The Coding Of Numeric Numbers For Fbs-Plc; Range Of Numeric Value; Representation Of Numeric Value - FATEK FBS Series Manual

Plc
Hide thumbs Also See for FBS Series:
Table of Contents

Advertisement

5.3.2 The Coding of Numeric Numbers for FBs-PLC

FBs-PLC use the binary numbering system for its internal operations that is the data of external BCD inputs must be
converted to binary number before the PLC can process. As we know the binary code is very difficult to read and input to
the PLC for human, therefore FP-07 and WinProladder use the decimal unit or hexadecimal unit to input or to display the
data. But in reality, all the operations taking place in the PLC are performed with binary code.
Remark: If you input or display the data without going through the FP-07 or WinProladder (For instance, input data
into or take out data from PLC through the I/O terminals using thumb wheel switch or seven segment
display), then you have to use the Ladder program to perform the Decimal to Binary conversion. This
enables you to input and display data without using the FP-07 and WinProladder. Please refer to
FUN20(BIN→BCD) and FUN21(BCD→BIN).

5.3.3 Range of Numeric Value

As we have mentioned before that FBs-PLC uses binary numbers for its internal operations. 16-bit and 32-bit are
three different numeric data of FBs-PLC. The ranges of the three numeric values are shown below.

5.3.4 Representation of Numeric Value

The representation and specification of 16-bit and 32-bit numeric values are provided below to enable the user to further
understand the numeric value operation for more complicated applications.
The most significant bits MSB of 16-bits and 32-bits (B15 for 16-bit and B31 for 32-bit) are used to identify positive and
negative numbers (0: positive and 1: negative). The remaining bits (B14~B0 or B30~B0) represent the magnitude of the
number. The following example uses 16-bit for further explanations. Please note that everything also applies to 32-bit
numbers and the only difference is the length.
0: Positive Number
12345
(Decimal)
In the above example, regardless of its size (16-bit or 32-bit), and starting with the least significant bit LSB (B0). B0 is 1,
B1 is 2, B2 is 4, B3 is 8, and so on. The number represented by the neighboring left bit will double its value (1, 2, 4, 8, 16,
and so on) and the value is the sum of the numbers represented by the bits that are equal to 1.
16-bit
32-bit
Floating point number
(Beginners can skip this section)
0 0 1 1 0 0 0 0 0 0 1 1 1 0 0 1
B15
8192+4096+32+16+8+1=12345
−32768~32767
−2147483648~2147483647
-38
38
±(1.8*10
~3.4*10
B0
5 - 11
)
3039H
(Hexadecimal)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents