Set Up Communication Between External Device and Mech-MSR via TCP ASCII
Communication Workflow (Command-Based)
The workflow of TCP ASCII communication based on commands is shown in the figure below.

|
The communication workflow is as follows:
-
A TCP client (such as a PLC) establishes a TCP connection with the 3D measurement system (Mech-MSR).
-
The TCP client sends a
trigger
command to trigger the project to run. -
Mech-MSR returns the status code for the command. For example, if the project is triggered successfully, Mech-MSR returns
0
. -
The TCP client sends a
return
command to obtain the measurement results. After Mech-MSR receives the command, it starts the countdown for 10 seconds. -
Mech-MSR returns results. For example, if the project is run successfully, Mech-MSR returns the measurement results. If the project has not finished running within 10 seconds, Mech-MSR returns the error code
-3
.
Communication Workflow (Command-Free)
The TCP ASCII communication mode enables the 3D measurement system (Mech-MSR) to automatically push results to the client (such as a PLC) after each project run, without requiring a request from the client. It is recommended for use when the laser profiler(s) are in the continuous acquisition mode or when project execution is triggered by I/O signals.
The communication workflow is as follows:
-
Select the Auto-push results option when configuring TCP ASCII communication.
-
Set Data format of return commands. Mech-MSR will automatically push the results in the specified data format.
-
(Optional) Configure the project execution condition. For example, you can set the execution mode to Run upon Image Update in the project toolbar.
-
A TCP client establishes a communication connection with the 3D measurement system.
-
After each project run, Mech-MSR automatically pushes the results to the client.
The next section on TCP ASCII commands will show the commands supported and analyze the returned results.