03-17-2010 04:48 PM
Hi all,
I am a bit novice to LabView so my problem may seem trivial to advanced users.
My aim was to do a program that is controlling the intensity of two LEDs via PWM output from ADlink PCI-9222 DAQ card so that the PWM is updated once per second depending on the user response. During the first 500 ms of the 1 second LED1 (CTR0) is supposed to be ON at given PWM intensity and during the other 500 ms the LED2 (CTR1) is supposed to be on.
However now when looking at the behavior of the program there is a ~100 ms delay between the LED1 OFF and LED2 ON whereas I would like the LED2 to be illuminated as soon as possible after LED1 is shut off as the system is used for psychophysis experiment. I have done the flickering of the LEDs using the Simulate Signal block with rectangular wave which seems in theory a good way to do but probably the delay of ~100 ms is a result of the way I have done this in practice.
So my question is: "Do you have any idea where the delay could come from? And how could this program be optimized?"
Thank you for any help,
Petteri
03-18-2010 05:58 AM
Hello petteri,
In you program, i didn't see any relation between LED 1, LED 2, Relay (PWM 410nm), Relay (PWM 560nm), and the time, so LabVIEW can flash the Led1, then doing the first Express VI, then the second express VI and finaly flash the Led2 , if you don't want this behavior, you can use a flat sequence structure, and you can fix the order as you want.
You can decide to flash the led 1, then the Led 2, and then doing the express VI.
Regards,
Nacer M. | Certified LabVIEW Architecte
03-18-2010 09:25 AM
Hey Nacer M,
I had done the flickering of the LED1 and LED2 so that when the simulated signal (square wave at a frequency of 1 Hz and duty cycle of 50%) is HIGH the LED1 is ON at a given PWM and when the simulated signal is LOW the LED2 is ON at a given wavelength. I used boolean comparators for that. So I assume that this "brute force" approach was not the most optimal way to do this. So what does the flat sequence in structure means in practice, is there a support help file on this somewhere with practical examples?
Best wishes
Petteri
03-19-2010 04:48 AM
Hello,
Here a documentation about this :
http://labview.ni.com/docs/proposals/7.0/FlatSequences/index.html
Regards,
Nacer M. | Certified LabVIEW Architecte