94
4 DATA COMMUNICATION USING BIDIRECTIONAL PROTOCOL
4.1 Receiving Data from Target Device
• Received data can also be read using interrupt programs.(Page 219 RECEIVING DATA WITH AN
INTERRUPT PROGRAM)
Note that if the reading of data received from the same interface is to be performed, it is not possible to
combine the reading of received data by the main program and that by the interrupt program.
Use either of the above program to read the data received.
• The SPBUSY instruction is used to read the execution status when using a dedicated instruction. (Page
520 Dedicated Instructions)
• More than one BIDIN instruction cannot be executed simultaneously on the same interface.
Execute the next BIDIN instruction only after the execution of the first BIDIN instruction is completed.
• When the send/receive data quantity is set in byte units and the receive data quantity is an odd byte when
requesting the reading of received data to the CPU module, 00H is stored in the higher byte of the last data
storage position in the receive area where received data is stored.
C24
D10
Dm
D0
D1
D2
D3
D4
(1)
(0)
(n)
(10)
Address Buffer memory
Data reception result
For normal completion
I/O No.
Interface number
Receive data count
Allowable receive data count
Reception result
Receive data count
Received data
Received data
Received data
* When the received data count is larger than the
allowable received data count, only the data up to
the allowable received data count will be stored
and the rest of the data will be discarded.
Un\G600
Un\G1536
Un\G1537
Un\G2047
to
to
to