5-5SectionUsing Protocol Macros
76
5-5 Protocol Structure
Protocols consist of communications sequences. A sequence consists of steps.
These steps can be repeated, or they can be branched or ended depending on
the responses received. A step consists of a command, send/receive mes-
sages, processing results, and the next process (which depends on the proc-
essing results).
Communications
sequence
Example: Reading the process values
for a Temperature Controller
Transmission of process value reading message and
reception of response message
Step 0
Messages
Step 1
Protocol
A protocol consists of processing sequences (such as reading the process value
for a Temperature Controller) for a general-purpose external device. A se-
quence consists of a group of steps, each of which consists of a send/receive/
control command, send/receive message, processing result, and a next step
that depends on the processing results.
For example, with a sequence that reads the process value for a Temperature
Controller, the sequence sends the send message for the connected Tempera-
ture Controller (a character string in which the Process Value Read command is
inserted between the header + address and the check code + terminator) and
receives the receive message (a character string in which the Process Value
Read command response is inserted between the header + address and the
check code + terminator).
Serial Communications Board
RS-232C or
RS-422A/485
General-purpose external device
Send message (Example: PROCESS VALUE READ command)
Header Address Send data Check
code
Terminator
Receive message (Example: Response)
Header Address Send data Check
code
Terminator
CPU Unit
Command
SEND
RECEIVE