LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problems when using DAQmx continous buffer counting

Hello,
 
I met two problems when using the count_digital_events_buffered_continuously_Ext_clk.vi
 
1. I have only one input channel.  I set the sample clock(external) frequence 1000HZ,   when my input signal frequency is larger than 1000HZ, everything goes on well, however, if my input signal frequency is lower than 1000HZ, something unexpected happened: the program will not record the counter data unless the next available signal is detected. That is to say, if my input signal is 10HZ,  only 10 numbers are read from the buffer(1,2,3,4,...) every second.   I expected to receive 1000 numbers per second (of course, there will be some same numbers. such as 1111112222223333333...) How can I modify the example to achieve this kind of data output?
 
2.  I am confused by the "sampling rate" property: what does the sampling rate mean in this example?  what will happen if the value is set too high or too low?
 
thanks for your attention.
0 Kudos
Message 1 of 4
(2,753 Views)
Probably you need to be set to TRUE a Channel Property named DupCountPrevention (Duplicate Count Prevention). This property doesn't apply to all counters, you should check the documentation for your hardware.
Maybe the quickest option is to try: paste a Daqmx Channel Property Node from the Daqmx palette, wire the task out from Create Channel, then navigate to Counter Input > General Properties > More > Advanced.


Paolo

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 4
(2,734 Views)
qwang,

This example requires two external signals, one to be counted, and one to supply the sample clock, which specifies how often the count register will be latched. I suspect that you have the same signal wired to both, or the same signal internally routed to both. You will need either another external signal to supply your clock, or another counter to generate this clock (continuous pulse train generation). For external clocks, the sampling rate property simply lets the driver know the expected frequency of the external signal. This is used in automatic buffer allocation. Provided you read the data fast enough in LabVIEW, if you are a little off on this property, there will be no problems.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 3 of 4
(2,728 Views)
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 4 of 4
(2,717 Views)