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.
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 !
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 !