Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate dc voltage using PCI 6221 card ?

Hi all,
I am using labview 8 , Nidamx 7.3 and M series PCI 6221 card.
I need to generate dc voltage at the analog output at a sampling rate of 300K/sec and I need to vary the voltage between the range of 1 to 5 V. I am new to labview. Is there any good tutorial or example in labview to do this?
 
Thanks & regards
Venkat
 
0 Kudos
Message 1 of 10
(5,325 Views)
Venkat,
 
Thank you for contacting National Instruments.
 
There are great examples of how to do this! First off, I recommend that you install NI-DAQmx 8.0 from our website. This will install support for your PCI-6221 in LabVIEW 8. Then, you can go to Help>>Find Examples in LabVIEW. This will open the Example Finder, which is a great resource and a good starting point for a data acquisition project.
 
In the Example Finder, a list of folders will be in the middle of the window. Double-click on "Hardware Input and Output", Then "DAQmx", then "Analog Generation", then "Voltage". This will bring up a list of all the examples that meet that description. You can see a brief description of what they do by selecting the example and reading the Information at the top right in the Example Finder.  
 
Based on your description, I recommend looking at the example named Gen Mult Volt Updates-Int Clk.vi. You can save a copy of this example and edit it to fit your needs.
 
--
Michael P
National Instruments
0 Kudos
Message 2 of 10
(5,303 Views)

Thank You very much..It was very helpful..

Smiley Very Happy

Venkat

0 Kudos
Message 3 of 10
(5,297 Views)

Hi,

Whenever I try to run the example that u mentioned, I am getting an error message Error- 50150 occured at Daqmx create channel.

 What

0 Kudos
Message 4 of 10
(5,293 Views)
Hi,
Whenever I try to run the example u mentioned, i get an error saying " Error 50150 occured at Daqmx create channel (AO Volatage basic).
What should i do???
 
Venkat
0 Kudos
Message 5 of 10
(5,292 Views)
Venkat,
 
Remove your DAQ device and uninstall the DAQmx drivers - DAQmx 7.3 and DAQmx 8 (Add/Remove Programs>>National Instruments Software (Modify)>>NI-DAQmx (Remove)). Then, reinstall DAQmx 8. Then, put the DAQ device back in the computer. Doing this will make sure that the latest driver is being used. Let us know if you still get this error.
--
Michael P
National Instruments
0 Kudos
Message 6 of 10
(5,284 Views)
I got similar problem with the very same DAQ card. I used the vi program from help "Gen Mult Volt Updates-Int Clk.vi" .. I put zero frequency and i get an error because the sample clock rate shouldn't be zero .. so is there any way that can i get a DC signal (as long as it is not by using digital signal becoz i need up to 10 V) ?
0 Kudos
Message 7 of 10
(4,893 Views)

Hi nasrul

The frequency that the VI is requesting is not referring to the frequency components of your signal but rather to the number of samples per second that you wish to update your analog output voltage. If you are simply trying to output 10 V and have the analog output channel hold that value, you need only to set this value once. It can be a very simple software timed application. The VI that you are running is updating the analog output voltage every tick of the internal clock (Int Clk) which will be running at your specified frequency. Does this information clear things up?

Best regards,

Jordan D
Applications Engineering
National Instruments
0 Kudos
Message 8 of 10
(4,879 Views)
Hi

I am also new and have the same problem. I need to generate a DC voltage signal of 1 V. I looked at the example that is mentioned but it seeems to me as if it can be used for generating waveforms only. Can you please clarify this or my approach is wrong.

Abhishek
0 Kudos
Message 9 of 10
(4,676 Views)

Hi,

Yes, that example is setup to only take waveforms.  However, if you look at the DAQmx Write.vi, there is a drop down menu to select what type of signal, how many channels and samples, and data type.  For your application we would be interested in changing the data type, where you can select between a waveform or double. 

Please open up the example titled GenVoltageUpdate.vi and modify it as shown below.  This modified example uses the DAQmx Write with 1 Chan. 1 Samp. with a double data input and added functions DAQmx Start Task and a While Loop.



Message Edited by samantham on 11-29-2007 01:55 PM
Samantha
National Instruments
Applications Engineer
Download All
0 Kudos
Message 10 of 10
(4,651 Views)