461
Mach4 General Discussion / Re: Lua Macro Parameters
« on: March 08, 2017, 05:33:29 PM »
Chaoticone, sorry for mangling your name in my previous post. Thanks for the file, deleted the lines:
package.loaded.mcErrorCheck = nil
ec = require "mcErrorCheck"
since I don't have that module either.
Still no joy.
When I call this macro from a button or through the mdi the dros move correctly and then I get the message rt==nil
If I call rt.rtMessage("Button Message") from a button I get 'Button Message' so the GUI lua is loading the rtModule and seting it's rt but the load_modules.mcs for macro rt must be failing to load the same module as the screen. How can you debug this?
Has anyone tested this with Mach4Lathe?
The UC100 plugin failed because they hadn't tested it with lathe so lathe must have some different code.
TIA
RT
package.loaded.mcErrorCheck = nil
ec = require "mcErrorCheck"
since I don't have that module either.
Still no joy.
Code: [Select]
function m9002()
local inst = mc.mcGetInstance()
mc.mcCntlGcodeExecuteWait(inst,"g1F4 x1")
if rt==nil then
wx.wxMessageBox("rt==nil")
else
rt.rtMessage('Another Hello')
end
end
if mc.mcInEditor()==1 then
m9002()
end
When I call this macro from a button or through the mdi the dros move correctly and then I get the message rt==nil
If I call rt.rtMessage("Button Message") from a button I get 'Button Message' so the GUI lua is loading the rtModule and seting it's rt but the load_modules.mcs for macro rt must be failing to load the same module as the screen. How can you debug this?
Has anyone tested this with Mach4Lathe?
The UC100 plugin failed because they hadn't tested it with lathe so lathe must have some different code.
TIA
RT