Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Exception Breakpoint CWNumEdit OPC Binding

I'm trying to bind an opc simulator tag to the CWNumEdit control in VB6 so that each time it is updated, it will be displayed on the screen.

I have done this successfully with an LED display (CWKnob) with no problems, I added a cwnumedit control and occasionally (more often than not) receive the following message after closing the screen with the cwnumedit control on it:

The exception Breakpoint
A breakpoint has been reached.
(0x80000003) occurred in the application at location 0x0787x9ea.

Click on OK to terminate the program
Click on CANCEL to debug the program

Clicking on either then brings up the following:

An exception 'Unhandled Win32 Exception' has occurred in VB6.exe

However, no debuggers are registere
d that can debug this application. Unable to JIT debug.

The program will then crash completely. This seems to happen regardless of which OPC server I connect to. I am connecting via code rather than the properties of the control, using the line:

CWAngleS1.CWBindings(1).URL = "opc://localhost/ICONICS.Simulator/SimulatePLC.PumpStatus"

As I said, no problems with the LED's being displayed, just the cwnumedit that crashes everything.

I'm running:

Win 2K SP3
MS v6.0 (589)
VB 6.0 SP 5

Any assistance would be greatly appreciated!
0 Kudos
Message 1 of 5
(3,850 Views)
It could be having a problem disconnecting from the OPC server before the control is discarded. Have you tried disconnecting the binding in code before closing the form? The code would be:

CWAngleS1.CWBindings(1).Disconnect

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 5
(3,850 Views)
Hi Chris,

Thanks for you quick response.

Yes, I have tried disconnecting using the code you mentioned and it still does the same thing - I tried this code in the Form_Unload routine and experienced the same results. It seems to relate with how many bound objects I have on screen:

ie. If I have one label, then it will do it now and again. The more I have the more often it seems to crash?

Have you got any ideas?

Thanks!
0 Kudos
Message 3 of 5
(3,850 Views)
Unfortunately, I don't have any ideas on what is causing this. If you contact our support engineers with an example (http://www.ni.com/ask), then we will try to find the explanation. As long as we can reproduce the problem here, we should be able to figure out what is going on.

Chris
0 Kudos
Message 4 of 5
(3,850 Views)
Thanks Chris,

I have got around the solution by using the DataSocket control which I have found is alot more reliable for the task I need!

Thanks
0 Kudos
Message 5 of 5
(3,850 Views)