Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to an OPC server from an EVS

Solved!
Go to solution

I have a piece of code which I use to connect to a OPC server to write variables for logging by another program.  When I port to an EVS I cannot get the address format required.  I am not sure what I should use for this.  The code which works on the PC running the server is :

 

 

however when I replace the localhost with the address of the computer I get error 1181.  I looked this up and the help file tells me that the address is improperly formed.  I have tried address and address:port number in place of localhost.  Both give me the same thing.  Does anyone know hat is going on.  I note that the real time and normal palettes are different. But this case came from creating the file in the target and then copying it into the computer section of the project explorer and it works.

0 Kudos
Message 1 of 6
(6,442 Views)

Hello,

 

Unfortunately the image you added is not properly displayed.  Please add the code as an attachment or use a different file format.

 

What LabVIEW functions are you using to call the OPC Server?  If using Datasockets this article might be helpful to verify everything is set up properly.

 

Regards,

M. Whitaker
ni.com/support
0 Kudos
Message 2 of 6
(6,424 Views)

Sorry about that.  It showed up on the origianl as a screen capture.  Here is the original code in  Open_OPC_Output and here is my write file which actually writes the data.  Both work well with Kepware as long as the address is localhost.

 

Download All
0 Kudos
Message 3 of 6
(6,415 Views)

Which EVS are you trying to port to? And you only receive the error 1181 when you change the URL from localhost to the EVS address correct?

dK
0 Kudos
Message 4 of 6
(6,370 Views)

I am trying to port to 1460 RT system.  When I try to enter the address of my kepware server which is on a remote machine I never connect.  I do not have a kepware server for the RT system.  I have another developer looking on the forums and he tells me that the OPC is not supported on the RT system.  Is this true?  If it is then I will have to write the data out another way.

0 Kudos
Message 5 of 6
(6,358 Views)
Solution
Accepted by stevegraff

Since you are using DataSocket functions to write to an OPC server, a real time system will not be compatible.

dK
0 Kudos
Message 6 of 6
(6,343 Views)