LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

attach a c# code in labview (with MyRIO)

Hi,

 

i would like to know, how i can attached my c# code to my vi. I am working with MyRIO-1900. since my vi needs too much time to overlay the defect regions, i decided to write a c# code to which i send an Array with the adresses of defected Pixels and the dimensions of my Image. this returns the Regions of the Image, which will be overlay.

My Problem is that i don't know if and how i should attach this c# code in my vi.  does someone have any litterature, which describe how i should proceed? the c# code i wrote automatically generates a dll, but i readed somewhere that dlls don't work on myRIO.

I will be very happy if someone can help me. I test my c# code on visual Studio and it works, so if i can integrate it to my vi, it will be very helpful for me.

 

Idrissou.

 

 

0 Kudos
Message 1 of 4
(2,920 Views)

So you have a MyRIO, that runs NI Linux RT. 

You need to build our code into a .so library that can run on the Linux target. 

If you are using any Windows function, you can't use them. 

 

Look at 

Integrating C Code with LabVIEW on NI Linux Real-Time Targets

 

Or do a google search for "LabVIEW external code Linux RT"

0 Kudos
Message 2 of 4
(2,904 Views)

To get c# code to run on a LabVIEW RT Target, you need to have a LabVIEW-compatible compiler.  As dkfire's reply points out, there are tools to include c and c++ routines, but c# does not appear to be supported at the present time.  Can you use one of the supported Languages?

 

Bob Schor

0 Kudos
Message 3 of 4
(2,873 Views)

Hi,

thanks for your replies. I will write my code in c or c++ and try to integrate it in labview. I will use this C & C++ developpement Tools for NI Linux RT, Eclipse Edition. I will then let you know if i have any Problem.

 

 

0 Kudos
Message 4 of 4
(2,857 Views)