20 SERIAL COMMUNICATION INSTRUCTIONS
20.8 Receiving Data Using an Interrupt Program
1697
20
■Receive data
*1 The amount of the data to be received must be set in units as specified in the engineering tool. For byte specification, set the number of
bytes. For word specification, set the number of words.
• The data received from the external device is stored in the specified device.
• The receive data can be read without considering the address of the receive area of the buffer memory.
• When the Z.BUFRCVS instruction is executed, receive completion takes place; the receive read request signal (Xn3/XnA)
or receive error detection signal (Xn4/XnB) turns off automatically. If the receive has been read using the Z.BUFRCVS
instruction, the receive read completion signal (Yn1/Yn8) does not need to be turned on.
• The Z.BUFRCVS instruction is used in the interrupt program, and processing completes within one scan.
• The following figures show how the Z.BUFRCVS instruction operates when its execution completes.
Operand: (d)
Device Item Description Setting range Set by
+0 Receive data length Used to store the amount of data that was read from the data storage area for
amount of receive data.
*1
System
+1 to n Receive data Used to store the data, in ascending order of the address, that was read from the
receive data storage area.
System
0 END
Sequence scan
Z.BUFRCVS instruction
Execution of the instruction
Interrupt program
Storing receive dataReceiving data