08-13-2013 06:17 AM
I have setup an OPC server using Kepware to communicate through to a PLC. I am using datasocket.
There is no problem with reading and writing to the OPC server.
Is there a way to check if the connection between the OPC server and the PLC is valid eg. using Datasocket Read? Or is there an other way to check about the data is valid
08-13-2013 06:37 AM
Hi Kim,
The value you can get using control value tag to value tag, and the status of tag you can get using state message tag.
08-13-2013 08:11 AM
I am sorry but I didn't understand what you were trying to tell me. Can you please attach a screendump or try to be more specific
08-13-2013 08:59 AM
Read an item as a variant, then use Get Variant Attribute with attribute name "Quality".
Convert the attribute value to an integer: this is the OPC quality code of the item, a bitmask from which you can extract information about the connection status and other info.
08-14-2013 02:06 AM
Thanks Pincpanter
Can you tell me which bit is the connection to the PLC?
08-14-2013 02:13 AM
Kepware documentation should give you the answer. Searching the web, I found this document.