Contact Us

CATEGORIES

Whoops…Nothing found

Try other keywords in your search

TcpClient

 1 Minute

 0 Likes

 231 Views

TCP client module for sending and receiving TCP data in PIXERA.

The module opens a TCP client connection to a configured target IP and port. It can optionally append carriage return (CR) and line feed (LF) delimiters to outgoing messages. When CR and/or LF are enabled, incoming packets are expected to use the same delimiter format.


Usage

Use this module when PIXERA needs to communicate with an external device, application, service, or controller over TCP as a client.

Typical use cases include sending string commands to a TCP server, receiving response messages, and exposing the connection state to other module logic. The module can bind to a selected local adapter and can be initialized manually or through the Auto Init property.


Procedure

  1. Set IP to the target TCP server address.
  2. Set Port to the target TCP server port.
  3. Select Adapter IP if the machine has multiple network adapters. Use Any when no specific local adapter is required.
  4. Enable Add Carriage Return <CR> and/or Add Line Feed <LF> if the connected device expects line-delimited commands.
  5. Run init to start the TCP client connection.
  6. Use send with a string message to transmit data.
  7. Connect logic to receive to handle incoming TCP messages.
  8. Use IsConnected internally to read or update the current connection state.
  9. Run uninit to close the network connection and release the module helper objects.

If send is called while the module is not connected, the module calls init before sending. The configured delimiter is appended to each outgoing message.


Data

Actions

Action Info Input Output
ref Returns a reference to the module instance. - self
init Initializes the module, loads helper/network libraries, reads properties, configures TCP, sets packet delimiter, and starts the network client. - -
uninit Closes the network connection and resets helper, property, init, and lock state. - -
send Sends a TCP message. If the module is not connected, it initializes first. The configured delimiter is appended automatically. msg (string) -
receive Callback/output action for incoming TCP data. - msg (string)
IsConnected Internal status attribute for the TCP connection state. isConnected (bool), doSet (bool) connected (bool)

Properties

Name Content Type Hint Options Source Options Action
IP 127.0.0.1 string
Port 4352 number
Adapter IP Any string Utils.Network.getLocalAdapterEntries
Add Carriage Return <CR> true bool self.init
Add Line Feed <LF> true bool self.init
Auto Init false bool
Description TCP client module for sending and receiving TCP data. When sending CR and LF, it is automatically expected that incoming data will also contain CR and/or LF in the same way. string
Author AV Stumpfl GmbH string
Logo Embedded image in module JSON image
Url https://help.pixera.one url
Version 2.4 number

Module Version 2.4 | 6 July 2026 | AV Stumpfl GmbH

Was this article helpful?