Using Protocol Macros

Section 5-5

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).

Protocol

Communications sequence

Step 0

Step 1

Example: Reading the process values for a Temperature Controller

Transmission of process value reading message and reception of response message

Messages

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).

Command

CPU Unit

Send message (Example: PROCESS VALUE READ command)

 

SEND

 

 

 

 

Header Address

Send data

Check Terminator

 

 

 

 

code

 

 

Receive message (Example: Response)

RS-232C or

 

 

 

 

 

RECEIVE

 

 

RS-422A/485

 

 

 

 

 

Header Address

Send data

Check Terminator

 

 

 

 

code

 

Serial Communications Board

General-purpose external device

76

Page 87
Image 87
Omron CQM1H-SCB41 operation manual Protocol Structure, Receive