beautypg.com

5 example calculation, 2 data formats, Example calculation – Pilz PSSu E S 2AO U User Manual

Page 16: Data formats

background image

Function description

Operating Manual PSSu E S 2AO U(­T)
21423­EN­03

16

a

2

 = Amplification factor * 256

D

User scaling is deactivated in the default setting. The default value for offset is 0. The de­
fault value for gain is 256

D

 (100

H

). That corresponds to amplification factor 1.

4.2.1.5

Example calculation

Task:

If the PIO shows a decimal value of 10 000, there should be 10 V at the output. User scal­
ing should be used in this case (Gain a

2

). Manufacturer scaling should not be changed. All

numbers are decimals.

Solution:

User scaling 
y = (a

2

 / 256 * x) + b

2

and manufacturer scaling 
y = (a

1

 / 256 * x) + b

1

act consecutively, giving:
y = (a

1

 / 256 * ((a

2

 / 256 * x) + b

2

)) + b

1

 or:

y = (a

1

 * a

2

 * x / 65536) + (a

1

 * b

2

 / 256) + b

1

With default values for a

1

 = 32, b

1

 = 0 and the default value b

2

 = 0:

y = a

2

 * x / 2048

a

2

 = y * 2048 / x

Due to the hardware calibration the converter's output range is divided so that the 10 V end
point is assigned the value x = 4095. With the default values y = 4095 and x= 10 000 the
result is:
Gain a

2

 = 838

4.2.2

Data formats

The way in which the analogue value is displayed depends on the voltage range, on scaling
and on the data format. The following examples show the relationship between the values
with default scaling.

You can configure the following data formats:

}

Two's complement (default)
The digital values are transferred with 15 bits plus a sign bit (MSB). The MSB is "1" with
negative values and "0" with positive values.

}

Sign and magnitude representation
The digital values are transferred with 15 bits plus a sign bit (MSB). The MSB is "1" with
negative values and "0" with positive values. With negative values there is a distinction
between sign and magnitude representation and two's complement representation.

}

Formation of magnitude option
Negative digital values are converted into positive values of equal magnitude.

As the module's resolution is 12 bits plus sign bit, the three least significant bits have no
significance for the analogue value.

Analogue value and typical digital value with a voltage range of 0 ... +10 V, two's
complement or sign and magnitude representation:

This manual is related to the following products: