pause robot from other task

V+ discussions, tips and tricks, sample code, Q & A

pause robot from other task

Postby Auden » Sat Feb 13, 2016 10:59 am

hi all

I use IRobot 800 and ACE Version 3.6.2.14.
I have 4 task from task0 to task1.
The task0 is my main program how did I pause robot from other task?
for example
Use task1 pause to task0.
I can't use task0 to suspend that is my main program.

I want to pause robot on myself.
Auden
 
Posts: 8
Joined: Mon Oct 05, 2015 12:44 am

Re: pause robot from other task

Postby Guenter Grass » Mon Feb 15, 2016 8:03 am

Hi Auden,

you can use these instructions in Task 1 to abort task 0 and stop the robot movement "immediatedly".

ABORT 0 ; aborts Task 0 but will finish the current robot motion
BRAKE ; stops the current robot movement
DO
WAIT
UNTIL Task(1,0) <> 4 ;wait until Task 0 is finished


Important: Don't do BRAKE and then ABORT 0! Always ABORT first!

Best Regards
Günter
Guenter Grass
 
Posts: 189
Joined: Thu Oct 16, 2008 4:34 am

Re: pause robot from other task

Postby Auden » Tue Feb 16, 2016 1:20 pm

The Abort can be to resume?
HI sir.
I have a question.
How to pause robot movement "immediately" from other task?
because I want to resume robot movement.


thank you.
Auden
 
Posts: 8
Joined: Mon Oct 05, 2015 12:44 am

Re: pause robot from other task

Postby Guenter Grass » Fri Feb 26, 2016 3:57 am

Hi Auden,

there is no interrupt handling in Micro V+ (iCobra). In V+ and the new eSeries robots you could use the REACTI command for this.

What you can do is to structure your robot program to handle this. E.g.

CASE step OF

VALUE 0:
CALL rob.home()
step = 10

VALUE 10:
APPROS pos1,50
BREAK
step = 20

VALUE 20:
MOVES pos1
BREAK
step = 30

VALUE 30:
DEPARTS 50
DO
WAIT
UNTIL STATE(10) > 90
step = 40

END

You can stop the robot motion immediatley with the code I send before from another task
ABORT 0 ; aborts Task 0 but will finish the current robot motion
BRAKE ; stops the current robot movement
DO
WAIT
UNTIL Task(1,0) <> 4 ;wait until Task 0 is finished


Somewhere in this TASK you have to decide if to restart from the beginning or continue with the current step. E.g.
DO
WAIT
UNTIL SIG(i.plc.reset) OR SIG(i.plc.continue)
IF SIG(i.plc.reset) THEN
step = 0
END

Beware of forward processing so that the program is not already in the next step. Make sure to at least end the step with BREAK or STATE(10) > 90 (or even higher if needed).

Best Regards
Günter
Guenter Grass
 
Posts: 189
Joined: Thu Oct 16, 2008 4:34 am


Return to V+

Who is online

Users browsing this forum: No registered users and 2 guests

cron