Hi John,
Many thanks for the files you provided.
I went to the shop and quickly loaded the files to my plasma computer.
It worked!! (after some small tweaking, see my comments below). Now all cuts are on the same height level. Excellent. I had no time to analyze what do you do different, but in the evening Ill spend time on it.
I also installed the PP you sent.
There is one "inconsistency" with the multiple
if..then..else nesting which originates from PP, and this caused an error when I wanted to load your gcode file to LinuxCNC. I found that one extra
o010 else
Please find below the relevant part of gcode with added indents for better readability:
Code:
o020 if[ #<_firstTime> EQ 1 ]
o010 if[ EXISTS[#<_hal[plasma_tab.use_control_params]>]]
o011 if[#<_hal[plasma_tab.use_control_params]> EQ 1]
o012 if[ EXISTS[#<_hal[plasma_tab.g0-gap]>]]
#<_g0-gap> = #<_hal[plasma_tab.g0-gap]>
o012 else
#<_g0-gap> = 20.000
o012 endif
o013 if[ EXISTS[#<_hal[plasma_tab.pierce-gap]>]]
#<_pierce-gap> = #<_hal[plasma_tab.pierce-gap]>
o013 else
#<_pierce-gap> = 8.000
o013 endif
o014 if[ EXISTS[#<_hal[plasma_tab.cut-gap]>]]
#<_cut-gap> = #<_hal[plasma_tab.cut-gap]>
o014 else
#<_cut-gap> = 6.000
o014 endif
o015 if[ EXISTS[#<_hal[plasma_tab.pierce-delay]>]]
#<_pierce-delay> = #<_hal[plasma_tab.pierce-delay]>
o015 else
#<_pierce-delay> = 1.000
o015 endif
o016 if[ EXISTS[#<_hal[plasma_tab.w-gap]>]]
#<_w-gap> = #<_hal[plasma_tab.w-gap]>
o016 else
#<_w-gap> = 10.000
o016 endif
( __SUSPICIOUS extra line:__o010 else )
o011 else
(Use values from SheetCam Below)
#<_g0-gap> = 20.000
#<_pierce-gap> = 8.000
#<_cut-gap> = 6.000
#<_pierce-delay> = 1.000
#<_w-gap> = 10.000
o011 endif
o010 endif
#<_firstTime> = 0
o020 endif
I marked
SUSPICIOUS the extra line.
I needed to create an empty endcut subroute, because there was a reference in your code. I don't know what is the purpose of this sub in your setup.
When I commented out the line 774 in PP file, the code is loadable without errors.
Thanks you very much for your help!
Regards
Janos