S7-300 PLC Siemens
This article is a small program of learning S7-300, used for the simple and intuitive understanding of PLC Development.
1. circuit diagram of three Asynchronous Motors
2. PLC control wiring diagram
We can see that the control button is connected to the i0.0 and i0.1 ports of the PLC signal module SM, and the output signal is output from q4.1.
3. plc sm module selection
1) Select sm321 di32 * 24 V for the input module
2) Select sm322 do32 * ac120/230/1 A as the output module.
4. The hardware configuration diagram is as follows:
5. Edit symbol Variables
6. Write a ladder Program
7. Compile the program
Program explanation:
Sb1_start uses an open circuit symbol to indicate that when the entire line is connected, the entire line is disconnected by default.
Sb2_stop uses closed-circuit symbols to indicate that when the entire line is disconnected, it is connected by default.
Fm_out uses the output symbol. At sb1_start, fm_out indicates that when the fm_out output is high (that is, sb1_start does not need to be closed and the line is also connected), the output is self-locked, press the start button once to keep the motor running. When sb2_stop is pressed, the line is disconnected, fm_out outputs low level, and the motor stops running.
The STL program corresponding to the above-mentioned Mr diagram is as follows:
A( O "sb1_start" O "fm_out" ) AN "sb2_stop" = "fm_out"
8. program testing
Start plcsim (Step 7 simulation software), set the input and output in the software, and download the program to the simulation software to start the test. The test result is as follows:
1) Initial Startup screen of the program
2) simulate SB1 Press
3) cancel the SB1 press Signal
4) simulate sb2 Press
The test above shows that the program runs normally.
The sample code of this program can be downloaded from here.
Siemens plc study note 4-(control the start and stop of three asynchronous motors)