Showing results for 
Search instead for 
Did you mean: 

Industrial Automation OPC Servers 5.1 and NI OPC Servers 4.2

Hi Jeremy


Yes I do use LV 8.2.1 for this project (But I think it should also be verifyed on LV 8.5 since I think I saw the same on this platform).


The strange thing is that no errors are returned - the errors cluster is empty. Reading a tag just returns a default value (e.g. reading a DBL returns zero).

I inserted the delay between the open and read and then the read returned the correct value.

It does not seem to be nessesary with a delay during a write operation.


The sub vis to read then looks loke this:


Open datasocket (mode=read, timeout =default 10s)

Wait 200ms

Read datasocket 

Close datasocket


I use the KepWARE OPC server since this supports LV 8.2.1 which the NI implementation of the KepWARE server does not (Restricted to LV 8.5 or later).

In case you will need it you can download a free demo of the Kepware that will run for 2 hours after each restart. I have verified the above behaviour using this demo and a Siemens S7 PLC.


Let me know if you need more information. 



Henrik Molsen

microLEX Systems 

H. Molsen, CIM Industrial Systems
0 Kudos
Message 11 of 15

Hi Henrik,


I've tried this in 8.6 with KEPServer, and I see the same behavior.  I'll look in to this and try to find out whether or not it is a bug.  I also noticed that if you did two reads back to back without any delays, the first read always came back as 0, and the second always returns the correct value.


In any case, I doubt the issue would be very high priority, since most users will be performing the read in a loop and the first read probably won't matter very much. 



Applications Engineer
National Instruments
Message 12 of 15



In my application I use a loop and check the quality. After a number of retries I return either the result or an error in case the quality is always bad. The example I gave was just to make it easier to identify the problem. (I think it is always better with a stripped down version for debug).


Thank you for looking into the problem.



Henrik Molsen

microLEX Systems 






H. Molsen, CIM Industrial Systems
0 Kudos
Message 13 of 15

Hello guys,

I'm trying to implement a CVI client into a OPC server (KEPServerEX) via DataSocket. My problem is that I can connect to the server (because I see that the number of clients increment) but I can't read nor write any value. It is very strange, since I tested the same CVI client using MatrikonOPC Server for Simulation and it worked just fine, so I may discard any DCOM problem.

In the KEPServerEX, I'm choosing the option "simulate device" and choosing localhost ( as the device ID.

I hope you could help me, I really need to implement this OPC server, since I will use about 3 or 4 PLCs (different brands) and this is the only OPC server that includes already the drivers of the brands that I'd like to use.


Best regards,


0 Kudos
Message 14 of 15



Since you were able to successfully communicate with your MatrikonOPC Server, it sounds like the problem may lie in the calls you are sending to the KEPServerEX.  Based on this, I would check to see if the calls to your server changed when you changed servers.



Trey C.

0 Kudos
Message 15 of 15