The logic behind the code is correct, but with the loop you will receive thousands of Carousel Moving Forward into the log.
However with forward thinking from the mach team there is a command call mc.mcSignalWait so you can change your loop too mc.mcSignalWait(inst, mc.ISIG_INPUT1, mc.WAIT_MODE_HIGH, 0) or mc.mcSignalWait(inst, mc.ISIG_INPUT1, mc.WAIT_MODE_LOW, 0) - depends which way you need to go. The 0 on the end denotes wait indefinate, if you change this to 10 it will wait for the signal for 10 seconds then continue.
Apart from that all looks good, heres my version tested
local inst = mc.mcGetInstance()
local Carousel = mc.mcSignalSetState (mc.mcSignalGetHandle (inst, mc.OSIG_OUTPUT1),1)
mc.mcCntlSetLastError(inst, "Carousel Moving Forward")
mc.mcSignalWait(inst, mc.ISIG_INPUT1, mc.WAIT_MODE_HIGH, 10)
mc.mcSignalSetState (mc.mcSignalGetHandle (inst, mc.OSIG_OUTPUT1),0)
as you will notice you can join commands into 1 liners.
DazTheGas