Hi All

I am trying to make a macro to operate a punch but I am struggling to get it to work. Can someone point me in the right direction. The punch has two sensors for top and bottom of the stroke and two switches to go down and up so in principle it sounds very easy. This is what I have in M25.m1s


While Not IsActive(INPUT2)
ActivateSignal(OUTPUT1)
Wend
DeActivateSignal(OUTPUT1)

While Not IsActive(INPUT1)
ActivateSignal(OUTPUT2)
Wend
DeActivateSignal(OUTPUT2)

End


Thanks