5
Arithmetic function examples
Example 1:
To get an average of channels 1, 2, 3 and 4 each input is added together and divided by 4:
Program:
E A1
=
1
,
E b1
=
0
,
E C1
=
4
,
E A2
=
1
,
E b2
=
0
,
E C2
=
4
,
E A3
=
1
,
E b3
=
0
,
E C3
=
4
,
E A4
=
1
,
E b4
=
0
,
E C4
=
4
,
OP 1
=
add
,
OP 2
=
add
,
OP 3
=
add
1 * (Ch1 + 0)
4
Add
1 * (Ch2 + 0)
4
Add
1 * (Ch3 + 0)
4
Add
1 * (Ch4 + 0)
4
Example 2:
Three inputs are present. The display is to indicate the highest of the 3 inputs. Channel 1
input is to be multiplied 2/3.
Program:
E A1
=
2
,
E b1
=
0
,
E C1
=
3
,
E A2
=
1
,
E b2
=
0
,
E C2
=
1
,
E A3
=
1
,
E b3
=
0
,
E C3
=
1
,
OP 1
=
HiGH
,
OP 2
=
HiGH
2 * (Ch1 + 0)
3
HIGH
1 * (Ch2 + 0)
1
HIGH
1 * (Ch3 + 0)
1
Example 3:
To multiply the figure displayed on channel 1 by the sine of the angle of the figure displayed
on channel 2. The second channel would normally be scaled from 0 to 360 when either the sine or cosine
is being used, however numbers outside this range are acceptable.
Program:
E A1
=
1
,
E b1
=
0
,
E C1
=
1
,
E A2
=
1
,
E b2
=
0
,
E C2
=
1
,
OP 1
=
SINE
1 * (Ch1 + 0)
1
SINE
1 * (Ch2 + 0)
1
40 of
LDRSMANADD-2.3-0