Sorry been snowed under this end,
Have a look at the example again, its using the switch command so you can convert this in lua to an if statement.
use it in the form of
rc = mc.mcSiganalWait..........
if rc == MERROR_TIMED_OUT then
disable machine and update history with error
else
continue with gcode
end
DazTheGas