0

I have a four channel LED system where I'd like to control LED intensity and time-on for each LED separately- with specific number of iterations of this stimulus (see diagram below).

enter image description here

We're using an A/O module on cDAQ system to control each individual LED and zero frequency sine waves to set up the LED voltages (snippets attached) - each LED also has a specific 0V pre and post stimulus time. The LEDs need to have the same timing so that each waveform executes at the same time and the stimulus needs to be repeated several times (controlled by the front panel and a loop). Ive set up a subVI which ensures all the waveforms are of equal length (MakeWavelengthEqual(SubVI)) as well as one subVI to generate a digital output for the duration of the LED on time (TrigOutGen(SubVI)) to trigger out data acquisition equipment.

The VI creates these Waveforms and output them to each individual channel, whilst also repeating them. However I keep having an issue where the LED outputs don't quite correlate to the waveforms I've set up - and the final LED output repetition seems to create a situation where the LED stays on even after the VI completes its run. See VI below:

enter image description here

I'm new to labview so troubleshooting these issues is very difficult to me, I get no errors, the waveforms look correct when plotted and the task is set up to clear outside of the loop so I'm not sure where the problem with the final output occurs. I'd really appreciate any help anyone can provide.

D.J. Klomp
  • 2,429
  • 1
  • 15
  • 30
  • You need to clean up your code and use [proper dataflow techniques](http://www.ni.com/getting-started/labview-basics/dataflow). The code is very hard to follow. – shmicah Feb 14 '18 at 22:15
  • Also, it would be massively easier to control the LED intensity using PWM instead of mapping voltages to led brightess – DCA- Mar 15 '18 at 15:40

0 Answers0