Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni-DAQmx .NET6 Support

Hi

 

As we all know, Microsoft announces the new version of .NET which is the .NET6.

Now currently if you wish to work with C#, you have to opt to at maximum .net 4.8 framework.

 

Is there any plans to support these new versions of .NET? As i wish to upgrade my systems and start working with the latest version of .NET.

 

 

0 Kudos
Message 1 of 11
(6,431 Views)

Hi,

 

I think Yes, but I am not sure for this. 

You may send an email to NI to obtain the right information for this, you will follow the news to know the upcoming releases.

0 Kudos
Message 2 of 11
(6,379 Views)

Hi, I ported an old .NET4.8 Windows Forms application into .NET6 by using .NET upgrade assistant from Microsoft.

 

The application can be compiled and run. It works as long as no NI UI controls are called. Those result the following error:

Ylts_1-1637340280333.png

 

 

Maybe there is some hope, that NI will bring Measurement Studio into .NET6 because I succeeded to port a non-NI based old .NET4.8 windows forms application into .NET6.

I did not test DAQmx..

BR,

Ilkka

 

0 Kudos
Message 3 of 11
(6,314 Views)

I second that. It was quite ok to ignore .NET5 because this was a work in progress version with many problems and missing features.

 

But .NET6 is a LTS version that is here to stay and Microsoft, despite telling that Framework 4.8 will be supported for a long time, is doing everything to pull developers to .NET6. I mean they even adapted Windows Forms, modernized it by a lot and try to convince developers to convert their older projects.

 

This tells me that Microsoft wants to get rid of .NET Framework as early as possible. NI has to move to support developers in this transition and not to thwart them.

0 Kudos
Message 4 of 11
(6,295 Views)
Dear <Name Redacted>,Thank you for your patience, I got a reply from the product planning team.We do not plan to support .NET Core in application software or driver software in 2022. We are reviewing plans for 2023, but those are definitely not yet solidified.I hope this helps, I will go ahead and mark this technical support case as "potentially resolved". Feel free to let me know if you have any follow-up queries regarding this topic!Regards,<Name Redacted>NITechnical Support Engineeringwww.ni.com/support

Regarding sending an e-mail to NI: this is the reply I received from NI when inquiring about support for .NET 6 across their product lines in December of last year.

Message 5 of 11
(6,175 Views)

Thanks. This is after all a clear statement, albeit a quite frustrating one.

For me, it would be ok to end development of Measurement Studio alltogether and focus on the .NET drivers for each device category alone.

Drivers like NI-DCPower always lagged behind NI-DAQmx.

0 Kudos
Message 6 of 11
(6,133 Views)

I agree.  Just provide the drivers for .NET 6.  We do not need Measurement Studio or weird interoperability with LabVIEW.  All we need is a wrapper around the NI-VISA and NI-DAQmx dlls and we are good to go. 

 

How can we get this?  Can NI at least disclose the dll signatures so we can create our own?  How can this exist for python (pyvisa) and not .NET 6.0?

 

This is very frustrating.  Engineers may prefer python or LabVIEW, but developers will frequently prefer C# for large automation projects.  Where is NI's support?  I don't want to start a flame-war, but I need to highlight this obvious gap from a developer's perspective.

0 Kudos
Message 7 of 11
(4,844 Views)

@JordanWirth wrote:

I agree.  Just provide the drivers for .NET 6.  We do not need Measurement Studio or weird interoperability with LabVIEW.  All we need is a wrapper around the NI-VISA and NI-DAQmx dlls and we are good to go. 

 

How can we get this?  Can NI at least disclose the dll signatures so we can create our own? 


They can not only but they did, since a long time! When you install DAQmx you can also elect to install C language support (is installed by default). That support will install nidaqmx.h files and friends on your machine under: <ProgramFiles>\National Instruments\Shared\ExternalCompilerSupport\C\include, that document the entire official DAQmx API. There is even a programmers manual for that too: https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/cdaqmx/help_file_title.html

 

Similar for NI-VISA. That follows completely the official VISA specification which is published by the VXI Plug&Play consortium. Because of that, the according support is not installed in the National Instruments directory but in its own specific directory which is documented in this knowledgebase article: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019KZcSAM&l=nl-NL

 

 

The visa.h header file can be found at either of the following two paths for 64-bit Windows:

C:\Program Files (x86)\IVI Foundation\VISA\WinNT\include

C:\Program Files\IVI Foundation\VISA\Win64\include


For 32-bit Windows, the path will be:

C:\Program Files\IVI Foundation\VISA\WinNT\include


Note that the WinNT in the above paths will still be WinNT for all Windows versions.

 

Now, there is nothing that can stop you from writing a C# Interop interface, isn't it? 😁

 


@JordanWirth wrote:

How can this exist for python (pyvisa) and not .NET 6.0?


Someone went through the trouble of writing the equivalent of a C# Interop interface in Python using the ctypes Python library.

Rolf Kalbermatter
My Blog
Message 8 of 11
(4,803 Views)

That's wonderful Rolf! 

 

Thanks for doing my homework for me.  I looked around but never managed to dig that out of the docs.

0 Kudos
Message 9 of 11
(4,755 Views)

I created a wrapper and posted the source code here.

Its not very clean or well tested.  It still needs some TLC so feel free to clone the repo.

 

https://github.com/jrdnwrth/NetVisa

 

Thank you!

Message 10 of 11
(3,559 Views)