Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

With .NET Core?

Would just like to chip in and say just because .NET Core can do cross platform, doesn't mean all driver and tooling needs to support all platforms... a .NET Core project can example easily be build against Windows runtime only.

 

That said it would be nice to example be able to use Measurement Studio, and DAQmx drivers from more lightweight devices for Industrial IoT scenarious.

 

We're also example using Teststand(for now...) on production line, at the moment, using custom result recording to Azure Cloud for data analysis etc, and there we're using Microsofts .NET dll's, and that works fine since they support .NET 4.5+ but at some point newer versions of those dll's will only be for .NET Core.

 

 

 

 

 

 

Message 11 of 20
(2,860 Views)

.NET Core leaves the runtime to be updated via Windows Update, and the version your application uses ships with your application. That's alot better for maintenance and easier for the customer when they don't have to install a new version of the framework when you compile against a newer version.

 

It also has alot better support for databases, command line interface generation of entity framework models (scaffolding) -- the dialog they had for years to do this was extremely buggy and sometimes would error out and you couldn't generate anything but errors.

 

Project files -- the new SDK version of the project file is SO much cleaner and clearer than it's been. Doing a diff you can clearly tell what changes have been made.

 

Sqlite and JSON support...

0 Kudos
Message 12 of 20
(2,684 Views)

I've recently had success using the NI APIs with .NET 5 (Core) libraries/apps.  However, I have not been able to reference/call them within TestStand.  For example, you can see the classes/methods when trying to use within the Sequence Analyzer config.

0 Kudos
Message 13 of 20
(2,670 Views)

That's kind of the whole issue.

Dotnet core (soon to be dotnet 5) can easily run most "legacy dll's" such as the teststand api ones, aslong as the compile target is set to windows, it's the other way that's the major issue: that none of NI's tools currently support dotnet core, and no clear plan other than a very vague answer in another topic that they are working with microsoft on it (Re: .NET Core Support - NI Community), which i see you commented on aswell 🙂

 

Hell even if they opened up their software a bit more, i'm sure the community(or NI partners) would be able to make an "adapter" for any language, took years for python support in teststand as an example.

0 Kudos
Message 14 of 20
(2,663 Views)

"That's kind of the whole issue."  Yup, completely agree.  There have been many times we started down the .NET Core path, but had to move back to "full framework" due to these limitation.  Maybe one day 😀.

 

0 Kudos
Message 15 of 20
(2,659 Views)

… one year after… is there something new in this arena ? What are the plans at N.I. to support .Net Core modules?

Thanks to anyone having more news on this.
Christophe

Message 16 of 20
(2,148 Views)

DLL: c:\windows\system32\nicaiu.dll

Link: https://www.ni.com/en-us/support/documentation/supplemental/21/using-ni-daqmx-in-text-based-programm...

header file: C:\Program Files (x86)\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h
documentation: C:\Program Files (x86)\National Instruments\NI-DAQ\Docs\cdaqmx.chm

 

Measurement Studio assemblies aren't compatible with .NET core and beyond, so I started making my own wrappers around NI DLL's.

 

So far the only problem I've found, is that the DLL reads as 64 bit, but will only work for C# if you compile as x86 (even though the driver is listed as 32 and 64 bit - https://www.ni.com/en-us/support/downloads/drivers/download.ni-daqmx.html#445931). Which is also the same experience you get with Measurement Studio .NET assemblies.

 

Dump of file c:\windows\system32\nicaiu.dll

8664 machine (x64)

Dump of file c:\windows\SysWOW64\nicaiu.dll

14C machine (x86)

 

0 Kudos
Message 17 of 20
(1,866 Views)

Measurement Studio isn't compatible with Visual Studio 2022 - Is difficult to keep using VS2019 especially when .NET 5.0 is outdated

Measurement Studio isn't compatible with .NET 5.0 but uses old Framework 4.8

 

Anyways, according to NI, it isn't required to install MS in order to speak with Daqmx cards, so I install all libs and tried to refer those in my project - as expected, it wasn't possible.

 

I then copied files manually and tried to refer as assembly, again incompatibility issue

 

 

I am unable to integrate DaqMx to Core or .NET 6.0. Not only this, I am unable to interface Daqmx.dll in my 6.0 project. 

 

What is the solution you can suggest? We have heavy dependence on NI USB Cards and can not stick to old and outdated Visual Studio / Framework

 

 

0 Kudos
Message 18 of 20
(471 Views)

There have been several attempts to create a .Net Interop layer for DAQmx and other NI drivers that calls the NI DLL directly. Some have even published their (partial) work on git and other platforms. It's not rocket science to do an Interop interface, just a damn lot of work, since the DAQmx API is huge!

Rolf Kalbermatter
My Blog
0 Kudos
Message 19 of 20
(450 Views)

Yes, I have seen such projects.

- I was also thinking of integrating my old application dll (which I wrote in 4.8 and refers to DaQmx dlls) into my core project by making DllImport calls.

- but that kills my flexibility, as I have to keep on maintaining my old 4.8 project for every small change which is needed in new project.

- Or another approach is to use DllImport directly with DaQmx, but that's a lot of work because all classes and structs have to be reflected in my new core project too.

 

0 Kudos
Message 20 of 20
(421 Views)