LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared variables in standalone applications

Hi, im using Labview 10 with NI opc servers. I have built a standalone application that  uses i/o variables (shared variables) to take data from  the NI OPC servers which is done locally and works fine. So i assign the Shared variable to work remotely from another PC making sure the shared variable uses the psp address so it will work remotely, For some reason it won't work remotely, the shared variable defaults to a local address when built as part of an application. Why is this??

0 Kudos
Message 1 of 8
(4,476 Views)

LV exe's use a .alias file that is adjacent to your exe and resolves target logical names to physical IP addresses.
So first make sure that the PSP URL is derived from the project so that it will have a logical target name.

 

For example:

 

if your NSV URL is: \\cRIO1\process\NSV1

then the alias file will contain a line like:

cRIO1=192.168.0.2

0 Kudos
Message 2 of 8
(4,436 Views)

Hi, tried that. Still defaults.

 

Stu

0 Kudos
Message 3 of 8
(4,418 Views)

Hey Stu,

 

Have you tried binding the shared variables to the data source on OPC server? Perhaps this may solve the issue, let me know if this helps.

 

Use the instructions in the link below:

 

https://www.ni.com/docs/en-US/bundle/labview/page/binding-shared-variables-and-other-ni-psp-data-ite...

Regards

Andrew George @ NI UK
0 Kudos
Message 4 of 8
(4,355 Views)

Hi, it seems to be a problem with the shared variable establishing comms remotely with the NI OPC server software. I've tried using a 3rd party OPC client to establish comms with the NI OPC Servers remotely and it can't establish, comms. I also have a 3rd party OPC server installed with NI OPC Server and that works fine.

 

Stu

0 Kudos
Message 5 of 8
(4,328 Views)

Hey Stu,

 

I have a few links that I want you to try the first is to ensure that the variables are being setup correctly, so as to ensure the communication between the host and OPC is correct. The second is a debugging page which may prove useful. The page covers data-binding, firewall settings and setting the correct communication ports using the OPC server. Apologies for not being able to find a cut an dry solution, however this problem is not easy to replicate.

 

Using the LabVIEW Shared Variable and OPC With NI-DAQmx:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2CMCAY&l=en-US

 

Error -1950679035 when Using Shared Variables Bound to OPC Tags:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019M1mSAE&l=en-US

Regards

Andrew George @ NI UK
0 Kudos
Message 6 of 8
(4,310 Views)

Hey Stu,

 

I have a few links that I want you to try the first is to ensure that the variables are being setup correctly, so as to ensure the communication between the host and OPC is correct. The second is a debugging page which may prove useful. The page covers data-binding, firewall settings and setting the correct communication ports using the OPC server. Apologies for not being able to find a cut an dry solution, however this problem is not easy to replicate.

 

Using the LabVIEW Shared Variable and OPC With NI-DAQmx:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2CMCAY&l=en-US

 

Error -1950679035 when Using Shared Variables Bound to OPC Tags:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019M1mSAE&l=en-US

Regards

Andrew George @ NI UK
0 Kudos
Message 7 of 8
(4,309 Views)

The error is the exact problem i'm having. I'am using Labview 8.6, not 8.6.1 and still have the problem when i deploy as application. Could it be a fact that i could be using a newer version of the runtime engine thats causing this issue??

0 Kudos
Message 8 of 8
(4,289 Views)