Hello Guest it is April 17, 2021, 07:40:49 AM

Author Topic: lua code help please  (Read 716 times)

0 Members and 1 Guest are viewing this topic.

lua code help please
« 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

Re: lua code help please
« Reply #1 on: July 16, 2018, 08:11:19 AM »
Lua: Error while running chunk