Instrument controls LMG450
62
An instruction consists of one or more expressions. Each instruction (except
if
,
else
and
fi
)
has to be finished with ‘
;
’. An instruction can be longer than one line. The result must not be
assigned to a variable.
4.4.4.2.2 Condition
instruction
Condition instructions choose between two alternative program flows. This is done by the
expression following immediately to the word
if
.
if(expression) Instructions; fi
or
if(expression) Instructions; else Instructions; fi
The brackets for the expression are necessary. Then there could be one or more semicolon
separated instructions which are executed if the expression was true. The end of the
conditional execution is marked with
fi
, which is also necessary. The
else
part is optional.
Condition instructions can be nested, for example to realise a logical AND:
if(expression1)
if(expression2)
Instruction 1;
:
Instruction n;
fi
fi
Example
if (Utrms>227.5)
dout_off(1);
dout_off(2);
else
dout_on(4);
fi
If the voltage is bigger than 227.5V the digital outputs 1 and 2 are set to off. In the other case
the output 4 is set to on.
4.4.4.2.3 Expressions
An expression is a sequence of operators, operands and functions. Expressions are in general
recursive, which means they can be nested. But there is a practical limit in CPU power and
memory which can cause the message „out of memory“.
The order of evaluation of an expression depends on the priority of operands and on the
brackets (see below).
4.4.4.2.4 Constants
Constants are always floating point. The valid range is
±
3.4E-34 to
±
3.4E+34. The number can
be entered in usual or scientific notation. The decimal dot is only necessary for floating point
numbers.
Summary of Contents for LMG450
Page 1: ...4 Channel LMG450 Power Meter User manual Status 2009 02 17...
Page 2: ......
Page 4: ......
Page 5: ......
Page 6: ......
Page 8: ......
Page 10: ......
Page 18: ......
Page 22: ......
Page 36: ......
Page 76: ......
Page 102: ......
Page 112: ......
Page 118: ......
Page 124: ......
Page 230: ......
Page 240: ......
Page 292: ......