Chapter 7 Automatic Sending/Receiving function (ASR)
Sample program 4
To close the connection to other station
Slot No.
0 1
2
(for EHV-CPU)
EH-ETH2
* -
-
SCRW for reading out SR
SCRW (WM000, R100)
(00003)
(00001)
WM003 = H2
WM004 = H2F
DM005 = ADR (WM10)
WM007 = 13
R100 = 1
(00002)
R100
S
Reading out SR at R100 = 1
R100
Setting parameter of SCRW(s) for reading out SR
*1
.
Request to read out SR
Area setting (unit:0, slot:0)
Transmission I/O address is starting from WM10
Transmission data size is 13 words
Setting 1 to control bit for reading SR
R7E3
(00004)
R12
Request to close connection 2 by R11 = 1.
Check the status of connection 2 (M180)
R11
M180
Set 1 to “Request to close bit” for connection 2
Set 1 to “request to write CR
*2
bit”
Set 0 to “request to open contact” (R11).
Enable the circuit for cancellation the request to close.
(00006)
M219 = 1
R103 = 1
R11 = 0
R13 = 1
R12
(00010)
R7E3
WM00B = H3
WM00C = H0
DM00D = ADR (WM20)
WM00F = 10
SCRW (WM008, R103)
(00011)
Parameter area setting of SCRW (s) for writing CR.
Request to write CR.
Area setting (unit:0, slot:0)
Transmission I/O address is starting from WM20.
Transmission data size is 10 words.
SCRW for writing CR.
R12
R11 = 0
(00005)
(00007)
TD12
Timer counting from the request to close.
R13
0.1
10
(00008)
R14
Set 1 to R14 if the connection 2 is not closed after 1
second.
TD12
M180
Clear “request to close bit” for connection 2.
Set 1 to “request to write CR bit”.
Disable the circuit for cancellation the request to close.
(00009)
R13
M219
R14
M219 = 0
R103 = 1
R13 = 0
Cancellation the request to close if the connection 2 is
closed (M180=0).
M180
M219
*1: SR is abbreviation of Status Register
*2: CR is abbreviation of Control Register.
See "Chapter 8 Register Structure" for detailed.
7-13