![background image](http://html1.mh-extra.com/html/omron/cj1w-scu22/cj1w-scu22_operation-manual_742498247.webp)
6-19
6 No-protocol Mode
CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit(W494)
6-
3 Usin
g Serial P
o
rt
I/O Ins
truct
ion
s
6
6-3-2 Instr
u
ction Ex
ecution Metho
ds
z
ST
System-defined variable
User-defined variables (To be defined before or when creating a program)
Device variables for CJ-series Unit (To be created on the I/O Map View
window after the unit configuration is created)
Program Example
//Detection of rising edge of trigger
IF ( (Trigger=TRUE) AND (LastTrigger=FALSE) AND (_Port_isAvailable=TRUE) AND (Barc
orde_P2_NopRcvCompleteSta =TRUE) AND (SerialRcv_instance.Busy=FALSE) ) THEN
OperatingStart:=TRUE;
Operating:=TRUE;
END_IF;
LastTrigger := Trigger;
//Communication parameters settings and SerialRcv instruction initialization
Name
Data
type
Factory
setting
Comments
Details
_Port_isAvailable
BOOL
---
Network Communications
Instruction Enabled Flag
This flag is TRUE when there
are internal logical ports
available, FALSE when there
is no internal logical port
available.
Name
Data type
Factory setting
Allo-
cated
address
(AT)
Details
Trigger
BOOL
False
---
Execution conditions
LastTrigger
BOOL
False
---
Trigger value of previ-
ous task period
OperatingStart
BOOL
False
---
Start processing
Operating
BOOL
False
---
Processing
InPort
_sPORT
(UnitNo:=_CBU_No0
0, PhysicPortNo:=0)
---
Port specification
RecvDat
ARRAY [0..12] OF
BYTE
[13(16#0)]
---
Receive data
RecvSize
UINT
0
---
Receive data size
RecvStringDat
STRING[255]
''
---
Bar code (string)
Code
ULINT
0
---
Bar code (integer)
SerialRcv_instance
SerialRcv
---
---
---
Name
Data
type
Fac-
tory
setting
Address
Comments
Details
Barcode_P2_NopRc
vCompleteSta
BOOL
---
IOBus://rack#0/slot
#
0/P2_NopSta/P2_N
opRcvCompleteSta
Port 2: Reception
Completed Flag
This flag is TRUE
when the receiving
is complete.
Содержание 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...