This might be a weird question, but does PC-DMIS offer any sort of math functions for formulas between features? I have three features in a program: an OD, and ID, and the true positon from one to the other. I have to take all three elements and use them in a formula to output wall thickness. As of right now, I'm having to enter all this data into an Excel sheet that has the formula that does the math. Is there any way that I can do this right in the PC-DMIS program and output this directly in the report along with the other data?
PC-DMIS math functions
Collapse
X
-
PC-DMIS does offer the ability for you to customize your own math functions, in 2 ways
There are many math functions available via the ASSIGN command which has access to variables, features, and dimensions.
You can also use BASIC language syntax to write your own custom algorithms, and pass data into and out of it via the command line.
- Likes 1
-
It depends on what you want exactly.
Do you want a average of thickness, the different thicknesses depnds on the centering defect, or the distances point to point ? Or something else ?
Can you post the code, please ?
Or the calculation that you do under Excel ?
It could help to give the right assignments !
- Likes 1
Comment
-
ASSIGN/V1=(B1.D.MEAS-B2.D.MEAS)/2
ASSIGN/V2=(B3.TP.MEAS)/2
ASSIGN/V3=V1-V2
Rough idea - Not actual code - HTH3.7mr3CAD++ / 2011mr1CAD++/2012mr1CAD++/QUINDOS7
- Likes 1
Comment
-
dcoss What I do..
1) Measure both features.
2) Create an assignment. I made V1 for this example. It equals the difference between the radial values of the features.
3) Force the result of V1 into a generic circle's diameter value. Report that generic circle's diameter to (which is your wall thickness).
Code:MOVE/CLEARPLANE CIR2 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR THEO/<10,10,10>,<0,0,1>,2.5,0 ACTL/<10,10,10>,<0,0,1>,2.5,0 TARG/<10,10,10>,<0,0,1> START ANG=0,END ANG=360 ANGLE VEC=<1,0,0> DIRECTION=CCW SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=NO MOVE/CLEARPLANE CIR4 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR THEO/<10,10,10>,<0,0,1>,1.5 ACTL/<10,10,10>,<0,0,1>,1.5 TARG/<10,10,10>,<0,0,1> START ANG=0,END ANG=360 ANGLE VEC=<1,0,0> DIRECTION=CCW SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=NO ASSIGN/V1=CIR2.R-CIR4.R F1 =GENERIC/CIRCLE,DEPENDENT,CARTESIAN,OUT,$ NOM/XYZ,<10,10,10>,$ MEAS/XYZ,<10,10,10>,$ NOM/IJK,<0,0,1>,$ MEAS/IJK,<0,0,1>,$ DIAMETER/0.5,V1 DIM LOC1= LOCATION OF CIRCLE F1 UNITS=IN ,$ GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO AX MEAS NOMINAL +TOL -TOL DEV OUTTOL D 0.5000 0.5000 0.0020 0.0020 0.0000 0.0000 ----#---- END OF DIMENSION LOC1
- Likes 1
Comment
-
Yeah you could use a line also. Whatever you'd like, there are many ways to accomplish things in PC DMIS.
For the line method..You could use my assignment math and then put the variable in the length for the generic line & report the length for your dimension. Be mindful of workplanes and alignments when doing this (as usual.)
-
Comment
-
Its ok! We'll get this. You're almost there.
A generic feature is a feature that you can make in PC DMIS. It is "generic" meaning you ARE NOT CONSTRUCTING IT OUT OF OTHER FEATURES. You create the feature and then drive it's location with typing in nominals (or pumping variables into it). The numbers you type in (or the number that a variable equals that you use) will put the feature in that numeric position/vector relative to your current origin.
Go to Insert/Feature/Generic
Click Circle and click the Diameter box, then click OK. Now you'll have a generic circle in your Edit Window.
Now that the generic circle is in your edit window, it will have junk numbers in it. You have to make it make sense.
You'll have these 5 fields:
NOMXYZ
MEASXYZ
NOMIJK
MEASIJK
DIAMETER 0,0
By typing, "force" that generic circle to a NOMINAL and ACTUAL XYZ location that makes sense. Same with the IJK values. On the last line (where it says diameter) the FIRST number is the nominal size and the SECOND number is the measured actual.
All you're doing with all of this here is making PC DMIS do math (creating variable) and then you're using this generic feature as a way to HOLD the math and then report it cleanly (ask for diameter of generic circle that is forced to a certain diameter [driven by your variable]).
You can put a variable into a report comment and show it that way but I prefer doing it this way because it shows up with all of the other data in a nice & easy way to understand.Last edited by DAN_M; 03-12-2020, 02:49 PM.
-
-
With DAN_M example, assuming the number of hits is the same, I would :
ASSIGN/V1=DOT(CIR2.HIT[1..CIR2.NUMHITS].XYZ-CIR4.HIT[1..CIR4.NUMHITS].XYZ,UNIT(CIR2.HIT[1..CIR2.NUMHITS].XYZ-CIR2.XYZ))
Which give an array of something which is close to local thickness (projection of points along a radial vector).
Then :
ASSIGN/AVERAGE_THICKNESS=SUM(V1)/CIR2.NUMHITS
ASSIGN/MAX_THICKNESS=MAX(V1)
ASSIGN/MIN_THICKNESS=MIN(V1)
COMMENT/RPT
"Average thickness = "+AVERAGE_THICKNESS
"Max thickness = "+MAX_THICKNESS
"Min thickness = "+MIN_THICKNESS
Hoping Aerage is the same value than Excel one !!!!!
Comment
-
I never got the ASSIGN command to work. Here is the code that I am using with two different circle features. ASSIGN/V1=(CIR_4.5.DIAM-CIR_3.826.DIAM)/2 Everything after the "=" sign is red, so obviously PC-DMIS doesn't like something I'm doing. Any ideas?
Comment
-
@dcoss
Syntax error. PC DMIS is mad because you're using decimals in your names for your features.
Now that your programs are becoming more advanced, you should get in the highly advised habit of only using letters, numbers, and underscores to name things. NO spaces or special characters. This goes for features, alignments, constructions, everything in PC DMIS.
If you fix that, your code should work fine. Just duplicated it on my end and it worked.
-
Consider renaming to something like this and you'll be all set:
Code:MOVE/CLEARPLANE CIR_4_5 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR THEO/<0,5,8>,<0,-1,0>,1 ACTL/<0,5,8>,<0,-1,0>,1 TARG/<0,5,8>,<0,-1,0> START ANG=0,END ANG=360 ANGLE VEC=<1,0,0> DIRECTION=CCW SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=NO MOVE/CLEARPLANE CIR_3PNT826=FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR THEO/<0,5,8>,<0,-1,0>,0.5 ACTL/<0,5,8>,<0,-1,0>,0.5 TARG/<0,5,8>,<0,-1,0> START ANG=0,END ANG=360 ANGLE VEC=<1,0,0> DIRECTION=CCW SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=NO ASSIGN/V1=(CIR_4_5.DIAM-CIR_3PNT826.DIAM)/2
-
Man, every time i think i have something clever to contribute to these threads low and behold DAN_M and JEFMAN have already posted a +1 (or sometimes +3) version of what i was going to suggest!
-
Related Topics
Collapse
-
I am using PC-DMIS version 4.2 on a manual cmm. Due to my reporting needs to list data for features that cannot be checked on CMM, I am trying to use...
-
Channel: PC-DMIS for CMMs
12-15-2014, 09:28 AM -
-
by ashearerI'm new to PCDMIS and I was wondering if there is a way I can assign the number of the balloon on the print into the feature column on the excel sheet...
-
Channel: PC-DMIS for CMMs
12-23-2020, 02:44 PM -
-
by bfire85Anyone have any luck with VB and getting the SkipBlanks:=True to work when copying one set of cells of a spreadsheet to another spreadsheet?
...-
Channel: PC-DMIS Code Samples
10-12-2017, 03:11 PM -
-
by TIMSHARMANHi there I don't know if this is possible but a few years ago I created custom excel output scripts that where based in pcdmis I have now been asked if...
-
Channel: PC-DMIS for CMMs
01-28-2016, 04:09 AM -
-
by ThePuddsThe title of this is the question. How do you do this inside of PC-DMIS? When a report is normally printed, it is printed in PDF. Is there a way i can...
-
Channel: PC-DMIS for CMMs
02-04-2020, 09:56 AM -
Comment