Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Traditional NI-DAQ from C#

I'm just getting started in MS7.0 and have some questions.

I have a board that is currently unsupported by DAQmx (PCI6534), so I must use Traditional NI-DAQ. My project will be written in C#.

The MS docs suggest that I use ActiveX controls to get at the NI-DAQ functionality, but I don't seem to have these controls installed (i.e. they don't appear in the Tools->Add/Remove Toolbox items ... window).

I guess I can just use the NI-DAQ dll, much I like I used to from C++, using .NET P/Invoke. Does anyone have a class that wraps the NI-DAQ dll ?

I'd be interested to hear anybody's experiences with the above techniques. If I'm just missing something (which I suspect, as this all seems quite inelegant) then please put me straight 🙂

M
any thanks,

Jony Hudson
0 Kudos
Message 1 of 4
(4,339 Views)
The Traditional NI-DAQ ActiveX controls are included with NI-DAQ 7. To install them, you need to select "Measurement Studio ActiveX Controls" which is located in the feature tree under "Microsoft Visual Basic Support" in the installer. This is the easiest way to use Traditional NI-DAQ in .NET.

National Instruments does not currently supply a class of P/Invoke wrappers for Traditional NI-DAQ. There are some examples available like this one that contain wrappers for a few Traditional NI-DAQ methods and show how you would create the wrappers for the functions you need.

I hope this helps.
Good luck with your project.

Tony H.
Measurement Studio
0 Kudos
Message 2 of 4
(4,339 Views)
Thanks for the info. I've been playing around with both approaches. The NI-DAQ approach would seem to be preferable, as I know the API, but I'm starting to realise that it's a little bit involved (having problems passing buffers of the right type).

I've got a couple of questions about the ActiveX controls. First up, are they documented anywhere ? I can't seem to find anything about them in the docs I have installed. Second, is it the case that they have to be hosted within a form ? This kind of messes up my application's architecture ...

Many thanks for the help,

Jony
0 Kudos
Message 3 of 4
(4,339 Views)
I have a managed C++ wrapper for the traditional NIDaq. If you want it, just e-mail me: Mike.Jones@woofumdust.com
0 Kudos
Message 4 of 4
(4,339 Views)