Selection Code
- Last UpdatedNov 28, 2025
- 3 minute read
The selection code (SC) is an at most four-digit integer (=XYZW) which, depending on its position in the selection row, is valid for a certain of the resulting geometry parameters. If the selection code consists of several digits it must be interpreted from right to left, sometimes in several steps. The parameters should also be evaluated in the order A, B, C, since one evaluated parameter may be used in the evaluation of a following one. Missing leading digits in a positive selection code should be interpreted as zeros, for example, X=0, Y=0, Z=1 and W=0 for selection code 10.
For parameters whose selection code is negative the corresponding parameter value will be set to 0. Otherwise, the parameters will be initialized as follows:
-
A is set = acut,
-
B is set = bcut,
-
C is set = ccut.
However, these values may be changed by the selection code as described below.
The significance of the different digits is:
|
W |
If the current parameter value is still zero after the initial setting and W>0, then fetch the value from the parameter row of the current endcut code. Fetch it from the column within this row indicated by W. |
||
|
Z |
If Z>0 then fetch the value from acut (bcut, ccut), if Z = 1 (2, 3). |
||
|
Y |
Has different significance for different parameters (when >0): |
||
|
=1 |
V1: |
Set V1 = a1, if a1>0, otherwise V1 = 90. |
|
|
=2 |
V2: |
Set V2 to the value indicated by W, if this value is less than 90, otherwise set V2 = a2 (if a2>0, otherwise V2 = 90). |
|
|
=3 |
There are conditions in two steps for the different angles. |
||
|
V2,V3: |
If abs (ccut - bprof) < 0.1 then set V2 =V3 = 0. |
||
|
C,V2,V3: |
If V2 + V3 = 180 and a2 + a3 >=180 then set parameter C = bprof and V2 = V3 = 0. If the previous condition is not met, but a2 + a3 is not = 0, then set V2 = a2 (if V2 = 90) and V3 = a3 (if V3 = 90). |
||
|
=4 |
V2: |
Set V2 = 90 if C=0. |
|
|
=5 |
There are different conditions and choices for different parameters. |
||
|
B: |
If A < 0 or B < 0 then let A=0 and B=0 |
||
|
V1: |
Set V1 = a1, if C < 0 or V1 < 0 then let C=0 and V1=0 |
||
|
V2: |
Set V2 = a2, if V2 < 0 then let V2=0 |
||
|
V3: |
Set V3 = a3, if V2 < 0 or V3 < 0 then let V2=0 and V3=0 |
||
|
=6 |
There are different conditions and choices for different parameters. |
||
|
V1: |
Set V1 = a1, if V1 < 0 then let V1=0 |
||
|
V3: |
If V3 = 90 then let V3 = α3 |
||
|
=7 |
V1: |
SET V1 = a1 |
|
|
V3: |
If V3 = 0 then let V3 = V2 |
||
|
=9 |
B,C: |
Parameter optional. Accept an undefined value (=0). |
|
|
X |
=1 |
There are different conditions and choices for the different parameters. |
|
|
B |
If B=0 assign the value indicated by W. |
||
|
C |
If C=0 then set C = (aprof - bcut)/2. |
||
|
R1 |
Set R1 = 0, if B=0. |
||
|
V1 |
Set V1 = 0, if B=0. |
||
|
=2 |
B |
If bcut is not = 0 then set B = bcut, otherwise set B = aprof and subtract parameter value according to W. |
|
|
=5 |
Parameter may be omitted. |
||
|
P |
=9 |
R2 |
R2 evaluated according to a customer specific rule. |
Finally, if V2 + V3 not = 0, set V4 = V2, otherwise set V4 = 90*sign (ccut)
The rules may seem very complicated and they actually are. However, the most complicated cases are very rare and somewhat theoretical. As stated above, the selection rows with the selection codes must always be defined by AVEVA when a new endcut type is implemented and should normally not be changed by a customer. To change the parameters in the parameter rows is rather straightforward once you know what geometrical property a given parameter has (see example below).