LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC shared variable cannot be read on RT target

I created a Shared Variable on My Computer which is bound to an OPC server. I then created a VI on a RT target which reads the value of that shared variable. But although I run the VI for about 20 seconds, the value is never read. If I run the same VI on My Computer, the value is read properly.

If I create a shared variable not bound to the OPC server and create a VI that links the OPC server to that shared variable, I can also read it from the RT target.

Do you have any suggestions?

0 Kudos
Message 1 of 3
(2,802 Views)
Hello, your first method should work, do you add an OPC Client to the project first? ( My computer >> New >> I/O Server ) before adding the bound variables?
National Instruments
0 Kudos
Message 2 of 3
(2,787 Views)

Yes, I am doing that. However, when I attempt to run the VI, I get this error code:

 

 -1950679027

Shared Variable in opconrt.vi<APPEND>
This error or warning occurred while reading the following Shared Variable:
\\My Computer\OPCLibrary\Ch0V0Set
\\192.168.1.3\OPCLibrary\Ch0V0Set

 

I read that it corresponds to "NI-PSP has not connected to the server yet", but what does that mean? I assume it's referring to the Shared Variable Engine or Scan Engine, but I thought those are launched automatically as the RT target is booted, and so it should have worked even in that case.

Thanks for your time,

Pablo Mosteiro

0 Kudos
Message 3 of 3
(2,777 Views)