101
Mach4 General Discussion / Re: Modbus sending same register twice
« on: November 14, 2021, 01:47:35 AM »
There is an MQTT library for lua, check out this thread https://www.machsupport.com/forum/index.php?topic=36807.0
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 m111 ()
local inst = mc.mcGetInstance()
local YShift = 10
mc.mcCntlSetPoundVar(inst, mc.SV_HEAD_SHIFT_Y, YShift)
end
if (mc.mcInEditor () == 1) then
m111 ()
end
local droVal = select(1,...) --This gets the value that was entered into the DRO.
droVal = droVal + 1 --Do some stuff
return droVal --Returns the value to the DRO and updates any linked registers etc.
function WaitForIdle()
local inst = mc.mcGetInstance()
local state = mc.mcCntlGetState(inst)
if (state == mc.MC_STATE_IDLE) then
return true
end
return false
end