Logix5K and Data Shifting

bbishop108

Member
Join Date
Mar 2017
Location
Indiana
Posts
86
Good day all!
I am using a compact logic controller, L16ER, and I have an 8 position rotary table. I will try to explain the table positions as I am writing this, for the most part the table positions line up with a clock. I have stations at 12, 3, 6, 9, the other 4 positions are in between each of these main 4. So just to reduce confusion let's say that they are 1, 4, 7, 10.

The operator loads and unloads parts from station 6 (6 o'clock), parts are then marked at station 9 (9 o'clock). After the parts are marked they are judged at that time to be good or bad (1 for good, 0 for bad).

The problem(s) I have is that the table indexes one position further than the data, meaning by the time the table indexes back to station 6 the data for that position is not available until AFTER the part is marked at station 9. So I have been spinning my wheels trying to figure out how to correct for this. The operator at station 6 has an indicator light (green good, red bad), so if the data shifting is wrong then they will pack parts in the wrong place.

The next issue in conjunction with the previous issue, is when I have no more parts to run at station 6 but I still have to index the table until the table is empty. Additionally, once I am no longer marking/grading parts then I am also not shifting the data from the previously marked parts as the table indexes. So this also makes the data tracking incorrect when parts return to station 6.

Essentially all I am doing is moving one's and zero's, but I have not been able to see a viable solution to account for the table being indexed one position further than the marking/grading of the parts. This has been soooo frustrating for about a week now, if anyone has options for me to explore that would be fantastic. Thanks!!!
 
There are many ways to do this. You will probably get different opinions. I generally don't move data, rather I point to it. So, if there are 12 spots, I will create a structured array of at least that many. Let's assume I'm starting fresh, I will load data into [0], then increment my pointer to 1. Next time I load I will go into [1], etc. You will need to roll this value over. Inside my structured array I would have a position id value. This is the only value I would update when you rotate the table. Then you just look up the data for whatever position you need. You can still change or update data, just look up the position id and change what you need. I hope I explained this clearly, I'm typing on my phone so I'm not going too in-depth.
 
The problem(s) I have is that the table indexes one position further than the data, meaning by the time the table indexes back to station 6 the data for that position is not available until AFTER the part is marked at station 9.
Just speculating here but, it sounds like a parallel (bit) shift register tracking only the presence of a part could be useful. This could be used to empty the table - just check this register for any ON bits. If so, rotate until they're all OFF. This still leaves you the tracking error.

From your description it sounds like the register is being updated with the presence of an inducted part only when the new part is shifted to the second station, not when it is actually placed in station 6.

But, I could be wrong.
 
Three things are needed to track your parts.
1. Part Present switch at load/unload station.
2. Index position switch.
3. Index Command that tells table to move.

Below I Created a DINT called Index_Bit. If you multiply that by 2 on every cycle it will shift bits thru the DINT. Unlatch the End Position(the 9th bit) to keep the size correct at 8 bits. Then Unlatch Bit 2 if Defect detected at 9 o'clock.

Capture.jpg
 
Last edited:
Thanks for the suggestions! This one had me ready to run head first into a wall, but I was finally able to get past it! I more or less had to scrap my original programming as it was just flawed, once I got back to a very basic concept and started over I was able to make it work. I just believe it ended up being me over complicating matters. Thanks for all the advice!!
 
Thanks for the update. If you have the time, a brief description of your solution may help someone else down the road.
 

Similar Topics

Hi all, I'm trying to use the Data Preserve Tool for Logix5k (CompactLogix controller) but I keep getting comms errors and I'm not sure why. I've...
Replies
4
Views
4,104
Using Logix5K version V16.04.00 (CPR 9, when we try to save the project, we get: "Data upload did not complete. Internal Object Identifier...
Replies
23
Views
18,577
Hi all, I'm starting work on a system and the processor for said project is a Control Logix 1756-L82. When I open Logix, however, that CPU is...
Replies
9
Views
2,946
Hello, I have been working on an alarm tracking routine. I take several bits to get a status of a device and load then into an INT Dev_Stat. When...
Replies
0
Views
1,012
Hi all, I'm working on some Control and Compact Logix A&B PLCs, running Logix5K version 24. I've been doing online edits just fine, but I've...
Replies
6
Views
2,437
Back
Top Bottom