01-09-2006 04:33 PM
I am using a USB microcontroller digital I/O to turn on and off a LED. I am using the same I/O to generate a trigger pulse for a EC650 prosillica camera. I am currently using the wait.vi in labview to determine the duration of the LED pulse. It seems to work but sometimes the VI freezes and it waits a few seconds before the VI continues. I am attaching labview code illustrating my problem. After the initialization stuff and alignment video on the front panel I am taking 13 images in a for loop using the wait.vi to determine the LED pulse duration, then it just outputs the images to the screen and saves the images. I believe the problem is that pulse width (wait.vi) is too small (i.e. a few milliseconds). Does anyone know how accurate and precise a LED pulse I can have using labview this way? The microcontroller also has an external clock and counter, so could I use them together somehow to generate a pulse width less then 1ms and still be precise and accurate? Thanks for any help or advice to solve my problem.
Kevin Baker
01-10-2006 02:41 PM
01-17-2006 04:01 PM
Thanks Avery. I found out that the microcontroller has an event counter not a clock. I was told "To turn on a digital bit of any of our multifunction devices for less than 1ms with LabVIEW, VB, C/C++ etc. is not possible due to the
uncertainties of Windows. These are polled functions and the best you
can hope to achieve it about 25ms.", by the manufactur of the microcontroller. Unfortunately this won't work for my application, since I need to turn on 13 different light sources with the digital I/O and switches. I don't need to get below 1ms, but I would like get close to it. I thought a 555 timer would work, but then I couldn't change the pulse width later. I am thinking looking at an oscilloscope to see what kind of pulse widths I am getting. The labview code I attached will work even if I specify a 1ms wait between the turn on and off the digital I/O. I would like the LED pulse width to be about 1ms, and I want to use the pulse trigger mode on the camera. Does anyone know of a cheap way to achieve this timing? Thanks in advance for any help.
Kevin Baker
01-18-2006
02:13 PM
- last edited on
03-18-2025
05:23 PM
by
Content Cleaner