Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: michael123 on July 16, 2018, 07:16:05 AM

Title: lua code help please
Post by: michael123 on July 16, 2018, 07:16:05 AM
inverter (multi-function)
four outputs

MI3/MI4/MI5/MI6

1st button  -- on/off/off/off
2nd button -- off/on/off/off
3th button  -- off/off/on/off
4th button  -- off/off/off/on

one of them

local inst = mc.mcGetInstance()
local Output5 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5)
local Output6 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT6)
local Output7 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT7)
local Output8 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT8)

mc.mcSignalSetState(Output5, 1)  --On
mc.mcSignalSetState(Output6, 0)  --Off
mc.mcSignalSetState(Output7, 0)  --Off
mc.mcSignalSetState(Output8, 0)  --Off


and doesnt work,


mach4
on 3.0.12 it worked
on 3.0.16 not

Title: Re: lua code help please
Post by: michael123 on July 16, 2018, 08:11:19 AM
Lua: Error while running chunk