Newbie with Simple Sorting Conveyor

David1224

Member
Join Date
Nov 2013
Location
Ohio
Posts
19
Hello everyone,

I am new to the forum and have only basic PLC experience. I have an application where I need to use a CLICK PLC to control a roller conveyor to direct boxes to one of four lanes using three pop up diverters.

There is no way of monitoring conveyor position (the conveyor is at a constant speed), but there are photo eyes located at each of the three diverters for box position sensing. The time/distance between boxes is variable and it is possible for up to 5 boxes to be introduced before one would reach the last lane. Lane selection will be manual input from one of four push-buttons at the start of the conveyor.

I have attempted to research various methods of handling the box queue(shift register and FIFO) and have only managed to confuse myself. Also, I know that the Click PLC instruction set is somewhat limited. I was hoping that someone could point me in the right direction.

Thank you!
 
I don't know if "simple" should be used with any sorting conveyor! :D

Some questions:
1). Can boxes be removed from the conveyor while it is running? If there are four boxes on the conveyor and Joe decides to grab one of them before it gets to the diverter...

2). If the power goes out while it is running, what are the consequences of starting back up with boxes on the conveyor that may go to the wrong divert? Will it be a big deal just to "purge" them out the last divert?

3). Is there a photo eye at the loading point on the conveyor?
 
1). Can boxes be removed from the conveyor while it is running?
It is unlikely that boxes will be removed after loading and lane selection (they travel to an un-manned area). Of course, it is not impossible for boxes to be removed.

2). If the power goes out while it is running, what are the consequences of starting back up with boxes on the conveyor that may go to the wrong divert? Will it be a big deal just to "purge" them out the last divert?
Wouldn't be a huge deal. Would it be possible to use retentive memory addresses to solve this problem? I'm using the Click C0-01DR-D CPU with battery backup retentive memory.

3). Is there a photo eye at the loading point on the conveyor?
There isn't currently, but there is a push-button station with 4 buttons to select a lane. Eventually we would like to use a barcode reader to automatically select a lane. There will likely be a photo eye installed at that point.
 
One solution:

  1. Utilize the block copy instruction as a shift register. Depending on how you want to data to move in the register and whether the instruction moves the data 'up' or 'down', it may require one or two instructions to accomplish. The simplest case is n+1 is moved to n+0 for a length of X, that is, the data moves 'down' in the register. New values are entered at the 'top' of the register.
  2. Make sure there are enough stages (zones) in this register so that one zone does not encompass more than one divert lane. To allow for future expansion don't make the zones the minimum size - you might have to fit a new lane in between existing ones someday.
  3. Drive the shift register with an edge contact (TD?) derived from a retentive self-resetting timer, a. the preset value of which will determine the width of each zone and b. the enable input of which is connected to a 'line running' contact. Perhaps a contact off of the output which drives the line's drive motor so that the data in the register doesn't get lost, that is, keep on shifting, when the line stops. A pitfall of this method is that the program can't know how fast the conveyor is actually running. If a belt loosens and the line slows things could go haywire. Likewise if it's a VFD drive and someone tinkers with the speed setting.
  4. Place destination data into the register when: a. the operator has selected a destination and b. has pressed the release button and c. the shift register timer times out.
  5. Lock out further releases until the last package has cleared the first input zone, otherwise you'll write over a previous entry with a new one and the old destination will be lost.
  6. You need to use some system to encode the destination button presses. Normally the end result would be an integer corresponding to the lane number. This makes it easy to do a compare for equality with a math/compute instruction downstream at the divert point.
  7. Once the destination is encoded and is shifting down the line, each zone will cover some area of the conveyor (how much will depend of the timer value above). When a code in a given stage of the register matches the code for a particular lane the divert for that lane can be enabled - that is, if the zone match (some fixed memory value is compared to the value in the stage of interest in the shift register) is true AND the PE for that lane is blocked/cleared then acutate the divert.
  8. After the package and data at the release point are inducted, clear out the new data location. This will insure that you don't continually shift in a '2' for example.
That's a lot to digest for a beginner, I know. Reference jawolthuis' opening statement!
 
To monitor conveyor position you need to add a toothed sprocket and proximity sensor to the "turnaround" pulley on the conveyor. The pulses this makes is used to increment a shift register. Next at the entrance to the conveyor you need a box sensor to load a bit into the shift register. Next, determine how many pulses are needed to get near the sensor for a particular divert lane then set the value for the shift register slightly less, then let the sensor plus the shift register trigger the divert device. Other methods will work but this is how I did it. Lane assignment is another problem.The lane is normally printed into the barcode and detected by the barcode scanner. Of course, with proper translation or selector switch the lane could be changed.

Edit:
I have a complete sortation program for a SLC500 I wrote 11 years ago somewhere and will look for it if needed.
 
Last edited:
If the conveyor is at a constant speed, as David1224 notes in his first post, then an encoder is not needed, just timed pulses. Determine the number of pulses which pass from the decision position until each diverting lane's PE. Establish a FIFO queue for each divertor lane.

As each divert decision is made store the number of pulses determined above for the selected lane into the next indexed spot in that lane's FIFO queue and shift the index.

