LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

speed control

On the board i am using, there is a LED and reciever set up between the blades of a fan. As the fan/motor rotates, a digital pulse is sent via a DAQ to LabView. I can see this pulse and display it using an LED but i have two queries.
 
1- There should be three pulses every rotation (Three bladed fan) but I only seem to be recieving abour one every 4/5 seconds. This occurs on the test panel and the program.
 
2- I would like to display the speed, has anyone got any clues on how to do this? I was thinking along the lines of timing a pulse and using a formula to calculate the speed, but i'm having trouble accomplishing this. 
 
Any help would be greatly appreciated.
 
0 Kudos
Message 1 of 4
(2,580 Views)

Hi there

If you can see the LED blinking it means that your sensor is operating corectly. If you can not pass the data to LV (or you can sometimes) it means that you have a problem with dealing with DAQ itself. IT is hard to say more not knowing your setup.

About the speed. I understand you want to disply the angular velocity, i.e. the number of rotations per second, rigt?

If you have three pulses per rotation, so provided the time between pulses "tp", the the instantenous angular velocity will be:

f=1/(3*tp) [rev/sec];

or

W=2*pi/(3*tp) [rad]

You may also average the tp over several readings if you want.

take care

Pawel

 

0 Kudos
Message 2 of 4
(2,561 Views)
The formula itself wasn't a problem, but thanks anyway. What i am struggling with is how to measure the time between pulses. any ideas?
 
thanks
tom
0 Kudos
Message 3 of 4
(2,541 Views)
Hi Tom,
 
Sounds like a cool application 🙂 How are you reading the 'digital pulse' on your DAQ card (using the digital or analogue inputs)? You could be missing pulses if you are sampling too slowly from the digital or analogue ports.
 
A nicer way to count pulses like this would be to use one of the counter inputs on your DAQ card (if you have a suitable card). These inputs look for the leading (or trailing) edge of each pulse, rather than the actual pulse itself, so are not susceptible to 'missing' pulses if the sample rate is too low. You can use LabVIEW to determine the time between the pulses if required, using the Elapsed time nodes.
 
There are several example vis included with DAQmx (you can find these under the LabVIEW Example finder) which will allow you to measure frequency and time using the counters.
 
There's some information on using the counters on our website here:
 
 
 
I've also attached a sample vi which shows you how to take a frequency measurement using both the Counter and the Analogue input (you will need to adjust the DAQ Assistants to match your channels). If you find that the counter input is over-estimating, you may need to de-bounce or clean up the signal from your light sensor, you can find several websites which explain how to do this (the 'standard' way is to use a 555 timer in monostable mode).
 
Good Luck!
 
Mark
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,523 Views)