
5-15
5 Serial Gateway
CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit(W494)
5-3 Usin
g the Serial Gate
wa
y
5
5-3-3 U
s
ing the Ser
ial Gate
w
a
y F
uncti
on When Protocol Macro
s
Are
E
x
ecuted
The following user program example shows how to return the Serial Gateway to the not prohibited sta-
tus after the ExecPMCR instruction is executed and the sequence is completed. (This example uses
port number 1 of a Serial Communications Unit with unit number 2. Note that in this example, the
sequence number specified by the ExecPMCR instruction is not specifically indicated.)
z
Unit Settings
* Make sure the settings match the corresponding settings at the destination.
The default settings are Baud Rate: 9,600 bps, Start Bits: 1 bit, Data Length: 7 bits, Parity: Even par-
ity and Stop Bits: 2 bits.
z
LD
System-defined variable
User-defined variables (To be defined before or when creating a program)
5-3-3
Using the Serial Gateway Function When Protocol Macros Are
Executed
Name
Setting target
Setting
Unit Configuration
CPU/Expansion Racks in Con-
figuration and Setup of Sys-
mac Studio
Mount CJ1W-SCU22 in slot 0
of the CPU Rack.
Device name of this unit
SCU
Unit number
Unit number switch and Unit
Configuration (CPU/Expan-
sion Racks in Configuration
and Setup of Sysmac Studio)
Unit number 2
Serial Communications Mode
System Settings data
Protocol Macro Mode
Port setting
Default (*)
Name
Data type
Factory
setting
Comments
Details
_Port_isAvailable
BOOL
---
Network Communi-
cations Instruction
Enabled Flag
This flag becomes TRUE when
there are internal logic ports
available. This flag becomes
FALSE when there is no inter-
nal logic 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 setting
SendData
ARRAY[0..4] OF
WORD
[5(16#0)]
---
Send data
Содержание 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...