Hello, I want to execute a bash script from the GUI regardless of the mode (homed, interpreter running, etc...) - just click and run always.
I can't use MDI_COMMAND because it won't execute while a program is running.
I suppose I could write a component that calls the script and connect buttons to its hal pins, but is there a simpler / more straightforward way?
while program execute ... no other gcode can run .... but you can use pin ...
net your_bash pyvcp.yourbutton (--in-- on your panel.hal)
--- on main.hal
net your_bash and2.in0
net your_bash2 not.0.in motion.run (sorry not remember exact motion name)
net your_bash3 not.0.out and2.0.in1
net your_bash3 and2.0.out MDI_xxx (--out--- on main.hal file)
these prevent execution while running ... but maybe and not homing signal .... so you can run only 1 time ...
You didn't mention which screen you are using.
I assume you are not talking about a gcode script, but it might help to know what the script does.
But probably you are going to have to do what you mentioned