LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get counter of daqmx

Hiya!

 

So, i'm generating a frequency on counter out (daqmx) and when user presses a button, connected to a digital in i stop this freqency. Can i check some property to see how many cycles i generated? The CO.counter shows the time for each ...

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 1 of 2
(2,057 Views)

Hello,

 

Sorry for the late reply. If this is still an issue for you, I thought I could give my input on your question. When you create your virtual channel and generate pulses using "CO Pulse Freq", the counter uses a timebase as the source to help generate the pulse, e.g. an 80 MHz timebase. To read the count register using the "CO.count" property node will thus, just as you say, not give you comprihensible information on amount of cycles generated with your frequency and duty cycle.

 

In your case, I might try one of two things. By placing a "CO.OutputState" property node in your pulse gereration while loop, You can create a ring indicator, changing value between "High" (=10192) and "Low" (=10214). Together with shift registers and some conditions, you can sum up all the times the value goes from Low to High and output the result to a loop tunnel indicator when the used presses the stop button.

 

Another, and maybe a better way, is to use a second counter to create another virtual channel, counting the edges of the pulses you have created. By connecting the default output terminal of the first counter to the default source terminal on the second counter, you can count the number of cycles through a "CI Cnt Edges" virtual channel. As the first counter controller is busy generating your pulse, the second counter is free to count the edges untill the user presses the stop button.

 

Maybe, and likely, there are even better ways, but none that I can think of right now.

 

 


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