I mistakenly posted this in tips and tricks first, I just moved it here where I think it should be...
Hi! I've been tinkering with AHMI for a couple of years. I recently purchased the ClxDriver.dll and control packs to help support, and also because I wanted an easy way to deploy a click-once app with some of the AHMI features.
I have noticed that when I use the EthernetIPForCLXCom.Subscribe method, even with a try-catch block, I never seem to actually hit the catch block when I get an exception (Wrong tag name in the subscription), yet the app is throwing an exception in the debugger. The only place I can see that exception is in the debugger, the code continues to run without displaying the messagebox that I have in the catch section.
When I use just a .read("Tagname"), the exception acts as it should and I do hit the catch block. Only the Subscription method seems to hide the exception when using the ClxDriver.dll.
I have uploaded an image showing the only way I can see the exception. Maybe it is my VS settings, possibly, but this is the first time I have ever encountered this.
Here is the code that is causing the exception, the tag name error was in:
Private Sub DataSubscriptionToPLC()
Try
PLCSubscriptionIDs.Add(PLC.Subscribe(PLCTag_InvalidateTorques, 1, AddressOf SubscriptionCallback))
PLCSubscriptionIDs.Add(PLC.Subscribe(PLCTag_AddTorques, 1, AddressOf SubscriptionCallback))
Catch ex As Exception
MsgBox("Failed to subscribe. " & ex.Message)
End Try
End Sub
The tag name was wrong in PLCTag_InvalidateTorques, but it never actually failed and presented any exception.
Any ideas how I can catch this exception?