Conveyor Tracking UR robot

Hi, I am working with conveyor tracking. I wonder how to define the SyncIn Zone, Sync Zone and SyncOut Zone???
Thank you

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.

1 Like

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)

    #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
    #record encoder ticks when object entered zone
    #loop below code until object is out of reach
    while reachable:
       #get current encoder tick count
       #calculate how far the object has moved since it entered the synczone
       #check whether it has moved beyond the synczone or not
       reachable = (move < synczone)
       #wait 0.1 seconds between loops

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.

1 Like

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.

UPDATED_PICK_POS=pose_add(PICK_POS, p[moved,0,0,0,0,0]

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.

1 Like

Hi @ajp,
Could I get the rising edge or falling edge DI signal???
Thank you very much.

Hello @tuan.hoang apologies this response may come too late to be useful as I have just returned from leave. Could you explain in a little more detail what you you mean by “get” the rising/falling edge? The system will count them for you.

Hi @ajp, wish you have a good day. I mean, for example, if I use “Wait” node for waiting a signal from input 0 High and increase a variable + 1. but if input 0 keeps High state, my variable increases +1 continuously until input 0 Low, I want to use the falling edge of signal or rising edge of signal to make condition to increase my variable.
Thank you.

Hi @tuan.hoang, there isn’t a specific functionality to achieve this. I would just add a WAIT LOW after you have incremented your variable, that way it won’t get back to the wait high again until you’ve passed a falling edge…

Is the signal coming from an encoder? Alternatively you could probably actually enable conveyor tracking on a couple of input pins and use that to count them… even if they’re coming in really slowly.

Hi @ajp , thank you for your advice, I just use that case to explain what I want to achieve. I just want to know is there any way to do it, but if not I will try other solution for my case.
Thank you

hi @ajp could you elaborate a little bit more on the pose_trans if the conveyor is not aligned with the robot base axes please?

I’m quite confused between choosing which are the necessary transformations required.

movel(pose_trans(tray_pos, dir_conveyor)). If thats the case, how do I include/combine the information together?

As far as I can see, there are 3 main info, distance_moved, tray_pos, dir_conveyor.

i’m guessing

first = pose_trans(p[0, 0, 0, dir_conveyor[3], dir_conveyor[4], dir_conveyor[5]], p[0, dist_moved, 0, 0, 0, 0, 0])
second = pose_add(tray_pos, first)

and finally movel(second).

Could you advise if that should be the way indeed please?

I managed to test the above combination of pose_trans and pose_add and they work as expected indeed.

Hi Elvin,

Yes it looks like this approach should work. Is the issue now resolved?

yes it has been resolved.