Jump to content

Problem after writing to a remote OPC


Recommended Posts

Hi guys. I've created a small application that occasionally must write a value to a remote OPC server. If the remote OPC item is 16 bit long and I'm writing a 32 bit value, then my application never writes this value again, and somehow destroys the connection handle with the OPC server. I just have to restart my app. Does anybody know a nice way to handle OPC connections ?

Link to comment
Sorry, more questions than asnwers:

How are you writing to the OPC Server?  DataSocket? 

And if the Server is expecting 16 bits, can't you split your data into 16 bits?

Khalid Ansari

3874[/snapback]

Sorry for the delay, i was away for a few days.

Well, to tell the truth my question is about how to handle OPC connections if the OPC server hangs for some reason, and not how i send data. In my ocassion i connect to a SCADA created with WinCC v6.0. If i attach my control to the OPC from the control properties and not by code, then everything is OK. But i would like to give myself the opportunity to select a different tag name from the server, because not all SCADAs use the same tags :)

Anyway thanks for the interest.

Link to comment

I had a similar problem with a data socket (OPC) connection to a OPC-server. Some integer-variables had to be sent as I8. Sending them as I16 or I32 caused the OPC-server to stop responding and it seemed as if the handle had been destroyed. But it had nothing to do with the remote OPC-item name or the handle, it was just the data-type of the variable that caused the trouble.

Greetings,

Toni

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.