I would like to modify the PickPlaceSeq so that the robots moves to a position close to the pick position after placing is done. This movement should only be done when there are no available pick or place locations and the robot otherwise would just be waiting for the next job.
I’m a newbie in RAPID programming so any suggestions or adwices are very welcome.
As a newbie I wonder why you choosed to modify the Pick routine? Is the execution “hanging” in this routine waiting for new jobs? (Haven’t found any RAPID programming manual so it’s a bit hard to know how the statements work…)
If I understand this right, the row
GetItmTgt ItmSrcData{Index}.ItemSource,PickTargetMaxTime:=nWaitTimeTimeflag:=bTimeout;
starts a timer that will be checked at the next call to Pick and if more than 2 seconds passed bTimeout will be set.
Is bTimeout accessed indirectly somehow (pointer?) or is the assignment misstyped (reversed)?
The GetItmTgt is a blocking (hanging) instruction.
If the MaxTime argument isn’t used, the GetItmTgt will block forever or until the PP is moved.
In this case, the program pointer will wait for 2 seconds. After that it will automatically be released and the bTimeout flag will be set to TRUE. If a target gets available in the queue before the 2 second elapsed, the instruction is released but with the bTimeout flag set to FALSE and the data is held in the PickTarget variable.
I hope this makes it understandable.
I also attach the RAPID reference manuals for you. That might help a little bit.
webwiz/148/RapidRefManuals.zip