FlexLogger

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ-9174 Counter Reset

I have a test setup using cDAQ-9174 and a NI9421 digital input module to read hall sensors on a rotating motor. 

I have the Flexlogger application set to start logging after 10 pulses, and stop after 50 pulses. THat appears to work, however When I restart the test, the counter does not reset. I haven't been able to locate anywhere in the counter setup that  resets the counter. Is there a setting I am missing? In one of the topics, there was a suggestion to  use a formula 'Counter1'%50, where would this formula be entered? Is there any comprehensive documentation or literature on Flexlogger and how to use it. I found about 25 minutes of youtube videos, but they are superficial and only scratch the surface of the SW and instrumentation

0 Kudos
Message 1 of 2
(1,041 Views)

There isn't a setting in the latest release of FlexLogger (2021 R3) that will automatically reset counters at the start or end of a test. However, there are a few ways to get this to work:

 

1. Manually before each test

Within the counter's channel config pop-up, there's a button to reset all the counters in the module (see counter-reset-button.png). You could make this part of the pre-test procedure to reset the counter before starting each test.

 

2. Using the counter's reset line with events and an output channel

I assume this is the other post you were mentioning: https://forums.ni.com/t5/FlexLogger/reset-setting-pulse-counter-during-test/td-p/4062879

In there, the last option they mention is using a digital output module and event to reset the counter. This would require you to add another module to your chassis that supports digital outputs. If you do, you could configure a new digital input channel and configure your counter channel to use that new input as its reset line. Then, you would configure a digital output channel and wire it to the new input. Lastly, you'd configure two events: one to set the output high when the test stopped and another to set the output low just after. See the other attached images as an example. Note: I haven't fully tested that configuration to confirm it works, but it demonstrates the idea.

 

For the last part that was mentioned in that post of performing a modulo operation on the pulse count: I don't think it sounds like that would solve the use case you're describing. That would basically create a continuous sawtooth channel (counting 0-50, and then snapping back to 0 and incrementing again). I don't think that would align to the start/stop of your test unless you're able to guarantee the pulses will stop right after 50 of them have occurred and won't start again until you've hit the run button in FlexLogger. If that does sound like it might fit your use case, though, you could try it out by creating a basic plugin to do that calculation (https://www.ni.com/documentation/en/flexlogger/latest/manual/adding-a-plugin/).



In terms of comprehensive literature on how to use FlexLogger, the best place to look is the FlexLogger manual (https://www.ni.com/documentation/en/flexlogger/latest/manual/manual-overview/).

 


Regards,

Eric Satterness
FlexLogger Product Owner

0 Kudos
Message 2 of 2
(989 Views)