Configure Custom Communication Service - TCP Client

You are currently viewing the documentation for the latest version (2.2.0). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

This section describes how to configure a custom communication service of the TCP Client type in Mech-MSR.

Configuration Process

Before configuring, click Communication Configuration on the software toolbar and confirm that the software is currently using the custom communication mode.
config custom mode

To configure a custom communication service of the TCP Client type, perform the following steps:

  1. On the Service configuration tab of Communication Configuration, click New service.

  2. In the New Communication Service dialog box, set Protocol to TCP Client, specify Service name, and then click OK.

    config custom tcp client
  3. In the service list on the left, click the newly created service. Its configuration interface is displayed on the right.

  4. In the Communication Parameters area, set parameters as needed.

    config custom tcp client com param
    • Auto-enable the service when opening the solution: If you want the software to automatically enable the service the next time the solution is opened, select this option.

    • Auto reconnect: When this option is enabled, the service automatically attempts to reconnect after the connection to the TCP server is lost. Enable it as needed.

    • Server IP: Specifies the IP address of the remote TCP server. Make sure that the TCP server IP address is configured correctly and reachable.

    • Server port: Specifies the port of the remote TCP server. The default value is 50000. Adjust it according to the actual port of the TCP server.

    • Terminator: Specifies the terminator agreed upon by both ends of the communication. It is used to mark the end of a message so that the receiver can correctly split and parse data. To use it, select the Terminator option and specify the terminator. The software supports "\n", "\r", and "\r\n" as terminators.

  5. In the Heartbeat Settings area, enable heartbeat checks as needed, and configure heartbeat parameters.

    config custom tcp server headtbeat
    • Heartbeat message: Specifies the heartbeat message to send. It is recommended that the heartbeat message use a format different from business data so that the receiver can identify it more easily.

    • Heartbeat interval: Specifies the interval for sending heartbeat messages. The default value is 1000 ms.

After the configuration is complete, you can start the communication service.

For a custom communication service of the TCP Client type, the service attempts to establish a connection to the TCP server when it starts. If the connection cannot be established, the communication service cannot start. Troubleshoot according to the error dialog box.

Test Communication

After configuring and successfully starting a custom communication service of the TCP Client type, you can test whether the service communicates properly.

To test communication, perform the following steps:

  1. In the service list on the left, click the service. Its configuration interface is displayed on the right.

  2. In the Communication Test area, enter data in the input box, and then click Send.

    config custom tcp server test
    To send data in hexadecimal format, select HEX, enter hexadecimal data in the input box, and then click Send.

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.