Reset Counters - Resets all

Recommended Posts

I have tried the suggestions you have made in other topics but still cannot get my counters to reset effectively. I have two counters, set up as 0 and 1. with firmware debounce. They record reasonably well, but when I need to reset them (about once per day), either both get reset or none at all. I have tried various combinations, but cannot get it sorted. I attach the ctl file if that may help you. I have tried this on my own latest Express version and a friend's full version and cannot make headway. are you able to help me please?




Link to comment
Share on other sites

1) the conversion is wrong. It should be Value - counterOffset. What you have is invalid.

2) in startup you are only hard resetting counter 0, though you are enabling both counters.

3) you really need two variables for counteroffset, probably just counteroffset1 and counteroffset2, and two conversions, one for each counter: value - counterOffset1 and value - counterOffset2. Otherwise the counters become linked

4) in reset_counter you don't want any of the labjack stuff. You just want to edit the counterOffset. So if counterOffset1 is assigned to Wind_Run it'd be:

counterOffset1 += wind_run[0]

Do the same for the other.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.