Lack of a single up/down counter in RSLogix 500

robpaige

Member
Join Date
Jun 2011
Location
Wisconsin
Posts
78
Here's the situation: operators print off labels for finished products, scan the barcode on the label, apply the label to the products and place them in the warehouse for later shipping. Most of the time, this works just fine, except for when it doesn't :)

Some time in the future, the barcode is scanned right before the product is placed in a truck for shipping. If the operator scanned the barcode the first time, everything's fine. If he forgot, or had a printer mishap that resulted in an unreadable barcode which he forgot to turn in :oops:, then it's panic at the disco as people struggle to account for the item which doesn't exist in the inventory. Which is where I come in. I've been tasked with creating an alarm system that lets the operator know he's either forgotten to scan a barcode, or has forgotten to tell the system he has a bad barcode. Since the computer network already accounts for the actual barcode numbers, I get off relatively easy, and don't have to worry about what the barcodes say, just that they're all accounted for. My initial thought was to set a bit when a label has printed, use that to start a timer, and reset both the bit and the timer when the label is either scanned, or accounted for as bad.

But the operators won't cooperate with my beautiful, simple "one at a time" scheme. They print multiple labels, then scan the whole batch. So I thought counters. The operators thwarted me by not sticking to a set amount of labels scanned/printed at a go, everyone's got to be an individual. Maybe it exists, but I wasn't able to find a way to set the Count Down's Preset equal to the Count Up's accumulated value, so I improvised. I set an integer slot equal to 0, and have it add 1 each time a label is printed, placing the result in it's own integer slot. Then, when a label is either scanned or denoted as bad, I subtract one from that value. I then set up a timer that starts as soon as the value goes from 0 to 1, and continues counting as long as that value is strictly greater than 0. If the time elapses, it's business as usual, with an alarm to let the operator know he's gotta scan his barcodes or tell the system he's got a bad one. If the value goes to 0, the timer resets.

I've already written the ladder logic and am ready to send it to my boss, but I am kinda curious how you guys would have handled it.
 
I would beat the **** out of one of the operators as an example. Do that and they will all listen next time.

What you really need to do is have a meeting with their boss, explain what you have come up with and let him handle his operators on the implementation of new procedures.
 
Mark I like your solution a lot better. It's the Warner Brothers Animation approach to work, which always gets a big thumbs up from me. Alas, as a lowly intern, I am not allowed to beat the operators :)
 
I know this sounds strange but create two counters, a CTU and a CTD, but both using the SAME counter number. Trigger each with its appropiate trigger. Watch the accumulator.
 
Bernie that's brilliant, I'll give that a shot. I always assumed that doing something like that would lead to problems.

The Count Up and Count Down instructions can be used as pairs on the same address without any problems. It's when you address two or more of the Count Ups or two or more Count Downs to the address that unexpected things can happen.
 
Bernie that's brilliant, I'll give that a shot. I always assumed that doing something like that would lead to problems.

There are a couple of exceptions. The CTU/CTD pair is one. Since they share the same control structure, if you change the Preset, it affects them both.

Same for FFL/FFU pairs...they can share the same control structure (they must in some cases to work as intended), and there are probably other cases where the same addresses can/should be used with more than one instruction.
 
OR instead of using an up-down counter, how about using an integer with a +1/-1

That is what he is doing now. He has an integer file that he is adding and subtracting 1 from.

Good thing about a CTU/CTD pair is if the rung stays true for more than one scan, it doesn't repeat the action. Just a bit easier to work with (in my opinion).
 

Similar Topics

Facing Cimplicity communication error at one of our site. We have used Modbus_RTU & SNP Protocol in this project, the devices on Modbus are...
Replies
4
Views
2,146
Hi; We need to install a sensor to see the running web (sometime brown web sometime white) of a corrugator machine whose max speed is 250M/min...
Replies
11
Views
3,572
A question for the people who work on industrial sites. A customer complained about having to revamp several premium PLC that worked fine...
Replies
21
Views
8,046
  • Poll
My thoughts on slack for a wire that goes from one point in a panel to another point in the same panel is that there should be enough slack for...
Replies
10
Views
3,034
Hi All, I have wired up plenty of sensors and plenty of digital things over my time. However my exposure to analog cards and sensors is very...
Replies
10
Views
2,563
Back
Top Bottom