
Chapter 7 Communication function
7-23
B) Receiving program : [Figure 7.12] shows an programming example to receive Read data frame(RD_DATA).
[Figure 7.12] Receiving program of Read data frame
Remark
[Note 1] Receiving flag is available only in Cnet Ver.1.1 or later. If Cnet version is below Ver. 1.1, use a faster
timer than transmission cycle in transmission station instead of the receiving flag.
If RD_DATA frame is received via RS-422 channel in the program of [Figure7.12], 24 byte data same as the
number of received data set in receiving Frame Editor is saved to %MB100 area set to ‘RD1’ and 24 is output to
LEN1 among LEN1~LEN4 indicating receiving data length.
[Figure7.13] shows variable setting screen of saving area RD1 of receiving data. 24 ARRAY variables are
allocated to %MB100 area with USINT ARRAY type. If ARRAY number is lower than RD1 number of receiving
frame registered, transmission is not available, thus it shall be at least the same.
As ARRAY area of
receiving frame is just one,
set unused receiving area
as of DUMMY variable to
Auto-memory area.
RX data area(RD1) : defines memory
area to save data received to RD1 area
registered to ARRAY in Frame Editor.
ARRAY number shall be set at least the
same as the number to transmit which is
registered in frame with data type set to
USINT ARRAY
Slot No.
Receiving channel
number:
No.1(RS-422)
Frame name
Executes receiving
Function Block only
when receiving via
receiving flag
which is turned
‘ON’ if ‘RD_DATA’
is received.
[Note1]