09-30-2011 12:53 PM
Hi,
I new to this NI stuff so any expert help would really be appreciated.
I look it up online and it said the example code for C# Visual Studio .net is available under C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\
however the only folder I see is DAQmx ANSI C. Where is the .net example? Did I miss some option during installation. I did not have measurement studio, but the web said I should still be able to use it in .net.
I also look under C:\Program Files\National Instruments\NI-DAQ and found nothing. Is there any place online that I can download the example.
The program that I want to write it quite simple. I only need to toggle 2 output on/off.
I have set up all the HW and verify via NI Measurement & Automation Explorer->Sevice and Interfaces->NI USB-6525 "Dev 1"->Test Panels
that I can toggle both output.
Now I want to be able to toggle it via C# application.. So I assume
1. In C# copy NI .net library to my application folder (Which library, Hope NI provide one for convenient. and where it is located?)
2. Add reference in my C# app to NI Library
3. Call function to initialize the NI device (if need)
4. Call function to toggle the I/O
If the step above is correct can someone provide the answer.
If not can someone guide me in the right direction.
Thank
10-01-2011 11:12 AM - edited 10-01-2011 11:13 AM
Interesting question. I will be following this.
I have built LabVIEW to call C# methods, but not the other way around (as near as we could figure, it was only possible through call-backs).
I hope you get a good answer for this.
BTW, my information on LabVIEW and C# is in this message.
Rob
10-03-2011 06:50 PM
Hello Guys,
When you install DAQmx, you have the option of including example code for .NET. If you go to your control panel and then to "Programs and Features" you can open up "National Instruments Software". This tool allows you to modify, repair, and remove NI software. If you select DAQmx and then "modify" it, you'll have the option of installing items that you may not have included with the original installation. While modifying DAQmx, you can find the examples at NI-DAQmx > Application Development Support > .NET Framework Languages Support > Examples.
10-04-2011 10:26 AM
I have done that, but the installer gave me the following error
Installation Cannot Proceed
Measurement Studio for VS2008 Integration not present
Measurement Studio for VS2005 Integration not present
Measurement Studio for VS2008 not present
Measurement Studio for VS2008 Integration not present
Measurement Studio for VS2005 not present
Measurement Studio for VS2005 Integration not present
Measurement Studio for VS2003 not present
and the 'Next' button is disable.
I even try and select only select the following option from the features list
.NET Framework 3.5 Language Support
.NET Framework 2.0 Language Support
.NET Framework 1.1 Language Support
and get the following error
Measurement Studio for VS2008 Integration not present
Measurement Studio for VS2005 Integration not present
How about point me to the example code that I can download online or better yet
If my outline step 1-4 about is correct. Just write a brief answer to guide me.
Also any documentation that describe your .Net library API will also help
if I want to modify my c# program later.
Thanks
10-05-2011 05:22 PM
Are you using .NET Framework 4.0?
10-06-2011 05:57 PM
My computer has the following .net framework installed
Microsoft .NET Framework 1.1
Microsoft .NET Framework 2.0 Language Pack - DEU
Microsoft .NET Framework 2.0 Service Pack 2
Microsoft .NET Framework 3.0 Service Pack 2
Microsoft .NET Framework 3.5 SP 1
Microsoft .NET Framework 4 Client Profile
Microsoft .NET Framework 4 Extended
Microsoft .NET Framework 4 Multi-Targeting Pack
Do I have to delete one of these .NET Framework to get the example to install?
Thanks
10-07-2011 04:25 PM
Did you try installing only the examples? If I try to install the examples along with the ".NET 4.0 Languages Support" then I get your error. But when I try installing the examples by themselves, with nothing else, it allows me to install.