Basic function codes – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 272

API Library of Routines
Appendix B
BASIC Function Codes
B-141
The following Table B.B lists the BASIC function codes.
Table B.B
BASIC Function Codes
Function Name
Function
Number
Description
CC_INIT
0
Initialize Control Coprocessor library
DTL_INIT
1
Initialize DTL library
DTL_C_DEFINE
2
Define a DTL data definition
DTL_UNDEF
3
UnĆdefine a DTL data definition
DTL_DEF_AVAIL
4
Determine DTL definitions available
DTL_READ_W
5
Read data from the PLC
DTL_WRITE_W
6
Write data to the PLC
DTL_RMW_W
7
Perform read/modify/write on data
DTL_GET_WORD
8
Get a word from a byte array
DTL_GET_FLT
9
Get a floating point from a byte array
DTL_GET_3BCD
10
Convert a 3 digit BCD value to binary
DTL_GET_4BCD
11
Convert a 4 digit BCD value to binary
DTL_PUT_WORD
12
Put a word to a byte array
DTL_PUT_FLT
13
Put a floating point to a byte array
DTL_PUT_3BCD
14
Convert binary to 3 digit BCD
DTL_PUT_4BCD
15
Convert binary 4 digit BCD
DTL_SIZE
16
Get size of memory to store data item
DTL_TYPE
17
Get data type of Coprocessor data item
DTL_CLOCK
18
Set coprocessor clock to PLC clock
DTL_READ_W_IDX
20
Read any element from PLC data file
DTL_WRITE_W_IDX
21
Write any element to PLC data file
DTL_RMW_W_IDX
22
Read/modify/write any element from PLC file
BPI_DISCRETE
32
Get/Set discrete I/O word
BPI_WRITE
33
Allow Block Transfer Read
BPI_READ
34
Allow Block Transfer Write
MSG_READ_W_HANDLER
40
Initiate and process message read
MSG_READ_HANDLER
41
Initiate message read processing
MSG_WRITE_W_HANDLER
42
Initiate and process message write
MSG_WRITE_HANDLER
43
Initiate message write processing
MSG_CLR_MASK
44
Clear bit in the read/write masks
MSG_SET_MASK
45
Set bit in the read/write masks
MSG_TST_MASK
46
Test bit in the read/write masks
MSG_ZERO_MASK
47
Zero all bits in the read/write masks
MSG_WAIT
48
Wait for I/O completion of message
BASIC Function Codes