Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a sinewave using PXI-6713 from VB.NET?

I need to be able to programmatically change the amplitude of the sinewave as well as the frequency. This appears to be fairly easy to do from the "Test Panels", however not so from the base classes I can see. I am limited to manually creating a "AO#" channel, which executes no problem, however as far as being able to control the output I am lost. Please help! 🙂
0 Kudos
Message 1 of 3
(3,654 Views)
Dear SeanFarr,

Thank you for contacting National Instruments.

To address your question, you have control over what you output. In the test panels, you can output a sinewave of a specific amplitude and frequency, but you can't change the wave programmatically. Instead you have to stop outputting the wave, change the settings, and then output again. Each time you program the generation of a finite wave (perhaps in a while loop), you can initialize the values of the frequency and amplitude, and perhaps this will do what you're trying to accomplish.

Examples that may help you do this are found in the National Instruments folder C:\Program Files\National Instruments\NI-DAQ\Examples\VBasic\Ao.

Let me know if you have any further questions or if this does
not resolve your issue.

Thanks again and have a great day!

Chad AE
Applications Engineer - National Instruments
0 Kudos
Message 2 of 3
(3,654 Views)
The examples referenced above are Visual Basic 6 examples and use the Traditional DAQ driver.

If you are using Visual Basic .NET instead of Visual Basic 6, you are better off using the native .NET class library for the DAQmx driver. Examples that use this class library are installed by default to Program Files\National Instruments\MeasurementStudioVS2003\DotNET\Examples\DAQmx

Analog output examples are in the Analog Out subdirectory.

Documentation on the DAQmx .NET class library is, by default, in Start>>Programs>>National Instruments>>Measurement Studio for VS .NET 2003>>Documentation. The documentation is in the start menu by default only if you have Measurement Studio installed. Otherwise, see this post for information on how to get to the documentation.

The paths I've specified might be different on your system, depending on the version of DAQ that you have.
0 Kudos
Message 3 of 3
(3,654 Views)