NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
LANL13
Posts: 16
0 Kudos
Accepted Solution

Simultaneous Analog Output from NI-DAQmx USB-6211

[ Edited ]

Hello all,

 

Here is my problem:

I want my DAQmx (USB-6211) to simultaneously output two different waveforms. One should be output from ao0, the other from ao1. However, I keep getting "Error -50103". I cannot figure out how to get around this. I have tried doing Case 6 from this page but have been unsuccessful (I think that I am doing it wrong). Is there any guidance you could give me? I am new at LabView.

 

Thank you for your time,

LANL13

 

P.S. - I have attached a copy of my code if it helps

NI-DAQmx USB-6211.vi

 

 

Member
LANL13
Posts: 16
0 Kudos

Re: Simultaneous Analog Output from NI-DAQmx USB-6211

Sorry, I don't think that the VI posted well. Here it is again:

 

 

Knight of NI
Dennis_Knutson
Posts: 29,306
0 Kudos

Re: Simultaneous Analog Output from NI-DAQmx USB-6211

Did you do a search for this very common error. Your basic mistake is using two separate tasks instead of combining both channels into a single task.

Member
LANL13
Posts: 16
0 Kudos

Re: Simultaneous Analog Output from NI-DAQmx USB-6211

I agree that that is likely my problem, but I do not know how to fix it. How do I use 2 channels in a single task and then implement that task into my program?

Knight of NI
Dennis_Knutson
Posts: 29,306
0 Kudos

Re: Simultaneous Analog Output from NI-DAQmx USB-6211

Delete the second task and either specify all channels at once (i.e. Dev1\ai\ao0:1) or use a second Create Channel wired to the first.

Member
LANL13
Posts: 16
0 Kudos

Re: Simultaneous Analog Output from NI-DAQmx USB-6211

How do I make something like this: "Dev1\ai\ao0:1"

Knight of NI
Dennis_Knutson
Posts: 29,306
0 Kudos

Re: Simultaneous Analog Output from NI-DAQmx USB-6211

Sorry, it was supposed to be Dev1\ao0:1.

 

Just type it in. Or same basic way you made the Dev1\ao0 but instead click the browse button.

Member
LANL13
Posts: 16
0 Kudos

Re: Simultaneous Analog Output from NI-DAQmx USB-6211

So I replaced "Physical Channel X" and "Physical Channel Y" with "Physical Channel XY" which states Dev1\a0:1 like you said. This new physical channel is then wired to both Create Channels. However, I still get Error -50103. Should I be using a task instead of a Physical Channel? If so, how do I set it up?

 

Thanks for all of your help by the way. I truly appreciate it.

Knight of NI
Dennis_Knutson
Posts: 29,306
0 Kudos

Re: Simultaneous Analog Output from NI-DAQmx USB-6211

You are going to have to show your modifications. You only need a second create channel if the parameters (i.e. min and max) for it are different than the parameters of the first channel. If you have that, then each create channel function would specify it's own channel and you would not have dev1\ao0:1 anyplace. You would also wire the task out of the first create channel to the task in of the second create channel. You would then have a single clock, trigger, start, etc. function.

Active Participant
Mcdan
Posts: 463
0 Kudos

Re: Simultaneous Analog Output from NI-DAQmx USB-6211

LANL13,

 

Here is a quick modification which should do what you want.  In this case I have used DAQmx Create Channel twice, because it is not clear if the two channels' Min/Max values will always be the same.

 

Hope that helps,

Dan

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page