![background image](http://html1.mh-extra.com/html/omron/cj1w-scu22/cj1w-scu22_operation-manual_742498178.webp)
4 Using Protocol Macros
4-42
CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit(W494)
The following diagram shows an example in which sequence number 610 (Variable Area Read) of the
CompoWay/F Master Protocol is executed by using the protocol for an OMRON component connected
to port 1 (RS-422A/485) of the CJ-series Serial Communications Unit.
z
Connections
z
Setting User-defined Variables
Define input variable SrcDat (Send Data Area) and output variable DstDat (Receive Data Area) of
ExecPMCR instruction.
User-defined variable of Send Data Area
Variable name: SendData, Data type: ARRAY[0..4] OF WORD (five words)
User-defined variable of Receive Data Area
Variable name: RecvData, Data type: ARRAY[0..3] OF WORD (four words)
The details of send/receive word allocation for Sequence No. 610 (Variable Area Read) are shown
below.
In this example, the details of send data SendData[] and receive data RecvData[] are as shown below.
4-3-2
User Program Example
Send data Word data array
Receive data Word data array
SendData[0]
Number of send data words
RecvData[0]
Number of receive data
words
SendData[1]
Not used
Node No.
RecvData[1]
Response code
SendData[2]
Variable type
RecvData[2]
Receive data
SendData[3]
Read start address
RecvData[3]
Receive data
SendData[4]
Number of elements
Serial Communications Unit
Unit number 2
RS-422A/485
Send data
Receive data
Temperature
Controller E5
@
N
Node No. 00
Temperature
Controller E5
@
N
Node No. 01
Temperature
Controller E5
@
N
Node No. 03
Specifies the Temperature Controller Node
No., sends the Present Value Read command
send data, and receives the present value
set in the response in the specified word.