Sign in to follow this  
Followers 0
Poljak

Stoping MC_Move Relative block.

1 post in this topic

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0