
5-29
5 Serial Gateway
CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit(W494)
5-5 Serial Gate
wa
y
5
5-5-1 Ser
ial Gate
w
a
y Ex
ecu
ti
on T
iming f
o
r Protocol Macros
5-5
Serial Gateway
The execution timing for the Serial Gateway during execution of protocol macros is described here. The
operation when the command is received with the Serial Gateway enabled during Protocol Macro Mode
is as follows:
•
Next step contains the Receive command: Priority is given to the Receive command, and the Serial
Gateway is executed in the next step. The reception buffer is cleared during transfer processing using
the Serial Gateway. Therefore, when the command is received, and the command in the following
step is the Receive command, the Receive command takes priority over the Serial Gateway.
•
Next step contains any command except the Receive command (Send, Send&Recv, Wait, Flush,
Open, or Close): Priority is given to the Serial Gateway, for which conversion, transmission, and
response reception processing is executed using interrupts between steps. The Serial Gateway is
executed using interrupts between steps. The interrupts are not executed within a step. (Therefore,
the Serial Gateway is never executed after the Send command in a Send&Recv command.)
The processing flowchart is as follows:
The details of the processing flow are as follows:
z
Protocol Macro Priority over Serial Gateway
When the Serial Gateway is enabled during protocol macro mode and a command is received and if
the command in the next step is a Receive command, this next step will be executed without execu-
tion of conversion, transmission, and response reception processing for the Serial Gateway.
After the step containing the Receive command is completed, if the next step contains any com-
mand except the Receive command (Send, Send&Recv, Wait, Flush, Open, or Close), the protocol
macro communications sequence is temporarily suspended before the next step is executed, and
the FINS command conversion and transmission is executed on an interrupt between steps using
the Serial Gateway.
Until the response is received, the command in the step is not executed. After the response is
received, the protocol macro is resumed, and execution is started from the communications
sequence step that was suspended.
The step that is executing when a command is received is not interrupted. Therefore, if the Wait
command is executing, the Serial Gateway will not be executed.
5-5-1
Serial Gateway Execution Timing for Protocol Macros
Serial Gateway enabled, command received
Any command except Receive
Receive command
The next queued step is executed.
Command in
next step
Receive command takes
priority, and the next step is
executed.
Serial Gateway takes priority and
conversion, transmission, and re-
sponse reception processing is exe-
cuted on an interrupt between steps.
Содержание CJ1W-SCU22
Страница 192: ...4 Using Protocol Macros 4 56 CJ series Serial Communications Units Operation Manual for NJ series CPU Unit W494...
Страница 250: ...6 No protocol Mode 6 22 CJ series Serial Communications Units Operation Manual for NJ series CPU Unit W494...
Страница 460: ...A Standard System Protocol R 126 CJ series Serial Communications Units Operation Manual for NJ series CPU Unit W494...
Страница 473: ...Index 1 CJ series Serial Communications Units Operation Manual for NJ series CPU Unit W494 I Index...