Porting Fanuc macro to LinuxCNC

More
8 years 5 months ago #110336 by eneias_eringer
I made a conversion from renishaw fanuc macros to linux cnc, the worst problem was "goto", I had to write the same command several times because there is no "goto" ...
but the problem with the null variable I solved,i set always with a large value #<null>=9999 , renishaw macros for siemens uses that !

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago #110337 by Todd Zuercher
Working arround the lack of a GOTO, can be difficult. It usually requires a little different way of looking at your sub program.

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago #110338 by andypugh

vicstransam wrote: 2. The local variables are reset to a value of zero at boot, not a value of NULL so that is a dead end. I just avoid local variables if .


This G-code works (only with named parameters, I just tested it)
Code:
O100 if [exists[#<test>] (debug, exists with value #<test>) O100 else (debug, does not exist) O100 endif M2

Documented here:
linuxcnc.org/docs/html/gcode/overview.html#gcode:functions

(Possibly it should also appear in the parameters section?)

There is no "GOTO" in LinuxCNC G-code because it was written by programmers who have been trained to believe that GOTO is evil :-)

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #259440 by akg1904
Hi,

I have a post processor that generates G code for Fanuc Controller, can I use same G-code in LinuxCNC.
If not then how can I increase my G-code library in LinuxCNC so that it works with G-code develop for Fanuc Controller

Thanks and Regards
Abhishek

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #259448 by andypugh
Try it? Depending on what the postprocessor uses it might, or might not, work.
It depends how much Fanuc-specific stuff there is in there.
The following user(s) said Thank You: akg1904

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago - 3 years 10 months ago #259465 by Todd Zuercher
Maybe, for the most part Fanuc g-code is compatible with Linuxcnc. Where you are most likely to run afoul would be with M-codes and tool change codes, canned cycles and how subroutines are handled. There are almost as many different ways Fanuc controls can be set up for g-code as there are machine tool builders who use Fanuc controls. The specific g-code dialect is almost all ways different in some way from one builder to the next.

But even if your post's code isn't exactly what is needed for Linuxcnc, you probably can write a simple script to convert it on the fly as it is loaded into Linuxcnc. It is configured in the "Filter" section of your ini file.
linuxcnc.org/docs/stable/html/config/ini...html#_filter_section
 
Last edit: 3 years 10 months ago by Todd Zuercher.
The following user(s) said Thank You: akg1904

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum