beautypg.com

4 f o rm ulas – HEIDENHAIN ND 2100G User Manual

Page 203

background image

ND 2100G GAGE-CHEK

203

2.4 F

o

rm

ulas

Default cases provide an output category for any inputs that do not fit
into the defined set of cases.

While it is relatively easy to define complete sets of cases for simple
applications, it is good practice to include default cases in all Case
function formulas, thereby avoiding the possibility of undefined
results.

Default Case function syntax

A = Case(Test 1, result 1, test 2, result 2, test n, result n...empty
test, default result)

All inputs that do not fit into defined case sets produce the default
result. Revising the example shown on page 202 to include a
default case results in the following:

A = Case(C1 < 1,0,C1 > 1,1, ,2)

A = 0 when C1 < 1

A = 1 when C1 > 1

A = 2 when C1 = 1