
6-17
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
The default settings are Baud Rate: 9,600 bps, Start Bits: 1 bit, Data Length: 7 bits, Parity: Even parity
and Stop Bits: 2 bits.
z
Processing of receive data
The data stored in RecvDat[] is a bit string consisting of character codes that correspond to the individ-
ual character values of the bar code. One array element of RecvDat[] corresponds to one bar code
character. First, the characters are converted to the character string RecvStringDat by using the Ary-
ToString instruction. Next, RecvStringDat is converted to the ULINT integer code by using the
STRING_TO_ULINT instruction.
z
LD
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)
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
Allocated
address
(AT)
Details
OperatingEnd
BOOL
False
---
Process completed
Trigger
BOOL
False
---
Execution conditions
Operating
BOOL
False
---
Processing
InPort
_sPORT
UnitNo:=_CBU_No00,
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)
RS_instance
RS
---
---
---
SerialRcv_instance
SerialRcv
---
---
---
Name
Data
type
Fac-
tory
setting
Allocated address
(AT)
Comments
Details
Barcode_P2_Nop
RcvCompleteSta
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.
BYTE data type array
STRING data type
ULINT type
RecvDat[0]
BYTE#16#34 AryToString
RecvStringDat STRING_TO_ULINT
Code
RecvDat[1]
BYTE#16#39
'4901 '
ULINT#4901
RecvDat[2]
BYTE#16#30
RecvDat[3]
BYTE#16#31
Содержание 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...