EasyManua.ls Logo

mensor PCS 400 - 12 Twos Complement Binary Output; Table 8.3 - Characters for Display Resolution

mensor PCS 400
118 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
12 TWO’S COMPLEMENT BINARY OUTPUT
Background
Two’s complement notation is a way of expressing
negative values using binary numbers. The follow-
ing example demonstrates two’s complement bi-
nary representation.
A sixteen bit binary word representing the integer
27568 is 0110 1011 1011 0000.
Forming the binary equivalent of –27568 is accom-
plished in two steps:
1) perform the one’s complement to the binary
word of the positive value by reversing each
bit.
1001 0100 0100 1111
2) add 1 to the one’s complement.
1001 0100 0101 0000
We can verify that 1001 0100 0101 0000 is the
binary equivalent to –27568 by adding the positive
value of the integer 27568 (binary word 0110 1011
1011 0000). They will add to zero:
27568 = 0110 1011 1011 0000
+ –27568 = 1001 0100 0101 0000
0 = 0000 0000 0000 0000
Note that binary 1+1 is 0 with a carry of 1. The
left-most carry causes an overflow to the seven-
teenth bit. But since we defined a sixteen bit word
for the exercise, the overflow bit is discarded. Also
note that some way must be provided to advise the
user whether the binary string value is positive
(straight binary) or negative (two’s complement).
PCS 400 Implementation
The two’s complement option is especially useful
where binary output is desired with a bi-directional
pressure instrument, an instrument that measures
pressure in both positive and negative directions.
This option is provided via a 36-pin accessory
connector on the rear panel (see figure 8.12). Figure
8.11 details the output connector pin assignments.
The READY signal (pin 32) is held low while the
PCS 400 is updating the output, and goes high when
the numbers are valid.
The PCS 400 two’s complement binary output uses
sixteen bits. The pressure value is given in the first
15 bits and reserves the sixteenth (most significant)
bit as a sign bit. This sign bit is essentially a polarity
indicator to denote whether the binary output is
positive or negative. If the left-most bit is 0, then
the remaining bits are a common binary string. If
the left-most bit is a 1, then the remaining bits are
the two’s complement representation of a negative
value. Zero psi is represented by all 16 bits set to
0.
Note that with 15 bits representing the pressure
value, the highest and lowest integers available are
+32767 and –32767, respectively.
Because there is no decimal point associated with
binary output, the scaling of the output is deter-
mined by the number of characters set for the
Display Resolution according to the table below.
Note that the Display Resolution default value is 7;
therefore, the default scaling factor is 10000. This
may be changed under the LIMITS menu.
Table 8.3 Characters for Display Resolution
# Characters
for Display
Resolution
Scaling
Multiplier
Output
PSI
(Max)
Output
Binary/2’s
Comp (Max)
7 (default) 10000 3.2767 32767
6 1000 32.767 32767
5 100 327.67 32767
Thus, for a resolution of 6 characters, 27.568 psi
is represented as integer 27568 (binary 0110 1011
1011 0000). If the pressure were negative, the two’s
complement would be output. For example, –0.016
psi will have an output of decimal 65520 (binary
1111 1111 1111 0000), assuming the same 6
character resolution.
CAUTION: NO OVERRANGE!
Binary output does not include any
overrange nor underrange signal. If
the pressure exceeds the maximum for
the current resolution, the maximum
count (integer 32767, binary
0111 1111 1111 1111) will be output.
CAUTION: The 16 bit integer represents
the pressure only in units of PSI. Other
pressure measurement units are not
recognized by this option.
OPTIONS PCS 400
8-16 www.mensor.com

Table of Contents