S7-200 has I, O, M, D, T, C and other types, where I is the switch input and O is the switch output; M is an intermediate quantity, which can be used as a switching quantity or an analog quantity; PLC adapter can be understood as the connecting line between PLC and PC.
Data type in PLC: 1 bit data length: BOOL Boolean; 8-bit data length: byte type, CHAR character type SINT short integer; 16 bit data length: WORD INT integer; 32-bit data length: DWORD double word DINT long integer real floating point DT: date and time type? Time: Timed time type.
64-bit data length: LREAL long floating-point number type; Add a string type.
Extended data:
Working principle: When PLC is put into operation, its working process is generally divided into three stages, namely, input sampling, user program execution and output refresh. The completion of the above three stages is called a scanning cycle. In the whole operation process, the CPU of PLC repeatedly executes the above three stages at a certain scanning speed.
Input sampling: In the input sampling stage, PLC reads in all input states and data by scanning and stores them in the corresponding units in the I/O image area. After input sampling, enter the user program execution and output refresh stage. In these two stages, even if the input state and data change, the state and data of the corresponding unit in the I/O image area will not change.
Therefore, if the input is a pulse signal, the width of the pulse signal must be greater than one scanning period to ensure that the input can be read under any circumstances.
User program execution: In the user program execution stage, PLC always scans the user program (ladder diagram) from top to bottom. When scanning each ladder diagram, it always scans the control line on the left side of the ladder diagram first, and performs logical operation on the control line composed of contacts from left to right and from top to bottom.
Then, according to the result of logic operation, the state of the corresponding bit of the logic coil in the system RAM storage area is refreshed; Or refresh the state of the corresponding bit of the output coil in the I/O mapping area; Or determine whether to execute the special function instruction specified in the ladder diagram.
That is, in the process of user program execution, only the state and data of input points in the I/O image area will not change, while the state and data of other output points and soft devices in the I/O image area or system ram storage area may change, and the program execution results of the top ladder diagram will play a role in the lower ladder diagram using these coils or data.
On the contrary, in the ladder diagram arranged below, the status or data of the refreshed logic coil can only work on the programs arranged on it in the next scanning cycle.
Output refresh: After the scanning user program is completed, PLC will enter the output refresh stage. During this period, the CPU will refresh all the output latch circuits according to the corresponding state and data in the I/O mirror area, and then drive the corresponding peripherals through the output circuits. This is the real output of PLC.
The same ladder diagram, because of the different arrangement order, the execution results are also different. In addition, the operation result of scanning user program is different from that of relay control device running in parallel with hard logic. Of course, if the time occupied by the scanning cycle is negligible for the whole operation, there is no difference between them.
Baidu encyclopedia-Siemens PLC
Happy birthday to yourself. Send a circle of friends 1. Happy birthday to yourself. Classic short sente
Model essay on deeds of excellent nurses in epidemic situation 1
An epidemic broke out in Wuhan, spreading to the whole co