Returns, Description, C example – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual

Page 160

Advertising
background image

API Library of Routines

Appendix B

CC_PLC_BTR

B-29

This parameter returns a final completion status. Possible completion
status values are shown in the following table.

Value

Meaning

0

CC_SUCCESS = operation completed successfully

127

CC_E_NOATMPT = I/O operation not attempted; see status variable for reason

xxx

¬

PCCC_E_xxx = operation refused by the PLCĆ5 programmable controller

¬

See Table B.A for PCCC errors.

Returns

Status

Symbolic Name

Meaning

0

CC_SUCCESS

Operation successful

124

CC_E_FAIL

Expander not present

157

CC_E_NOTCONNECT

PLC is not connected or offline

165

CC_E_BAD_RACK

Rack value out of range

166

CC_E_BAD_GROUP

Group value out of range

167

CC_E_BAD_MODULE

Module slot value out of range

168

CC_E_BAD_RETRY

Retry value out of range

190

CC_E_SIZE

Invalid size for operation

Description

Use the CC_PLC_BTR function to get block-transfer information from
an analog I/O module. This function may take a long period of real time
to complete.

C Example

unsigned char rack = 0;

unsigned char group = 5;

unsigned char module = 0;

unsigned char size = 1;

unsigned iostat;

unsigned short buff;

.

.

.

status = CC_PLC_BTR (rack,group,module,size,1,&buff,&iostat);

if (!(status))printf (“value from module is %x\n”,buff[0]);

.

.

.

Advertising