![background image](http://html1.mh-extra.com/html/pasco/xplorer-glx/xplorer-glx_user-manual_3880195058.webp)
52 C a l c u l a t o r
outputfreq(Channel, frequency)
Use the outputfreq function to set the fre-
quency of the audio output signal.
18
The first argument, Channel, can equal 1 (for
left) or 2 (for right) and identifies which channel is to be controlled. The second
argument, frequency, sets the frequency, in Hz, of the output signal. The fre-
quency can be set between 250 and 5000 Hz for the built-in speaker, or between
60 and 5000 Hz for headphones or external speakers.
outputvolume(volume)
Use this function to set the loudness of the output sig-
nals.
18
The argument of the function can be set between 0 (for no output) and 10
(for the loudest possible output). The function controls both audio channels
together.
Logic Operators and Functions
A logic function has two possible values: 0 and 1. A logic operator (
<
or
>
) is
used to build an expression that can have a value of 0 or 1.
Less Than and Greater Than
If an expression such as a
<
b is true, then it
equals 1. If the expression is false, then it equals 0.
inrange(min, max, x)
This function has three arguments: the first two, min
and max, define the upper and lower limit of a range, and the third, x, is an input
value to be compared with that range. If min
≤
x
≤
max, then the function equals
1. If x
<
min, or x
>
max, then the function equals 0.
and(a, b)
This function equals 0 if either of the arguments equals 0; otherwise
the function equals 1.
or(a, b)
This function equals 0 if both of the arguments equal 0; otherwise the
function equals 1.
not(x)
This function equals 1 if the argument equals 0; otherwise the function
equals 1.
Audio Temperature Indicator
In this example, the GLX is programed to emit a sound when the temperature
exceeds 30 °C. The frequency of the sound increases as the temperature
increases.
Connect a temperature sensor to the GLX. In the Calculator, enter these two
expressions:
outputswitch(1,[Temperature (
°
C)]>30)
outputfreq(1,[Temperature (
°
C)]*10)
Select the outputswitch and outputfreq functions from the
Functions menu.
Select the [Temperature (°C)] measurement from the
[Data] menu.
Press
to start data collection. Place the temperature sensor in warm water.
Then allow it to cool again. When the temperature reaches 30 °C, the GLX emits
a tone at 300 Hz. As the temperature rises, the frequency of the tone rises.
Audio Temperature Indicator Example
F1
F2
Summary of Contents for Xplorer GLX
Page 4: ......
Page 6: ......
Page 7: ...Part 1 Users Guide...
Page 8: ......
Page 18: ...12 O v e r v i e w o f t h e G L X...
Page 94: ...88 S e t t i n g s S c r e e n...
Page 98: ...92 P r i n t i n g...
Page 104: ...98 O p e r a t i n g T e m p e r a t u r e...
Page 112: ......
Page 116: ...110 C a l o r i m e t r y...
Page 132: ...126 V o l t a g e v e r s u s R e s i s t a n c e...
Page 136: ...130 I n d u c e d E l e c t r o m o t i v e F o r c e...
Page 146: ...140 B e a t F r e q u e n c y...
Page 150: ......
Page 152: ......