I am using a PXIe-6363 and I want to generate three output signal. Two of the channels are used with the same clock as shown in the attached VI. I would like to add a third output channel which would trigger an external device. As far as I understand I cannot use another branch with AO voltage. Is there a way to generate a pulse on a third channel?
Solved! Go to Solution.
Why not just configure a 3rd AO channel as part of the same task?
There would be ways to do this with counter or digital output tasks as well, but a 3rd AO channel seems like a simpler approach to me.
That was the first thing I tried but I cant make it work. Maybe Iam doing something wrong?
The main thing wrong is putting that 3rd channel into a task of its own. Most DAQ devices can only run 1 hardware-clocked AO task at a time.
Instead, you need to include that 3rd channel as part of your 1 (and only) AO task. Construct the signal data in terms of that task's sample rate timing. For example, a simple triggering pulse might be almost all 0 values with a single sample of 5V at the appropriate index.
You need to define the same # samples for this 3rd channel as you do for the other 2 -- that is, you'll now be constructing a 3xN array instead of 2xN array.
You don't need a 3D array. 3XN refers to a 2D array with 3 rows and N columns (the # of samples per channel). You're already constructing a 2xN array, you just need to append a 1D size N array (for your 3rd channel data) to it to make a 3xN array. Use the "Build Array" function with 2xN array wired to the upper input terminal.
Note that the order of the rows needs to correspond to the order of the channels when you configure the task. So if you designate "Dev1/ao0:2", row 0 should be data for ao0, row 1 for ao1, row 2 for ao2.
Thanks for the suggestions. That was actually a pretty straightforward solution. Nevertheless, the trigger output is restricted to the same clock (frequency) provided for the other two channels. I have a slight concern that the trigger pulse is too wide, about 200μs since the frequency wont be above 50kHz. But for the time being it doesnt affect me. Thanks again.