Table of Contents

3D Height Mapping

Related articles:


ATTENTION: Height mapping is currently in beta testing.

Height mapping allows to correct the G-code program for abnormalities and slight surface variations of the working material by mapping out the height map of the working material prior to beginning the cutting job. This function is extremely useful when dealing with a working surface which might be oriented imperfectly or may have some abnormalities to it, as well as programs which require a high degree of precision.

The function is currently being tested for the X1366M, X1366M4 and X1366M6 profiles. Below is an example of the height mapping process in its current beta testing form:

In order to perform the height mapping procedure, do the following:

Setting up the probing procedure (beta users)

The 3D height map .xml file for the X1366M-series profiles is currently available on request (beta testing as of October 2019). In order to set up the profile once you have received the file, do the following:

#include pins.h
 
do_probe()
{
  g0moveA(0,4,0-10000); //100 mm down
  timer=200; do{timer--;}while(timer>0);//wait till motion started
  do{
   code=gvarget(6060);
   if (code==0x4d)
    {
      gvarset(9121,1);
      timer=30;do{timer--;}while(timer>0);
      message=PLCCMD_MOTION_BREAK; timer=10;do{timer--;}while(timer>0);
      message=PLCCMD_MOTION_BREAK; timer=10;do{timer--;}while(timer>0);
      exit(99);
    };
  sens=portget(INPUT_PROBE);
  if (sens!=0)
    {
      code=1;
      message=PLCCMD_LINE_STOP; 
      timer=10;do{timer--;}while(timer>0);
    };
  }while (code==0);
  do { code=gvarget(6060); }while(code!=0x4d);//wait till motion finished
};
 
do_rebound()
{
  //speed=gvarget(8254); //
  gvarset(7080,2000);       //
  timer=20;do{timer--;}while(timer>0);
  bounce=gvarget(8256);
  g0moveA(0,4,bounce);  //bounce
  timer=200; do{timer--;}while(timer>0);//wait till motion started
  do { code=gvarget(6060); }while(code!=0x4d);//wait till motion finished
};
 
do_lift()
{
  //speed=gvarget(8254); //
  gvarset(7080,2000);       //
  timer=20;do{timer--;}while(timer>0);
 
  lift_height=gvarget(8257);
  g0moveA(1,4,lift_height); //Lift Height
  timer=200; do{timer--;}while(timer>0);//wait till motion started
  do { code=gvarget(6060); }while(code!=0x4d);//wait till motion finished
};
 
 
main()
{
  message=PLCCMD_TRIGGER4_OFF;
  timer=2;do{timer--;}while(timer>0);
 
  sens=portget(INPUT_PROBE);
  if (sens!=0)
    {
      gvarset(7080,2000); //1000mm/min
      timer=20;do{timer--;}while(timer>0);
      do_rebound();
    };
 
  sens=portget(INPUT_PROBE);
  if (sens==0)
    {
      speed=gvarget(8253); //Probe Speed
      gvarset(7080,speed); //
      timer=20;do{timer--;}while(timer>0);
      do_probe();
    };
 
  do_rebound();
 
  sens=portget(INPUT_PROBE);
  if (sens==0)
    {
      speed=gvarget(8254); //Slow Speed
      gvarset(7080,speed); //
      timer=20;do{timer--;}while(timer>0);
      do_probe();
    };
 
   gvarset(5730,0);
   timer=20;do{timer--;}while(timer>0);
 
   do_lift();
 
   exit(99);
};

Changelog

2019-10-15: Manual Height Probing and Clear Map buttons have been added. Manual Height Probing allows the user to take a height measurement in some arbitrary point on the working surface, while the Clear Map button allows to delete the current point array and start anew. Save and Open Map buttons should now be stable.

2019-10-07: Save and Open Map buttons are now operational (some stability issues might be present). The generated map point spread is now shown within the software.

2019-10-04: The Save and Open Map buttons do not work yet. These will allow the user to save the created map and to load a previous map to apply to the G-code file.