At each time pulse decrement each non-zero FIFO position in each lane. If the first position in a given queue changes to zero then enable the divert action at that lane (assuming the lane's PE is made) and shift that lane's FIFO queue.
 
Thank you for the responses but I'm afraid I'm still lost for now.

I don't have any way of tracking conveyor position (other than somehow using the divert PEs?) so I'm glad to hear that's not necessary for fixed speed.

I will study all of your recommendations and hopefully something will click soon!
 
I have attempted to research various methods of handling the box queue(shift register and FIFO) and have only managed to confuse myself.
The Automation Direct CLICK PLC does not have a FIFO instruction, nor an indexed or indirect-address COPY instruction. It does have a Bit-Shift instruction, and also a Math Word Right Shift (RSH) instruction. In order to use the RSH instruction, I had to "Copy-Pack bits into a 16-bit word, do the right-shift, then "Copy-Unpack" back to another set of 5 bits.

The shift-register timing bit is constructed from the Pushbutton inputs, so a timer is not needed for that, nor does the length and speed of the conveyor make any difference. In other words, my program simulates FIFO registers using bit-shift registers.

Using these two instructions for each of the 3 diverter lanes, I have contstructed an untested program that ASSUMES that boxes bound for the 4th undiverted lane can be detected and counted so as to avoid needing a 4th set of Bit-Shift Registers. If the 4th-lane boxes turn out to be uncountable, then a 4th Bit-Shift register and associated rungs will be needed.

The attached ZIP file is the actual CLICK PLC program.
 
Last edited:
I did not have time to comment all the rungs, but this should do exactly what you want:
(I do not have a click to test on, so it is very possible I missed something... Just let me know)
 
The Automation Direct CLICK PLC does not have a FIFO instruction, nor an indexed or indirect-address COPY instruction. It does have a Bit-Shift instruction, and also a Math Word Right Shift (RSH) instruction. In order to use the RSH instruction, I had to "Copy-Pack bits into a 16-bit word, do the right-shift, then "Copy-Unpack" back to another set of 5 bits.
Lancie, the instruction set (http://www.automationdirect.com/static/specs/clickinstr.pdf) for the Click lists a Block copy. This sounds to me like an A-B file-to-file move. ASSUMING they function alike, using this it would only be necessary to load the desired data at one end then shift it.
 
ASSUMING they function alike, using this it would only be necessary to load the desired data at one end then shift it.
Yes, but best I can tell the CLICK block copy is not like the AB COPY. There is no indexed or indirect addressing for the CLICK Copy instructions (or any others), so the Block Copy cannot (by itself) simulate a FIFO register by copying downward a certain number of indexed words. (See attached picture). However it can be done by using the Pack Copy, then a FOR-NEXT loop for the RSH for the number of times set by a box counter, then Unpack Copy.
(I do not have a click to test on, so it is very possible I missed something... Just let me know)
The CLICK C0-01DR-D CPU only has 8 inputs X001 to X008. Only 7 inputs was mentioned by David. Somehow you multiplied that into 10! He would have to buy an add-on Input module to use your program as is.

Click COPY Block.jpg
 
Last edited:
Yes, but best I can tell the CLICK block copy is not like the AB COPY. There is no indexed or indirect addressing for the CLICK, so the Block Copy cannot (by itself) simulate a FIFO register by copying downward a certain number of indexed words. (See attached picture). However it can be done by using the Pack Copy, then RSH, then Unpack Copy.
Yes, the Click has no fancy addressing modes. The block copy shift register would be a bare bones affair. To actuate a given divert one would need to select the correct (fixed) shift register stage for the compare. The screen shot you posted of the instruction does not explicitly state that source and destination addresses cannot overlap so I'm ASSUMING that my initial move of n+1 to n+0 would work.

The CLICK C0-01DR-D CPU only has 8 inputs X001 to X008. Only 7 inputs was mentioned by David. Somehow you multiplied that into 10!
What did I multiply?
 
The CLICK C0-01DR-D CPU only has 8 inputs X001 to X008. Only 7 inputs was mentioned by David. Somehow you multiplied that into 10!

This was directed at me.
I just wrote out a program as I would have done it. I didn't notice where the model no. had been spec'd. Personally, for the money and robustness of the system (based on my limited knowledge of this app), I would expand the I/O and add the loading point PE.

(I also added in the queue for divert 4 which isn't actually even a divert, but it gives a place for every box to be directed, and will make it easier for someone to add error handling to the app.)
 
I think I'm starting to follow along now, especially with the visual examples. I'm going to explore the programs you guys provided to make sure I understand what's going on.

At first glance, it appears that Lancie1's method may work best for my application since it doesn't require any conveyor position input (or timed pulses) other than the existing photo eyes. Thanks again for everyone's help!
 

Similar Topics

Hi All, I've just recently completed a basic training course on PLCs. I've been playing around with Step7 from Siemens and I'm trying to...
Replies
7
Views
1,821
I have surfed this board for a while and have learned much, but mechanics are my real forte so please forgive my ignorance of a solution for what...
Replies
7
Views
4,446
Hello all, I'm a new member here. I've joined as I want to learn about PLC programming. I've got a few questions to begin with. To get me...
Replies
37
Views
4,532
Howdy folks. Been doing PLC programming for like 15 years now in LD and ST, but I'm trying to learn SFC now and have a kind of dumb question... I...
Replies
4
Views
1,382
Hello. New to Unity and had a couple quick questions. Can a Modicon M340 output to a small multiline LCD screen and not a full HMI?
Replies
4
Views
958
Back
Top Bottom