LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read opc item from datasocket - no values returned.

Hi all,
 
when i'm trying to read from an OPC item, this is my problem :
 
- Opening opc item with DS : no error
- Connection status : Connection active
- DS read returns me value 0 with 0 quality.
 
When I use Softing OPC client to read this item, at the same time,  DS read give me the value with quality 192
 
I've allready registered opcproxy.dll, so what can be wrong?
 
Greetz,
 
Bjorn Conjaerts
0 Kudos
Message 1 of 4
(3,248 Views)
Hello Bjorn,


Are you only reading the first value as it looks like you have the same behaviour as discussed here?
So, if you are only reading the first value it's expected that you will read value "0" and quality "0".

Based on the available examples shipped with LabVIEW and available on ni.com/examples, the quality output of the DS Read VI should give you the value "C0" if all OK.  So that's why I assume you have the same problem as in the linked forum post.
I don't know Softing OPC, but maybe it's programmed that way that it skips the first value if it reads "Quality = 0".

Please have a try by implementing the proposed solution and let us know if it works.


Best regards,
Joeri

National Instruments
Servicesg
0 Kudos
Message 2 of 4
(3,186 Views)
Hi Joeri,

Thanks for your answer.
I allready found this article on the website, and I've tried it before I posted this item.  It does not solve anything.

The first as well as the last value is nill with quality nill.

Any other idea?

Thanks

Bjorn
0 Kudos
Message 3 of 4
(3,178 Views)
Hello Bjorn,


I didn't wanted to mention in my first reply as I don't think it a problem in your case, but one of the more common problems we encounter with Datasocket is that the network port used for Datasocket data transfer is often blocked on company networks.  Datasocket uses port 3015, so please verify this port is open on your network. 
I don't know the Softing application and if it uses the same network port for data data communication.  I can't find the answer on the internet. 

With the current available information it's very difficult to troubleshoot your problem.  Can you post your VI so we can have a look?
If it includes custom Sub-VI's, please make a ZIP of all VI's.

I don't know if you added error handling in your application.
Without error handling it may happen that your application goes to the next step although no data was received.or an error occured.

What can happen for example. 
Although Ethernet can transfer data at a reasonable speed, it has a high latency.  This means that it takes a while before you receive an answer (data) after you did a request (read).  I did some tests and a latency of 200ms was no exeption. So if I set a timeout of smaller than 200ms my application could, whithout error handling, simply go to the next step and return no data.    Have a look at the default value of the timeout inputs of the Datasockets functions in LabVIEW, that's defaulting to 10 seconds.

Just a thought, but please if possible send us your VI so we can have a look at it.


Best regards,
Joeri

National Instruments
Servicesg
0 Kudos
Message 4 of 4
(3,164 Views)