beautypg.com

ProSoft Technology MVI56E-LDM User Manual

Page 190

background image

CIP API Functions

ControlLogix Platform ♦ "C" Programmable

Developer's Manual

Linux Application Development Module

Page 184 of 264

ProSoft Technology, Inc.

March 12, 2014

OCXcip_SetModuleStatus

Syntax

int OCXcip_SetModuleStatus (OCXHANDLE apihandle, int * status);

Parameters

apihandle

handle returned by previous call to OCXcip_Open

status

Module status, OK or Faulted

Description

OCXcip_SetModuleStatus

allows and application to set the status of the module to

OK or Faulted. .

apihandle

must be a valid handle returned from

OCXcip_Open

.

state must be:

OCX_MODULE_STATUS_OK

,

OCX_MODULE_STATUS_FLASHING

, or

OCX_MODULE_STATUS_FAULTED

If the state is OK, the module status LED indicator is set to Green.
If the state is Faulted, the status LED indicator is set to Red.
If the state is Flashing, the status LED indicator will alternate between Red and
Green approximately every 500ms. Note that flashing is not available if

OCXcip_openNM

was used to obtain handle.

Return Value

OCX_SUCCESS

The LED was set successfully

OCX_ERR_NOACCESS

apihandle

does not have access

OCX_ERR_BADPARAM

status is invalid

Example

OCXHANDLE apiHandle;

/* Set the status LED indicator to Red */

OCXcip_SetModuleStatus (apiHandle, OCX_MODULE_STATUS_FAULTED);