A little bit more help. This is what I'm using to give a start signal momentarily. Turns on Output 2 for half a second then shuts it off. I also show a message that it turns on and off.
Hope this helps.
-Chad
--TEST CODE OUTPUTS!!
function m1010()
local rc = 0;
local inst = 0; -- mc.mcGetInstance(mInst)
-- Turns on output 2.
hsig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2);
mc.mcSignalSetState(hsig, 1); --sets OUTPUT_2 to True
--Messages are written like this.
mc.mcCntlSetLastError(inst, "Output2 ON");
wx.wxMilliSleep(500) --Same as sleep in Mach 3.
-- turns off output 2
hsig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2);
mc.mcSignalSetState(hsig, 0); --sets OUTPUT_2 to False
--Messages are written like this.
mc.mcCntlSetLastError(inst, "Output2 OFF");
end --This is for the end of the function m1010()
--This next part does not have to be in here to run in Mach 4.
--It does need to be in here to step through and test.
if (mc.mcInEditor() == 1) then
m1010()
end