Sign in to follow this  
Followers 0
Erin R.

Need Help With FIFO

13 posts in this topic

Hello, First time I've posted here but have a question for you all... I need to track my product from a load point through the process to an unload point. There are only 4 processes total including Load and Unload. In a nut shell at the Load Station I load product from 6 lanes into carriages on an indexing conveyor. When the conveyor indexes; those 6 carriages are shifted and replaced by 6 more carriages. I already have in place a way to detect if the lane properly loaded product or failed to load product. I want to track these around the conveyor. So an example would be I need to move 111111 for 6 good products from station 1 to station 2. I also want to be able to replace data; so that if my process in lane 2 failed at station 2, that I could replace the 111111 with a 101111 Would it be best to do this with a FIFO; (FFL instruction and FFU) in AB RSLogix 5000? Or is there a simpler way to do it? I think I read up on possibly the COP instruction would do this for me easier. So I could basically write the logic to copy a 1 to a location if it is good product and copy a 0 to that location if the product is bad or the process failed? Thanks in advance for your advice.

Share this post


Link to post
Share on other sites
FIFOs are nice, but Bit Shift's are easier. Have you looked at a Bit Shift Concept for tracking? Here is an article I wrote to try and describe the concept. http://www.mrplc.com/kb/index.php?article=71 See if that will work for your machine.
1 person likes this

Share this post


Link to post
Share on other sites
Thanks for the quick reply on this Chris... I sent you an email and also added a comment to the article, I needed to clarify something. Please correct me if I am wrong. Thanks again.

Share this post


Link to post
Share on other sites
Post your questions and comments here, so that everyone can benefit.

Share this post


Link to post
Share on other sites
The question I asked was regarding that he mentioned in the article he was going to load B3:0/1 and B3:1/1 with a Zero coming from B11:0/0 because it is always off. I was wanting to clarify if this is actually the case, because I am thinking(could be thinking wrong) that he will be loading the Zero into B3:0/0 and B3:1/0. I was also commenting on what I am going to have to do in order to apply this to the RSLogix 5000 software since his example came from RSLogix 500. I went on to explain the basics of the machine that I have. It is very similar to his example. Yet, my machine only has 4 stations.

Share this post


Link to post
Share on other sites
That is correct. Since I am using this bit shift to track good/bad part status, I always load a ZERO because, I want my station to run and set the bit to "1" which means good. Also when the station runs, I always set it to false or "0" until the station is complete, and sets it true again. I dunno if you studied the animated gif file I made...I took while to make that dumb thing, but I figured it would be a good way to see how the parts move through the machine and what the bit shift is doing. As far as the logic question you asked, you would just create a DINT word and access it at bit level. Since the 5000 PLC is a 32-bit processor, you actually get more bits in your shift than a 500 based PLC, where you can only move or shift 16 bits at a time. I dunno if that helps or not.
1 person likes this

Share this post


Link to post
Share on other sites
Not to detract from Chris's excellent work with bit shift, but there is another way to skin this cat. You don't mention the flavor of PLC you're using and the code would be similiar but diffeerent for SLC / PLC / CLGX so I'll state my idea interms of using a CLGX and you can adapt backwards to SLC/PLC. You could use an array of DINT or SINT. For example declare a tag TrackArray of type of DINT[10]. Now we'll partition the array as follows: TrackArray[9] == Load Station TrackArray[8] == Process Station 1 TrackArray[7] == Process Station 2 TrackArray[6] == Process Station 3 TrackArray[5] == Process Station 4 TrackArray[4] == UnLoad Station TrackArray[3] == Memory of Work Loaction 1 TrackArray[2] == Memory of Work Loaction 2 TrackArray[1] == Memory of Work Loaction 3 TrackArray[0] == Memory of Work Loaction 4 For any TrackArray[x] element the boolean .1 == lane1 ; .2 == lane 2 and so forth to .6 == lane 6 Now each time you shift the carts a process station you simply run the commands COP TrackArray[1] TrackArray[0] 9 and then FLL TrackArray[9] 0 You can write you station process code to zero out those stations that fail or a Chris suggests zero at cycle start and then 1 at successful complete. Hope this is clear.
1 person likes this

