![background image](http://html1.mh-extra.com/html/omron/cj1w-scu22/cj1w-scu22_operation-manual_742498070.webp)
1 Introduction
1-30
CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit(W494)
When a standard system protocol (provided in the Serial Communications Unit, and CX-Protocol) is
executed
Using Standard System Protocols
1
Creating the User-defined Variable to Store Send/Receive Data
Create a word-type array variable to be set as the input parameter in input variable SrcDat, and
in-out variable DstDat, of the ExecPMCR instruction. Reserve the number of array elements
(size) that are required.
2
Setting the Send Data
Refer to Send Data Allocation in R-1-1 Using Standard System Protocols and set the number of
send data words to the starting element of SrcDat and the send data to the second and subse-
quent elements.
3
Coding ExecPMCR Instruction
Example) The following example shows how to use a Serial Communications Unit to read and
store the present values of E5
@
N Temperature Controller by using the CompoWay/F Master
standard system protocol sequence No. 610: Variable Area Read.
If the Input condition is TRUE when the Protocol Macro Executing Flag (*_P2_PmrExecSta) is
FALSE and the Network Communications Instruction Enabled Flag (_Port_isAvailable) is TRUE,
communications sequence No. 610 of the standard system protocol in the Serial Communica-
tions Unit is called, and data is sent and received via port 2 of the Serial Communications Unit.
For the details of the above example, refer to Section 4-3-2 User Program Example.
Protocol Macros
Unit
Uses standard system protocol No. 600
ExecPMCR
CPU Unit
External device
Example: K3N Series
Digital Panel Meter
Input
condition
Protocol Macro
Executing Flag
*_P2_PmrExecSta
Network Communications
Instruction Enabled Flag
_Port_isAvailable
InPort
Port
Execute
UINT#610
SeqNo
SendData[0]
SrcDat
DstDat
DstDat
Busy
Done
Error
ErrorID
ErrorIDEx
RecvData[0]
ExecPMCR
ExecPMCR_instance
Содержание 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...