Parametric Programming

Post Reply
User avatar
US_Helpdesk
Moderator
Moderator
Posts: 1094
Joined: Wed Feb 23, 2011 7:26 pm

Parametric Programming

Post by US_Helpdesk » Mon Nov 07, 2011 11:39 am

Parametric Programming is possible with CMM-Manager... Some things will be much easier than others. Unlike most DMIS based languages CMM-Manager does not expose EVERY characteristic as a Variable. For example in the current build you can apply a variable LOCATION (x,y,z) to a circle but not the diameter. This is due to our Automatic Path Planning capabilities. We are in the midst of making changes that will allow FULL variable definition of almost all characteristics in your program.

To recall a variable simply click the Set Variable button on the nominal tab of the measured feature. As shown in the attached photo. The variable values can be set through the embedded VB Script engine in CMM-Manager. Scripts are added and edited directly in the CMM-Manager program, these scripts are executed at program runtime. In 3.0 a VB Script can be added from the Program ribbon tab by clicking the Add VB Script button.

A script could be as simple as:

Code: Select all

varX = InputBox("Please Enter Nominal X location")
varY = InputBox("Please Enter Nominal Y location")
In this case an Input Box is displayed asking for the nominal X & Y locations, at run time the target measured location is updated per the input values.

Changing the diameter by parametric program is not as simple... Instead I would program the individual measured points and then construct a circle. In this case the Script could look something like this:

Code: Select all

Dia = InputBox("Please Enter Dia. in inches")

x = 1.5
y = 1.125
z = 0
depth = .125

pt1x = x + (dia / 2)
pt1y = y
pt1z = z - depth

pt2x = x 
pt2y = y + (dia / 2)
pt2z = z - depth

pt3x = x - (dia / 2)
pt3y = y
pt3z = z - depth

pt4x = x
pt4y = y -(dia / 2)
pt4z = z - depth
In this case I used 4 measured points for simplicity in calculations, if you want to measure a hole on some compound angle or with more than 4 points you'll need to get out your trig calculator :D
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

Koutinho
Regular User
Regular User
Posts: 31
Joined: Wed Mar 18, 2015 5:11 am

Re: Parametric Programming

Post by Koutinho » Fri Jan 08, 2016 6:07 am

Good Morning,

In last version of CMM (3.5) is already possible to us parametric programming to define the diameter and height of a cylinder?

Regards,

Koutinho

User avatar
medupriest
Moderator
Moderator
Posts: 374
Joined: Fri Mar 13, 2015 11:59 am

Re: Parametric Programming

Post by medupriest » Fri Jan 08, 2016 10:10 am

With "Define DCC" we can set the location of a cylinder parametrically, but not the diameter or height.
define cylinder.png
Because we can parametrically define points and can best fit cylinder to those points, you can input a height and diameter to measure a cylinder.

The attached program was written for a family of cylindrical parts that had a small flange as well, but something that can likely be modified to fit your purposes. Upon entering 5 parameters, this program takes two rows of 6 points at variable heights (taking into account the length of the part and the length of the stylus) and 6 points on a circular plane to report perpendicularity.
parametric_cylinder.zip
You do not have the required permissions to view the files attached to this post.

Koutinho
Regular User
Regular User
Posts: 31
Joined: Wed Mar 18, 2015 5:11 am

Re: Parametric Programming

Post by Koutinho » Fri Jan 08, 2016 11:21 am

Thanks for your fast response.

Did you see my last email?

Regards,

ameade022008
Power User
Power User
Posts: 73
Joined: Thu Oct 03, 2013 12:48 pm
Location: Tempe, AZ
Contact:

Re: Parametric Programming

Post by ameade022008 » Tue Jan 24, 2017 10:17 am

Subscribed for future reference
Albert Meade
Quality Manager, Metalcraft Inc.
http://azmetalcraftinc.com/

NODOCHAU
Participant
Participant
Posts: 7
Joined: Tue Jul 17, 2018 9:50 am

Re: Parametric Programming

Post by NODOCHAU » Thu Feb 28, 2019 9:48 am

Can we make the alignment and save/recall it by using variables?
I start to learn the parametric programming. It is very interested and it will save my time a lot if I can do that.
Thanks for sharing

User avatar
CrashN8
Site Admin
Site Admin
Posts: 318
Joined: Thu Feb 09, 2017 4:07 pm

Re: Parametric Programming

Post by CrashN8 » Tue Mar 05, 2019 6:03 pm

Not sure I understand your request... Do you want to recall one of several different Ref Frames depending on variable value? -i.e. maybe selection by user from list of available Ref Frames? Or is this more like offsetting the alignment by some variable distance based on previous measurement?

Post Reply