Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

independent DAQmx analog outputs Vdc

I have a compact DAQ 9172 with several AI & DO modules (9217, 9205, 9476, & 9481)

I need to add an Analog Output module to output a DC control voltage 0 - 5Vdc on 6 lines, independently (the 6 stations operate independently, and concurrently).

if anyone could point me to sample code, or give me some insight on the best way to proceed I would be  grateful

  

thanx

lmd2 

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 1 of 5
(3,212 Views)

As I'm sure you are aware It is only possible to output all AO channels at the same update rate as there is only one AO timing engine.  Therefore all of your channels will be updated at the same rate.  Now to do this it is actually pretty easy, simply:

 

1.create an AO task and wire in multiple Channels using a string similar to the following: Cdaq2Mod3/AO0:5. 

2.Configure your sample clock to whatever update rate you need. 

3. Specify any triggers you may need. 

4. You then may need to write some data into the buffer (even if its empty data to ensure that once the task is start there are values in the DAQmx buffer to be written to the card. 

5. Start the task

6. Open a While loop and inside the while loop build the data of each channel separately (however you need it to be for each channel). 

7.  Use the Merge signals.vi Express VI to build the array of data thatwill be passed to the DAQmx REad.vi. 

8.  Pass the output of the Merge Signals.vi toa DAQmx Read (Configured for AO >> Multiple Channels>> Multiple Samples)

9.  Clear the task after the while loop and handle any errors.

 

Please see the following discussion forum for more details as well as images/an example programs for how to do this.

 

Charley Dahan

Global Account Manager
Message 2 of 5
(3,191 Views)

hi Charles

thanx for the quick response

yeah, I follow what you are saying; setting all channels in tandem won't be a problem, I update a cluster of flow rates (in a functional global) whenever an individual flow rate changes, and that will drive my AO.

I was actually hoping to see an example of DC output, all the examples are continuos waveforms - guess I set minV and maxV to te same value and frequency doesn't matter(?)

 

didn't see any link in ur post to a discussion, or an example,  - but I guess I can wing it from here

thanx again

 

lmd2 

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 3 of 5
(3,188 Views)

Sorry about not attaching the discussion forum that i mentioned.  here it is:

http://forums.ni.com/ni/board/message?board.id=250&message.id=48446#M48446

 

If you are looking for simple DC output... you can check out the follwoing example program: ....Program Files\National Instruments\LabVIEW 8.6\examples\DAQmx\Analog Out\Generate voltage.ll\Gen Voltage Update.  That is simple DC voltage updates on a given AO Channel. 

 

hope this helps!
Charley Dahan

Global Account Manager
Message 4 of 5
(3,160 Views)

ok this looks real straight forward

so to control a group of channels I use DAQmx Flatten Channel String.vi and write an array of V to DAQmx Write configured for NChan 1 Sample. Then those outputs remain on and steady.  To update a single channel change the array element and resend the entire array, 

thanx a million 

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 5 of 5
(3,145 Views)