![background image](http://html1.mh-extra.com/html/omron/cj1w-scu22/cj1w-scu22_operation-manual_742498147.webp)
4-11
4 Using Protocol Macros
CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit(W494)
4-1
Over
vie
w
of t
h
e Pr
o
to
c
ol Mac
ro F
unc
tion
4
4-1-4 D
ata Exchange
Method f
or Link W
ords
When a Send command is executed ((1) in the above diagram), the read processing of data that
uses variables from the memory addresses used CJ-series Unit in the CPU Unit specified for the link
words is performed in the next I/O refreshing (2). The send message is compiled based on this data
(3), and then, the message is sent (4).
As a result, the actual send timing of the messages is not when the Send command is executed, but
when the next I/O refreshing with the CPU Unit occurs.
z
Continuous I/O Refreshing
I/O refreshing with the CPU Unit is continuously executed during execution of the ExecPMCR
instruction, regardless of the request from the Unit. When the Send/Receive command is executed,
the data from within the Unit is accessed and exchanged. This method is called continuous I/O
refreshing and is set by using a device variable for CJ-series Unit.
CPU Unit and the Unit for Continuous I/O refreshing is executed at the same timing as that of the
CPU Unit, in the same way as the On-request I/O refreshing.
When a Send command is executed in a step, the send message is compiled immediately based on
data read from the Unit, and the message is sent. Therefore, the actual message transmission is
performed immediately when the Send command is executed, without waiting for the next I/O
refreshing between the CPU Unit and the Unit.
The Recv command operation is similar. When the receive data is stored in the Unit, Receive com-
mand execution is completed. The data received is stored in the user-defined variable area at the
next I/O refresh with the CPU Unit.
CPU Unit
User program
User-defined variables
Receive data
Send data
Unit
Step 0
Step 1 (send)
(2)
(1)
Ex
ecution
IN
OUT
Receive data
Send data
I1
O1
Read and compile message
(4) Send
R (O1, 2)
Link word 1
ExecPMCR
Communications
sequence
This refresh timing is the next I/O refreshing when there is a
request from the Unit. (Send/Receive command is executed
within the communications sequence.)
(1) to (4) are performed in
order for the processing within
this dotted line.
Send message according
to Send command
ExecPMCR
CPU Unit
User program
User-defined
variables
Receive data
Send data
Unit
Step 0
Step 1 (send)
(2)
(1)
Ex
ecution
instr
uction
IN
OUT
Receive data
Send data
I1
O1
Read, compile message
(3) Send
R (O1, 2)
Link word 1
Communications
sequence
(1) to (4) are performed in
order for the processing
within this dotted line.
Send message according
to Send command
The refresh timing continuously refreshes I/O regardless of
any request from the Unit (using Send/Receive commands
in the communications sequence).