Replies: 1 comment 1 reply
-
That would suggest that UGS should know what kind of machine you have and what you want it to do in order to validate if the gcode is wrong. So that is unfortunately very hard for us to implement. If you break down the probe script, this is my interpretation what it does: G21G91G38.2Z-20F100 (probe incrementally down Z- 20mm and stop)
G0Z1 (move incrementally Z+ 1mm)
G38.2Z-2F10 (probe incrementally down Z- 2mm at slow feedrate and stop)
G92Z12.2 (set the current Z as 12.2mm)
G90 (make machine move in absolute coordinates)
G0Z5 (move to the absolute coordinate Z5 (move down 7.5mm)) So that should sounds like that would make the machine run into your probe plate at the end... =( The second probe script does something similar but instead of setting the temporary G92 offset, it sets the work coordinate which is a lot better. The G90 (use absolute coordinates) is not needed at all and should probably be removed. Yeah, so making gcode can be tricky, and using gcode blindly from other users can be dangerous. That is why we developed the probe module in UGS that takes care of the probing and also a visualization of the process. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I just started with UGS after some trouble with Candle2 not updating my work coords. I tried to set up some macros which worked fine there and in other tools. However, in UGS they crashed my bit into the Z-probe. ChatGPT knew the answer but it was not obvious to me what could go wrong here. So maybe it's a good idea to have a warning at prominent place or to do a sanity check on the macro code (or to fix it if it can be considered a bug). I assume(=hope) the problem would not occur on regular code, but that's far beyond my understanding of gcode processing (and how a commenting ; becomes a line break) :-)
This is how my CNC manufacturer suggested Z-probing:
G21G91G38.2Z-20F100; G0Z1; G38.2Z-2F10; G92Z12.2;G90;G0Z5
If you try it, put something thick and soft below your probe and be ready to press the stop button!
It will do a double touchdown as expected, but instead of the final 5mm move up it will move down a long distance at high speed! I learned that this code has several issues (no feed control with G0, using confusing G92 instead of G54, and most important: switching relative to absolute mode and doing another move afterwards).
This macro works as expected:
G21;G91;G38.2Z-20F100; G1Z1F100; G38.2Z-2F10; G10L20P1Z12.2;G1Z5F200;G90;
The main trick here is that G90 must follow after the final move.
Beta Was this translation helpful? Give feedback.
All reactions