Chapter 7 Automatic Sending/Receiving function (ASR)
Sample program 5
To close the connection with "Close mode control" enabled
Slot No.
0 1
2
(for EH-CPU)
EH-ETH2
* -
-
FUN201 for reading out SR
FUN201 (WM000)
(00004)
(00002)
WM003 = H2
WM004 = H2F
ADRIO = (WM005, R100)
ADRIO = (WM006, WM10)
WM007 = 13
R100 = 1
(00003)
R100
S
Reading out SR at R100 = 1
R100
Setting parameter of FUN201(s) for reading out SR.
Request to read out SR
Area setting (unit:0, slot:0)
Control bit address is R100
Transmission I/O address is starting from WM10
Transmission data size is 13 words
Setting 1 to control bit for reading SR
R7E3
(00005)
R12
Request to close connection 4 when R11 is 1 or
EH-ETH2 receives a request from another station
(M1A6=1).
R11
M1A0
Set 1 to “Request to close bit” for connection 4.
Set 1 to “request to write CR bit”.
Set 0 to “request to open contact” (R11).
Enable the circuit for cancellation the request to close.
(00007)
M21B = 1
R103 = 1
R11 = 0
R13 = 1
R12
(00011)
R7E3
WM00B = H3
WM00C = H0
ADRIO = (WM00D, R103)
ADRIO = (WM00E, WM20)
WM00F = 10
FUN201 (WM008)
(00012)
Parameters setting of FUN201(s) for writing CR.
Request to write CR.
Area setting (unit:0, slot:0)
Control bit address is R103.
Transmission I/O address is starting from WM20.
Transmission data size is 10 words.
FUN 201 for writing CR.
R12
R11 = 0
(00006)
(00008)
TD12
Timer counting from the request to close.
R13
0.1
10
(00009)
R14
Set 1 to R14 if the connection 4 is not closed after 1
second.
TD12
M1A0
Clear “request to close bit” for connection 4.
Set 1 to “request to write CR bit”.
Disable the circuit for cancellation the request to
close.
(00010)
R13
M21B
R14
M21B = 0
R103 = 1
R13 = 0
Cancellation the request to close if the connection 4 is
closed (M1A0=0).
M1A0
R7E3
M293 = 1
(00001)
“Close mode control” for connection 4 is enabled.
M1A6
M21B
7-15