And PLC is an electronic device made by solving these laws. For example, BOOL quantity (bit) can be used to unlock the on-off and on-off changes of external states (0 and1); The number of bytes (8 bits) can also be used to represent the calculation of simple data and characters of positive integers less than 255 (decimal). This is the data representation law of computer, which is related to the design principle of computer. And PLC is also a kind of computer.
Take Siemens 200PLC as an example. For example, a byte of data in the V storage area is 8 bits, and this byte is represented by B, then the address of this byte is VB, such as VB 100, which is a byte of data. The data address is in the V storage area 100, which contains 8 bits, namely V 100.0 ~ V65438+. A word (integer) is represented by W, so for example, VW 100 is a word and consists of VB 100 and VB 1 0/,and a double word (double integer) is represented by D and consists of two words, such as VD/kloc-0.