1. Bit, byte, word, and double word
A single bit in a binary number has only two distinct values: 0 and 1. These values can be used to indicate two different states of a switching quantity (or digital quantity), such as the opening and closing of contacts, or the energizing and de-energizing of a coil. If the bit is 1, it indicates that the coil of the corresponding programming element in the ladder diagram is "energized," with its normally open contacts closed and normally closed contacts open. This is referred to as state 1, or ON, for the programming element. The reverse is also true.
Eight bits make up one byte, where the 0th bit is the least significant bit (LSB) and the 7th bit is the most significant bit (MSB). Two bytes make up one word, and two words make up one double word.
2. Data storage and retrieval methods
(1) Bit access method: The address of a bit storage unit consists of a byte address and a bit address, such as I3.2. The region identifier "I" in between indicates input, with the byte address being 3 and the bit address being 2.
This access method is called the "byte-bit" addressing method.
(2) Byte access method: The input byte IB3 (Byte) consists of 8 bits from I3.0 to I3.7.
(3) Word access method: Two adjacent bytes form a word. The addresses of the two bytes in a word must be contiguous, and the lower-order byte in a word should be the high 8 bits, and the higher-order byte in a word should be the low 8 bits. IW14 indicates a word composed of IB14 and IB15. In IW14, I is the region identifier, W indicates word, and 14 is the address of the starting byte. In IW14, IB14 should be the high 8 bits, and IB15 should be the low 8 bits.
(4) Double word access method: Four adjacent bytes represent a double word, and the addresses of the four bytes must be contiguous. The least significant byte in a double word should be the most significant 8 bits. ID12 indicates a double word composed of IB12~IB15, where I is the region identifier, D indicates accessing the double word, and 12 is the address of the starting byte. In ID12, IB12 should be the most significant 8 bits, and IB15 should be the least significant 8 bits.
For example: There are 40 students in each of the Electrical Engineering 0231 and 0232 classes. Each class is divided into 5 groups, with 8 students in each group.
Then, the "position" method: Student No. 1, Group 1, Electrical Engineering Class 0231
"Byte" method: Group 1, Electrical Engineering Class 0231
"Character" method: Electrical Engineering Class 0231
"Double-character" method: Electrical 023
Disclaimer: This article is a reprint. If it involves copyright issues, please contact us promptly for deletion (QQ: 2737591964 ) . We apologize for any inconvenience.