Universal Robots Forum

Tracking 4 docks

Still green to Universal programing and trying to find the best way to solve a new issue with our recent installation. We have 4 docks that hold fixtures for weld setups for an automated welder. The docks now will be 1 and 2 setup with type A and 3 and 4 setup with type B. (Originally they were all the same) The Cobot picks from the appropriate dock when it is flagged ready and feeds it to the infeed conveyor of the welder. When it is finished it comes out of the outfeed conveyor. (FIFO) We now want to keep the fixtures from 1 and 2 returning to 1 and 2 and the same for 3 and 4. Is there a way to virtually at the cobot to track these to return them to there docks. We are monitoring the docks with sensors so we know if the are open. Currently we have it just returning the finished fixture to the next available open dock. Thanks for pointing me to any similar discussions or any help that you can give.

Hi David,

running a counter for loading and one for unloading the welder in combination with an array storing the origin of the parts could be possible.


Hi David,

Without knowing your full setup it’ll be hard to give a specific answer. Based on what you mentioned in your text it looks like you have a sensor on each dock to let the robot know when they are ready to be picked from. I’m assuming you’re using If-Statements here to control which is picked. One way of potentially doing this is having a variable associated with the current dock and have it be updated when it’s picked then reset when it places. I’ve written some potential pseudocode below to try and explain, hope this helps!

   DockCounter = 0
*Picking from Docks*
   If DockSensor1 = True
      *Pick from Dock 1*
      DockCounter = 1
   If DockSensor2 = True
      *Pick from Dock 2*
      DockCounter = 2
*Placing in Docks*
   If DockCounter = 1
      *Place in Dock 1*
      DockCounter = 0
   If DockCounter = 2
      *Place in Dock 2*
      DockCounter = 0
*Error handling on Dock outfeed*
   If DockCounter = 0
      *Flag for operator/error handling*