User Tools

Site Tools

Translations of this page:


MyCNC Shop

MyCNC website

myCNC Price List


Getting a Height Map

myCNC control software has API to record Height Map log file for further height adjustment.

Height Map Settings

There is a Height Map settings widget.

The following parameters can be set up in the widget

  • Log file name,
  • Axes list to record in the log
  • Log line format
  • Header line in the log file

Height Map Log API

There are 2 Global variable registers mapped to the Log API

Register Name Register Address Description
GVAR_POSITION_LOG_DATA 5730 If Logging is stopped, writing to this register does not have an effect.
If the Logging is started, writing any value to this register
will add current position
to the Log data array.
Beside of storing into the Log Array,
The Log position is stored into Global Variables 5731-5736 as well
#5731 - X, #5732 - Y, #5733 - Z
#5734 - A, #5735 - B, #5736 - C
GVAR_POSITION_LOG_CMD 5740 Begin/Eng Height Map Log
Writing “1” to this register will start logging
Writing “0” to this register will stop logging
All the collected data will be stored in a log file
with given filename and time stamp

Log Handler through PLC M-functions

As an example add M80 procedure to start-stop Height Map Log file


The procedure will send to Register #5740 variable value “eparam” which is initialized as P-parameter from g-code line.

  • Code line to start Height Map logging would be
    M80 P1
  • Code line to stop Height Map logging and save collected data to a file -
    M80 P0

Another example - code to add current position to the log file - code M85


This is just example of storing postion to the log.

To get a real example of Height sensing and Logging we have to

  • add probing motion down till probe sensor activated,
  • then storing current position (gvarset(5730,0)),
  • then lift up to initial height

(to be continued…..)

plc/plc_height_map.txt · Last modified: 2018/09/09 21:12 by skirillov

Translations of this page: