Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger 3 output channels

Solved!
Go to solution

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?

 

Thank you.

0 Kudos
Message 1 of 7
(994 Views)

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.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 7
(974 Views)

That was the first thing I tried but I cant make it work. Maybe Iam doing something wrong?

0 Kudos
Message 3 of 7
(960 Views)

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.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 7
(950 Views)

But the DAQmx write function does not have a 3D option. 

0 Kudos
Message 5 of 7
(947 Views)
Solution
Accepted by topic author KostasMavrakis

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.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 6 of 7
(909 Views)

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. 

0 Kudos
Message 7 of 7
(874 Views)