03-23-2006 06:58 AM
03-23-2006 10:24 AM
03-24-2006 04:35 AM
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
03-24-2006 09:39 AM
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
03-24-2006 09:50 AM
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
03-24-2006 09:52 AM
Oops forgot to attach the jpeg!
M.
03-27-2006 08:11 AM
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
03-28-2006 03:32 PM
03-30-2006 02:41 AM
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
03-30-2006 04:57 AM