9/17/2023 9:03 PM | |
Joined: 2/26/2019 Last visit: 11/4/2024 Posts: 57 Rating: (0) |
In my program I count liters of gas per day. The isssue I'm having is that my number of liters per day can be more than 32,767, which is the limit of a LSC Mathemetical instruction. I think the issue can be resolved by incrementing the 1st up/down counter to 1000 (Hundreds Counter), then iincrementing the 2nd up/down counter (Thousands counter) by 1 and have it reset the first counter, then display the combined mbers as two separate values. for example 40 and 123 .will be displayed as 40,123. The attached program generates 25 liters/minute with A1 set to 1000 in simulation mode, but the liter/minute can be lower if A1 is reduced. What I would like to do is have the Hundreds up/down counter increase by the output of B003 plus the previous count value every minute . ie 0, 25, 50, 75, 100..........1000, then increment the Thousands up/down counter by 1 plus the previous count value, and then reset the Hundreds counter to back to 0, The Thousands up/down counter would increment like this 0,1,2,3,4,.......32767. The attached program generates 25 liters/minute with A1 set to 1000 in simulation mode., but you can set A1 at anything if you want. Does anyone have an idea of how to design a program to do this? Thank you AttachmentCounter Circuit Diagram.zip (506 Downloads) |
9/18/2023 4:52 AM | |
Joined: 12/18/2014 Last visit: 11/18/2024 Posts: 34239 Rating: (4263)
|
Try this.
AttachmentLiter_Totalizer_8.3.zip (536 Downloads) |
Follow us on