|
Topic: DMD0069 OPENTCP - Open TCP Connection |
|
|
|
|
|
The Open TCP Connection (OPENTCP) instruction is used to create a TCP Client connection to a TCP Server.
Note: Open TCP Connection (OPENTCP) is NOT used to communicate via Modbus/TCP protocol. This instruction is used to implement a custom protocol over a TCP/IP connection. Use the built-in Modbus/TCP Client instructions Modbus Network Read (MRX) and Modbus Network Write (MWX) to communicate via Modbus/TCP protocol.
Open TCP Connection (OPENTCP) is a Multi-Scan instruction.
The gray triangle at the right end of the input leg in the ladder display
indicates the input is edge
triggered
|
|
Parameters:Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.
TCP Device - designates which of the pre-configured TCP Client Connections to open.
Note: Before this instruction can select a TCP Client Connection, one must be configured. Part of the configuration for a TCP Client Connection is assigning it a name. It is that name which will show up in the TCP Device selection drop-down menu. For more information on configuring devices refer to the Device Configuration Section under System Configuration.
no devices available - indicates that there are no Devices that can execute this instruction. The most likely causes are there are no SMTP Devices configured, or the CPU does not have an onboard Ethernet port.
To IP Address - specifies the IP Address of the TCP Server to open a connection to. The IP Address can be specified in one of the two following ways:
TCP Port Number - specifies the IP Port number to use when opening the connection. This can be any positive integer between 1 and 65535, or any readable numeric location.
On Success: - designates one of the following two options if the Open TCP Connection operation is successful:
On Error: - designates one of
the following two options if the Open TCP Connection operation is unsuccessful:
|
|
|
|
|
See Also:
|
|
|
|
|
Related Topics:
|
|
|
|
|
Example Using Stages:
|
|
|
|
|
Rung Example:
|
|
|
|
|