Cancel
Showing results for 
Search instead for 
Did you mean: 

PickandPlace Target Control, robot picks up entity then puts it back down over and over again.

Valued Contributor
Valued Contributor

Hello,

 

I'm trying to model a pickandplace robot that picks up a part and moves it from station to station. I have done this a few different times before, but in this case it isn't working.

 

The robot picks it up at the first station and moves it to the seconds, but then instead of taking it to the third, it starts picking the part up and putting it back down on the second station over and over again.

 

I suspect that this may be due to the presence of code that causes the pick and place to decide which station to go to after the second, but as far as I can tell this code should work.

 

Please see the attached simulation.

 

Any suggestions?

1 REPLY

Re: PickandPlace Target Control, robot picks up entity then puts it back down over and over again.

Valued Contributor
Valued Contributor
I just realized my problem. Apparently when I added my code, I added it above the standard line of code for OnTarget methods: ?.setDestination(?.succ, false /* true if robot should wait at target */)

This code was essentially resetting the destination to the same successor every time. I missed it because there were enough blank lines between the bottom of my code and that line that it was hidden.

Thank you everyone for any thought you put into this!