Using Operator Inputs to clear a counter

I have a machine that has a SLC 5/05 processor. We are trying to capture an accurate total count for all products ran during the day's production. The operator has to type the recipe number he is running in a dialog box on his HMI. The current production count is stored in register N7:193. I am wondering if it is possible to move the current count to a different register and then reset the original register to 0 whenever the operator changes the recipe number in the dialog box. That would then allow me to add the new register and whatever the count ends up being on the original register at the end of the production run for a total shift count. I am sure that I am overlooking something obvious and over thinking this.
 
N7:0 = Recipe Number
N7:1 = Last Recipe Number
N7:193 = Current Count
N7:194 = Last Count

NEQ N7:0 N7:1 MOV N7:193 N7:194, MOV N7:0 N7:1

You could do a first scan to also update N7:1 to N7:0

and you could expand the MOVs if you needed more than one "Last Count"
 
Alternatively to @robertmee's logic:
Code:
NEQ N7:0 N7:1 BST ADD N7:193 N7:194 NXB MOV 0 N7:193 NXB MOV N7:0 N7:1 BND
This would detect when a job change occurs, add the current count to the last count, reset the current count to 0, and then change the job.
 
Thank you both for the help. I was able to expand on the MOVs to keep track of the counts in a couple of different areas as well as the intended use case.
 

Similar Topics

Hi, In my ladder logic, I've got a data register D60 whose value is -0.001 (when using monitor mode to see values). D406 is 0.250. But then...
5
Replies
3,041
Views
I want to take a SLC 5/03 that is already connected to a Display (using RJ485 port) and 2nd port is connected to a modem. I want to add a...
3
Replies
2,567
Views
Hi all, Looking for some suggestions on some screens I am building. I have five separate but mostly identical machines that I would like to...
2
Replies
210
Views
Hello, im try to connect autonics HMI with Panasonic controller via ethernet. when i try to ping from HMI to the controller, the connection was...
1
Replies
91
Views
Hi everyone, The stepper motor in my project failed, so I bought a Schneider Electric LCA423-SCM-01 with an integrated controller (48 V DC, 2 A...
0
Replies
121
Views
Top