![background image](http://html1.mh-extra.com/html/pasco/xplorer-glx/xplorer-glx_user-manual_3880195057.webp)
X p l o r e r G L X U s e r s ’ G u i d e
51
Special Functions
These special functions do not directly control output, but can be useful in com-
bination with the output-control functions.
limit(min, max, x)
The limit function is used keep a varying value within a
specified range. The function has three arguments: min, max, and x.
•
If x
<
min, then limit(min, max, x)
=
min.
•
If x
>
max, then limit(min, max, x)
=
max.
•
If min
≤
x
≤
max, then limit(min, max, x)
=
x.
mod(numerator, denominator)
The mod function is equal to the remainder
when numerator is divided by denominator. The arguments numerator and
denominator can be any number (not just whole numbers). If denominator = 0,
then mod(numerator, denominator) = 0.
abs(x)
The abs function is equal to the absolute value of its argument.
random()
The random function equals a randomly generated number between 0
and 1. Each time the function is evaluated, a new random value is generated.
Note that the random function appears with a pair of parentheses after it, but it
cannot have anything between the parentheses.
Output-control Functions
The output-control functions set the output of the GLX’s audio channels and con-
nected Digital Adapters. The output-control functions work only when data col-
lection is in process. Each function must be used as part of a sensor-based
calculation (the calculation must include data from a sensor or time). Any prop-
erty of the audio output that is not specified in the Calculator will be determined
by the setting in the Output screen (see page 39). In the Functions menu, the
names of these functions are abbreviated to outstate, outswitch, outfreq, and out-
volume.
outputstate(GLXPort, AdapterChannel, state)
Use the outputstate func-
tion to switch on or off a Digital Relay connected through a Digital Adapter.
17
The first argument of the function, GLXPort, can equal 1, 2, 3, or 4; it identifies
the port that the Digital Adapter is connected to. The second argument,
AdapterChannel, can equal 1 or 2 and identifies which channel of the adapter the
Digital Relay is connected to. The third argument, state, can equal any number
and determines whether the relay is OFF or ON.
•
If state
=
0, then the relay is OFF.
•
If state
≠
0, then the relay is ON.
outputswitch(Channel, state)
Use the outputswitch function to turn on or off
the left or right audio output channel.
18
The first argument, Channel, can equal 1
(for left) or 2 (for right) and identifies which audio channel is to be controlled.
The second argument, state, can equal any number and determines whether the
audio output is OFF or ON.
•
If state
=
0, then the audio output is OFF.
•
If state
≠
0, then the digital output is ON.
17
The Digital Relay is PASCO part
CI-6462. The Digital Adapter is PASCO
part PS-2159.
See “Relay Control” on page 67 for
instructions on connecting and configur-
ing the adapter.
18
Whether the output is played through
the output port (to a pair of headphones
or amplified speakers) or through the
GLX’s built-in speaker depends on the
Output setting in the Output screen (see
page 40).
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: ......