Today, the master gave me a general idea of active control, and made a record and a memo.
1. Requirement Analysis
This project controls the circular water supply of buildings. The whole project requires obtaining and displaying the pressure, pressure difference, temperature, and so on, and controlling the motor at the same time.
2. Design
Use the step7 tool of Siemens to program the ladder chart.
Use wincc5.5 of Siemens to design and implement an active 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 following figure shows the configuration result:
Note:
1. This diagram must be completely consistent with the physical connection diagram on site.
2. This project uses the MPI/dp mode to communicate with the Cabinet. In this case, you need to set MPI/DP as an example before you can right-click to add it? The main station system "add cabinets ?.
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 the logical blocks of data defined in the shared data block can be queried. the user-defined data block is created using the UDT template. You must first define the data type UDT.
This specific introduction, see the following articles: 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. auto.1 (active) mode. In this mode, the upper and lower computers can communicate with each other through TCP/IP or ISO. For example:
B. Step 7 Communication Module Settings
Right-click the CP343-1 module-object properties, General-interface-properties to set the number of Ethernet metrics, for example,:
If the "set MAC address/use ISO protocol" option is selected, the PLC can communicate with the ISO protocol through the MAC address license.
C. Download the compiled program to the PLC, for example:
4. WinCC and program connection in PLC
In the internal variable, add ?" SIMATIC S7 protocol situe "Driver, where you can create a variable after creating a connection under industrial Ethernet or TCP/IP
A uses the Industrial Ethernet method to establish the connection between WinCC and PLC
Create a variable below testieth and select an address for the variable at the same time (this address is the automatically generated address in Step 7 compiled programs)
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)