RoboRIO .NET interop

Does anybody know if .NET interop works in labview on the RoboRIO if you install mono? It seems like it would, and I think it would be really cool for using text based code in labview.

The .NET interop is mostly based around property and method nodes. This lets you connect to built assemblies, but not insert C# or other text code into the diagram.

If you are wanting to include some text programming, I have two different suggestions. The formula node is a pretty good subset of C. It lets you write equations, loops and conditional code too. It is nice to use when you already have an equation and don’t feel like writing it with nodes.

I don’t see the MathScript support in the palettes. The formula node is extensible and some other math languages and tools have plugged in, but they have to do it specifically for a platform, and I don’t see it on linux.

A second approach would be to build some source into a library and call into it using a Call Library Function. If you use simple data types, it is not hard to accomplish. On the other hand, if you aren’t careful, you can corrupt memory, crash, etc.

Greg McKaskle

I know that it is based around the property and method nodes. I was just wondering if those were available on the roboRIO, and if they were usable, since its possible to have working .NET on the roboRIO.

The property nodes work for a number of different interfaces, LV UI, LV Classes, LV I/O, and ActiveX and .NET. Each of these has to not only be on the target, but plugged into the compiler. I can’t be positive, but I don’t think the ActiveX or .NET integration is there except for on Windows.

What .NET components were you specifically interested in? The linux platform has shells and libraries as its native extension mechanisms, and plenty of other things like interprocess comms are relatively easy.

Greg McKaskle

I’ve been working on a Trajectory Generator based on 254’s path generator, and it’s written in C#. Right now I am able to invoke it from LabVIEW on my desktop, and I want to be able to do that on the RoboRIO as well. Since .NET can run on the RoboRIO if we compile it, it seems like .NET interop could work as well.

I don’t know that much about mono on linux. Can you compile it into a linux library? Can you give it C entry points? If so, it will be easy to call from LV. Another approach is to use shared memory or pipes/TCP. And of course another is to write it in LV or using formula nodes.

I also don’t know that much about the trajectory code. The guys who built NItro, years ago, use the NI Motion libraries for their trajectory generation. Libraries like this can be added to WPILib or made available if teams will use them, but I haven’t heard many requests.

Greg McKaskle

I’m mildly curious about the future of .net capabilities since Microsoft is now open sourcing it.