From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Mono or .NET Core on CompactRIO (cRIO) and NI Linux Real-Time

I am investigating the feasibility of running .NET on a cRIO controller either using Mono or .NET Core. The idea would be to program the FPGA on the cRIO with LabVIEW but then write the host-side software with a .NET language, notably F#. My ideal scenario would be something like this:

 

Capture.PNG

 

This of course can be easily done on Windows due to the existence of .NET libraries that NI provides as well as LabVIEW's .NET integration (the ability to call .NET assemblies and even build LabVIEW code into .NET assemblies). However, on cRIO it is a different story. Most of it is complicated by NI's reliance on opkg, which seems like a non-standard package manager, and their own repository management.

 

On a cRIO and NI Linux Real-Time:

  1. Has anyone been successful in installing either Mono or .NET Core using packages?
    1. Did you use opkg?
    2. Or did you install another package manager?
  2. Has anyone been successful in building Mono or .NET Core from source?
  3. Bonus: Has anyone done one of the two above steps and been able to successfully run software on the cRIO using a .NET language?

Questions for National Instruments:

  1. Will Mono and .NET Core ever be added to NI's opkg repositories?
    1. This would be a huge benefit to customers looking to integrate .NET code into their cRIO development.
    2. Python is currently included in NI's repository, but in general, I have no interest in building large, reliable systems with Python. It's certainly nice to have it there, but it would be great if .NET was easily available on NI Linux Real-Time. F# can be used for scripting just as Python but can also build more robust code.
  2. Particularly with the development of .NET Core, it would be fantastic if LabVIEW could call and build .NET Core assemblies just as it can do so with .NET Framework assemblies on Windows. Will this happen?

As an interesting note, I was able to install Mono and then F# on a Raspberry Pi within the first day of getting a new one recently. The steps to do so followed directly from the installation documentation for both:

From there I was able to develop F# code on Windows 10 (due to better development environment) and then deploy and run the code on Mono on the Raspberry Pi without any changes. I don't think it should be easier to do this on a Raspberry Pi than on a cRIO.

 

As mentioned in this post, it would be wonderful if the experience of installing F# on NI Linux Real-Time could be as simple as:

opkg update
opkg install mono-complete
opkg install dotnet-sdk opkg install fsharp

A very nice bonus would be Visual Studio Code bundled as a package as well.

Message 1 of 4
(3,245 Views)

I wanted to let you know that improving .NET functionality in our offerings is something that National Instruments is currently working on.

 

Unfortunately, the specifics of what we are developing is confidential, so I won't be able to provide any more information.

 

Hopefully, someone else on the forums will have a bit of experience and be able to answer your other questions. 

Casey G.
0 Kudos
Message 2 of 4
(3,202 Views)

Hi Casey. Thank you for the response, however, I must admit it isn't useful. NI's communication method for new features of "we're working on something but we can't say what, when, or how" isn't a helpful thing to say for people looking for solutions. I need to move to something other than LabVIEW for embedded control. If I can't get that going on cRIO nicely, then I will need to move to other hardware as well. This is for multiple projects and systems, ones that will generate new purchases of NI hardware and software, and so I cannot plan on NI saying "we might improve .NET support". I mean, is this .NET support on NI Linux Real-Time along the lines of adding support for .NET Core? Is it the possibility of a new Windows-based cRIO (newer than the cRIO-9082)?

 

For me personally, if I could get some help from someone more of an expert in Linux to get .NET Core and/or Mono installed on a Linux Real-Time controller in a reliable way, then that would allow me to do what I need to do. It's something I'm working on when I get the chance, but getting external help is why I posted this, to help expedite the process.

0 Kudos
Message 3 of 4
(3,167 Views)

If you are trying to work with .NET, we have other lines that might be a better choice for you. Our PXI controllers run Windows which would be able to work with .NET, and our Embedded cDAQ controllers also have Windows and can run .NET code.

 

I am not certain what you are working on, but if .NET is a necessity, those might be better options for your project.

Casey G.
0 Kudos
Message 4 of 4
(3,143 Views)