-
When the PLC is put into operation, its working process is generally divided into three stages, namely, input sampling, user program execution and output refresh (i.e., input, execution, output).
The completion of these three phases is called a scan cycle.
Throughout the operation, the PLC's CPU repeats the above three phases at a certain scanning speed.
a) Enter the sampling phase.
During the input sampling phase, the PLC reads all input states and data sequentially in a scanning manner and stores them in the corresponding cells in the IO image. After the input sampling is complete, it moves to the user program execution and output refresh phase. In both phases, even if the input state and data change, the state and data of the corresponding cells in the iO image area do not change.
Therefore, if the input is a pulsed signal, the width of the pulse signal must be greater than one scan period to ensure that the input can be read in any case.
2) User program execution phase.
During the execution phase, the PLC always scans the user programs in sequence from top to bottom (ladder diagram). When scanning each ladder diagram, the control circuit composed of each contact on the left side of the ladder diagram is always scanned first, and the control circuit composed of contacts is logically operated in the order of first left and then right, first up and then down, and then according to the result of logical 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 Io image area; or to determine whether to execute the special function instructions specified in the ladder.
c) Output refresh phase.
When the scanning user program is finished, the PLC enters the output refresh phase. During this period, the CPU flushes all output latch circuits according to the corresponding state and data in the I-O image area, and then drives the corresponding peripherals through the output circuits. At this time, it is the real output of PLC.
Hope it helps.
-
The relationship between the operation of the PLC program and the action of the machine.
-
The working process is:
1. Input field signal: under the control of the system software, scan each input point sequentially and read the status of each input point;
2. Execute the program: scan the instructions in the user program sequentially, and perform logical operations according to the input status and instruction content;
3. Output control signal: According to the result of logic operation, the output status register (latch) sends the corresponding control signal in parallel to each output point to realize the required logic control function.
-
The relationship between the operation of the PLC program and the action of the machine.
-
Diagram of the internal structure of the PLC.
Program input device: It is responsible for providing the operator with the functions used to input, modify, and monitor the program.
**CPU: Responsible for PLC management, execution, computing, control and other functions.
Program Memory: It is responsible for storing the sequential program parameters and annotations designed by the user.
Data Memory: It is responsible for storing the state of the input and output devices and the conversion data of the sequence program.
System Memory: Stores the system programs required for PLC execution sequence control. Input Loop: Responsible for receiving signals from external input components.
Output Circuit: Responsible for receiving signals from external output components.
Processing Unit (CPU).
1.**The processing unit (CPU) is the control center of the PLC. It receives and stores the user program and data typed from the programmer according to the functions assigned by the PLC system program; Check the status of power supplies, memory, IOs, and alert timers, and diagnose syntax errors in user programs.
When the PLC is put into operation, first it receives the status and data of each input device in the field in the form of scanning, and stores them in the IO image area respectively, then reads the user program from the user program memory one by one, and sends the result of the logic or arithmetic operation according to the provisions of the instruction into the IO image area or the data register after the command is interpreted. After all user programs have been executed, the output status of each output in the IO image area or the data in the output register is transferred to the corresponding output device, and so on until the operation is stopped.
In order to further improve the feasibility of PLCs, in recent years, large PLCs have also adopted dual CPUs to form a redundant system, or a voting system with three CPUs. This way, even if one CPU fails, the entire system will still function normally.
2. Memory.
The memory that holds the system software is called system program memory.
The memory that holds the application software is called the user program memory.
3. Power supply The power supply of PLC plays a very important role in the whole system. Without a good, effective power supply system can not work properly, so PLC manufacturers also attach great importance to the design and manufacture of power supplies. Generally, the AC voltage fluctuates in the range of +10% (+15%), and the PLC can be connected directly to the AC grid without other measures.
-
The PLC operation method is as follows:
1.In-depth understanding and analysis of plant process conditions and control requirements.
a Controlled objects are controlled machinery, electrical equipment, production lines or production processes.
b Control requirements mainly refer to the basic mode of control, the actions that should be completed, the composition of the automatic work cycle, the necessary protection and interlocking, etc. For more complex control systems, the control task can also be divided into several independent parts, which can be simplified, which is conducive to programming and debugging.
2.Identify the IO device.
According to the functional requirements of the controlled object for the PLC control system, determine the user input and output equipment required by the system. Commonly used input devices include buttons, selector switches, travel switches, sensors, etc., and commonly used output devices include relays, contactors, indicator lights, solenoid valves, etc.
3.Choose the right type of PLC.
According to the determined user IO equipment, count the number of input signals and output signals required, and select the appropriate PLC type, including the selection of models, capacity, IO modules, power modules, etc.
4.Assign an IO point.
Assign the input and output points of the PLC, compile the input and output distribution table or draw the wiring diagram of the input and output terminals. Next, PLC program design can be carried out, and at the same time, the design and on-site construction of control cabinet or operating console can be carried out.
5.Design a ladder program for the application system.
According to the work function diagram or state flow chart, etc., the ladder diagram is designed, that is, programming. This step is the core work of the whole application system design, but also a more difficult step, to design a good ladder diagram, first of all, we must be very familiar with the control requirements, but also have a certain practical experience in electrical design.
6.Enter the program into the PLC
When using the Simple Programmer to input the program into the PLC
7.Conduct software testing.
Once the program has been entered into the PLC, test work should be carried out first. Because in the process of programming, there will inevitably be omissions. Therefore, before connecting the PLC to the field equipment, it is necessary to carry out software testing to eliminate errors in the program, and at the same time lay a good foundation for the overall debugging and shorten the overall debugging cycle.
8.Debugging of the application system as a whole.
After the completion of PLC software and hardware design and control cabinet and on-site construction, the online debugging of the whole system can be carried out, if the control system is composed of several parts, local debugging should be done first, and then the overall debugging; If the control program has a large number of steps, you can debug it in sections first, and then connect it to the general tune. Problems found in debugging should be eliminated one by one until debugging is successful.
PLC automation mainly relies on a variety of sensors, PLC only does to process the standard signals transmitted by various sensors and then output the standard signals to the sensor, what these standard signals do, it depends on what the sensor is used for.
The equipment that can exchange data with the PLC needs to have the following characteristics: it has its own data processing and data exchange mechanism and address; It supports 485, Ethernet and different brands of PLC-specific communication protocols. If the above two conditions are met, you can communicate with the PLC.
These two are mainstream PLCs, one made in Japan, one made in Germany, I have used both, both are very representative, it is recommended to learn both, you can learn Mitsubishi's first, because most of the programming methods of other brands of PLC are imitation of Mitsubishi, especially domestic brands, just like the Delta I use now, and Xinjie, which is almost exactly the same as Mitsubishi. Mitsubishi is what a traditional ladder looks like. And Siemens is also unique, although he also said that it is a ladder diagram, but his is a modular ladder diagram, which looks more intuitive than Mitsubishi's, and the step7 software is also very easy to use. >>>More
To put it simply, the principle is AC-DC-AC, input voltage to the inverter, and then input the nameplate parameters on the motor on the control panel, and the control can be realized. After communicating with the PLC, it realizes automatic control according to the instructions issued by the PLC.
1. Host. The host part includes the processor (CPU), system program memory, and user program and data memory. CPU is the core of PLC, which is used to run user programs, monitor the status of input and output interfaces, make logical judgments and carry out data processing, that is, read input variables, complete various operations specified by user instructions, send the results to the output end, and respond to requests from external devices (such as computers, printers, etc.) and make various internal judgments. >>>More