Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

A&E reconnect

More
19 Mar 2014 13:12 #1774 by Filliolej
Replied by Filliolej on topic A&E reconnect
thanks

:)

Please Log in or Create an account to join the conversation.

More
19 Mar 2014 12:10 #1773 by support
Replied by support on topic A&E reconnect
EasyOPC should automatically try to reconnect, with a configurable period (which defaults to 10 seconds I think). It should send a notification with an Exception when it reconnects, and then later a notification with a "null" Exception and a "null" Event when the connection is re-established.

It can also automatically do a Refresh then.

You do not have to (and you should not) write a single line of code for this. You cannot directly control the connections and disconnection the way you are trying to, just by calling UnsubscribeAllEvents etc.

Please first remove all the extra code, then do the test again, and observe what happens.

Please Log in or Create an account to join the conversation.

More
19 Mar 2014 10:47 #1772 by Filliolej
A&E reconnect was created by Filliolej
Hi, I've a problem with my vb.net program.
Sometimes I need to stop the AE-OPC Server on Windows and after 10sec I restart it. When I do this EasyEAClient will disconnect automatically. When I try manually to reconnect no event arrive so I need to stop my vb.net program and restart it...
Can you help me?

--- code for connection ---
EasyAEClient = New OpcLabs.EasyOpc.AlarmsAndEvents.EasyAEClient
AEFilter = New OpcLabs.EasyOpc.AlarmsAndEvents.AESubscriptionFilter

AddHandler EasyAEClient.Notification, AddressOf EasyAEClient_Notification

If Not .opcInfo.serverName Is Nothing Then
AEFilter.Areas = areas
MyHandle = EasyAEClient.SubscribeEvents(.opcInfo.host, .opcInfo.serverName,
.driverInfo.scanTime, State, AEFilter)
.updateTB_(.tbConnectionStatus, "Connecting...")
Else
MsgBox("Server OPC not found!")
End If

--- code for disconnect ---
RemoveHandler EasyAEClient.Notification, AddressOf EasyAEClient_Notification
EasyAEClient.UnsubscribeAllEvents()
EasyAEClient.Dispose()


--- code for reconnect ---
EasyAEClient.RefreshEventSubscription(MyHandle)

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.042 seconds