3.3 Sample Program
H8GN
3-11
JProtocol macro
The protocol macro function uses the PMCR command in a ladder proĆ
gram to execute a data send/receive sequence (protocol) with various comĆ
munications devices such as generalĆpurpose components connected to
the RSĆ232C or RSĆ422A/RSĆ485 interface to control the device.
Standard system protocol is preĆinstalled on Serial Communications
Board/Unit for enabling control of OMRON components (e.g. controllers
and temperature control units).
For details on protocol macros, refer to the CS1WĆSCB21/41/ĆSCU21
User's Manual" (Cat. No. W336).
Use port 2 on the Serial Communications Board (CS1WĆSCB41) for direct
connection to the RSĆ485.
CPUunit
CS1H
Serial Communications Board
CS1WĆSCB41
Port 2
RSĆ485
Set the TERM switch on the Serial Communications Board to ON and the
WIRE switch to 2". Attach a terminator to H8GN.
Read the PV of H8GN using sequence No. 600 send/receive with ASCII
conversion (response ON)" of the standard system protocol CompoWay
/F Host" built into the Serial Communications Board.
PMCR
#02E1
#0258
D01000
D01500
FAL(06) 01
Input
condition
000000
Network
communication
command
executable" flag
A20200
Protocol macro
in progress" flag
191915
Network
communication
error" flag
A21900
Communication port 0
Serial port 2
Destination address E1
(serial communication board)
Sequence No. 0258H (=600)
First word address for transmission data
First word address for reception data
The PV is stored to D01502 and D01503 if the read PV command is set to
D01000 onwards.
If a communications error occurs, execute the FAL command (continue
operation and analyze trouble command).
F What is a protoĆ
col macro?"
Connection
Sample ladder
program