Exception thrown: 'System.Runtime.InteropServices.COMException' in OpcNetApi.Com.dll|Classic OPC: DA, A&E, HDA, XML-DA, etc.|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Exception thrown: 'System.Runtime.InteropServices.COMException' in OpcNetApi.Com.dll
Avatar
Stitch35
Member
Members
Forum Posts: 9
Member Since:
06/04/2018
sp_UserOfflineSmall Offline
1
07/22/2018 - 22:20
sp_Permalink sp_Print

i want to disconnect OPC when OPC Read have exception and connect another OPC in window service but OPC cannot disconnect

 – how I can connect another OPC when OPC disconnect ?

Avatar
Frederick Loveless
Member
Members
Forum Posts: 20
Member Since:
10/02/2014
sp_UserOfflineSmall Offline
2
07/23/2018 - 07:34
sp_Permalink sp_Print

Are you saying that you are trying to disconnect and you are not getting a change in serer object status that indicates that you are disconnected?

Typically I do not disconnect on a read error. It could just be a timeout with the PLC that will rectify itself the next time around. However, if I do need to disconnect and the disconnect request fails that is ususally and indication that the server might be in a hung or locked state waiting for something to happen. In that case I re-initialize the server object I am using to make my connection. Set it to Nothing and then re-init all the connection parameters and then re-connect. 

More information might help us to help you.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 29
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1445
Posts: 4888