Hi guys!
I've been a CMM Programmer for two years.
There are many things I don't know.
What I want to learn most is the Assignment command.
How do these commands work and what do they mean?
What do the abbreviated names mean?
Can you help me?
Thank you very much in advance.
The Pc-Dmis help menu could be of some help as far as figuring out what abbreviated names to use and which ones to stay away from. For a example, like
NinjaBadger stated above, an Assignment of your machine name could look like this... ASSIGN/MACHINE_NAME, ASSIGN/MCHNAME, ASSIGN/I_LIKE_TURTLES, etc. What you want to stay away from is special characters of those used for computational purposes like +, -, *, /, and/or whatever makes your text color RED is not recommended/acceptable like for example ASSIGN/MACHINE-NAME, ASSIGN/I+AM+COOL.
It's best if you use something descriptive that you or anyone could understand. Some go with shorter names others use up a good amount of the allotted string length but suffer once when typing out such a long string at the expense of being super descriptive.
Functions List
Hit arrays:
Miscellaneous Functions
Operator for Expressions
Pointer Functions
References of Type Double
References of Type Point
String Functions
Variable Arrays
You can do a lot of assignments, calculations, coordinates retrieval, statements...
ASSIGN/V1=5 just gives "5" to V1 value
ASSIGN/V2=ARRAY(1,3,5,7) creates an array of 4 values in which ASSIGN/V3=V2[2] gives the second value of V2 (here 3)
If you want to create an array of odd numbers, you can do it in a loop like :
ASSIGN/V1=1
ASSIGN/V2=1
DO/
ASSIGN/V3[V2]=V1
ASSIGN/V1=V1+2
ASSIGN/V2=V2+1
UNTIL/V2>100
This array could be used to choose only one hit out of two in a feature :
ASSIGN/V1=1
ASSIGN/V2=CIRC1.NUMHITS/2
WHILE/V1<V2
ASSIGN/ODD_PT=CIRC1.HIT[V3[V1]].XYZ......................................here V3 is the previous array
ASSIGN/ODD_V=CIRC1.HIT[V3[V1]].IJK
F1 =GENERIC/POINT,DEPENDENT,CARTESIAN,$
NOM/XYZ,<ODD_PT.X,ODD_PT.Y,ODD_PT.Z>,$
MEAS/XYZ,<ODD_PT.X,ODD_PT.Y,ODD_PT.Z>,$
NOM/IJK,<ODD_V.I,ODD_V.J,ODD_V.K>,$
MEAS/IJK,<ODD_V.I,ODD_V.J,ODD_V.K>
ASSIGN/V1=V1+1
END WHILE
Just remember that you can do a lot of things with assignments, and it's very funny, like those examples that I give and which are totally unusefull !
Click on the little arrow at the right of "search", then click on "advanced search", type "Assign", add a name (dph51, vpt.se, ninjabadger...) and look at the results.
You can search also in the "code sample" area.
For me, one of my first code here was the t value calculation on scans :
ASSIGN/T_VAL=DOT(SCN1.HIT[1..SCN1.NUMHITS].XYZ-SCN1.HIT[1..SCN1.NUMHITS].TXYZ,SCN1.HIT[1..SCN1.NUMHITS].TIJK).
Definitely download the Core manual for the version you are using. I have the one for 2019 R1 and it has all of that in there. There are also some very good examples on the forum that I didn't even know was possible. Whenever I run across one that could be helpful to me, I screenshot it and print it then it goes into my personal binder for reference when I need it. I actually have entire sections of the Core manual printed and in the binder as well so I don't have to search for it on our network.