Active open procedure
Active open is a connection method that performs an active open processing in respect to an external device (Passive open)
that is in a passive open standby state for a connection. The following figure shows the process for the Ethernet-equipped
module to Active open.
For OPEN/CLOSE instruction, refer to the following.
MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
Ex.
Open/close processing for connection No.1
Open status
Open enable status
(closed)
Closed status
'Initial status'
(Un\G1900024.0)
OPEN instruction
OPEN instruction
completion device
OPEN instruction
completion device +1
CLOSE instruction
CLOSE instruction
completion device
CLOSE instruction
completion device +1
'Open completion signal
(connection No.1)'
(Un\G1900000.0)
'Open request signal
(connection No.1)'
(Un\G1900008.0)
After the module parameters are set, checks that the initial processing for the Ethernet-equipped module has completed normally. ('Initial status'
(Un\G1900024.0): On)
Start the open processing using the OPEN instruction.
The Ethernet-equipped module executes the open processing. (The module sends open request (SYN) to the external device.)
Data can be exchanged after the open processing completes normally.
Start the close processing using the CLOSE instruction. ('Open request signal (connection No.1)' (Un\G1900008.0): Off)
The Ethernet-equipped module executes the close processing. (The module sends close request (FIN) to external device.)
Data communication ends when close processing completes normally.
*1 If RST is returned from the external device after SYN is sent from the Ethernet-equipped module, open abnormal completion occurs
immediately, and the open processing ends.
*2 If ACK or FIN is not returned even after the TCP end timer time, the Ethernet-equipped module forcibly cuts off the connection (sends
RST). (Close abnormal completion)
*3 If the open processing target port has not been linked up, the OPEN instruction will complete with an error. Execute the open processing
again after link-up, or check that 'Connection status' (Un\G5192) is set to 1 before starting the open processing. If auto-negotiation fails,
the open processing will complete with an error. Retry the open processing after a while.
If the open processing completes with an error again, check the Ethernet cable connection or the operation of the external device and
switching hub.
APPX
380
Appendix 5 TCP/IP Communications, UDP/IP Communications
Parameter
communications
Power-on
completed
Ò
*3
('Open request signal (connection No.1)' (Un\G1900008.0): On)
Ó
1 scan
Abnormally ended
Ö
ACK
SYN
Ô
SYN + ACK
Õ
*1
*2
1 scan
Abnormally
ended
ACK
FIN
Ø
×
FIN + ACK