Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

ScatterGraph crashing COM control?

I am using Measurement Studio 8.0.1.334 with Visual Studio 2005. I have a form that contains an NI ScatterGraph, and a 3rd-party ActiveX control. The ActiveX control interfaces to USB power meter that is constantly streaming data to me. Unfortunately, I keep getting Overflow errors thrown by the ActiveX control, which causes it to stop streaming.
 
I have tried many things to track this problem down, and I am now convinced that the problem is coming from the ScatterGraph. If I remove the ScatterGraph, no crash. If I use a different graph type, no crash.
 
Any ideas about what is going on? I would give you a sample program, but you would need the USB power meter hardware and OCX, so the code wouldn't do you any good.
 
 
0 Kudos
Message 1 of 8
(3,768 Views)
Hi DRT,

Do you have the verbage of the error message that is being thrown? Is Visual Studio itself crashing or it is just your application?

Could you post a code snippet of how you're passing data to the Scatter Graph? How large is the data you're passing to the graph?

Let us know DRT, thanks.

Dan Weiland
0 Kudos
Message 2 of 8
(3,756 Views)
The error message is "Overflow error". The error is being thrown by the 3rd-party OCX control, from within the OCX code somewhere.
I am not plotting any data. Just having the ScatterGraph control in an active form causes this problem, and it appears to be only the ScatterGraph. I tried WaveForm and Complex graphs and they did not cause this. I tried the ActiveX CWGraph control, and it didn't cause the problem either.
 
 
0 Kudos
Message 3 of 8
(3,755 Views)
Do the acquisition rates being used by your OCX control affect the behavior positively or negatively in any way? Or does it throw this overflow error regardless?

I'm attempting to see if this is a problem with the ScatterGraph and OCX controls in general by attempting to create an error with our own OCX controls, but thusfar have been unsuccessful.

What language are you programming in?

I'm current contacting R&D as well to see if they have any ideas as to why this might be happening. Thanks for your patience DRT.
Dan Weiland
0 Kudos
Message 4 of 8
(3,737 Views)

Unfortunately, I can't change the rate at which the OCX streams data to me. The rate is relatively low, 10Hz.

I am programming with C# using Visual Studio 2005.

If you are interested in the OCX control, it is located at:

http://www.coherentinc.com/Service/index.cfm?fuseaction=Forms.page&PageID=93

Select the SSIM OEM tools. I think you could install this, and add the OCX to a C# project. It is shows up as prjSSIMUSB.SSIMUSB in the list of COM Components in Visual Studio.

0 Kudos
Message 5 of 8
(3,736 Views)
I'm actually not able to load that COM control onto a Visual Studio Form. It appears in the COM list and I can add them to my toolbox, but I cannot drag them onto the form. I've tried unregistering and registering the OCX numerous times, to no avail. (It DOES however appear and load properly in both LabVIEW and LabWindows/CVI Smiley Wink )

Do you think you could post a small example that uses the SSIMUSB.ocx file as well the actual SSIMUSB.ocx that your system is using, I can try to get it working.

Thanks
Dan Weiland
0 Kudos
Message 6 of 8
(3,650 Views)
OK, here is the project I created. You may have to click on the Scatter Graph some to get the exception to occur. It is intermittent, do be patient.
0 Kudos
Message 7 of 8
(3,643 Views)
I managed to get the SSIM tools to work in Visual Studio, added a NI Scatter Graph and tried to replicate the issue, but was unable to see the exception. I also got your project to compile and run, and clicked on the Scatter Graph control for a good five minutes with no errors.

Is there anything else you think might be causing the problem? In the project you sent us, is the SSIM USB control actually trying to acquire data or is it just sitting on the form? Does the exception ever occur for you while not acquiring data? Or only during acquisition. This is the only thing I can think of that would be different between your setup and my own.

Dan Weiland
0 Kudos
Message 8 of 8
(3,621 Views)