The Telnet interface allows sending and receiving data in RAW format. The interface is almost identical to the
TCP/UDP interface. However, unlike this, connections are kept open. Communication can also take place via a
serial interface.
Info: The interface automatically synchronizes with the slowest cycle of the assigned PLC. The telegrams are buffered by the system, so no telegram is lost.
The interface can be configured as a TCP client or as a TCP server. In addition, it is possible to transfer data via USB or serially. With the variable connect, the connection can be controlled. The variable is stored persistently, but in case of a connection failure, the variable is reset.
It should be noted that a timeout occurs if no data is exchanged. When the timeout is reached, after the repetition time has elapsed, a new connection is established. If the transfer timeout is set to 0, the connection will not be monitored. This configuration is not recommended for TCP connections.
Tip: The number of repetitions can be set to infinite by setting the value to -1.
| Variable | Description |
|---|---|
| Connection to the server. If the variable remains true, it will automatically repeat until the number of repetitions has been reached. Then the variable must be switched once to FALSE and then back to TRUE. Note that since the connection is asynchronous, you may need to wait until a response from the variable comes. | |
| Sends data to the interface. Communication must have taken place beforehand. See Data Preparation. | |
| Like send, but all telegrams are sent. This is useful for fast interfaces. | |
| Receives data from the interface. | |
| If there is no connection, this variable is true. |
| Variable | Description |
|---|---|
| Currently not used. | |
| Sends data to the interface. Communication must have taken place beforehand. See Data Preparation. | |
| Like send, but all telegrams are sent. This is useful for fast interfaces. | |
| Receives data from the interface. | |
| If there is no connection, this variable is true. |
The default line encoding is UTF-8. If other encodings are used, they can be set in the gateway under Advanced. Characters that are not supported will be attempted to be translated using alternative spellings. Otherwise, invalid characters will be discarded or replaced with a ?.
Note: Control characters and the header are also re-encoded.
The control character or line end is not sent to the PLC during transmission. In addition, this is appended after each telegram. It is not possible to omit it.
If a telegram without valid end is detected, it will be discarded and displayed accordingly in the monitor. The connection will then be re-established or interrupted.
If multiple different control characters are detected, they can be captured separated by a line break. Always sent with the first line break. This can also be empty.
| Escape Sequence | ASCII Abbreviation | Hex |
|---|---|---|
| \n | LF | 0A |
| \r | CR | 0D |
| \r\n | CRLF | 0D 0A |
| \0 | NUL | 00 |
| \t | TAB | 09 |
| \e | ESC | 1B |
| \f | FORMFEED | 0C |
| \x## | Arbitrary | ## |
The format of the character encoding can be set in the gateway under Advanced. The encoding is translated in both directions. Antcas Control always uses UTF-8 as standard.
A header can be sent after connection establishment. This can be configured in the gateway. On the server, a connection establishment is sent each time as an identifier. If a Telnet client is used, the message to the other side is sent upon connection establishment.
The message is transmitted including escape characters.