Guys,
I have been playing with LUA this weekend in an attempt to get my pendant to work. I am getting some strange behavior..
If I add some code to the Screen Load section it all goes in and seems fine. I even try to compile it and it compiles successful. Then I try to go into Debug and get the follow error?
Compilation successful!
Output: "C:\Users\Russ\AppData\Local\Temp\leEBAB.mcc"
Compilation successful!
Output: "C:\Users\Russ\AppData\Local\Temp\leEBAB.mcc"
Waiting for client connection...
Debug server disconnected.
Debugger socket not created. Debugger EvaluateExpr
Killed debuggee process 4800.
Debug session finished.
I decide to try to debug again and it opens and steps into the first line of the Screen Load script I hit the F11 hit and step in several lines. All looks good...
If I hover of any of the lines in the top of the code after I have stepped by them I can see their actual value, just what I want... However, as I get down into the Signal Library area I start to get something else.
pageId = 0
screenId = 0
testcount = 0
machState = 0
machStateOld = -1
machEnabled = 0
machWasEnabled = 0
inst = mc.mcGetInstance()
---------------------------------------------------------------
-- Signal Library
---------------------------------------------------------------
SigLib = {
[mc.OSIG_MACHINE_ENABLED] = function (state)
machEnabled = state;
ButtonEnable()
end,
[mc.ISIG_INPUT0] = function (state)
end,
As I try to check any input by hovering over it after I have stepped past that line of code I get the following.
string : Lua : Syntax error during pre-compilation
Strange thing is some of the code I had in the Screen Load script that worked before I added some more inputs still works. For example hitting a key to enter feedhold is another input and that still works?
This is some of the new code I added but this is pretty standard stuff, not sure where to start to figure out what is causing the issue.
[mc.ISIG_INPUT40] = function (state)
SRO()
--Spindle RPM Rate switch pokeys pin 47
end,
[mc.ISIG_INPUT41] = function (state)
SRO()
--Spindle RPM Rate switch pokeys pin 50
end,
[mc.ISIG_INPUT42] = function (state)
The function SRO is defined below all the inputs just like a few other sample functions but it not even getting to the function because of the lack on input data?
Thanks
Russ