0% found this document useful (0 votes)
25 views5 pages

Representation of Analog Values

The document discusses the representation of analog values in digital format for processing by CPUs. Analog values from input modules are converted to 16-bit digital values. The sign is always set in bit 15, with 0 representing positive and 1 representing negative. For modules with less than 16-bit resolution, unused bits are padded with zeros. Bipolar and unipolar input and output ranges are represented in tables showing the binary values for different decimal measurement values within the ranges.

Uploaded by

mahamd saied
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views5 pages

Representation of Analog Values

The document discusses the representation of analog values in digital format for processing by CPUs. Analog values from input modules are converted to 16-bit digital values. The sign is always set in bit 15, with 0 representing positive and 1 representing negative. For modules with less than 16-bit resolution, unused bits are padded with zeros. Bipolar and unipolar input and output ranges are represented in tables showing the binary values for different decimal measurement values within the ranges.

Uploaded by

mahamd saied
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Representation of analog values 3

3.1 Overview

Conversion of analog values


The CPU only processes analog values in digitalized format.
Analog input modules convert the analog signal into a digital value for further processing by
the CPU.
Analog output modules convert the digital output value from the CPU into an analog signal.

Analog value representation at 16-bit resolution


The digitized analog value is the same for all I/O values at the same rated range. The analog
values are represented as fixed point numbers in twos complement. This leads to the
following conditions:

Table 3- 1 Representation of analog values

Resolution Analog value


Bit number 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Significance of the bits S 214 213 212 211 210 29 28 27 26 25 24 23 22 21 20

Sign
The sign (S) of the analog value is always set in bit 15:
● "0" → +
● "1" → -

Resolution less than 16 bits


The analog value is left-aligned in the memory of analog modules with a resolution of less
than 16 bits. The unused least significant digits are padded with "0" values.
This reduces the number of measured values that can be represented. Modules occupy a
range of values of between+32767 and -32768 regardless of the resolution. The scaling
between two successive values depends on the resolution of the module.

Analog value processing


60 Function Manual, 06/2014, A5E03461439-AC
Representation of analog values
3.1 Overview

Example
The following example shows how the least significant digits are padded with "0" values:
● The module with 16-bit resolution is capable of incrementing the values in steps of one
unit (20 = 1).
● The module with 13-bit resolution is capable of incrementing the values in steps of 8 units
(23 = 8).

Table 3- 2 Example: Bit pattern of a 16-bit and 13-bit analog value

Resolution Analog value


Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
16-bit S 214 213 212 211 210 29 28 27 26 25 24 23 22 21 20
13-bit S 214 213 212 211 210 29 28 27 26 25 24 23 0 0 0

S = sign

Note
For information on the resolution supported by each analog module, please refer to the
technical data for the relevant module.

Analog value processing


Function Manual, 06/2014, A5E03461439-AC 61
Representation of analog values
3.2 Representation of input ranges

3.2 Representation of input ranges


The tables below set out the digitalized representation of the input ranges by bipolar and
unipolar input ranges. The resolution is 16 bits.
Please see the device manuals for each analog input module for assignment of the values to
the specific measured values in each measuring range.

Table 3- 3 Bipolar input ranges

Dec. Measured Data word Range


value value in %
215 214 213 212 211 210 29 28 27 26 25 24 23 22 21 20
32767 >117.589 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Overflow
32511 117.589 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 Over range
27649 100.004 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1
27648 100.000 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0
1 0.003617 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0.000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Rated range
-1 -0.003617 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
-27648 -100.000 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0
-27649 -100.004 1 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1 Under range
-32512 -117.593 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
-32768 <-117.593 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Underflow

Table 3- 4 Unipolar input ranges

Dec. Measured Data word Range


value value in %
215 214 213 212 211 210 29 28 27 26 25 24 23 22 21 20
32767 >117.589 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Overflow
32511 117.589 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 Over range
27649 100.004 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1
27648 100.000 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0
1 0.003617 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Rated range
0 0.000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-1 -0.003617 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Under range
-4864 -17.593 1 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0
-32768 <-17.593 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Underflow

Analog value processing


62 Function Manual, 06/2014, A5E03461439-AC
Representation of analog values
3.3 Representation of output ranges

3.3 Representation of output ranges


The tables below set out the digitalized representation of the output ranges by bipolar and
unipolar range. The resolution is 16 bits.
Please see the device manuals for each analog output module for assignment of the values
to the specific output values in each measuring range.

Table 3- 5 Bipolar output ranges

Dec. value Output Data word Range


value in %
215 214 213 212 211 210 29 28 27 26 25 24 23 22 21 20
32511 117.589 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 Maximum output
value*
32511 117.589 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 Over range
27649 100.004 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1
27648 100.000 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 Rated range
1 0.003617 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0.000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-1 -0.003617 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
-27648 -100.000 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0
-27649 100.004 1 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1 Under range
-32512 -117.593 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
-32512 -117.593 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 Minimum output
value**

* When values > 32511 are specified, the output value is limited to 117.589 % or 0 % (0.0 V / 0.0 mA), depending on the
module used.
** When values < -32512 are specified, the output value is limited to -117.593 % or 0 % (0.0 V / 0.0 mA), depending on the
module used.

Analog value processing


Function Manual, 06/2014, A5E03461439-AC 63
Representation of analog values
3.3 Representation of output ranges

Table 3- 6 Unipolar output ranges

Dec. value Output Data word Range


value in %
215 214 213 212 211 210 29 28 27 26 25 24 23 22 21 20
32511 117.589 0 1 1 1 1 1 1 1 x x x x x x x x Maximum output
value*
32511 117.589 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 Over range
27649 100.004 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1
27648 100.000 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 Rated range
1 0.003617 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0.000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0.000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Minimum output
value**

* When values > 32511 are specified, the output value is limited to 117.589 % or 0 % (0.0 V / 0.0 mA), depending on the
module used.
** When values < 0 are specified, the output value is limited to 0% (0.0 V / 0.0 mA).

Analog value processing


64 Function Manual, 06/2014, A5E03461439-AC

You might also like