Bpi_discrete – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 134
![background image](/manuals/579606/134/background.png)
API Library of Routines
Appendix B
BPI_DISCRETE
B-3
Gets the updated output-image word and optionally sets the input-
image word.
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 short BPI_DISCRETE (mode, input_img)
int mode;
unsigned short input_img;
Parameters
mode
Specifies whether or not the function sends a new value to the
programmable controller input image table using NO_MODIFY or
MODIFY (defined in COPRO.H).
Important: If the mode parameter is invalid (i.e. does not equal MODIFY
or NO_MODIFY), then the function will force the mode to NO_MODIFY.
It is difficult to return an error in this case because the expected return is
the output-image value from the programmable-controller data table.
input_img
The value sent to the programmable-controller input-image table at the
address corresponding to the control coprocessor’s physical address
(according to rack and slot).
Returns
Variable
Meaning
out_img
The programmable controller's outputĆimage word for the control coprocessor
Description
Use the BPI_DISCRETE function to return the programmable controller’s
updated output-image word for the control-coprocessor backplane I/O slot.
The function can also update the control-coprocessor input-image word in
the programmable-controller input image using the
input_img
parameter.
BPI_DISCRETE