Indexing/tracking

Srb0606.sb

Member
Join Date
Oct 2016
Location
NC
Posts
15
Hello,

I have a AB compact logix L36ERM controller and a vision system.

I am in need of a example of how to track 4 failed parts that have individual input bits for a failed criteria.(ex part 1 bad=input 1 on, part 2 bad = input 2 on...etc) Part Good input =0

The 4 parts move as 1 on each trigger/pulse to index. The (1234) 4th part always currently lands under a reject marker 4 indexes away. I can currently mark the fourth part every time no problem. I know on the next index after I can possibly time the other 3 parts to be marked while indexing the next new set of 4 under the reject area. I am struggling to determine a solid way to keep track of all previous and next "failed" part history until it gets to the reject marking area 4 indexes away from the inspection station.

The parts cannot move individually and each individual part of the 4 will need to possibly be marked.

I would like help to identifying if a FIFO could be a solution or an array of some sort?
Possibly a BSR instructions. I am not sure how to create and keep the history buffer memory up until reject area.

I am young in the controls game and any logic examples will be extremely helpful in my understanding.

I have read at least a 100 posts on here today and have not found any solid direction.

Thank you all!
 
Maybe I'm being simplistic.

Sounds like you check the parts 4 stations from where your reject bin is. I would just use a sint for each part. (or Dint, but it seems overkill for what you are doing)

part1
part2
part3
part4

when you check the part at whatever station, write to the first bit of each part sint.

When the parts index to the next station, do a bit shift right.

Repeat until you get to the reject station (how ever many bits down you have shifted) read each bit of the four parts at that. If any of them are 'bad', push it to the reject bin. Since you only need 4 bits, the bit shift will keep history of the last 12 or so parts you rejected. If you used a dint, you could have the last 28.

There are many, many other approaches. I've seen guys use integers for each station (ie 1000 = good part, etc)
 
Conceptually, don't think of one index as a single index. You need to think of it a four index motions that just happen to occur in a single, smooth action. Given that, you need to identify a piece of information you can use to indicate that the part group has moved one part spacing. Ultimately this is what will drive your part model.

How you choose to implement your part model is really up to you. I haven't used the FIFO construct enough to know if you can insert values in a specific location in the FIFO array, which you will need to be able to do. I like circular queues because they are computationally efficient but they can be hard to keep track of conceptually. The easiest tracker for a fixed distance tracking problem with Logix processors is probably an array that contains enough elements to span the number of locations needed to move from the initial position to he end position. With this you can just use a COP to move the contents of your array down one element every position increment. The location where you define the part quality would be the four locations starting at the upper end of your array. Copying the complete array contents starting from array location 1 to array location 0 will move the array contents one location toward 0.

Array location 0 is your marking location. If a part is bad insert an indicator in the array at the appropriate location based on how many part distances it is away from the marking location. Once the indicator reaches location 0 you know the part is bad and needs to be marked.

Keith
 
I am not quite clear in the indexing
one index move moves all 4 parts to the next position like there are in a 4 pocked fixture
or one index mover each part to the next position
if it one part at a them then a Bit Shift is the best choice
if you move 4 parts on each index position then create an array of INT's use the lower 4 bits 0-3 s use to represent the 4 parts if part is bad place a 1 in that bit as the index mover copy the int to the next position in the array at the dump position if the bit is true then part under it is bad dump it other variations of this can be used to track part numbers just create a user defined data type create an array and copy the data on every index
 
Thank you all, and yes all 4 parts move at once. I like both Ideas and I am visual learner so I am attempting to understand.

@Rson on the BSR, I use the index bit to trigger the instruction and the bit address is a new tag?


I think I have the array concept down fairly simple. I am also wondering if my index is 4 motions away with the 4 part at reject only at that point, on the 5 move, what position am I looking at in the array to trigger for the other 3 parts? Next one down?
 
To index your camera results you only need to map the 4 inputs to a DINT. When your conveyor indexes then Multiply the DINT by 16. This will shift your Results 4 positions in the DINT.

Index 4.PNG

It sounds like your indexing 4 times to get to the reject marker position. I would suggest installing 3 additional markers if physically possible. This would allow you to monitor a status bit for each location and control which marker to fire. Whether you install a marker in the first 3 index positions or 4 markers at the 4th position it would make the system more accurate instead of using timers.

