Tags:   #   #   #   #


In the case of CSMIO/IP controllers, the measurement start-up procedure looks a bit different from the original solution using an LPT port. Below you will learn how to perform a surface scan step by step, i.e. create a grid of points using a measuring probe using Mach3 software and a CSMIO/IP controller.

  1. In the case of Mach3 and CSMIO/IP controllers, the G31 command should be activated only from a macro.

This measurement method guarantees precision and safety because the measurement is performed autonomously by a CSMIO/IP controller.

Activating G31 directly from a gcode can be problematic and should not be done.

2. For the smooth G31 measurement performed from a macro, Mach3 version from 03.043.022 to 03.043.044 is required.

Using a newer version can cause problems with the synchronization of CSMIO/IP controller coordinates with Mach3.

The lack of synchronization causes an emergency stop of a machine and the E-PID fault message.

Mach3 from version 03.043.044, according to our observations, has a problem with the synchronization of coordinates after the measurement.


3. How to prepare Mach3 for Surface height measurement?

a) Install Mach3 version 03.043.022 to 03.043.044.

b) Place the macro (attached) in the appropriate folder, in my case C:\Mach3\macros\Mach3Mill

c) Give administrator rights to the Mach3.exe file (Right-click on the Mach3.exe file / Properties / Compatibility / Run this program as administrator)

4) How to measure the height of a surface.

a) Call the M40 command.

After calling this command, a window will appear asking for the name of the file.

The name you use is irrelevant because the CS-LAB plugin will create its own file named “CSMIO_IP_PROBE.txt” right after the first measurement.


b) Create a gcode that includes „M310 P-30 Q300” command

P – Z axis target position
Q – probing speed.


Below is a fragment of an exemplary gcode:



G0 X0 Y0 Z20

M310 P-30 Q300

G0 Z20

X20 Y0

M310 P-30 Q300

G0 Z20

X40 Y0

M310 P-30 Q300

G0 Z20


In the attachment, you will find a file with a complete example


Test M310

c) Run the gcode in Mach3, it will make a series of surface height measurements.


d) After executing the gcode, check the C drive, you will find the already mentioned “CSMIO_IP_PROBE.txt” file.


Its content is the set of points generated during the execution of the gcod.