1546
16 ETHERNET INSTRUCTIONS
16.1 Open/Close Processing Instructions
■Applicable devices
*1 FX and FY cannot be used.
*2 FD cannot be used.
*3 T, ST, C, and FD cannot be used.
■Control data
• These instructions close the connection specified by (s1) of the module specified by (U).
• The execution status and the completion status of the CLOSE instruction can be checked with the completion device (d)
and the completion status indication device (d)+1.
• The following figure shows the operation at completion of the CLOSE instruction.
• The CLOSE instruction is executed on the rising edge (OFF to ON) of the close command.
• For the same connection, do not perform open and close processing using the OPEN and CLOSE instructions concurrently
with open and close processing using other means. Concurrent use results in a malfunction.
• If a connection for which the OPEN instruction is in execution is specified in TCP Unpassive/Fullpassive open mode, an
error (C1B2H: OPEN/CLOSE instruction is in execution for the specified connection) occurs.
Operand Bit Word Double word Indirect
specification
Constant Others
(U)
X, Y, M, L,
SM, F, B,
SB, FX, FY
J\ T, ST, C, D, W,
SD, SW, FD,
R, ZR, RD
U\G, J\,
U3E\(H)G
Z LT, LST,
LC
LZ K, H E $
(U) GP.CLOSE
ZP.CLOSE
(s1)
*1
*2
(s2)
*2
(d1)
*1
*3
Operand: (s2)
Device Item Description Setting range Set by
+0 System area
+1 Completion status The completion status is stored upon completion of the instruction.
• 0: Completed successfully
• Other than 0: Completed with an error (error code)
System
• Completion device (d)
This device turns on during END processing of the scan where the CLOSE instruction completes, and turns off during the next END processing.
• Completion status indication device (d)+1
This device turns on or off depending on the completion status of the CLOSE instruction.
When completed successfully: The device remains off.
When completed with an error: The device turns on during END processing of the scan where the CLOSE instruction completes, and turns off during the next
END processing.
END0 END0END0END0
OFF
OFF
OFF
OFF
ON
ON
Sequence scan
CLOSE instruction
Completion device (d)
Completion status
indication device (d)+1
Completed with an error
Completed successfully
1 scan
Closing a connection
Execution of theinstruction