06-28-2021 11:33 AM
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
Solved! Go to Solution.
06-28-2021 02:40 PM
Hi Stephan,
Looks like the attachment did not get through.
06-29-2021 11:59 AM
Thx for the hint, the attachment should be placed after this reply.
Thank you in advance, Stephan.
06-29-2021 01:00 PM
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
06-29-2021 01:12 PM - edited 06-29-2021 01:14 PM
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.
06-29-2021 02:05 PM
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