Posted 4 Sep 2020 Hello, I've got a problem with a Motion control sequence. In my code i would like to perform operation like: When package move on optice sensor position it stopping and perform MC_Move operation. It's moving for X lenght, but sometimes it stop a little bit after sensor and i would like to stop MC_Move instruction faster - directly when state on sensor goes down. Which instruction use and how to code it to make it good. I already made something like. **pseudocode** seq=1: if sensor then MC_MOVE_instruction_execute=True; seq=2 seq=2: f_trig(sensor) If MC_MOVE_instruction_done or MC_STOP_instruction_done then MC_MOVE_instruction_execute=False; seq=3 seq3: REST OF THE CODE SR_INSTRUCTION(S=F_TRIG.q, R=MC_STOP_instruction_done OR SEQ=3) MC_STOP_INSTRUCTION_EXECUTE=SR_INSTRUCTION.Q Am i doing it right or there is another way? Thanks in advance. Share this post Link to post Share on other sites