multitasking with vision

multitasking with vision

Postby sherif1tce » Tue Aug 19, 2014 8:37 pm

Dear Sir,

We are using adept Desktop 4.2 with adeptsight vision and cobra i600 integrated automation pick place system . We like to run the vision sequence as parallel task along with robot motion . Therby , I can save some cycle time . kindly help me with sample code if possible.

Thnaks in advance.
sherif1tce
 
Posts: 24
Joined: Thu Mar 13, 2014 3:01 am

Re: multitasking with vision

Postby Guenter Grass » Wed Aug 20, 2014 5:32 am

Dear Sir,

here a small example you can use.

_______________________________________________________________
TASK 0 (robot task)

PROGRAM rob.main()

vis_ready = FALSE
EXECUTE 1 vis.main

WHILE TRUE DO
DO
WAIT
UNTIL vis_ready == TRUE

; pick the part and set the variable vis_ready to false as soon as the robot is outside the field of view
;e.g.
APPROS vis.loc,60
MOVES vis.loc
BREAK
SIGNAL a.vaccuum.on
DEPARTS 60
APPROS place,60
DO
WAIT
UNTIL DISTANCE(HERE,DEST) < 100 ;wait until the robot is within 100mm of the APPROS place,50
vis_ready = FALSE ;signal the vision task that it can commence (robot is outside the field of view)

MOVES place
BREAK
SIGNAL a.vaccuum.on
DEPARTS 60

END ;WHILE TRUE DO

END
_______________________________________________________________


_______________________________________________________________
TASK 1 (vision task)

PROGRAM vis.main()


WHILE TRUE DO
;waiting for robot task to tell us that the robot is not in the field of view
DO
WAIT
UNTIL vis_ready == FALSE

;the vision part you already have. Please add it here.
;and set the global variable vis.loc for Task 0
;e.g. get the first part found by the locator
SET vis.loc = VLOCATION(seq,locator,1,1311)

;after a part is found we change vis_ready to TRUE
vis_ready = TRUE


END ;WHILE TRUE
_______________________________________________________________

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

Re: multitasking with vision

Postby sherif1tce » Tue Aug 26, 2014 12:50 am

Dear Mr.Gunter ,

Thanks for sample code. I tried and found working except about last three components pick position is not updating even though vision seqence updating in parallel task . when same sequence running serially ( without separate vision task ) , until last component is used .pick position updating .

Kindly help me to resolve this issue.
sherif1tce
 
Posts: 24
Joined: Thu Mar 13, 2014 3:01 am

Re: multitasking with vision

Postby Guenter Grass » Tue Aug 26, 2014 2:25 am

Dear Sir,

it is near to impossible to guess the reason for the error you see.

Can you please post your program or send it to me directly?



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

Re: multitasking with vision

Postby sherif1tce » Wed Aug 27, 2014 10:19 pm

Dear Sir,

Problem sorted out . Reason is no of components (Vresult ) is not updated in vision rask . After adding that , problem solved.
sherif1tce
 
Posts: 24
Joined: Thu Mar 13, 2014 3:01 am


Return to AdeptSight

Who is online

Users browsing this forum: No registered users and 2 guests

cron