tracking production with barcode scanner in RSlogix 5000

peter764

Member
Join Date
Oct 2008
Location
Maine
Posts
35
I'd like to keep track of shift production with a barcode scanner. I was thinking of comparing the barcode to an array of 20 strings. The array would cleared twice a day. In comparing the barcode to the array, if the code is found I would increment a counter. If no code is found I would set it up in the array at the first 0 string and increment the counter. Does anyone have an easy way of doing this? I would greatly appreciate any ideas. I can use a bunch of NEQ and EQ statements to do this but would require a bunch of code. Is there an easier way?
 
Look at the FSC instruction. It exists to do exactly what you want, and I've used it in exactly your application before.
 
Look at the FSC instruction. It exists to do exactly what you want, and I've used it in exactly your application before.

Thanks. I'll check it out in the morning. I have three of these to do. The less lines of code the better (makes it easier to copy and paste the other two...…...lol)
 
Just an FYI, we did the same thing for searching for a particular recipe. Different use but same logic.

As long as you keep the number of values down to 20 or as high as 50 you should be ok. What we found was the PLC would spend a great deal of time searching if the recipe happened to be at the very bottom.
If there was a way for you to determine a unique property of each barcode and group (partition) the codes in your array. You could do so that group a is between 0 and 10 and group b is between 11 and 20. Read the barcode, then determine if you should start your search at 0 or 11. If your just using 20, then don’t bother. If you get above 50, you may see a delay. Just for reference, we had about 150 recipes in a Contrologix L72 and it would hang if made to search all 150.
 
The FSC instruction worked great once i got it figured out. I used one to compare bar codes and if it matched increment a counter. I used another FSC instuction to move the barcode to a blank string if it wasn't in the que. I set up the counters and que to clear at the start of each shift. One thing that bothers me is: I used a Fal instruction the clear the accumulator of the array of counters I had set-up. it would not clear array[0] so i used a move to clear that one?
 
Okay, so my company creates applications like these for different industries. Is having interoperability with Infor crucial? Because it's going to be next to impossible if Infor doesn't provide some sort of API. Even if they do, it more than likely costs a good amount of money for a developer license. Then you still have to develop said inventory application then have it interface with Infor!
 
I had a similar problem on an S5 155 processor w3hich at the time was one of the fastest but far greater sized arrays and for every different barcode we also had a count so for example we had an array of 100 for the bar codes and an integer array of 100 one for each bar code. Processing this crashed the PLC on watchdog so we iterated through the array by 5 on every scan instead, this worked a treat. as the barcode reads were once every 2-3 seconds.
 

Similar Topics

Hello everyone, I am in charge of programming a handling system that includes conveyors, cranes, saw, ... on PLC Allen Bradley 1756-L8, and I...
Replies
5
Views
2,678
Hi All, I am very new to SQL database logging and I'm looking for a bit of advice! At the end of each hour I log number of cases produced...
Replies
2
Views
1,865
Ok, so here's one that's been giving me a headache all day. I'm one of those guys that thinks about stuff until I get it...even off the clock...
Replies
24
Views
10,553
I have been requested to look at developing an application that would display that "current" status of a job, primarily to Sups and Management...
Replies
6
Views
2,958
I am attempting to reject a bottle If the label fails. The rejection works fine at normal line speed but at low speed the rejector fires (air...
Replies
35
Views
1,097
Back
Top Bottom