Siemens S7-200PLC series (3)

Siemens S7-200PLC series (addressing)

type of data

  In PLC, the data types mainly include: string, boolean (0 or 1), integer and real (floating point). And it is divided into signed and unsigned. In signed, the value range includes positive and negative. For example, in unsigned byte B (8-bit), the decimal representation is 0~256, but in signed, it is -128~127
  Constants are sometimes used in programming. The data length of constants is divided into bytes, words and double words. If there is no format description, the system default constants are all decimal

Addressing

Compilation format: AT.xy
  A: component name. That is, the area address
  T: data type of the data in the data memory . If it is bit addressing, there is no item. If it is byte, word or double word addressing, the value of T is B, W or D respectively.
  X: byte address
  Y: bit address in byte, only only this bit addressing
  example I0.2, MB2, MW2, MD4
bit addressing
  in accordance with the format bit addressing: Ax.y, attention must be specified using the element name (a), byte address (x) And bit number (y)
  can be bit-addressed programming components: input relay (I), output relay (Q), general auxiliary relay (M), special relay (SM), local variable memory (L), variable memory (V), Sequence Relay (S)
Note:
1. When directly addressing words, bytes and double words, pay attention to the high address and low byte
Write picture description here
2. Real number storage mode: 32-bit single-precision (the effective bit is 7 bits), Occupies 4 bytes of storage space and is accessed according to the double word length. When used in programming, up to 6 digits after the decimal point can be specified
Write picture description here

Guess you like

Origin blog.csdn.net/yue008/article/details/77547553