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

Page 163

Advertising
background image

API Library of Routines

Appendix B

CC_PLC_BTW

B-32

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

141

CC_E_CNVT

DataĆconversion error (BASIC only)

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_BTW function to put block-transfer information to 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;

.

.

.

buff = 0x23;

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

if (!(status))printf (“data sent to module\n”);

.

.

.

Advertising