Share this post


Link to post
Share on other sites
Chris, I do understand most everything that is going on, as far as, how you are writing a Zero to the status bit until you verify that the station completed then you write a One back into the status bit. I was just trying to verify if your explanation is correct. You are writing a Zero to B3:0/1 and B3:1/1... I do see where you are manually writing those zeros with the program. But I do not completely understand if you are saying that the BSL is doing that for you. Further, I think I am having trouble wrapping my brain around the idea, because although I am running 4 stations including the load and unload. I have 6 lanes at each station. So when my loader cycles I will load 6 of my product at that time. Then when I index I will shift those 6 products out and I will have 6 empty carriages come in and load 6 more products. I think I need to stop thinking about it as I am loading 6 products and look at it as I am loading 1, and just duplicate the logic 6 times with a different DINT to track each lane. Am I on the right track with that way of thinking? Thank you. Edited by Erin R.

Share this post


Link to post
Share on other sites
I write or set an UNLATCH to make sure it's ZERO going into the bit shift. I doubt it will ever be possible for the bit shift to load a "1", but by me setting the unlatch, I am sure it's going in as a zero. That's me being parniod...sorry about that. Also, this is why it's good to post in an open forum because you get other ideas from other great programmers in the group. One thing I have learned, there are so many ways to program a PLC, everyone has their own style and concepts, and I never view one style or method as "wrong". Thanks for sharing BobLFoot!

Share this post


Link to post
Share on other sites
Ok, I am starting to understand more clearly. And yes Chris, I have always thought there are 1000 ways to program a machine to do the same thing in the end... BobLFoot... I am leaning toward the track array. example that you show here. The only thing that has me in a programmers block is that I have a 3 lane offset after the load station. Our layout at the load station is from right to left... 4, 5, 6, 1, 2, 3 ... So with the 3 lane offset after the product leaves the load station it goes to process 1 but only lanes 4, 5, 6 go into the process 1... lanes 1, 2, 3 will be in the offset area. Thats why I am wondering if I wouldn't be better off to treat it as a single lane then just duplicate it over and over for my 6 different lanes. Because I will need to handle lanes 1, 2, 3 differently than 4, 5, 6. If that makes sense. I could be making it more complicated than it actually is. Thanks again.

Share this post


Link to post
Share on other sites
Erin - Since this is a sequential conveyor and all you're interested in is go/no-go then a serial array should work fine. given you have offsets and may not ahve mentioned them all I'll try and lay out one scenario which you may need to tweak. You could use an array of BOOL. For example declare a tag TrackArray of type of BOOL[64]. Now we'll partition the array as follows: TrackArray[60] == Load Station Lane 3 TrackArray[59] == Load Station Lane 2 TrackArray[58] == Load Station Lane 1 TrackArray[57] == Load Station Lane 6 TrackArray[56] == Load Station Lane 5 TrackArray[55] == Load Station Lane 4 TrackArray[54] == Offset Location 3 TrackArray[53] == Offset Location 2 TrackArray[52] == Offset Location 1 TrackArray[51] == Process Station 1 Head A TrackArray[50] == Process Station 1 Head B TrackArray[49] == Process Station 1 Head C TrackArray[48] == Process Station 1 Head D TrackArray[47] == Process Station 1 Head E TrackArray[46] == Process Station 1 Head F TrackArray[45] == Process Station 2 Head A TrackArray[44] == Process Station 2 Head B TrackArray[43] == Process Station 2 Head C TrackArray[42] == Process Station 2 Head D TrackArray[41] == Process Station 2 Head E TrackArray[40] == Process Station 2 Head F TrackArray[39] == Process Station 3 Head A TrackArray[38] == Process Station 3 Head B TrackArray[37] == Process Station 3 Head C TrackArray[36] == Process Station 3 Head D TrackArray[35] == Process Station 3 Head E TrackArray[34] == Process Station 3 Head F TrackArray[33] == Process Station 4 Head A TrackArray[32] == Process Station 4 Head B TrackArray[31] == Process Station 4 Head C TrackArray[30] == Process Station 4 Head D TrackArray[29] == Process Station 4 Head E TrackArray[28] == Process Station 4 Head F TrackArray[27] == UnLoad Station Lane ?3? TrackArray[26] == UnLoad Station Lane ?2? TrackArray[25] == UnLoad Station Lane ?1? TrackArray[24] == UnLoad Station Lane ?6? TrackArray[23] == UnLoad Station Lane ?5? TrackArray[22] == UnLoad Station Lane ?4? TrackArray[21] thru == TrackArray[1] Memory of Work Loactions Now each time you shift the carts a process station you simply run the command "COP TrackArray[1] TrackArray[0] 60" six times and then and then OTU TrackArray[60] thru OTU Track Array[55] The trick is to have one entry position for each physical position.
1 person likes this

