LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing shared variables from a C# application

Hello,

 

I hope this question is posted in the appropriate forum, my apologies if not.

 

I'm building a C#, WPF application on Windows 7 Pro that aggregates data from multiple sources, one of them being a cRio 9025 + 9144.

 

I have a vi running on the same computer that displays data coming from the cRio and allows me to control and monitor my devices. This vi works with no problem. What I would like to do is to read and write the shared variables this vi is using to communicate with the cRio, but from the WPF application.

 

I have searched and investigated, but I can't find a really good solution. For instance, I could run a small vi that reads a shared variable and returns its content, but it sounds like a lot of unneeded code is being executed, and it's probably quite slow.

 

Also, during my investigations I have got messages that my license must be activated to access NI .NET components, but I have no clue which license to activate or buy. I have Labview 2012 and I have activated every license I could, to no end.

 

Could you kindly point me to a source explaining the best approach to take?

 

Thank you for your help.

 

0 Kudos
Message 1 of 5
(3,737 Views)

Hi,

 

Could you post your VI just in order to see what you've done?

 

Thank you.

 

Regards,

Celine
National Instruments France

0 Kudos
Message 2 of 5
(3,704 Views)

Sure. I have attached the project, with the vi running on the PC included. I think vi that run on the cRio or 9144 are irrelevant to the discussion, but let me know if you need more.

 

Thank you for your help.

 

DLB

 

0 Kudos
Message 3 of 5
(3,688 Views)

@Proengin wrote:
[..]

Also, during my investigations I have got messages that my license must be activated to access NI .NET components, but I have no clue which license to activate or buy. [..]

 


Those libraries are part of Measurement Studio (MStudio), an "add-on" to MS Visual Studio:

MStudio Libraries.PNG

 

Maybe it is easier for you to buy MStudio (either as standalone or as part of the Developer Suite Core) rather than trying to create a LV wrapper and include this as unmanaged package in your C# application.....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 5
(3,678 Views)

I have Measurement Studio Enterprise Edition installed and activated on my computer. However, I might have missed a step somewhere, and I will focus on running the examples and reading the doc (!) until my license issue is fixed.

 

Anyway, that's the pointer I was looking for, thank you. I'll come back here if I still can't make it to work.

 

DLB

 

0 Kudos
Message 5 of 5
(3,670 Views)