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: 

Getting my application on one computer to access the shared variables on another

I have an program on one computer (Windows 7 using DSC and NI OPC Server) that works with an Allen Bradley plc. I want to build an executable of a copy of this program to run on an Allen Bradley touch panel (running Windows XP) that will access the shared variables of the original program. The two computers are on the same network. My first attempt failed as I simply used the same shared variable library in my build and the other computer threw and error about OPC server not being licensed. I called NI and the rep suggested that I can do this if I can get the copied program to link/load a different library with shared variables of the same name but the address altered to link to the original program. But he couldn't tell me how to do this. Any ideas?

0 Kudos
Message 1 of 3
(1,936 Views)

Use the programmatic access VIs: http://zone.ni.com/reference/en-XX/help/371361K-01/lvconcepts/sv_usingdynvarapi/

 

On the application that does deploy the libraries you can put one of the shared variable nodes on the block diagram, right click on it and select "Convert to Programmatic Access" to see how it formats the ni.var.psp for a given variable.

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 2 of 3
(1,924 Views)

Thank you for your quick reply. The program I want to clone has over 500 shared variables and uses binding on most of the front panel indicators and controls. The solution you suggest does not answer how I deal with these problems.

0 Kudos
Message 3 of 3
(1,915 Views)