Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - robo

Pages: [1]
1
Support Questions / Re: Exceptions in ClxDriver.dll
« on: March 18, 2021, 06:24:45 AM »
Right clicking on the file ClxDriver.dll and selection properties shows a file version/product version of 1.3.4.0.  I just received the file it this week.

2
Support Questions / Exceptions in ClxDriver.dll
« on: March 17, 2021, 08:12:06 AM »
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:

Code: [Select]
     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?

Pages: [1]