1. Bit components and word components
Devices such as X, Y, M, S, etc. that only handle ON / OFF information are called bit elements; and devices such as T, C, D, etc. are called word elements, and a word element consists of 16-bit binary numbers composition.
The bit element can be used in combination, the 4-bit element is a unit, the general representation is made up of the Kn-starting device number, and n is the number of cells. For example, K2 M0 means M0 ~ M7 to form two bit sets (K2 for 2 units), which is an 8-bit data, M0 is the least significant bit. If the 16-bit data is transferred to less than 16 bits of bit combination (n <4), only the lower data is transmitted, the extra high data is not transmitted, and the 32-bit data transfer is the same. In the case of a 16-bit operation, when the bit element involved in the operation is less than 16 bits, the upper part of the high bit is treated as 0, which means that only the positive number (the sign bit is 0) is processed, and when the 32-bit processing is performed same. The first component of the component to be combined can be arbitrarily selected, but to avoid confusion, it is recommended to use elements numbered 0, such as s10, x0, x20, and so on. <p = “”>
2. Data Format
Within the FX Series PLC, the data is stored in binary (BIN) complement, and all four operations use binary numbers. The most significant bit of the complement is the sign bit, the positive sign bit is 0, and the sign of the negative number is 1. FX series PLC can realize the binary code and BCD code mutual conversion.
For more accurate operations, floating point arithmetic can be used. In the FX series PLC provides binary floating-point operations and decimal floating-point operations, with binary floating-point and decimal floating-point conversion of the instructions. The binary floating-point numbers are represented by a pair of consecutive data registers. In the 32-bit registers of D11 and D10, the 16 bits of D10 plus the lower 7 bits of D11 are the mantissas of the floating-point numbers, and the D11 The first 8 bits are the order bit, the most significant bit is the sign bit of the mantissa (0 is positive, 1 is negative). The 10-bit floating-point numbers are also represented by a pair of data registers. The numbered data register is a mantissa segment, and the number is large. For example, when the data register (D1, D0) is used, the number is
10 decimal floating point number = [mantissa D0] 10 [index D1]
Among them: D0, D1 is the highest bit of positive and negative sign bit.

Leave a Reply

Your email address will not be published. Required fields are marked *