LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Voltage Pulse Measurement

Solved!
Go to solution

My goal of this VI is to monitor the frequency of a motor that I am using.  I have confirmed that the motor is working at the intended 12.5Hz (750 RPM), and now I want to confirm it via LabView.  The chopper blade powered by the motor has 7 slits, so the phototransistor I am using pulses at 87.5Hz (12.5Hz*the 7 slits in the blade).  By building an initially basic VI that can do such a thing, I can build onto it, eventually using a VFD to control the motor speed.

 

The NI modules at my disposal are the NI 9423 24V DI and the NI 9219 AI.  I would like to measure the rate of the pulses from the phototransistor (87.5Hz).  I have debugged the hardware, and measured the 24V with the NI 9423.  However, it seems to collect data very slowly, maybe 1Hz.  I was able to increase the rate a little but not much.  Is there a timing function that can collect the voltage data at the rate I need? 

 

I think another option would be to generate analog waveforms, and measure the pulses via Pulse Measurements.VI under the Signal Processing tab.  However, I played around with this, and generated an artificial square wave at 87.5 Hz, my intended signal frequency.  The VI returned a period of 0.011, which equals to 90.91Hz.  I increased the number of digits, but that didn't change anything.  Is there a reason for this?

 

I also considered skipping the analog input and go directly to digital counting.  I tried some examples for counting, and they made sense, but I still couldn't get any measurements.  Any help would be greatly appreciated

0 Kudos
Message 1 of 7
(3,190 Views)

My goal is to build a basic VI that will measure the frequency of an AC 24V motor that I am using.  The motor runs at 12.5Hz, and powers a chopping blade that has 7 slits.  I am using a phototransistor to send 24V pulses.  The pulses should be sent at a rate of 87.5Hz (12.5Hz * the 7 slits). 

I have a couple ideas, they're just very rough and hopefully with your advice I will be able to further these ideas.  Available to me are the NI 9423 24V DI and the NI 9219 AI, both mounted on a cDAQ-9172.  I am using LabView 2014 Service Pack 1. 

I am able to measure the 24V pulses using the 9219, but it's measured very slowly, around 1Hz.  Is there a time function/parameters to increase the sample rate?

My first idea is to use the Low Frequency with 1 counter.vi which utilizes the 9423 to count the pulses.  Is this VI sufficient as is?

My second idea is to use tone measurement which uses the 9219 which generates an analog WFm. 

And my third idea, similar to tone measurement, is just use the Pulse Measurements.vi to generate a period which gives me frequency.

 

Any help would be great considering my thoughts are pretty jumbled right now and I'm not sure what will work best for 12.5Hz.  I feel like I'm overthinking these ideas because I don't have the blade yet, so it's difficult to test.  I suppose I could just use a function generator to try them out? 

0 Kudos
Message 2 of 7
(3,171 Views)
Solution
Accepted by topic author fowlerd8

Hi fowler,

 

I feel like I'm overthinking these ideas because I don't have the blade yet, so it's difficult to test.

Yes 🙂

 

I suppose I could just use a function generator to try them out?

Surely you can use a simple FG to test your DAQ setup…

 

I am able to measure the 24V pulses using the 9219, but it's measured very slowly, around 1Hz.

The NI9219 allows for just 100S/s/channel, which might be a little bit slow to detect 90Hz signals reliable…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 7
(3,158 Views)

Hi GerdW,

 

I used an FG to send an 87.5Hz pulse to the 9423 using the VI that I linked.  I verified the FG output with a scope beforehand and it works.  I connected the hot to PFI 1 and selected CTR0, with COM connected to the FG grnd.  I'm just getting 0's, and after 10s the VI is timed out as intended.  What am I missing here?  A simple wiring error?  I looked through some data sheets and for low frequency/single counter applications, the connections I mentioned are default.  So that's correct...

0 Kudos
Message 4 of 7
(3,151 Views)

Are you using the DAQmx Timing VI when configuring your AI task? 

 

I measure RPM for DC fan assemblies using an analog signal.  I preferred that method over a counter because I could put volts, amps and RPM all in one AI task.  My motors vary in speed from 40Hz to 100Hz (2400-5000 RPM) but I can record much lower than that.  I measure 10k samples at 50k Hz and use "Extract Single Tone Information.vi" to get a frequency.  It works really well.

 

Edit:  Oh yeah 100/S/s is pretty slow.  My suggestion doesn't help you at all. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 7
(3,150 Views)

I also have a 9215 which is rated for 100ks/S/ch which is more than plenty it seems.

0 Kudos
Message 6 of 7
(3,098 Views)
Solution
Accepted by topic author fowlerd8

@fowlerd8 wrote:

I also have a 9215 which is rated for 100ks/S/ch which is more than plenty it seems.


Yes that device would work much better if you choose to go the analog route.  The 9219 appears to be for thermocouples and strain gages which don't need fast acquisition. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 7 of 7
(3,091 Views)