Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

outputting 2 different time length voltages while recording the current from one of the outputs

Solved!
Go to solution
I'm creating a vi that outputs 2 different voltage waveforms (AO1 and AO2). These waveforms are different in time length, and number of times they will be outputted. AO1 needs to occur several times while AO2 is running its first time. I am also recording the voltage input of AI1 while outputting to AO1. I have attached a vi of what I thought will work. I thought it would be good to have the ai/StartTrigger initialize the acquisition, and voltage output. However, this arrangement produces an error. The error I get is -200802. Am i going about this all wrong? Any ideas?
0 Kudos
Message 1 of 3
(2,853 Views)
I should mention that I have a PCI-6711 and 6052E in my machine. I was hoping to just use the 6052E. But timing needs to be accurate, which is why I want all three events to have the same trigger.  If using both cards will improve the timing, then that is an option.
0 Kudos
Message 2 of 3
(2,850 Views)
Solution
Accepted by topic author Jordanyorg

At first glance, I see a couple issues with your code:

- You arecalling DAQmx Write before you call DAQmx Start. The Start must be called before the Write.

- You have two Analog Output tasks. Only one Analog Output task is allowed per device. If both of your analog output channels are on the same card, they must be in the same task.

 

Here is a great resource for getting started with DAQmx programming.

---

Peter Flores
Applications Engineer
Message 3 of 3
(2,833 Views)