beautypg.com

ProSoft Technology MVI56E-LDM User Manual

Page 211

background image

ControlLogix Platform ♦ "C" Programmable

CIP API Functions

Linux Application Development Module

Developer's Manual

ProSoft Technology, Inc.

Page 205 of 264

March 12, 2014

OCXcip_SetModuleStatusWord

Syntax

int OCXcip_SetModuleStatusWord (OCXHANDLE apihandle,

WORD statusWord,

WORD statusWordMask);

Parameters

apihandle

handle returned by previous call to OCXcip_Open

statusWord

Module status data

statusWordMask

Bit mask specifying which bits in the status are to be modified

Description

OCXcip_SetModuleStatusWord

allows an application to set the 16-bit status

attribute of the module's Identity Object.

apiHandle

must be a valid handle

returned from

OCXcip_Open

.

statusWordMask

is a bit mask that specifies which bits in

statusWord

are written to

the module's status attribute. Standard status word bit fields are defined by
definitions with names beginning with

OCX_ID_STATUS_

. See the API header for

more information

Return Value

OCX_SUCCESS

Success

OCX_ERR_NOACCESS

apihandle

does not have access

Example

OCXHANDLE apiHandle;

/* Set the status to indicate a minor recoverable fault */

OCXcip_SetModuleStatusWord (apiHandle,
OCX_ID_STATUS_RCV_MINOR_FAULT,
OCX_ID_STATUS_FAULT_STATUS_MASK);