Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency Output and Measurement with NI USB 6343 not working

Solved!
Go to solution

Hi there,

 

i'm trying to output a frequency and measure it back into the NI USB 6343 multifunction Daq Device. I wired the In and ouputs on a breadboard with a LED that shows the frequency (visible up to 40Hz).

The output will function with no problems, but the frequency measurement always exceeds the timeout. A counter input that will count edges works, but the frequency measurement does not.

What am i missing here?

 

The attached VI is just a test Vi for a bigger project where i have to measure the frequency and several analog inputs of a damper-teststand. I am not getting the frequency measurement to work. Please Help

 

Ps. at the time i have a solution where i measure the frequency with a time signal and the counted edges, but this is very inaccurate.

 

Greetings to you all,
Stephan

0 Kudos
Message 1 of 6
(2,616 Views)

Hi Stephan,

 

Looks like the attachment did not get through.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 6
(2,585 Views)

Thx for the hint, the attachment should be placed after this reply.

 

Thank you in advance, Stephan.

0 Kudos
Message 3 of 6
(2,552 Views)

Your X-series device supports a lot of flexibility for routing signals between internal counter I/O pins and external PFI I/O pins.  Your code doesn't specify any particular routing for where send the output pulses or which PFI to use for frequency measurement, so the default PFI pins will be used.  So your frequency measurement task is looking at a different PFI pin than your output task is sending the pulses.

 

Have a look at the shipping examples for pulse generation and edge counting to see how to route I/O signals from/to a specific PFI pin.

 

(Note: you need to specify a different counter for the freq measurement task than you use for the pulse generation task.  You seem to be already doing that or else you'd get a different error, not a timeout.)

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 6
(2,545 Views)

Hi Kevin, thank you for your respond.

That's right i am not specifying the PFI Ports and it does use the default PFI (in my Case: Counter 1(Output) PFI 13  and Counter 2 (Input) PFI 14 . I wired my cables according to the screw terminal schematic / pin terminal schematic of my USB  X Series.

 

With the same wiring, but configuration as Count Edges and not as frequency measurement it does work. So im supposing this is not the cause. The initializing of the channel as frequency measurement works, but the Daqmx Read Vi then has a timeout.

 

 

0 Kudos
Message 5 of 6
(2,542 Views)
Solution
Accepted by topic author Stephan.Bormann

The default PFI pin for freq measurement is different than the one for edge counting because they connect to different internal counter pins.  Edge counting signals go to the SOURCE pin, which you've identified as PFI14.   A frequency input signal goes to the GATE pin which will be a different PFI.

 

(Note: when you measure frequency, a high speed internal timebase clock connects to the SOURCE.  Frequency is measured by counting edges of that clock and latching those counts on GATE edges).

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 6 of 6
(2,538 Views)