![background image](http://html1.mh-extra.com/html/omron/cj1w-scu22/cj1w-scu22_operation-manual_742498183.webp)
4-47
4 Using Protocol Macros
CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit(W494)
4-3 Usin
g Pr
otoco
l Macr
o
s
4
4-3-2 U
s
er Prog
ram Example
Program Example
Determining the ExecPMCR instruction execution completion
ExecPMCR
instruction execution
Processing at normal end
Trigger reception
Communications parameters
settings
Inline ST
Inline ST
ExecPMCR_instance.Done
Trigger
Operating
1 InPort.UnitNo
:=_eUnitNo#_CBU_No02;
//Serial Communications Unit, Unit number 2
2 InPort.PhysicPortNo:=USINT#1;
//Port number 1
3 SendData[0]
:=WORD#16#0005;
4 SendData[1]
:=WORD#16#0003;
5 SendData[2]
:=WORD#16#C000;
6 SendData[3]
:=WORD#16#0000;
7 SendData[4]
:=WORD#16#0001;
8 RecvData[0]
:=WORD#16#0004;
Operating
SCU_P1_PmrExecSta SCU_P1_PmrSeqEndSta
SCU_P1_PmrSeqAbtSta
ExecPMCR_instance
InPort
Port
Execute
UINT#610
SeqNo
SendData[0]
SrcDat
DstDat
Busy
Done
Error
ErrorID
ErrorIDEx
RecvData[0]
_Port_isAvailable SCU_P1_PmrExecSta
ExecPMCR_instance.Busy
Operating
RS_instance
RS
OperatingEnd
Set
Q1
Reset1
OperatingEnd
ExecPMCR_instance.Error
1 //Processing at normal end
2 TmpData:=DWORD_TO_DINT(SHL(WORD_TO_DWORD(
3
RecvData[3]), 16) OR WORD_TO_DWORD(RecvData[2]) );
Inline ST
1 //Processing at an
error completion
2 ;
Processing at an error completion
ExecPMCR_instance.Error
SCU_P1_PmrExecSta
ExecPMCR
Содержание 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...