Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: matrix on October 22, 2018, 01:23:26 PM
-
Hello,
I'm trying to do something simple like, check if an output or input is active.
I'm use mach3 VB, and I'm not able to find the dynamics of the LUA.
This command dont work, why not?
local inst= mc.mcGetInstance()
local Output0 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0)
if (sig == Output0) then
wx.wxMessageBox("Output on")
end
what is the trick??
-
Hi,
local inst= mc.mcGetInstance()
local Output0Handle = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0)
local Output0=mc.mcSignalGetState(Output0Handle)
if (sig == Output0) then
wx.wxMessageBox("Output on")
end
Craig
-
Hi,
just looking at what I've posted and it wont work either...try this:
local inst= mc.mcGetInstance()
local Output0Handle = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0)
local Output0=mc.mcSignalGetState(Output0Handle)
if ( Output0~=0) then
wx.wxMessageBox("Output on")
end
Craig