Looping the point to speed up the inspection process

hgnguyen
New User
New User
Posts: 1
Joined: Sat Feb 18, 2012 5:55 pm

Looping the point to speed up the inspection process

Post by hgnguyen » Fri Mar 30, 2012 7:25 pm

Dear All,
I have one question regrading the point measurement. I want to know the thickness or a part at different location (i.e 10° apart), However, to repeat the entry for each point is taking too long. My question is
Can I create a loop which I can measure multiple points at the same time by rotating the coordinate (10° about Z Axis)?

If there is a requirement code, can you please help me start with the simple code?

User avatar
US_Helpdesk
Moderator
Moderator
Posts: 1092
Joined: Wed Feb 23, 2011 7:26 pm

Re: Looping the point to speed up the inspection process

Post by US_Helpdesk » Mon Apr 09, 2012 11:44 am

This can be done using a loop...

See the attached program file as well the screen shots below.

Place a loop in your program from the Program Ribbon Tab>Loop Operations
loop_opo.jpg
The Measured Point and Ref Frame Rotation should be included inside the loop
program.jpg
After Running you will see you have features Point1, Point1...1, Point1...2, Point1...3, etc. In the Feature Database
features.jpg
You can access these looped features in Teach Mode operations by clicking the Index checkbox in most operations. This Index specifies which one of the loop features you want to use. i.e. Point1...3 => Point1 (index 3)
You do not have the required permissions to view the files attached to this post.
I've migrated to a new user account, see my other posts here

Luke_P
Getting Started
Getting Started
Posts: 5
Joined: Thu Aug 29, 2013 10:35 am

Re: Looping the point to speed up the inspection process

Post by Luke_P » Thu Aug 29, 2013 12:27 pm

Hi,

Is it possible to dynamically report distance between points? The number of points is variant and is read from an inputbox while the program is running.

So basically I want to measure 12 or any other even number of points, and then report the distance between those opposed to each other. Depending on the situation I might need 2 or more distances and I want to measure it all in one program.

What I don't know is how to dynamically change features names / labels, features indexes in report distance function don't allow for any symbols other than numbers. I've looked around on this forum as well as CMM-Mgr help files, which frankly are useless regarding VB scripting.

Could you please help me find solution to this problem?

User avatar
US_Helpdesk
Moderator
Moderator
Posts: 1092
Joined: Wed Feb 23, 2011 7:26 pm

Re: Looping the point to speed up the inspection process

Post by US_Helpdesk » Thu Aug 29, 2013 2:59 pm

see attached...
You do not have the required permissions to view the files attached to this post.
I've migrated to a new user account, see my other posts here

Luke_P
Getting Started
Getting Started
Posts: 5
Joined: Thu Aug 29, 2013 10:35 am

Re: Looping the point to speed up the inspection process

Post by Luke_P » Fri Aug 30, 2013 12:59 pm

thanks for Your help. this works like a charm.

One more thing though.
I'm reporting distance between points in XY plane. in order to do that I'm calculating said distance and then I'm reporting it with "User Defined Dimension" option. Maybe there is an easier way to do this, I couldn't figure out how to do it with "Distance Between" option.

1. Is there any way to input information into "Note" field in the feature report options (user defined dimension, feature, distance between etc.) using VBScript?
For example I'm measuring points on the circumference of an inner diameter every 20deg, and then in the report i want to include information about the angle of the measurement to the X axis.
Information in "Dimension Name" field in "User Defined Dimension" is then displayed in Tolerance Report in "Type" line.

2. Is there any way to call out "Distance Between" option in VBScript?
Where You could specify names or lables of the features You want to report, like "Distance Between", "Angle Between", as well as other parameters like plane or axis of the reported dimension. nom, ltol, utol also.

Attached is what i have so far...
You do not have the required permissions to view the files attached to this post.
Last edited by Luke_P on Fri Aug 30, 2013 1:44 pm, edited 1 time in total.

User avatar
US_Helpdesk
Moderator
Moderator
Posts: 1092
Joined: Wed Feb 23, 2011 7:26 pm

Re: Looping the point to speed up the inspection process

Post by US_Helpdesk » Fri Aug 30, 2013 1:30 pm

User Defined Dimension is the only "easy" way to pull from VB back to the CMM-M Report. The more involved way includes re-constructing parametric features (variable use in Defined and construct features) then report these new features as required - i.e. Distance Between instead of User Defined Dimension

The Note Field is not accessible from VB / Variable definition. This has been requested and will likely be in a future release.
I've migrated to a new user account, see my other posts here

Luke_P
Getting Started
Getting Started
Posts: 5
Joined: Thu Aug 29, 2013 10:35 am

Re: Looping the point to speed up the inspection process

Post by Luke_P » Fri Aug 30, 2013 2:02 pm

Ok, but re-constructing features with the use of variables would defy the idea of automation and looping, wouldn't it? I mean that could work for predefined number of features, the number that wouldn't change in different program runs.
So basically You're looping through features and while You're in Teach Mode, there's only one feature in the loop available for reporting. meaning You'd have to add more features that would read variables from the features measured inside the loop and then report distance between those. That's a bit redundant.
Am I right?

Anyways, thank You for Your help. It was very useful, and I've learnt quite a bit. :)

User avatar
US_Helpdesk
Moderator
Moderator
Posts: 1092
Joined: Wed Feb 23, 2011 7:26 pm

Re: Looping the point to speed up the inspection process

Post by US_Helpdesk » Sun Sep 01, 2013 12:55 pm

No no no.... I think you missed my point. You can use variables to re-construct features. These variables would be created using Actual Measured Features with the GetFeaturePropertyAct() function in VB. Then construct the features using the Define Option and specify the variable name for each component of the feature with the Set Variables button.

Maybe I am still not understanding this... Could you send a sample project with some comments explaining what you'd like to do?
I've migrated to a new user account, see my other posts here

Luke_P
Getting Started
Getting Started
Posts: 5
Joined: Thu Aug 29, 2013 10:35 am

Re: Looping the point to speed up the inspection process

Post by Luke_P » Mon Sep 02, 2013 7:26 am

the goal is to measure points on a circumference of an inner diameter every, 30 deg, 10 deg or whatever, and then report the distance between opposite points. so that we would have information in which direction the diameter is deformed, and where we could expect leaks. i know there are other ways to do it perhaps faster and more elegant, but this is what i'm required to measure.

my idea, was to automate the measurement by creating a program that would measure the number of required points depending on the techs input. for example if engineer decides to increase the number of points to get more detailed info, i wouldn't have to write another complete program. just change the input.

the easiest way would be to just use Measure Circle command, then extract raw data and then report dimensions, but this method doesn't include probe compensation. good idea would be to add an option of compensating extracted clouds in future release, so you could further manipulate points extracted from the cloud in the CMMM itself.

Attached is my project You've requested. it's the same file i've posted a while ago. hope this will help you understand what i'm trying to do here.
You do not have the required permissions to view the files attached to this post.

User avatar
US_Helpdesk
Moderator
Moderator
Posts: 1092
Joined: Wed Feb 23, 2011 7:26 pm

Re: Looping the point to speed up the inspection process

Post by US_Helpdesk » Tue Sep 03, 2013 10:54 am

So does this method work? It seems that it should... The only suggestion I have to to replace the Sync CAD command at line008 with a Run-Time Align Part instead. Run-Time Align Part must be performed after the alignment on non-determinant Ref Frames - i.e. Round Parts with no rotation constraint.

The request for probe comp on Extract Raw Data is already completed... This was added in CMM-Manager 3.3.

I hope this helps.
I've migrated to a new user account, see my other posts here

Post Reply