A - 39
Appendices
NX-series Communications Interface Units User’s Manual (W540)
A-4 Programming Samples
A
A-4-4 Programming Sample 3: Receiving Data
The following figure shows a timing chart for the main variables.
Each time the Input SID is incremented and input data is received
from the CIF Unit, the input data is
stored in RcvDat (receive data storage area).
If a parity error or other communicati
ons error occurs and the value of N1_Ch1_Receive_Data_Error_-
Flag changes to TRUE, the receive
data is assumed to be incorrect until the value of N1_Ch1_Re-
ceive_Last_Data_Flag changes
to TRUE. The incorrect received data is not stored in RcvDat.
Timing Chart
E001_NX_Unit_I_O_Data_Active_Status_125
NX Unit I/O Data Active Status
N1_Ch1_Input_SID
Ch1 Input SID
N1_Ch1_Receive_Data_Flag
Ch1 Receive Data Flag
N1_Ch1_Receive_Last_Data_Flag
Ch1 Receive Last Data Flag
N1_Ch1_Receive_Data_Error_Flag
Ch1 Receive Data Error Flag
RcvDone
Reception completed flag
RcvError
Reception error flag
RcvDat
Receive data storage area
Communications
error occurs.
Final data received.
Receive data is stored
in RcvDat.
Receive data is not
stored in RcvDat.
01Hex 02Hex 03Hex 04Hex 05Hex 06Hex