Panasonic FP-E Programming Manual page 106

Fp series
Table of Contents

Advertisement

Relays, Memory Areas and Constants
Expression of decimal numbers in PLC
Decimal number is basically processed in 16-bit or 32-bit binary.
The most significant bit (MSB) expresses negative or positive sign of the data. When
the MSB is "0", data is regarded as having a zero or positive value and when the MSB
is "1", data is regarded as having a negative value.
In the case of positive numbers, the bits following the most significant bit express the
size of the data.
Example 1: Expressing the decimal number "1868"
0
A negative number is expressed as a two's complement (the bits of the 16−bit binary
data of the positive number are inverted and 1 is added to the result).
Example 2: Expressing the decimal number "-4"
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0
1 - 82
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
0 0 0 0
1 1 1
0
1
0 0
The data size is indicated by the other bits.
1,024 + 512 + 256 + 64 + 8 + 4 = 1,868
Most significant bit: 0 (positive value)
Invert each bit
Add 1
Most significant bit: 1 (negative value)
1 1
0 0
Binary expression of
decimal number "4"
Binary expression of
decimal number "−4"

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fp0Fp2Fp2shFp0rFrsFp10sh ... Show all

Table of Contents