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

202
2 Installation and Specifications
2.4 F
o
rm
ulas
H1 = Case(C1<=1mm,SendMsg”Case 1”,C1<=2mm,0 ”Case
2”,C1>2mm,SendMsg”Case 3”)
Incomplete case sets and default cases
Case functions use logical test criteria and conditions to sort a
potentially broad set of inputs into a relatively small collection of well-
defined output categories. This logical sorting works well unless the
inputs include a case that is not defined as an output category.
Each Case function must include a complete set of cases. A Case
function with an incomplete case set will not work and will generate
an error message.
Case function tests are performed from left to right and
only one result will be generated. This precludes the
possibility of more than one result being generated for a
single Case function. For example, while a value of 0.75
for C1 in the example above would satisfy the first two
tests, only the first test will generate a result.
Example:
A = Case(C1<1,0,C1>1,1)
A = 0 when C1<1
A = 1 when C1>1
A is undefined when C1=1
The case C1=1 must be included to provide a complete set of
cases.