Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 119

Chapter 7
Using the Serial Ports
7-11
d.
Use
_gs_rdy()
to verify that the data coming into the input
buffer is the same as the data that was transmitted.
e.
After all the data is transmitted, turn the transmitter off.
f.
Clear the input buffer.
g.
Wait for new data to come into the input buffer.
h.
Read the new data in the input buffer.
or use the sample code on page 7-12.
There may be many transmitters and receivers connected together on
an RS-485 network. If there is more than one transmitter on your
network, disable the transmitter when the coprocessor is not
transmitting and include collision detection. Use
_ss_enrts()
to
disable the transmitter; use
_ss_dsrts()
to enable the transmitter.
You cannot disable the receiver. This means that the control
coprocessor and serial expander receive all data that is transmitted
and store that data in the input buffer. Make sure the input buffer
does not overflow; if it does overflow, the buffer is locked until you
execute an OS-9
deiniz
and
iniz
command. Use the
_gs_rdy()
function to determine how many characters are in the input buffer.
Use the input buffer to verify that all of the data was transmitted
before turning the transmitter off.