LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

measuring frequency question

I have a Speedmaster device that outputs a TTL signal at a frequency
related to the measurement that it is reading. The frequency
fluctuates around 8000 Hz. I am trying to measure the period between
pulses in real time using a counter on a 6024E DAQ card but I am
getting readings that are not correct. I connect the +output of the
Speedmaster to the Counter0 Gate the GND output of the speedmaster to
the DGND of the DAQ. I am using the 20MHz timebase to count pulses on
Counter0. This is my first time trying to measure frequency this way
and any help would be appreciated.

Thanks,
-Mike

0 Kudos
Message 1 of 4
(2,876 Views)

Hello Mike,

First i would measure the frequency on a scope to check really how it looks like. check that output is 5V TTL.

if it still doesnt work i would suggest then to plug your TTL signal to one of the DIO of your card instead of the gate. using DAQmx makes it easy then to figure out the frequency of the TTL. using timed aquisition of one channel n samples, you obtain an array from wich you can directly map the frequecy of your TTLs.

for another option look at this example. it uses AI, but the principle is the same.

http://zone.ni.com/devzone/cda/epd/p/id/5013

Gabriel

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 2 of 4
(2,863 Views)
hei
 
i meant this example:
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 3 of 4
(2,860 Views)
Hi Mike,
Gabi’s suggestions are definitely good ideas. If you are certain that your Speedmaster device is generating a TTL signal, you can check to see if your signals are connected properly using MAX.

1.
-Open Measurement and Automation Explorer.
-Right-click on the 6024E and select “Test Panels…” Test Panels are useful for trouble shooting because it removes any LabVIEW code from the test. You can use the digital I/O tab to see if you are switching the digital value. You can use the counter I/O tab to see how many pulses are counted.
-To configure the Counter I/O test, under Channel Name, select whichever counter you are using (zero or one).
-Change the Mode to “edge counting”.
-Select your signal channel as the “Edge Source”. The signal channel for your device (assuming you are using counter 0) should be PFI 8.

2.
There are several examples for acquiring frequencies in LabVIEW. These are accessible in LabVIEW by selecting Help>>Find Examples…
Then browse to Hardware Input and Output>> DAQmx >> Counter Measurements >> Digital Frequency. The appropriate example for your application would be “Meas Dig Frequency-Low Freq 1 Ctr.vi”.

3.
For simple acquisition tasks, it may be easier to generate your own program using the DAQ Assistant.
-Place a DAQ Assistant on the Block Diagram and choose Acquire Signals>>Counter Input>> Frequency.
-Select your device and counter.
-Configure your Signal Input Range. You mentioned that your input will be around 8000 Hz.
-Your Measurement Method should be “1 Counter (Low Frequency)”.
-For acquisition mode, you will probably want to use either “N samples” or “Continuous”.
-“Samples to Read” will be determined by how many pulses of which you want to measure the frequency. You may want to measure the frequency of a large number of pulses and average them to get one value.
-Click “OK”.
-On data output terminal of the DAQ Assistant Express VI, right-click and select Create>>Indicator to create a graph of the measured frequency.

Message Edité par The Fearless Hyena le 04-30-2007 06:05 PM

0 Kudos
Message 4 of 4
(2,840 Views)