- Posts: 224
- Thank you received: 0
Macro
9 years 2 months ago #97625
by smplc
Does LinuxCNC parametric programming have custom macro similar to Fanuc G65, G66, G67 and P, M or G9### and underlays canned cycles? For instance a drill fixed cycle or a roughing cycle with looping and branching. Are any parametric programming algorithms reference sources of a multi-repetitive, non-monotonic and Type 2 cycle (Fanuc G71) without air cuts and not like roughing an existing pattern and casting (G73)? Does LinuxCNC have a parametric programming quick reference key and where?
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
9 years 2 months ago #97632
by Todd Zuercher
Replied by Todd Zuercher on topic Macro
I am not real familiar with Fanuc macro calls (not all of our Fanuc machines have Custom Macro enabled.) so I don't use them much.
Linuxcnc does not have a Modal call similar to M66. (To the best of my knowledge, but it wouldn't be the first time I was wrong.)
But to the best of my knowledge most of the same functionality as G65 can be achieved with Linuxcnc's O-subs. With one glaring difference. Linuxcnc does not have a goto funtion. You can usually work around this if you're clever in your parametric programming. But it can make porting existing Fanuc code over to Linuxcnc a bit of a pain.
Here is a link to the O-Word section of the Linuxcnc Docs.
linuxcnc.org/docs/html/gcode/o-code.html
And the Parameter section of the G-Code Overview.
linuxcnc.org/docs/html/gcode/overview.html#_parameters
It might be possible to add G65, G66, G67 functionality without too much difficulty using Remapping. G65,G66, and G67 are currently undefined and open for remapping. (I believe someone recently added Fanuc style M98/M99 support this way.)
linuxcnc.org/docs/html/remap/remap.html
Linuxcnc does not have a Modal call similar to M66. (To the best of my knowledge, but it wouldn't be the first time I was wrong.)
But to the best of my knowledge most of the same functionality as G65 can be achieved with Linuxcnc's O-subs. With one glaring difference. Linuxcnc does not have a goto funtion. You can usually work around this if you're clever in your parametric programming. But it can make porting existing Fanuc code over to Linuxcnc a bit of a pain.
Here is a link to the O-Word section of the Linuxcnc Docs.
linuxcnc.org/docs/html/gcode/o-code.html
And the Parameter section of the G-Code Overview.
linuxcnc.org/docs/html/gcode/overview.html#_parameters
It might be possible to add G65, G66, G67 functionality without too much difficulty using Remapping. G65,G66, and G67 are currently undefined and open for remapping. (I believe someone recently added Fanuc style M98/M99 support this way.)
linuxcnc.org/docs/html/remap/remap.html
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
9 years 2 months ago #97643
by Todd Zuercher
Replied by Todd Zuercher on topic Macro
As far as I know Linuxcnc completely ignores N### line numbering, so it can't be used for referencing a GOTO or other branch/loop fuctions. But you can use the o-word while/endwhile, do/while, if/elseif/else/endif, repeat, and call.
Please Log in to join the conversation.
9 years 2 months ago #97650
by smplc
Understood. I haven't reference source a parametric algorithm of a canned cycle similar to Type 2 foregoing. I can set a counter to do a non-monotonic profile but it has some air passes yet. It could require some nested loops, branching and arithmetic expressions. I'll have to improvise, experiment and test it simulated.
Please Log in to join the conversation.
9 years 2 months ago #97651
by andypugh
G71 / G72, if you mean lathe roughing cycles is a "work in progress".
There is a simple (no pockets) version here:
github.com/LinuxCNC/linuxcnc/tree/BenPotter/G71
And a more complicated (with pockets) one here done as a remap in Python (but it has limitations)
github.com/LinuxCNC/linuxcnc/tree/andypugh/g71type2remap
The remap version could, in theory, be used on a standard install without recompiling.
There is a simple (no pockets) version here:
github.com/LinuxCNC/linuxcnc/tree/BenPotter/G71
And a more complicated (with pockets) one here done as a remap in Python (but it has limitations)
github.com/LinuxCNC/linuxcnc/tree/andypugh/g71type2remap
The remap version could, in theory, be used on a standard install without recompiling.
Please Log in to join the conversation.
9 years 2 months ago #97679
by smplc
The G71 and G72 monotonic (no pockets) link reminds me of scripture and not very identifiable. Seen some it's G-code ISO too and I already knew text.
I was looking for source code or C. Python appears an interpreter. Maybe close enough. configs/sim/axis/g71/python/remap.py
I see SUB can get used like custom macro G65.
I was looking for source code or C. Python appears an interpreter. Maybe close enough. configs/sim/axis/g71/python/remap.py
I see SUB can get used like custom macro G65.
Please Log in to join the conversation.
Time to create page: 0.506 seconds