Index tags.PNG
 
Thank you

Thanks this is very helpful! I appreciate the images as well. However, only one marker is for all 4 parts in one position. (couldn't make it that easy right?) I think I answered my own question here, so deleted it. haha thanks again
 
Last edited:
First, You need a Part Detection Photo-Eye. Hopefully there is space between each part that would allow you to see each one individually as they index past the marker. Then I would do this. Create a DINT called Part_Detected and use my Part Detect PE to populate the bits in the DINT as they are detected. Then Series Part Detected and Reject Status Bits to Trigger Marker.

First thing is to clear your Part Detection DINT at the beginning of an index cycle.

Part Detect CLR.PNG


Then Trigger the Marker as needed.

Marker Trigger.PNG
 
awesome this did work and right now I'm using timers, however the photo eye will help improve ! Again thank you for your help!
 
Glad you got it working. FYI, The part detection photo-eye logic requires 4 parts every time to work correctly. If you have missing parts in the group of 4 then the logic would need to be different to allow for missing parts.
 
Glad you got it working. FYI, The part detection photo-eye logic requires 4 parts every time to work correctly. If you have missing parts in the group of 4 then the logic would need to be different to allow for missing parts.


So I have ran into a snag where I cant seem to figure out how to effectively reset my timers or the one shots so that If 2 indexes of 4 bad parts happen back to the bits will cycle effectively instead whats happening is it immediately rests since the bit is still high and causes triple marks and printer faults. I can successfully mark four caps on each single index

Here is what I attempted to do with your sample code. FYI I have been out on sick leave due to surgery so I am back debugging.

Bad Part Identified.JPG trigger bit shift and time.JPG trigger marker.JPG
 
Last edited:
Do the Keyence bits reset each cycle?

Does the Keyence bit need a acknowledge to reset?

Do you have an index complete bit?
 
To Reset your timers add an OTE after the Multiply of Shift Register. Then place a XIO of the OTE in your Timer Rung. That will reset the timers for 1 scan each index cycle.
 
The Keyence bit does not reset, it says a one of until the next image is taken and updated, so its possible to always stay high.

The transmission of receiving programs does require a acknowledgment through a MSG instruction, however the Good or NOT GOOD part signal does not its discrete i/o.

I do have index complete bit, however I was not successful in using it.

I have also used the OTE and XIO scenario with no success the timer resets before the parts move marking incorrectly .


attached is what I came up with for 4 parts and it worked appropriately for 4 parts only, for example part 1 and 3 only ii did not reset so I am creating individual counters to account for all scenarios.

reset comp.JPG
 
Last edited:
I have dealt with a similar programming scenario some years ago.


We had a 6 part index, and I used a fork sensor to look through holes in the belt when they were being moved.


I used a BSL instruction that was being triggered by the sensor looking through the belt.


The "data" bit (sorry I don't do AB every day and its been a while) is tied to the anded inspection result outputs from the vision systems, if you get 2 passes, then your BSL will move a 1 however many places you tell it to. Camera trigger needs to be positioned so that you will take a picture and have time to acquire results before you shift the bit.


You can define in the instruction what size the data you want to retain is. I would steer away from timers if you can.


Is it guaranteed you will have 4 parts every index, or is there a possibility it could only be 2 or 3 physical parts.
 
Last edited:

Similar Topics

Hi everyone. Been banging my head against a wall trying to figure out tracking on a servo driven conveyor. I already have a tracking array setup...
Replies
12
Views
3,354
Hello, I'm in the process of converting a slicer from an Ultra3000 drive to a Kinetix 5100 using the KNX software version 4.00. The current...
Replies
0
Views
498
Hello! The equipment I'm working on uses a lot of indexed tags I guess you'd call them. I thought it was indirect addresses maybe but all the...
Replies
9
Views
994
Hello, Please see the attached rungs of some sort of indexed sampling routine that is currently in a SLC500. I am tasked with migrating to a...
Replies
2
Views
1,262
Phil should index or allow someone to index his forum by inserting #keywords at the end of the posts. This would make it easier to find...
Replies
3
Views
1,633
Back
Top Bottom