From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring frequency with CompactRio

Solved!
Go to solution

Dear All

 

I have an anemometer that sends digital signal. I try to analyse the signal to determine the wind speed.

I have a NI cRio 9024 and NI 9205. When I connect the anemometer, it gives me back voltage square pluses (see attachment). I wonder if I could transform this to readings of frequency because it is linear to the wind speed.

 

I tried to follow the link below, but my module does not have the Specialty Digital Configuration option

http://digital.ni.com/public.nsf/allkb/C9088DFDF803CD8B862575F3007C40FD

 

or I should have another NI module that could measure the frequency of the signal directly?

I would appreciate any ideas or suggestions. Thank you so much!

 

Labview Newbie

Download All
0 Kudos
Message 1 of 14
(4,347 Views)

Hi zhuleijia,

 

when you use an AI module you have to deal with voltage signals. But using a simple comparison will transform them into booleans…

 

- The pulse is only very small in amplitude. Is this intended?

- The pulse has an offset. Usually I would expect positive voltages from an anemometer… Did you check wiring and aquisition settings?

- To calc the frequency you need to count rising edges of your signal(s) per time unit.

- A DI module would be better suited for that task. Please call your local NI support for suggestions!

 

Du benutzt eine deutsche LabVIEW-Version. Kennst du das deutschsprachige LabVIEW-Forum?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 14
(4,317 Views)

Thank you so much for your answer, it turns out I connected it wrong. In fact all ports were sending the same wave, even the ones that were not connected. I will check the wiring and hope I can get some meaningful outputs. Thank you again!

0 Kudos
Message 3 of 14
(4,307 Views)

Hi zhuleijia,

 

in a multiplexed acquisition (like your 9205 module does) it is expected to see a signal even on non-connected inputs!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 14
(4,304 Views)

Dear GerdW,

 

thank you for the clearification. I have trouble with the wiring. I am not sure where I should connect the voltage supply  and GND on 9205

 

I always connected the Erde(earth) to COM, tried many ways to connect the supply and GND (AI0/AI8, V1/C on the controller, AI0/AI1...) but none of them worked. I am sorry if this questions is too stupid.

 

Best Regards,

LV newbie 

0 Kudos
Message 5 of 14
(4,297 Views)

Hi newbie,

 

I don't know what kind of "supply" you want to connect to your 9205 module. It doesn't need any supply!

 

You have to connect the output signal of your sensor to any of the AI pins as wll as GND (or COM as it is named in the 9205 manual)! You surely want to measure RSE as shown on page 14…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 14
(4,294 Views)

 The anemometer needs a power supply DC 4-18V. Thank you for the help throughout today. I really appreciate it. 

0 Kudos
Message 7 of 14
(4,286 Views)

Hi zhuleijia,

 

when the sensor needs some power supply you need to provide this!

Get an additional power source as neither the cRIO nor the 9205 module will provide power for your sensor…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 14
(4,282 Views)

Thank you for your answer, I found my mistake with the wiring and now I am able to see the square wave with different frequency at different wind speed.

 

However I failed to measure the frequency with Tone Measurements function or Extract Single Tone.VI. They only gave me 0, what did I do wrong?

 

or it is better to count rising edges like the link below

https://decibel.ni.com/content/docs/DOC-10885

Thank you so much

0 Kudos
Message 9 of 14
(4,257 Views)

Hello iamnewhere

 

I am not sure what you are doing wrong but you could implement this calculation in the FPGA with different methods or in the RT implementing Math and Analysis VIs. You can find below a list with names of LabVIEW examples implementing different methods for those calculations. 

You need to go to help>>find examples. You are going to see the "NI example finder" window, if you go to the second tab "search", you can type the names below. 

You could use the "Analog Period Measurement.lvproj". 
You could use the "FFT.lvproj". 
You could use the "Period and Phase Measurement.lvproj". 

All the examples above implement different techniques.

 

Please review this as well. Accuracy of the FPGA Math & Analysis VIs

 

Regards

Frank R.

0 Kudos
Message 10 of 14
(4,245 Views)