LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

incorrect pulse reading

I'm reading a digital input from a light sensor that pulses when a three-bladed fan rotates (3 times/rev). This pulse is only appearing on screen as about once every 4 seconds even though the motor is rotating at near 8000rpm. (400 pulses/second) I have tried to increase the frequency of samping but the DAQ assisstant only lets me choose "1 sample on demand" Does anybody know how I can overcome my problem? Also i would like to convert the pulses into angular veloicty but I am having trouble. I don't know how to measure the time between pulses. If anyone has any ideas, they would be greatly appreciated.
 
Tom
0 Kudos
Message 1 of 13
(3,605 Views)
 
0 Kudos
Message 2 of 13
(3,595 Views)

Hi Tom,

I've already posted an answer to your questions on another thread, which you can find here:

http://forums.ni.com/ni/board/message?board.id=170&message.id=175097#M175097

What DAQ card are you using, and what version of the DAQmx drivers?

Regarding the pulses, what do you think is the duty cycle of the pulses coming from the LED (ie, what's the 'on' time relative to the 'off time'). You'll need to know this to enable you to set the correct sampling rate.

For example, consider your fan rotation as 300 sample 'steps', and the LED beam is broken for 10 'steps' for each fan blade (assuming 3 fan blades) - to reliably 'see' the beam breaks you will need to sample at the very minimum 30 times per revoultion, if possible more. Therefore, if the max speed of your fan is 8000rpm, you'll need to take a very minimum of 8000/60 = 133 revs worth of samples a second, or 133x30 = approx 4000 samples per second to reliably read the speed at the maximum velocity.

To calculate the time difference between pulses, you could try using the Timing and Transition Measurements Express VI (which can be found on the Express VI sub-palette), this VI can return various properties of the signal you feed it, including the period, frequency, pulse duration and duty cycle.

I hope this helps, as I suggested on the other post you may be better off using the counter function if your board supports it. Links to sections of NI’s website discussing the use of counters can be found on the other thread (see link above).

 

Best wishes,

 

Mark

Applications Engineer

National Instruments

 

Message 3 of 13
(3,582 Views)

thanks. I know that the sampling rate must be increased, but the DAQ assisstant will not let me do it. The only option I have is "1 sample on demand".The funny thing is, is that if i choose this option, i get a regular pulse and not just one sample. I tried the timing and transition express vi, but i couldn't see an output for either the pulse or duty cycle, even when I could see a pulse on a LED indicator?

unfortunately my DAQ cannot support a  counter channel. any ideas would be greatly appreciated. thanks again, tom

0 Kudos
Message 4 of 13
(3,568 Views)

Tom,

Which DAQ card have you got? What version of the DAQmx driver are you using?

If you don't know, you should be able to find out in NI MAX (Measurement and Automation Explorer), our configuration utility which installs with the DAQmx drivers (for the card). It has a drop down tree structure where you can interrogate and test all the NI DAQ cards installed on the system, and also look at the software versions installed.

When you drop the Timing...Express vi onto your block diagram (or later double click on it), a configuration window should pop up giving you the options to select Frequency, Period, Pulse Duration, Duty Cycle, Preshoot, Overshoot and Slew Rate (see attached jpeg). Remember that if you use the Express VI the data should be in the Dynamic Data type. If you need to convert it from or back into double type you can do this using the DDT conversion tools, which you can find under the Express - Signal Manipulation

Best wishes,

Mark

0 Kudos
Message 5 of 13
(3,564 Views)

Oops forgot to attach the jpeg!

 

M.

0 Kudos
Message 6 of 13
(3,563 Views)

I'm using a USB-6008. I have the digital line linked to an LED array which blinks when the fan is active. I also have a line going to the express vi you suggested (timing and transiant sp*) and indicators for the pulse duration and duty cycle. Even when the motor is running and the LED is blinking, the pulse and duty cycle both remain zero. The signal is there but I'm not getting any response? Can you help?

 

Many thanks, Tom

0 Kudos
Message 7 of 13
(3,546 Views)
 
0 Kudos
Message 8 of 13
(3,521 Views)

Hi Tom 

 

Is there any chance you can post your VI specifically the section where you are having the problems for me to have a look at and see if I can get it working.

 

Regards

 

Tim

 

NI UK AE

0 Kudos
Message 9 of 13
(3,506 Views)
sorry, I dont have LabView on this PC and I've broken my foot so cant get to a Pc with it so I've drawn the basic vi i'm trying to use, I'm not sure if it'll help though!
 
I'm reading a single line digital input , the only option i could choose was "one sample on demand". This seems to work, as the LED blinks when the pulse is generated. I'm feeding this to a digital output which flashes a LED on the board i'm using.  This all works!. The problem comes when i use the timing and transient vi. I havd a DDT componenet (not shown in my amazing drawing) I have tried measuring duty cycle, pulsse width and period but i get nothing from any of them i.e. a constant 0,
 
0 Kudos
Message 10 of 13
(3,500 Views)