I need some serious help guys!
I tried the script today, and it came out to nothing.
I took a physical button and wired it to the ESS Port 2, pin 2 with a proper resistor.
I mapped port 2, pin 2 to Mach and ESS INPUT1.
I confirmed that the button is working as intended by looking under the operator tab, the input1 LED lit up when pushing the button.
Also under Diagnostic --> Log, I can see that Mach logs HIGH when pressing the button and LOW when releasing it.
So far so good!
But I can't seem to get the signal script to initiate at all. I tried my script and also simplyfied it alot.
I even made it so simple to just pop up a messagebox or setLastEroor to confirm it's alive, but no it's really dead!
Not sure I'm editing the script in the right way? I did it like this:
Operator --> Edit Screen: Marked WX in top left corner (screen tree manager), then I pressed on the lightning on the bottom left corner (properties) and opened the "screen load script" and simply pasted my script within the {} under siglib. Then just saved the script ans saved the screen.
Is this the correct way? or must I edit the script in other way?
I have also thought about if Input1 (assigned under Mach Configure) automatically is the same as mc.ISIG_INPUT1 ??
Or must they be assigned to eachother in some way so that mc.ISIG_INPUT1 listens to Mach physical input 1?
One thing I noticed but didn't got the time to test was, the Log said button had "SigID 2, INPUT#1", is it perhaps that Input1 actually is mc.ISIG_INPUT2 ?
Back to the Operator --> Edit Screen: There is a column named "Signal script" in the bottem left frame (properties).
That file/script whatever it is only contains:
if SigLib[sig] ~= nil then
SigLib[sig](state);
end
Should I do something in here?
It's really frustrating when I'm not even able to receive a fault code, the code seem to not even be initiated. Running G-code or not, Enabled or not.