Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

AI, AO, DO Channels Read/Write

When reading a load using a load cell using the AI channel, does the raw data need to be scaled or I can assume what I read is the actual force. How do I output the value read to a text box since the output is not a string. I tried converting to a string but convert.ToString doesn't seem to do the trick.

I am new to using AI and AO channels. How do you turn on devices like power supplies? AO or DO?
0 Kudos
Message 1 of 5
(3,993 Views)
Hi E-man,

Depending on the hardware and LabVIEW version, you may be using DAQmx. DAQmx is our new driver that works in LabVIEW 7.x and all E-series and M-series boards.

When you program in DAQmx you can set up a load cell task that will automatically scale your voltage depending on your hardware.

Also, the analog read VI returns a number (or array of numbers) so you will need to display your data using a numeric indicator.

Please give me some more informaion about what hardware and software you are using so I can better help you.

-Sal
0 Kudos
Message 2 of 5
(3,982 Views)
i am using DAQmx PCI-6220. I have labview 7.1 but I prefer to develop my application with Visual Studio .NET c#.
0 Kudos
Message 3 of 5
(3,975 Views)
Hi E-man,

The best way to get started is to check out some of the examples that are included. If you are at all familiar with LabVIEW programming, I would suggest using the Example Finder in LabVIEW to start.

In LabVIEW go to Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage or Strain.

Take a look at some of the examples to see how LabVIEW and DAQmx work to set up channels and perform the acquisition.

Now, in C# DAQmx works exactly the same. But instead of LabVIEW VIs, you use C functions. The concept of DAQmx is the exact same however. You can call the same DAQmx functions in C# as LabVIEW and it should work. Check out some of the C# examples found on your computer:

C:\Program Files\National Instruments\MeasurementStudioVS2003\DotNET\Examples\DAQmx

-Sal
0 Kudos
Message 4 of 5
(3,955 Views)
Just to clarify a little bit...

In C#, you'll be using the DAQmx .NET class library rather than the C API/functions. The DAQmx .NET class library is a native .NET assembly that presents the DAQmx driver functionality as an object oriented class hierarchy. Where possible, it presents API concepts in the same way that analogous concepts are presented in the .NET framework. As Salvador mentioned, all of the functionality (outside of RT) that is available in LabVIEW is available in the DAQmx .NET class library.

In addition to the examples, I recommend that you check out the conceptual content, which is designed to give you an overview of the driver and highlight the key concepts you need to get started. Check out the topic Using the Measurement Studio NI-DAQmx .NET Library in your Visual Studio .NET 2003 help. If you have Measurement Studio, you should also look into using the DAQmx Assistant and user control code generation tools. Documentation for these tools is in the topic Creating a Measurement Studio DAQ Application.

If you do not have Measurement Studio, there is no link to launch the Measurement Studio help on its own. See this NI Discussion Forum thread for information on how to add the link.

Finally, if you are unfamiliar with the DAQmx driver, you should check out the NI-DAQmx Help file (Start>>Programs>>National Instruments>>NI-DAQ>>NI-DAQmx Help). It documents the driver and data acquisition concepts in a language-agnostic manner.

Good luck and let us know if you have additional questions.
0 Kudos
Message 5 of 5
(3,943 Views)