Hi, I am working with conveyor tracking. I wonder how to define the SyncIn Zone, Sync Zone and SyncOut Zone???
Hi @tuan.hoang, welcome to the forum!
I assume you’ve used these specific parameters while programming other robots? We don’t have those on the UR system, if you could define them clearly then we can explain how to achieve the same results with UR.
Hi @ajp, thank you for reaching out!
Yes, I do want control these parameters. Can you help me to explain how to achieve it.
Hi @tuan.hoang, Please explain what the parameters are intended to do exactly.
Hi @ajp, let me simplify it. I want to define a zone, when sensor detects object, then object keep moving. when object enter the zone, we will do conveyor tracking and pick and place object if object is still in the zone otherwise object is out of the zone robot do nothing.
Hi @tuan.hoang, ok this is doable but will require some scripting. What is the state of your program so far? If the below doesn’t make any sense whatsoever, this may be too much to try to support over the forum and you should contact your local UR partner to help you with the program.
Lets say your Synczone is 0.5m wide and your encoder ticks per meter is 10,000. You’ll need to add a thread to your program to track how far the object has moved through the synczone.
It will look something like this:
Before Start tpm = 10000 synczone = 0.5 Main Program . .(other motions and conveyor tracking code etc) . . Thread_1 #wait for sensor signal to show object entered sync zone Wait object_detect #you can check the reachable variable in your main program to see if an object is present in the synczone reachable=True #record encoder ticks when object entered zone start_ticks=get_conveyor_tick_count() #loop below code until object is out of reach while reachable: #get current encoder tick count current_ticks=get_conveyor_tick_count() #calculate how far the object has moved since it entered the synczone moved=(current_ticks-start_ticks)/TPM #check whether it has moved beyond the synczone or not reachable = (move < synczone) #wait 0.1 seconds between loops wait(0.1)
Take this as pseudo code rather than something that is perfectly formatted and will run directly, but this should hopefully give you an idea of how to get started with this? Your main program would check the reachable variable to see if there is an object to be picked by the robot or not.
Presuming the robot is not always going to be ready and waiting at the pick position, you’ll need to add more code to offset your pick position based on how much the object has moved by the time you’re ready to pick it (essentially catch up with it on the the conveyor before you start tracking).
This approach would also work to build a FIFO queue to track multiple objects. There’s an example of this on the support site at the link below which might help, although it is quite old.
Hope this helps. We aim to publish a more complete guide on advanced conveyor tracking in the near future.
Hi @ajp ,
Thank you for helping me out. I got your idea and will test myself. Just one more question, I do conveyor tracking with the guide in training section using conveyor tracking wizard. It works if I taught the Wait position right above the sensor which detects object but when I choose another position It does not work. Is there anyway I change this Wait position. I attached the picture which includes the guide I followed, please take a look and give me some suggestion.
Thank you a lot.
Hi @tuan.hoang , I assume that your object always comes in the middle of the conveyor (seen as perpendicular to conveyor motion), so we’re just talking about how to compensate in the direction of motion of the conveyor?
Lets say you’ve got your conveyor aligned with your robot base coordinate system, and the conveyor motion is in the positive X direction. In this case you would want to teach PICK_POS at the position directly above the object when it triggers the sensor as you have been doing, but then offset PICK_POS by how much the conveyor has moved, then move to this starting position instead of the original pick pos.
Where moved is calculated from tick counts in the thread as shown in example in previous post. If conveyor is not aligned with base coordinates, you’d need to use pose_trans instead of pose_add with a feature representing your conveyor orientation.
Could I get the rising edge or falling edge DI signal???
Thank you very much.