nistam Posted February 9, 2005 Report Share Posted February 9, 2005 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 ? Quote Link to comment
Khalid Posted February 11, 2005 Report Share Posted February 11, 2005 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 Quote Link to comment
nistam Posted February 14, 2005 Author Report Share Posted February 14, 2005 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. Quote Link to comment
anton.lindner Posted February 15, 2005 Report Share Posted February 15, 2005 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.