defcon.klaxon
Lifetime Supporting Member
Hi all,
I've been using the TOT instruction for totalizing flows wherever I've not had flowmeters with totalizer pulses. It works great and I have it set up to reset each night at midnight to provide daily flows; I then use OldTotal to display "yesterday's flow".
One thing I can't quite figure out, though, is how you'd go about resetting both the Total and OldTotal values simultaneously. The client wants to be able to reset the flow totalizers with a button in the HMI. To reset the Total is easy I just one-shot the ProgResetReq input; but how would I go about resetting the OldTotal? The only thing I can think of is sending two pulses to ProgResetReq, but that may be a bit of a pain. I tried overwriting the OldTotal value but the TOT block repopulates the tag, so it won't be that easy. I'm going to mess with this a bit, but was wondering if you guys had any suggestions.
I've been using the TOT instruction for totalizing flows wherever I've not had flowmeters with totalizer pulses. It works great and I have it set up to reset each night at midnight to provide daily flows; I then use OldTotal to display "yesterday's flow".
One thing I can't quite figure out, though, is how you'd go about resetting both the Total and OldTotal values simultaneously. The client wants to be able to reset the flow totalizers with a button in the HMI. To reset the Total is easy I just one-shot the ProgResetReq input; but how would I go about resetting the OldTotal? The only thing I can think of is sending two pulses to ProgResetReq, but that may be a bit of a pain. I tried overwriting the OldTotal value but the TOT block repopulates the tag, so it won't be that easy. I'm going to mess with this a bit, but was wondering if you guys had any suggestions.
Last edited: