Keeping track with multiple parts

jpfletcher

Member
Join Date
Nov 2014
Location
Lexington,NC
Posts
13
Does anybody have a sample plc program for a micrologix 1400 using an encoder to keep up with multiple parts? The part hits a part present switch, the encoder starts counting, then two things happen at two different counts along the machine. First there is a seal inserter which presses a rubber seal along the groove on the part. Second the part travels on down to the end trimmers which trims excess rubber on the front and rear ends.
 
I don't have a sample program, but you are using a counter to start counting encoder pulses when the part hits the parts present switch.

The parts are always the same distance from the point of each of the two operations and the parts present switch.

If you compared the counts with GEQs to compare the present count with a number corresponding to a distance down the line for each of the operations, you should be able to determine when a part is located at the desired location.
you could use enough counters to accommodate the number of parts "in the system" if you need to keep track of each one individually
 
Here is another suggestion. You might want to use the BSL instruction a couple of times to track the part(s) position(s). The 1st BSL for distance to 1st station then a 2nd BSL for distance from the 1st station to the 2nd station. Use the encoder to pulse the BSL and your parts present sensors to detect when to put a bit in the BSL.

Edit:
Here are some links that may help understand the BSL.
http://knoware-online.com/plc_easy_learner.html
http://www.mrplc.com/kb/Programming-Application-How-to-use-Bit-Shifts-%28BSL%29-in-PLCs_71.html
http://www.youtube.com/watch?v=bD699pWxs3Q
http://www.youtube.com/watch?v=iRgkk_n35eo
 
Last edited:
Does anybody have a sample plc program for a micrologix 1400 using an encoder to keep up with multiple parts?
I do have RSLogix500 programs that use encoders and shift registers, but most are too long to post here due to site size limits.

Here is a LogixPro program (RSLogix simulator) for a Bottle Line that uses an encoder pulse and 2 BSR instructions (Bit Shift Right). Two shift registers are set up for Large Bottles in B3:4 through B3:5, and Broken Bottles in B3:6 through B3:7. After the BSRs on Rung 002, the rest of the program uses bits in the 2 shift-register areas to perform various operations on each bottle as it reaches a location as tracked by the shifting bits in the registers.

The LogixPro bottle conveyor and encoder stops at each station for filling, capping, sorting Large and Small, and Diverting of broken bottles, so only the 2 registers are needed. If your parts do not stop at the Seal Inserter, then 1 BSR should do the job. If a part stops (and the conveyor does not) until the seal is inserted, they as JRW said, you could use a 2nd BSR to track the part after it leave the Seal Inserter.
 
Last edited:
With an encoder, what I normally do is establish a "birthplace" for the product, and accumulate the delta of the distance at regular intervals to know it's distance from that "birthplace". Then, for actuators, and other processes that are distance dependent, you can set them to operate upon ranges of that distance value.

Another method I have used for long conveyors or those with multiple entry and exit points is to use an encoder driven pointer to circle through an array representing a "map" of the conveyor contents. The pointer represents the beginning of the belt (or end) and all the actions and other necessary values are calculated as offsets (with rollover) from that pointer. This method is one of those that will puzzle people who look at the code, but it is nearly bulletproof in performance and you are only limited in size by how many arrays of data you can string together for your map. You don't have to shift and shuffle thousands of data points if, for example, you are tracking fifteen parameters of up to 40 different products on a 900 foot belt, they are all sitting there static in the map(s), you just keep sweeping through the map with your pointer and entry point offsets, diverter offsets, printer offsets, barcode readers, scales, whatever, they all come sweeping through the "map" data filling in the values as they go, or moving them to the next system in the case of diverters.

If you only have a handful of products in process at any given time, keeping a short list (array) of them and their distance from that one key "born here" sensor is pretty simple to write and read years later.
 
Last edited:

Similar Topics

Good Morning , I have a Panelview Plus application that I would like see in my CompactLogix which screens are presently displayed on the...
Replies
9
Views
4,006
EDIT: Sorry for the typo in the title, it should say "via MSG" Hi guys, I've come up against something that is likely simple to take care of...
Replies
12
Views
1,890
Hey guys I am new to these forums and I am relearning PLC's after a 10 year break from it. What I am trying to do is keep track of cans that get...
Replies
8
Views
2,347
I have a Micro830, but I imagine my problem is just locical and probably applicable to most any PLC I have a conveyor with a photocell at one...
Replies
12
Views
3,028
An issue has come up at a plant where interlocks are being bypassed by forced I/O.... Specifically this relates to prox switches which detect the...
Replies
1
Views
1,793
Back
Top Bottom