05-14-2019 11:20 AM
I have c++ code that interfaces the a PC-DIO-96 board (or equivalently a USB-6509). I'd like to convert my code to c#. There are a few examples of c# code but they're very simple. I can use PInvoke from c# to call c++ functions but I'd rather use c# function calls directly. Does anyone know where I can find a listing of c# functions with appropriate namespaces and which dll's if any I need for c#? Thanks.
05-16-2019 09:13 AM
Hi Gene,
In the next links you can find the help documents for Measurement Studio, there you can find some additional examples and syntaxis for C# code.
Measurement Studio 2012 for Visual Studio 2010 Help
http://zone.ni.com/reference/en-XX/help/372636F-01/
NationalInstruments.UI.WindowsForms Namespace
http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/bc10ffb8/
Using the Measurement Studio Windows Forms .NET Controls
Hope this can help.
09-16-2020 12:12 PM
Hello,
I found some c# examples but (1) they're very simple and don't correlate very well to the code I need to convert and (2) when I tried to build one of the examples, I get an error on the NationalInstruments.DAQmx namespace - error CS0234: The type or namespace name 'DAQmx' does not exist in the namespace 'NationalInstruments' (are you missing an assembly reference?). Normally I add a reference to a DLL that contains a namespace I want to use. The namespace NationalInstruments.DAQmx is referenced but what DLL contains that namespace?. Evidently that DLL is not begin accessed by the sample program.
Thank you,
Gene
09-16-2020 03:06 PM
Please disregard my last message. The .NET libraries weren't installed, once I installed them the sample programs built successfully.
Gene