Photocoupler

What do the local variables in the Siemens plcS7-300 mean? How do you apply them?
A: L is equivalent to DB. The difference is that L is only a local variable. It is only used in subroutines, and the initial value is not fixed, that is, it is not necessarily 0. It is mostly used for intermediate temporary variables of subroutines. DB is a global variable that can be saved.
The usage of L is the same as DB. In the subroutine, the usage of L0.0 is the same as DB1.DB0.0 or M0.0. Because L cannot save variables, it generally acts only as a temporary variable, so each subroutine can call L0.0. The reason why L is used can reduce the occupation of variables and simplify the variable space.
1.M is used as a control relay to store intermediate operating states or other control information. It can also be accessed by MB, MW, MD. It is valid in the entire POU (ProgramOrganizationalUnit), so it is best to define it in the global symbol table before programming, so that there will be no conflicts when used in each program, and it is also prepared for error checking.
2.L is a local memory. As a temporary memory or a parameter for a subroutine, L can also be L*.* (if L2.5 is the BOOL quantity, which is the fifth bit of the second byte), LB, LW, LD To access, but only in the POU it is created, it can also be defined in the symbol table, but can only be defined in each POU's own symbol table.
3. Global Variables and Local Variables In symbolic addressing programming, global variables directly display symbolic names, while local variables are preceded by #, and there are many advantages to using local variable programming: programs can be functionalized (reduced reprogramming) ), large programs facilitate collaborative operations (dividing tasks into functional blocks), which is the superiority of SIEMENS PLC.

Anti-Jamming RC Arc Extinguisher

Anti-Jamming RC Arc Extinguisher

YZPST-302327PP(4)

Anti-Jamming RC Arc Extinguisher

YANGZHOU POSITIONING TECH CO., LTD. , https://www.cnchipmicro.com