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 , 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.
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 , 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.