From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,020 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
(3,995 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')/Value

 

Maybe this will help a bit (not sure):

http://www.ni.com/white-paper/4679/en/

http://www.ni.com/white-paper/5484/en/

Message 4 of 4
(3,956 Views)