Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: jelle_bos on October 21, 2019, 01:12:11 PM
-
Dear people,
I am programming some mach4 custom screen sets. But i want a button to set a variable High or low. So like some boolean to be true when the button is pressed and false when it is not pressed. I don't mean an output to be set high or low, but more like a variable to be true or false.
I also want to save a variable or value when i close mach4. I want to use that to let the machine know what tool is in the ATC spindle when i have closed mach4 and to let the machine know what tool is in the chuck when mach4 is opened the next day. like some eeprom or something.
Does someone know how to do this in lua and mach4?
Thanks in advance.
Kind regards,
Jelle
-
Jelle,
The best thing I have found to use is registers.
Here is a link to a Lua for Dummies I made.
It has some stuff on registers.
https://www.machsupport.com/forum/index.php?topic=39763.msg266718#msg266718
Hope it helps.
Bill
-
Thanks for the reply. It worked indeed and I can also use this to save the values. You saved me alot of headache