mycnc:height_mapping
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
mycnc:height_mapping [2019/10/07 09:33] – ivan | mycnc:height_mapping [2019/11/19 11:12] – ivan | ||
---|---|---|---|
Line 1: | Line 1: | ||
======3D Height Mapping====== | ======3D Height Mapping====== | ||
- | < | + | < |
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. | 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. In order to perform the height mapping procedure, do the following: | + | The function is currently being tested for the X1366M, X1366M4 and X1366M6 profiles. |
+ | |||
+ | {{youtube> | ||
+ | |||
+ | In order to perform the height mapping procedure, do the following: | ||
* Open the file that you will want to correct for the material variations | * Open the file that you will want to correct for the material variations | ||
- | {{: | + | {{: |
* After opening the file, head to the Map tab on the main screen of myCNC software | * After opening the file, head to the Map tab on the main screen of myCNC software | ||
- | {{: | + | {{: |
- | * Select your Segment Length, your XY Grid, and Probe Speeds | + | * Select your Segment Length |
- | {{: | + | {{: |
+ | * Select your probe speeds. The probe speed is the speed with which the probe will be moving down from the start of the downward movement to the first contact with the surface. The slow speed is the speed on the rebound, allowing for a more precise measurement of the z-height position on second contact. | ||
+ | {{: | ||
+ | * Select your Lift Height and Bounce Back settings. The Lift Height specifies the z-axis height to which the probe will be lifted between different probing points (safe height). Note that this height is absolute, not relative, so it will raise it TO the position specified in this field in program coordinates, | ||
+ | {{: | ||
* Select whether you want the material to be probed in a Rectangular or a Fill Area pattern. Generally, either of these methods will give similar results: | * Select whether you want the material to be probed in a Rectangular or a Fill Area pattern. Generally, either of these methods will give similar results: | ||
{{: | {{: | ||
* Press the Generate Map button. Note that in order for the map to position itself properly, the X and Y program coordinates must be at zero prior to the map generation step. | * Press the Generate Map button. Note that in order for the map to position itself properly, the X and Y program coordinates must be at zero prior to the map generation step. | ||
- | {{: | + | {{: |
* Press the Run button (this begins the probing process) | * Press the Run button (this begins the probing process) | ||
- | {{: | + | {{: |
* After the probing program has completed running, press the Apply Map button. The original G-code file that you have loaded in should now be corrected. | * After the probing program has completed running, press the Apply Map button. The original G-code file that you have loaded in should now be corrected. | ||
- | {{: | + | {{: |
- | * After the file has been corrected for surface level imperfections, | + | * After the file has been corrected for surface level imperfections, |
+ | * If you would like to add a manual measurement of a point or a set of points, you can do so by moving the machine to an arbitrary XY location and recording the height there using the Manual Height Probing button. This will add that XYZ point to the existing height array. | ||
+ | {{: | ||
+ | * If you would like to clear the existing generated map (for example, for the purposes of manually recording a set of points without data from the automatic measurements), | ||
+ | {{: | ||
+ | * If you would like to save the existing map in order to apply it to a G-code file at a later point, you can do so using the Save Map button. The map will be saved in the folder specified in '' | ||
+ | {{: | ||
- | ====Relevant macros==== | + | ====Settings up the probing procedure (beta users)==== |
- | The height | + | The 3D height |
- | < | + | * Head into home/ |
- | #11=1 (Sensor Normally opened) | + | * Head into myCNC '' |
+ | * On recent software versions, it can be added by going into '' | ||
+ | * On older software versions, add the M180 procedure by manually creating an '' | ||
+ | <code C># | ||
- | M88 P#10 L#11 (Smooth stop if sensor activated) | + | do_probe() |
- | G91 G0 Z-30 F# | + | { |
- | G04 P0.1 | + | g0moveA(0, |
- | G91 G0 Z2 F500(Rebound 2mm) | + | timer=200; do{timer--; |
- | M89 P#10 L#11 (Stop if sensor activated) | + | do{ |
- | G91 G0 Z-30 F# | + | |
- | G04 P0.1 (Pause) | + | if (code==0x4d) |
- | M85 (saving the coordinates in log) | + | { |
- | G90 | + | gvarset(9121, |
- | </code> | + | |
+ | | ||
+ | | ||
+ | exit(99); | ||
+ | }; | ||
+ | sens=portget(INPUT_PROBE); | ||
+ | if (sens!=0) | ||
+ | { | ||
+ | | ||
+ | message=PLCCMD_LINE_STOP; | ||
+ | timer=10; | ||
+ | }; | ||
+ | }while (code==0); | ||
+ | do { code=gvarget(6060); | ||
+ | }; | ||
- | Note that the first two lines describe your probe port number and the typical state of the sensor | + | do_rebound() |
+ | { | ||
+ | //speed=gvarget(8254); // | ||
+ | gvarset(7080, | ||
+ | timer=20; | ||
+ | bounce=gvarget(8256); | ||
+ | g0moveA(0, | ||
+ | timer=200; do{timer--; | ||
+ | do { code=gvarget(6060); | ||
+ | }; | ||
- | The M85 macro (Settings > Config > PLC > Hardware PLC) that is called on at the end of the program simply saves the coordinates to a log array through the following procedure: | + | do_lift() |
+ | { | ||
+ | // | ||
+ | gvarset(7080, | ||
+ | timer=20; | ||
- | <code>main() | + | lift_height=gvarget(8257); |
+ | g0moveA(1, | ||
+ | timer=200; do{timer--; | ||
+ | do { code=gvarget(6060); | ||
+ | }; | ||
+ | |||
+ | |||
+ | main() | ||
{ | { | ||
- | gvarset(5730,0); | + | |
- | exit(99); | + | timer=2; |
+ | |||
+ | sens=portget(INPUT_PROBE); | ||
+ | if (sens!=0) | ||
+ | { | ||
+ | | ||
+ | timer=20; | ||
+ | do_rebound(); | ||
+ | }; | ||
+ | |||
+ | | ||
+ | if (sens==0) | ||
+ | { | ||
+ | speed=gvarget(8253); | ||
+ | gvarset(7080, | ||
+ | timer=20; | ||
+ | do_probe(); | ||
+ | }; | ||
+ | |||
+ | do_rebound(); | ||
+ | |||
+ | sens=portget(INPUT_PROBE); | ||
+ | if (sens==0) | ||
+ | { | ||
+ | speed=gvarget(8254); | ||
+ | gvarset(7080, | ||
+ | timer=20; | ||
+ | do_probe(); | ||
+ | }; | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | exit(99); | ||
};</ | };</ | ||
+ | * Note that the probe sensor number is defined in the '' | ||
+ | |||
====Changelog==== | ====Changelog==== | ||
- | 2019-10-07: Save and Open Map buttons are now operational (some stability issues). The generated map point spread is now shown within the software. | + | **2019-10-15: |
+ | |||
+ | **2019-10-07:** Save and Open Map buttons are now operational (some stability issues | ||
- | 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. | + | **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. |
mycnc/height_mapping.txt · Last modified: 2024/03/22 14:12 by ivan