1
Mach4 General Discussion / lua in Mach 4
« on: August 09, 2022, 12:38:37 PM »really simple question, I think.
I am building a m6 in Lua in Mach4
I have a 4 tool changer it has air cylinders that need to be activated, I have them on output 2 - 5
I want to build a variable name to activate the correct cylinder for the tool change
tool 1 is output 2
Line one does not work, it assigns the variable Tsig1 the text value
line two does work it returns a number
I am putting the text that is shown in parenthesis in a variable but it is text
how do I tell the program that I want it to see the text as a output variable thingy?
local Tsig1 = ("mc.OSIG_OUTPUT2")
local Tsig2 = mc.OSIG_OUTPUT3
So really x="mc.OSIG_OUTPUT2"
Local Tsig1 = x
or I tried Tsig1 = (x) and every other kind of bracket or parenthesis
I also tried string.format
and every other thing I could find on the web
No dice
Thanks