Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

particlereport

I recently upgraded my CCWIMAQVision library to MeasurementStudio 7.1.1 -- I changed my Particle report function calls from the BasicParticle(...) function that was part of the old MeasurementStudio to the MeasurementStudio 7.1.1 version function call, ParticleReport(...)

Everytime I make the ParticleReport(...) call the library throws an exception, any ideas why?

C_CWIMAQParticleReport report = visionObject->CreateCWIMAQParticleReport();
visionObject->ParticleReport (image,report,COleVariant((long)1),COleVariant((long)1));
0 Kudos
Message 1 of 9
(4,941 Views)
Hi mps,

Thanks for using our forums! One thing that comes to mind is that when you upgraded Measurement Studio, it may not have "brought" you Vision functionality with it. You might try reinstalling Vision, making sure to include the appropriate language support (check this by doing a custom installation). Let us know if this helps you out.

Regards

Dan
National Instruments
0 Kudos
Message 2 of 9
(4,914 Views)
I think the vision module is installed correctly because I am able to use other vision functions. I am able to create the _CWIMAQParticleReport object, but when i call reportObject.ParticleReport(...) the OLE library throws an exception. Any other ideas?
0 Kudos
Message 3 of 9
(4,891 Views)
What parameters in particular are you using? One of the other engineers here has run into some issues where some parameters in the particle report became obsolete after the upgrade. We might just need to change the parameters you are using.

Dan
National Instruments
0 Kudos
Message 4 of 9
(4,858 Views)
Here are the parameters that I am passing to the ParticleReport function.

_CWIMAQParticleReport report = visionObject->CreateCWIMAQParticleReport();

//image is an image of type IMAQ_IMAGE_U8
visionObject->ParticleReport(image,report,COleVariant((long)FALSE),COleVariant((long)TRUE));
0 Kudos
Message 5 of 9
(4,847 Views)
Can you run the example described in the ParticleReport Method help file?
Message 6 of 9
(4,817 Views)
The VB example gave me a better error message. It said that I was running an unlicensed version of IMAQ Vision, so I registered it and the Particle Report function worked. It's strange that that's the only Vision function call that it died on. Thanks for your help.

Attached is the error that VB threw.
0 Kudos
Message 7 of 9
(4,801 Views)
Hi mps,

That's what I was wondering- I think there were some changes made between versions. Anyhow, in your current state, you will have Vision activated for 30 days- were you able to activate the license?

Dan
0 Kudos
Message 8 of 9
(4,796 Views)
Yes, I did activate, and the ParticleReport(..) function started working.

Thanks
0 Kudos
Message 9 of 9
(4,794 Views)