Dtl_put_word – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 190
Advertising
![background image](/manuals/579606/190/background.png)
API Library of Routines
Appendix B
DTL_PUT_WORD
B-59
Puts a word into raw format.
C Syntax
#include <copro.h>
unsigned DTL_PUT_WORD (in_val, out_buf)
unsigned char in_val;
unsigned *out_buf;
Parameters
in_val
The word value to be encoded into the byte array.
out_buf
Specifies an array of two bytes to receive the converted value.
Returns
Status
Symbolic Name
Meaning
0
DTL_SUCCESS
Operation successful
Description
Use the DTL_PUT_WORD to convert a control-coprocessor unsigned to
a 2-byte array (in programmable-controller format) and place it in the
2-byte array.
C Example
unsigned status;
unsigned char untyped_data[50];
unsigned word_val;
.
.
.
status = DTL_PUT_WORD (word_val, &untyped_data[10]);
DTL_PUT_WORD
Advertising