LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

C# API to access Shared Variables?

Hi,

 

Sorry if this is the wrong forum, not sure where to post these types of questions.

 

I'm new to NI products and building some middleware to communicate between applications. Veristand Server is running and hosting Shared Variables used for a simulation and I would like to tap into these in a C# application.

 

I can't find any API to do this, as the .NET examples seem to offer access to the Controller, models and parameters. Is there any API to read/write shared variables?

 

Thanks,

Lane

0 Kudos
Message 1 of 4
(4,690 Views)

Thanks, some good ideas in there. We're currently talking over sockets but looking into accessing the data directly. I don't think dumping out to a file is feasible in our architecture.

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

The shared variables can be accessed through a restful interface. So basic TCP\IP... Problem is finding the documentation.

 

Some documentation is in the LabVIEW Help. Search "Getting Variable Updates" (online LV Help).

 

An HTTP GET on this address used to work for me:

http://localhost:3580/nivariable/VariableValues('ni.var.psp://localhost/EtherCAT%20Master/Mod3/DI1')...

 

Maybe this will help a bit (not sure):

https://www.ni.com/en/support/documentation/supplemental/06/using-the-labview-shared-variable.html

Message 4 of 4
(4,626 Views)