Product specifications

Instrumentation Laboratory Exercise 36
To do this, create the following formula boxes. The V
L
array is wired
into the left side, and the output at the right side is the array
converted to volts. The first formula box extracts the MSB and
removes the twos complement (by adding 128 to the value of the
array). The second formula box extracts the LSB. Notice we are using
a predefined function in the box called intpar. It returns the integer
part of a whole number. This is used to eliminate the fractional
component. The third formula box on the right reconstructs the
number in the proper form MSB × 256 + LSB, because each digit of
the MSB is equal to 256 of the LSB.
Also we divide by the factor of 217/V
range
where V
range
is the
maximum input voltage minus the minimum input voltage and 217 is
the number of voltage levels we can differentiate (for example, 0 to
216 + 215 + 214 + … + 2). As we have used a unipolar input with a
range of 10 V, therefore the maximum is 10 V and the minimum is 0
V, so V
range
is simply 10 V (if we had used bipolar V
range
would be
–10 V to +10 V, or 20 V), thus our conversion factor is 13107.2. This
is what the byte swapping routine and conversion should look like:
Finally, display the resulting data as a Strip Chart (under the Display
Menu) as shown below. Right click Strip Chart and select Properties
from the context menu. Go to the X-Y Scales properties on the left
side bar and set X minimum to 0 and maximum to 2000. Set Y scale
appropriately to see the trace. Ensure Autoscaling is OFF for both
scales.