LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows/CVI accessing C# program

I suppose this is a common problem.

What I want to achieve is this:

 

I want to do my User Interface design in C# WPF, instead of the LabWindows/CVI (*.uir), which is cumbersome and not user-friendly.

 

say a simple slider in C# WPF, how can a LabWindows/CVI program able to access and set those variables in C# WPF slider?

do we need to create some sort of wrapper for it? Is the .NET Library useful for this purpose?

 

can we have some demo to test it out?

 

thanks.

0 Kudos
Message 1 of 6
(4,676 Views)

Hi,

    I am not too familiar with C# and CVI cooperation but maybe it is better idea to to separate C#UI and CVI code to different project.

    What i mean is.Compile one of them to library(DLL or something in C#) and then use one from other by some well defined API.

    I think this is better idea than mix lot of functions call from two different runtimes(C# and CVI)

   

    There is sample already shipped/instaled with CVI, some of this is about call .net function from CVI.
    You can also create your own wraper library from CVI menu Tools>Create .Net controler.Check the help file.

 

 

P.S. personaly, i like the CVI UI, and UI editor too.

0 Kudos
Message 2 of 6
(4,668 Views)

Hi TTH,

 

It is unfortunately not possible to host .NET Controls in the CVI UI. R&D seem to be working on doing that possible in the future but there is no release date for this feature. Ina ddition, the ActiveX Container in LabWindows/CVI does not support hosting .NET controls using COM Interop.

 

Best regards

______________
Florian Abry
Inside Sales Engineer, NI Germany
0 Kudos
Message 3 of 6
(4,662 Views)

If you chose WPF as front end, why not chose c# with measurement studio as back end instead of CVI?

0 Kudos
Message 4 of 6
(4,640 Views)

I am wondering exactly which user interface controls are available in C# which are not available in CVI.

Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 5 of 6
(4,581 Views)

Another option to consider is to use network variables to communicate between your C# program and the CVI program. Perhaps the WPF C# program contains the UI and then sends that information to the CVI application to process. CVI could even then send back processed information via network variables to the WPF UI for display purposes. 

 

Just a thought.

Jonathan N.
National Instruments
0 Kudos
Message 6 of 6
(4,539 Views)