121
Mach4 General Discussion / Re: mcLua reference
« on: January 28, 2018, 06:35:02 AM »
You will find the API docs in the Mach4Hobby/Docs directory.
DazTheGas
DazTheGas
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
function m6()
local inst = mc.mcGetInstance()
local selectedtool = mc.mcToolGetSelected(inst)
local currenttool = mc.mcToolGetCurrent(inst)
if selectedtool == currenttool then
mc.mcCntlSetLastError(inst, "Current tool == Selected tool so there is nothing to do")
else
mc.mcCntlCycleStop(inst)
wx.wxMessageBox("Please change tool and press Cycle Start\nAfter setting tool please RAISE Z Axis")
mc.mcCntlSetLastError(inst, "Current tool == " .. tostring(selectedtool) .. " Previous Tool == " .. tostring(currenttool))
mc.mcToolSetCurrent(inst, selectedtool)
end
end
if (mc.mcInEditor() == 1) then
m6()
end
The Mach core communicates with the outside world via a signal mechanism. All signals are "owned" by the core. The core drives output signals and input signals direct the core. This means that a user should never set an output signal and the core will never set an input signal.