Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Interupting analog output based on analog input values (NI PXI6229)

Hi,

I'm using a PXI 6229 analog output to ramp high-power lasers on and off, which are coupled into a optical fibers. At the same time, analog inputs on the same board are being used to measure photodiodes pre- and post- the fiber to determine coupling efficiencies. The idea is to turn the lasers off if a certain threshold is not surpassed.

I've currently implemented this using a software-timed loop, writing a value from the pre-prepared ramps to the AO, then reading both AIs, determining the ratio of the two powers and checking my condition. This works, however it would be beneficial for integration with the rest of my control/DAQ system if I could use daqmx timing instead, but as far as my understanding of daqmx/LabView is so far, is that I can only access the data read from my inputs once my task is finished.

Thanks in advance for your input
Tobias
0 Kudos
Message 1 of 3
(3,147 Views)
I'm wondering if this is a misconception of mine because I usually pre-define my ramps in arrays and then use the instance of daqmx write labeled "N channels, N Samples". So I guess a way this might be implemented by feeding the task one point at a time (and reading one point at a time) using the instance for N channels, 1 sample?

0 Kudos
Message 2 of 3
(3,145 Views)

Hi Tobias,

For the application you have described, the best way to trigger the acquisition is in software.  To use hardware timing, you would need to specify the analog level for triggering. However, this value will be constantly changing and even if you wanted to change it programmatically, you would still need to update it with every acquisition. As it stands now, the best way to accomplish the triggering would be to take the inputs point by point, compare it in software, and then create the condition for it to stop when it reaches a certain level. All of this can be done in a while loop allowing you to compare the values while the task is still running.

Regards,

Kent

0 Kudos
Message 3 of 3
(3,125 Views)