Share this post


Link to post
Share on other sites
Sorry guys I have been on a few other projects ... I am now back to my tracking issue. BobLFoot... First, Where in Southern Indiana are you from? I just moved to Florida from Sullivan, Indiana, Which is close to Terre Haute. Now to my issue just to clarify this is more of what I actually have. I think we had a miscommunication on the number of processes. I only have 2 processes then a load and unload as well. So its Load, Process 1, Process 2, Unload. That being said, coupled with your example, if I am following you properly; I should have something like this??? TrackArray[33] == Load 3 TrackArray[32] == Load 2 TrackArray[31] == Load 1 TrackArray[30] == Load 6 TrackArray[29] == Load 5 TrackArray[28] == Load 4 TrackArray[27] == Offset 3 TrackArray[26] == Offset 2 TrackArray[25] == Offset 1 TrackArray[24] == Process1 Lane 6 TrackArray[23] == Process1 Lane 5 TrackArray[22] == Process1 Lane 4 TrackArray[21] == Process1 Lane 3 TrackArray[20] == Process1 Lane 2 TrackArray[19] == Process1 Lane 1 TrackArray[18] == Process2 Lane 6 TrackArray[17] == Process2 Lane 5 TrackArray[16] == Process2 Lane 4 TrackArray[15] == Process2 Lane 3 TrackArray[14] == Process2 Lane 2 TrackArray[13] == Process2 Lane 1 TrackArray[12] == Offload 6 TrackArray[11] == Offload 5 TrackArray[10] == Offload 4 TrackArray[9] == Offload 3 TrackArray[8] == Offload 2 TrackArray[7] == Offload 1 TrackArray[6] == Lane 6 Work Memory TrackArray[5] == Lane 5 Work Memory TrackArray[4] == Lane 4 Work Memory TrackArray[3] == Lane 3 Work Memory TrackArray[2] == Lane 2 Work Memory TrackArray[1] == Lane 1 Work Memory Am I following properly in the thinking that I will load the TrackArray from the back side meaning when I verify I have loaded product that I will set location TrackArray[33] - TrackArray[28] to the ON state. Then when I do the copy command as in your example that those locations will shift to the locations TrackArray[27] - TrackArray[22]. I could also use Chris' method of when they are shifted to these locations I write a ZERO into the TrackArray until that station finishes then I could change it to a ONE upon completion?

Share this post


Link to post
Share on other sites
First Question - I am only 25 minutes from Louisville, KY so I'm on the East Side while you're on the west. Yes you are fo0llowing the concept well. No if wisdom can interject I'd suggest you use an array of DINT rather than BOOL. Use Bit 0 for Product Present and Bit 1 for GO/NOGO. Each process can zero out Bit 1 at the start of the process and return it to 1 on successful completion. Therefore if a part arrives with Bit o true and Bit 1 false it is bad from previous process and you can pass it on without processing. The "spare" 30 bits of the DINT you don't use now can be expanded for other status and serial tracking information as the customer feature creep monster appears :) lol.

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