Sign in to follow this  
Followers 0
arcotangente

Product ID tracking in a sorter machine

4 posts in this topic

I'm writing a PLC program (Q Series Mitsubishi PLC, GXWORKS 2 Software) for a package sorting machine. The logic of the machine is the following:

 

  1. Packages are induced in the conveyor. A barcode reader scanner gets the package barcode.
  2. Barcode is send to our SMS (sorting management system), it calcules the exit and send it back to the PLC.
  3. Package travels to the calculed exit, then is derived into the chute.

 

The tracking of the products is done by an encoder and a shift register. This means that every memory address represents a physical position in the conveyor. Then, the shift register move the bits representing the packages along the memory buffer, till the bit arrives to an address that represents an exit, so the package can be derived.

 

My problem is not the tracking of the product, but the product ID tracking:

 

When a package enters in the conveyor, an ID is set for that product (1,2,...,n). The idea is that this ID is used to track the state of that package, for example if the package was derived in the correct exit, if it has a damaged barcode, etc.

 

My question is, how can I track this ID along in an efficient way. I was thinking in use the same shift register not moving a sole bit, but moving a larger number for example |1|0000011|, where the first bit acts like a flag that represents the existence of a product and the rest of the numbers is the product ID. When the flag gets to the exit address I can substract 10000011 - 10000000 = 00000011, to get the product ID.

 

Is any more efficient way to do this ?

Share this post


Link to post
Share on other sites

Wy back when, we used an array and sized it based on the max amount of items we could get loaded into the system + some overage then just pushed and popped to our stack. It was an array of structured data types so each item had the info we needed. 

1 person likes this

Share this post


Link to post
Share on other sites

I think I understand... for example I can track the position with my shift register + my encoder, when the package enters the conveyor I add 1 entry to my array of ID's. In every pulse I move my bit flag in the shift register and also the item of the array, till the flag gets to the exit address. Then I have to find the array entry that had move "n" slots, where "n" is the number of pulses of the encoder, that is also the memory addresses that my bit flag has shift.

I understand it correctly ?

I'm gonna try it now !

Share this post


Link to post
Share on other sites

We used a photoeye to trigger a camera (sorry not allowed to go into too much detail). It then added the item to an array. I reccomend you figure out how many inches/cm or whatever of travel one revolution of your encoder is and then convert it to a ratio of 1. so say 1 encoder rev = 2 foot of item travel on the conveyor and your divert is 11 foot away from the photoeye you use to trigger the camera. so if you add your item to the array at 0.5 revs of the encoder then your item location is scan ratio + encoder revs. so you would divert at 5.5. We had an absolute encoder. converting it to a ratio of 1 makes the math way easier.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0