Today, the master gave me a lecture on the overall idea of automated control, and made a record and a memo.
1. Requirement Analysis
This project controls the circular water supply of buildings. The whole project needs to obtain and display the pressure, pressure difference, temperature, and so on, and control the motor at the same time.
2. Design
Use the step7 tool of Siemens to program the ladder chart and complete automatic control.
Use wincc5.5 of Siemens to design and implement an automatic man-machine interface.
3. Step 7: programming steps
1) hardware configuration
Because the model of the Siemens device has been selected, the hardware configuration is performed based on the model of the physical device. The configuration result is shown as follows:
Note:
1. This diagram must be exactly the same as the physical connection diagram on site.
2. this project uses the MPI/dp mode to communicate with the Cabinet. After setting MPI/DP as shown in the following figure, you can add a cabinet by right-clicking "add Main Station System.
2) Programming
Ob block: Organizational block, with interrupted organizational blocks, starting organizational blocks, and various wrong organizational blocks. ob1 is the main program, which is used to store the main program compiled by the user and then performs cyclic scanning.
FB block: function block. FB has its own DB
FC block: Function
Db block: data block, which can be divided into background data blocks, shared data blocks, and user-defined data blocks. The background data block is equivalent to the FB storage zone, all logical blocks of data defined in shared data blocks can be accessed. User-defined data blocks are created using the UDT template. You must first define the data type UDT.
This detailed introduction, see the following article: http://blog.csdn.net/fengshuiyue/article/details/39372439
3) connection with PLC
A. in "Control Panel"-"set pg/PC interface", set the interface mode for communication between the host computer and the lower computer. In this project, set it to "Intel (r) 82583 v gigabit network connection. tcpip. in auto.1 (active) mode, you can use TCP/IP or ISO to communicate with the lower computer. For example:
B. Step 7 Communication Module Settings
Right-click the CP343-1 module-object properties, General-interface-properties to set Ethernet parameters, such:
If the "set MAC address/use ISO protocol" option is selected, the PLC can communicate through the MAC address using ISO protocol.
C. Download the compiled program to the PLC, for example:
4. WinCC and program connection in PLC
Add the "SIMATIC S7 protocol situe" driver to the internal variable. In this case, you can create a new connection under industrial Ethernet or TCP/IP to create a variable.
A uses the Industrial Ethernet method to establish the connection between WinCC and PLC
Create a variable under testieth and select an address for the variable (this address is the automatically generated address in the program compiled in Step 7)
B. use TCP/IP to connect to the PLC
The new setting variable in TCP/IP is the same as that in Industrial Ethernet.
The above is an overview of the use of siemens plc for development.
Siemens plc Study Notes II-(work records)