Fuji touch screen and Siemens PLC communication solutions - Solutions - Huaqiang Electronic Network

High frequency probe high frequency line can be customized other specifications
SMD aluminum electrolytic capacitor
Brand AVX TPSE226M035R0125 Low impedance tantalum capacitor AVX 22
Electronic scale crystal oscillator 3.2*2.5mm 3225 16M (16.000MHZ) 12PF 10PPM 20PPM 30PPM

With the development of computer network and fieldbus technology, plc and touch screens are widely used in industrial control and building automation. Fieldbus technology and its bus interface module, intelligent instrument, control equipment and other integrated monitoring system has become an important direction of the development of current automation technology. In the field of industrial control, the combination of PLC and touch screen technology has become more and more familiar and familiar to engineers. Because touch screen has the characteristics of simple operation, direct interface, easy programming, good communication with PLC, strong anti-interference ability, etc. It is rapidly infiltrating into various industries and taking advantage of the greatest advantages of automated control.
PROFIBUS provides two communication protocols: DP, FMS, and the Fuji UG series touch screen supports the DP protocol. Fuji touch screen has strong compatibility, can communicate with PLC of nearly 30 manufacturers, has strong compatibility, and can also communicate with computer (open communication protocol).
Through the connection of the interface unit, UG031-P communication card and bus, the UG touch screen can be used as the slave station and the Siemens S7-300 or S7-400 series PLC communication as the master station (the network structure is shown in Figure 1). Digital camera Figure 1: Network structure of PROFIBUS-DP 1 System structure The background of this paper is a main control system consisting of raw material mixing line, potato cake production line, packaging line, etc., as well as steam boiler system, water system, compression. An auxiliary system consisting of an air system, a lighting system, a ventilation system, and a fire protection system. The positions of each system are relatively scattered, and there are many control points, including more than 140 motors, 29 inverters, and 15 temperature and humidity control points.
Due to the complexity of the system, the control adopts a layered control strategy. The two host computers complete the plant-level monitoring and data management functions. The touch screen and PLC complete the field-level control and communicate using the Profibus fieldbus. The host computer has an interface that can be connected to the LAN and WAN to facilitate further development. Among them, the digital input point has more than 900 points, the digital output has more than 400 points, and the analog input is 20.
Take this food processing plant as an example to form a centralized control system. The system structure is shown in Figure 2.
Among them, PLC (1) is used for the main system, and PLC (2) is used for the auxiliary system. The composition of the auxiliary system is similar to that of the main system, so its composition is omitted from the figure. PLC selects CPU315-2DP of S7-300 series and CPU226 of S7-200 series, PID module is FM355C, communication module is CP342-5, expansion module is IM153-1, I/O module is used: digital input module selects SM321 The digital output is SM322 and the analog input is SM331. The upper computer selects the industrial computer of Siemens, and it has built-in PCI interface CP5611 card for communication with PLC.
The CPU315-2DP of the S7-300 series is selected to be able to expand the I/O module to meet the control point requirements, and the selection of the IM module for expansion is based on the distance between the IM module and the CPU 315-2DP of the central controller.
Since all I/O modules are housed in the same control cabinet, the IM153-1 with a communication distance of 5 meters is selected. When the distance between the IM module and the central controller is long, you can select the IM module with the communication range of 100 meters.
The touch screen uses Fuji UG420H-SC1, 10.4 inch, 128 color STN display, based on the dedicated configuration software under WINOOWs95/98/NT operating platform, the interface is friendly and intuitive, easy to learn and use, greatly saving product development cycle. The programming software is equipped with a large number of graphics libraries (switches, lights, bar graphs, etc.) for selection, and can also edit the required process graphics according to user requirements, and can convert BMP files and DXF files in AUTOCAD.
Digital camera Figure 2: Control system hardware composition and structure
2. Touch screen communication settings and interface design After the hardware connection is completed, you need to specify the system hardware configuration and set some communication parameters in the configuration software. First, develop the type of touch screen used. Here, select the default UG420 (640*480 10.4inches); the next step is to specify the PLC type and model for communication with the touch screen. Here, select SIEMENS S7-PROFIBUS; the last step specifies the system parameters, first read The area and the write area, the read area refers to the buffer for reading data from the PLC. If the trend map needs to be displayed in the system, the read area should be set larger. Generally, 1000 words can be set, and the write area is used to display the storage screen. Status, page number, screen cascading, alarm status, and more. In addition, in the dialog No. of Word Setting for I/O, it is necessary to indicate the MPI address of the touch screen and the frame length of the transmission. The MPI address has been defined in the hardware configuration of the PLC, and the two must be identical, otherwise communication will occur. error. In addition, the frame length is 32 bytes; the parity is odd parity; the data length is 8 bits; the stop bit is 1 bit; and the communication mode is RS-485.
UG00S-CW has a very complete and powerful configuration function. When developing the configuration, developers can not consider the communication protocol problem, because Fuji has blocked all the technical details, it has intelligent Addressing function. When a button is created, this button is pre-defined in the PLC (in Siemens plc, both digital and analog definitions are in the DB block). Assuming the address of this button is DB2.DBX2.0 (which means the 0th bit of the 2nd byte in the 2nd DB block), the address of the button in the touch screen should be represented as DB2:2-0. We can see that you don't need to do any other work except that the address is written differently. You don't need to define the variables, let alone the frame structure of the communication.
The same is true for analog, except that in analog, you need to indicate the number of bytes occupied by the analog, which is as simple as the same amount.
It can be said that UG00S-CW is very simple and convenient when dealing with basic analog digital quantities, but it has encountered unexpected problems when dealing with some complicated situations. In this centralized control system for food production lines, it involves the compatibility of communication formats in Fuji touch screens and Siemens PLCs.
Some PID controlled analogs in the system need to be displayed with trend graphs. It is not complicated to display trend graphs in UG00S-CW. First click on the trend graph icon, select the trend graph type in the pop-up dialog box, and then select each one. The address corresponding to the curve can be. However, in the online debugging, there is always a comunication error message. After troubleshooting, the problem is found on the trend graph. If the trend graph is removed from the program, everything is normal. Then I will try to use the Siemens PLC first. The corresponding analog data is read into the buffer of the touch screen (ie, the internal storage area), and then the address of each curve of the trend graph is changed to the corresponding internal address. After online debugging, it was found that the comunication error message no longer appeared, but the display of the trend graph curve was extremely abnormal. After observation, it was found that the curve shows normal except when the value of the analog quantity is zero, while the curve points to infinity when it is non-zero. This problem has made the author puzzling, and finally finally thought that it may be that Siemens PLC and Fuji touch screen may not be compatible in the storage format. The analog quantity in the trend graph of the Fuji touch screen is generally double word (4 bytes). The order read from the Siemens PLC is to read the first word as a high word and the second word as a low word, while Siemens The analog storage in the PLC is stored in the low-word and then stored in the high-word, so that the data read by the Fuji touch screen from the Siemens PLC is just the reverse of the high and low words. Because the value of the general analog quantity is relatively small, the high word is zero, which is equivalent to multiplying the original value by a number of 2 to the 16th power, which far exceeds the upper limit of the analog quantity, so the above situation occurs. .
In order to solve the above problem, it is necessary to read in the data in the PLC, and then reverse the high and low words, and then point the curve address of the trend graph to the internal address of the stored correction data. In order to complete this function, you need to use the macro command of UG00S-CW. Fuji UG00S-CW platform provides a rich macro command set, mainly in the following categories:
The screen class, the OPEN macro that can be executed when an interface is opened, and the CLOSE macro that can be executed when an interface is closed. When an interface is opened, the CYCLE macro is stopped until the interface is closed.
Button class, an ON macro that can be executed when a button is pressed and an OFF macro that can be executed when a button is released.
The macro mode, that is, the macro block is controlled by a certain bit. When this bit is 1, it is executed. When it is 0, it stops. This bit can be the address in the PLC or the internal address of the touch screen.
The macro command set of Fuji UG00S-CW is very similar to the assembly language, but it also adds many system command functions and auxiliary functions, making the development program more convenient and faster. The storage format in the touch screen is a word, and the address is represented by $u. For example, $u1000 indicates the 1000th word, $u1000-14 indicates the 14th digit of the 1000th word, and the touch screen does not have an address for indicating the byte. Representation. There are multiple PID control loops on this food production line. Each loop corresponds to a trend graph. Taking the first loop as an example, it occupies Buffer1 (up to 12 Buffers are available). The trend graph has three curves PV, SP, OP, their corresponding PLC address is DB10: DBD0, DB10: DBD4, DB10: DBD8, and then the adjusted address is stored as $u500~$u505, the program segment is as follows:
/* First read the analog quantity into the touch screen, use the block assignment BMOV instruction, that is, assign DB10:DBD0~ DB10: DBD8 to $u500~$u505*/
$u500=DB0010:0000 C:12(BMOV)
/ / The high and low words of each quantity are reversed below
$u600=$u500 (W)
$u500=$u501 (W)
$u501=$u600 (W)
$u602=$u502 (W)
$u502=$u503 (W)
$u503=$u602 (W)
$u604=$u504 (W)
$u500=$u505 (W)
$u505=$u604 (W)
Then copy this block to the CYCLE macro of each screen, and then point the initial address of the buffer address to $500. The sampling mode is set to: Constant Sample, the number of curves (ie No. of Word) is set to 3, and the storage length is 500, the other settings are the default values, the address of the corresponding three curves in the trend graph is changed to $u500, $u502, $u504, so as to ensure that the data in the touch screen and the data in the PLC are updated synchronously. Download the program to the touch screen, go online and test everything.
3 Conclusion Fuji Touch Screen and Siemens PLC have high stability and are very efficient and fast in software development. Therefore, in terms of industrial control, the combination of the two is a very good choice, which can give full play to the advantages of both. However, since the two are not the same manufacturer after all, it is inevitable that there will be some flaws in the compatibility of certain details. This is the place we should pay special attention to when designing the industrial control system. The hardware vulnerability software supplement is the eternal method of the IT industry. Before developers can make their products perfect, we should use our own wisdom to perfect our system.

Bilge Float Alarm

Bilge float alarm,Bilge float alarm price,Bottom floating alarm

Taizhou Jiabo Instrument Technology Co., Ltd. , https://www.taizhoujiabo.com

This entry was posted in on