Hi,
can I use: Mxx [my_macro] to call a macro?
thanks.
Hello!
The easiest way is to save your gcode for the macro as a text file, named with an extension of “.g”, and, then using the WebUI, connect to the Jackpot control board, and upload the macro script text file to the Flash Memory on the Jackpot. Then, also using the WebUI, go into a settings type editing area (not exactly sure of the naming here), and there is panel for editing your macro commands. In the area, you assign a name for the macro, and an icon, and optionally a hotkey I think, and you also tell it the file name you have uploaded. Then, on the WebUI’s main dashboard, the macro icons will be displayed as buttons.
I think this question is “Can I use Mxx from my gcode to call a macro?”
(It isn’t “how do i define a macro in the GUI?”, right?)
If that’s the question, then no- as far as I know, FluidNC doesn’t allow macros to be called from within a gcode file itself.
http://wiki.fluidnc.com/en/config/macros
Note: it is somewhat possible to use control logic from within FluidNC gocde, which is a related but different capability. See here for details:
http://wiki.fluidnc.com/features/gcode_parameters_expressions
Thanks
I’ll test it.
Great.
I learnd it is not possible for FluidNC’s gcode to call a macro.
Again
FluidNC can not use gcode to call macro or subprogram; but can FluidNC’s gcode use some jump like “goto” ?
If you had a macro defined in a gcode file on the SD card, you should be able call something like this in your main gcode file:
$SD/Run=mymacro.gcode
Thanks.
Do you mean to run a macro (Program fragment of gcode) saved in SD by command?
my job need to do many times repeat, so I’d like to call that macro in my main gcode or beable to jump to that macro when need.
Have you tested this? I don’t think I was ever able to make this work.
From here:
http://wiki.fluidnc.com/en/config/macros
$ commands typically require an Idle state. Otherwise they will be rejected.
I got Alarms when loaded it into UGS.
G1 Z-0.2000 F47
G0 Z0.2000
G1 X0.8782
(G0 -- G1 slowdown to study, no Z axis )
Z0.0800
$SD/Run=mymacro.gcode
G1 Z-0.2000 F47
I at least know I was able to create a playlist type of gcode script that ran multiple files. I would need to try this again to confirm. I know there were some changes to how this works back in 3.7 or 3.8.
a good idea if be able to run multiple file.
I found this link about macro kind seems OK for LinuxCNC under FluidNC?
LinuxCNC and FluidNC are two different CNC control software packages.
They do the same job in a system- running the motion control hardware.
You can only be running one or the other.
The Jackpot and other FluidNC controllers we use only run FluidNC, not LinuxCNC.
What applies for LinuxCNC has nothing to do with what FluidNC does.
It does only in the sense that the FluidNC devs tend to look at the LinuxCNC implementation as a reference for implementing functionality in FluidNC. But I agree in that just because it works in LinuxCNC, doesn’t mean that it works in FluidNC. They don’t implement all features.
sorry
I can’t link it, the topic is:
Feature: The ability to exit out of a Macro mid script #1318
in: bdring/FluidNC)
Thanks.
I see.
Yes, right now to exit out of a script, you either need to deal with it through if/else structure or to raise an alarm.
ok.
I’ll dig more of if/else.