From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

use two counters with PCI-MIO-16E-1

I have to use the 2 Counters of the AT-MIO-16E-1,
Counter 0 for period measurement and with the second one i want to measure how often the period measurement have an rsing edge with an event count. I'm working with two ActiveX. Is this what i Want to do possible?
And how can I do this?

Regards
Stefan
0 Kudos
Message 1 of 3
(2,990 Views)
Stefan,

This should be fine. I am not 100% sure what you want to do with the counters, but let me try.

If you can open up the example PulsePeriod.vbp in the MeasurementStudio/Samples/DAQ/Counters folder, then you will already have the period measurement program finished.

You can add another counter control to your program, and configure it as an ungated, simple event counter. When you tie your signal to the source of this second counter, you will get a continuously increasing count of how many periods your signal has gone through.

Hope this gives you a good starting point.

Regards,
John N
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,990 Views)
Stefan,

Sorry I forgot you were using VC++ instead of VB. If you happen to have VB, then check out the examples I mentioned, and VC++ will use the controls exactly the same way.

If not, the basic setup for the first counter that I didn't discuss is Period Measurement with an internal timebase and your signal tied to the gate of the counter. The periodic event you will get passes the measured period to you.

One more point that we have discovered is that if you encounter incorrect readings in your program, then try changing all your counter settings from the Gate to the PFI pin that corresponds to that counter's Gate. The same goes for the source. Change all your Sources from the Source to the PFI pin that corresponds to that counter's Source.

John
0 Kudos
Message 3 of 3
(2,990 Views)