Bpi_write – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 139

API Library of Routines
Appendix B
BPI_WRITE
B-8
Responds to a synchronous block-transfer read from a
programmable controller.
Important: Only a single task should use the BPI functions. A second
calling process is put to sleep if the BPI is already in use. The second task
could time out unexpectedly.
C Syntax
#include
unsigned BPI_WRITE (size,src,timeout,trg_mask)
unsigned char size;
short *src;
unsigned int timeout;
unsigned short trg_mask;
Parameters
size
Determines how many words the programmable controller
will receive.
src
Provides the address of the buffer containing the data that the
programmable controller will receive.
timeout
Function timeout in seconds. The application program sleeps until the
function completes or times out. A value of 0 causes the function to use
the minimum value of 1 second. The maximum value is TOMAX
(0x 3fff).
trg_mask
Use this word mask to inform a programmable controller to initiate a
block-transfer read to the control coprocessor. The ladder-logic
program in the programmable controller monitors this mask to trigger
the block transfer. The bit mask is the actual input-image word for the
rack and slot location of the control coprocessor. If the parameter is
null, then it won’t attempt to send the bit mask to the programmable
controller before the BPI_WRITE.
BPI_WRITE