LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Not Outputting DAQ Signal

Solved!
Go to solution

Just use seperate (independend) tasks for each type of DAQ. So task1 would be 2 AO for the mirror and task2 would be the pulse train.

If you have problems with these, you can run them on their own and measure the signal using a scope or multimeter.

 

Felix

0 Kudos
Message 11 of 17
(1,069 Views)

I appreciate all the help so far from everyone.

 

I was talking with my advisor and after I explained my problems to him and showed him that part of the proposed solution is to configure two separate tasks he said that the most important thing is that the pulse train for the camera be in sync with the waveform output signal. He sounded concerned that if there were two separate tasks that the camera computer may not be in sync the whole time. Basically the camera needs to always be in sync with the scanning mirrors as they move.

0 Kudos
Message 12 of 17
(1,061 Views)
Solution
Accepted by topic author tenub

Ok, you need sync of the tasks. This is one of the areas of LV programming I find most interesting and fun. Sadly, I never did the combination you require, so I can't detail the approach.

 

So at first, we do not want to handle such delicate timing on top of an OS (like WIN) -> latency in the ms range. So we do not program that logic directly in LV. Instead we use the timing engine of the DAQ device and just need to configure it correctly -> latency in the ns range!

So you still use 2 seperate tasks. Then you need to configure them to share start trigger and timebase (sampling clock). This might involve using one of the counters to generate the clock instead of the 'Onbord clock'. Strongly depends on the device(s) you use (PXI systems are very-very accurate for this, with usb devices sync several cards seems to mean troubles).

As said before, I didn't combine what you need, so google 'synchronization analog output pulse train site:ni.com' or the like. A posting on the 'multifunction-DAQ' forum (NI Discussion Forum : Most Active Hardware Forum : ...) will also help you to get attention of the NI-AEs that are working in this field.

 

Felix

Message 13 of 17
(1,044 Views)

Okay, I think I'm getting close to having something that works. I removed the pulse train for now because I just want to get the waveform generators working. The error I'm now receiving is that the number of channels of the task do not match the number of channels of the data in the DAQmx Write VI (the Analog 2D DBL box). For some reason it thinks that the # of points of the input to the waveform generator VI (currently using 7760 to generate a smooth power law function) is the number of channels because it says in the error box that the number of channels of the data is 7760. Any help on this issue??

0 Kudos
Message 14 of 17
(1,025 Views)

Don't transpose the 2D array going into the DAQmx Write.

 

Also, please clean up your wiring.  You have a lot of wires running backwards and behind other structures making the code harder to read.

0 Kudos
Message 15 of 17
(1,018 Views)

Okay, so I decided to create a separate VI that just generates the waveforms to a 2d array and outputs it to a waveform graph to use as a subVI in the main VI. For now I've completely ignored the pulse train part, as I'm focused on just getting the signal of the waveforms to output correctly to both channels. I finally managed to get channel 0 to output some sort of vertically fast moving line and chanel 1 to output some weirdly skittery thing that looks like a step function on my oscilloscope. I'm thinking that this isn't the way things are supposed to look. Here is my latest VI screenshot attached:

0 Kudos
Message 16 of 17
(995 Views)

Okay, it seems I just had to fiddle with the oscilloscope as everything is outputting correctly to it now. Now to implement the pulse train generator back again!

0 Kudos
Message 17 of 17
(969 Views)