Chapter 6 Communication Mode
6 - 37
Mod
b
u
s M
a
ster
[EHV-CPU]
(2) Sample program description
The s parameter and the sending data area parameter are set upon the first scan.
M0 will be turned on at the 2nd scan, and initial setting for port 2 of slot 2, unit 3 will be performed.
When R100 is turned on, then the state of the coil for 16 bits are read from an address H0010 of the slave No.05.
Response data will be stored in WR200. Bit X3229 is a status flag of EH-SIO. When initial setting is completed,
this flag will be ON.
The contents of initial setting
Items
Setup value
Setup contents
Communication mode
H0010
Modbus master mode
Modbus transmission mode
H0000
RTU mode
Receiving timeout time
50
500 ms
TRNS 9 ( WY325 , WR0 , M0 )
WR7 = H0000
…
Initial setting command
WR8 = 200
…
Command timeout time
DR9 =ADR(WR100)
…
I/O address of sending data area
( WR100 )
DRB = ADR(WR200)
…
I/O address of receiving data area
( WR200 )
WRD = H0400
…
Size of receiving data area
R7E3
s parameter
TRNS 9 command
WR100 = H0006
…
No. of send data (byte)
WR101 = H0010
…
Communication mode
WR102 = H0000
…
Modbus transmission mode
WR103 = 50
…
Receiving timeout time
R7E3
Sending data area
(Parameter for initial
setting)
R7E3
M0
S
DIF
TRNS 9 command
execution
For initial setting
R100 = 0
WR100 = H0006
…
No. of send data (byte)
WR101 = H0501
…
Device No
,
Function code
WR102 = H0010
…
Starting address of coil
WR103 = 16
…
The number of coils
WR7 = H0080
…
Query send command
M0 = 1
Set query data.
Start TRNS 9 command.
R100 X3229
Summary of Contents for EH-150 Series
Page 2: ......
Page 10: ...M E M O ...
Page 30: ...Chapter 4 Installation 4 10 M E M O ...
Page 156: ...Chapter 7 System setup 7 12 M E M O ...
Page 164: ...Chapter 8 Daily and Periodic Inspection 8 8 M E M O ...