Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

"Flickering" two counters of ADLINK PCI-9222

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

0 Kudos
Message 1 of 4
(5,930 Views)

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

0 Kudos
Message 2 of 4
(5,920 Views)

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

0 Kudos
Message 3 of 4
(5,915 Views)

Hello,

 

Here a documentation about this :

http://labview.ni.com/docs/proposals/7.0/FlatSequences/index.html

 

Regards,

Nacer M. | Certified LabVIEW Architecte

0 Kudos
Message 4 of 4
(5,902 Views)