Valve remote control system based on CAN bus
Introduction Ordinary electric valve is a kind of universal execution unit, it has an irreplaceable role as an important actuator widely used in the field of industrial process control. Valve electric device is a motor-driven, driven mechanical deceleration device will power transmission to the valve to achieve the valve opening and closing of the final components, it is the core part of the electric valve. In recent years, domestic manufacturers of electric valves have gradually mastered some core technologies such as mechanical transmission and manufacturing through the introduction and absorption of advanced international technologies as well as the cooperation with internationally renowned enterprises such as Limitorque and Rotork. Coupled with the price advantage, Has made the dominance of the domestic market. With the improvement of industrial automation, especially the emergence of fieldbus technology, only on-site operation and simple point-to-point control function of the electric valve is increasingly difficult to meet the needs of the market, major companies have introduced foreign field bus electric valve products, but High prices. Therefore, it is of great significance to improve the automation level of our electric valve, to reform the domestic electric valve products, to launch our own fieldbus products, to enhance the competitiveness of our products, to consolidate the domestic market and to gradually participate in the international competition. . Fieldbus is a digital, serial, multipoint communication data bus used between field devices and control room automation devices in the manufacturing or process area. It is also known as the open, digitized, multipoint communication underlying control network. The emergence of fieldbus provides a fully distributed solution for industrial automation, improves the intelligence and autonomy of field devices and facilitates system installation and maintenance. There are many kinds of field bus, there are 13 kinds of international standard field bus, CAN bus which supports multi-master mode, excellent short frame transmission performance, high reliability, non-destructive bus arbitration, Intel, Philips, Motorola and many other semiconductor manufacturers chip support, as well as relatively simple means of development and low development costs, making it a hot spot for the development of the domestic field bus. The valve control system based on CAN bus that this text studies is the remote control system of the valve that the microcontroller technology, CAN technology is applied to the domestic common type electric valve, together with the industrial control computer. 1, the overall design of the valve remote control system General-purpose valve on the control accuracy is not high, the operation is relatively simple, only the open, off, stop three states. Under normal circumstances, the operator in the field through the valve on the controller to control the operation of the valve on and off, the valve opening through the valve on the pointer instrumentation. Because of the need of protection, the controller can realize the shutdown function under the fault condition of the valve on the electrical control. However, the diagnosis of the fault can only rely on the experience of the operator, and even requires the inspection of the lid, which brings inconvenience to the maintenance. The remote valve control system proposed in this paper includes upper and lower two-level control. In addition to retaining the original on-site operation functions, the operator can also remotely operate the valve through the host computer. The host computer provides easy-to-use man-machine interface, supports simple configuration of different valves in the system and uses database technology to manage the status information and fault information of each valve in the system operation, which is convenient for system maintenance. The host computer not only has Fieldbus interface with the next crew communication, but also should have an Ethernet interface in order to achieve the system and external information exchange. Under the premise of keeping the original electrical structure of the electric device, the lower computer introduces the micro-controller technology to form an embedded control system, which not only supports on-site operation but also supports the remote control of the host computer. Both of them can be switched on-site Switch. The next crew control system to increase the detection circuit and field bus interface to achieve a large number of fault valve operation information collection. On the one hand, the micro-controller can control the opening and closing of the valve according to the valve opening value set by the on-site or host computer; on the other hand, it can respond to the data request from the upper computer and upload the operation information of the valve to the upper computer. Host computer, the next crew through the field bus connection between the two clear division of labor to form a truly full distribution of fieldbus control system (FCS). Based on the above analysis, this paper uses a centralized management, distributed control of the upper and lower computer two-level control of the overall structure of the system, as shown in Figure 1. Figure 1, CAN bus valve control system structure diagram PC using industrial control computer, in addition to the functions mentioned above, but also designed to run the statistical information printing and system alarm and other functions; the next crew is based on micro-controller control Unit, and embedded in the valve, with the electrical control part of the valve together to achieve control functions. System communication is selected CAN bus, CAN bus protocol is simple, only includes the physical layer and data link layer, the user can define the application layer, the transmission medium can be shielded twisted pair, the signal transmission using a short frame structure, each frame The effective number of bytes is 8, the transmission time is short, the probability of interference is low. Bus communication rates up to 1Mbps / 40m, direct transmission distance up to 10km / 5Kbps, the bus can be mounted on up to 110 devices. When a node is seriously wrong, can automatically out of the bus, the CAN bus technology literature more, this is not described in detail. In the remote valve control system mentioned in this article uses CAN bus because of the logic control valve simple, small amount of information, combined with the CAN bus data transfer speed, ease of development, technical support and cost considerations. 2, Host Computer Design System The host computer hardware Advantech IPC IPC-6718V, together with Advantech's dual-port CAN interface card PCL-841, stable performance, greatly shortening the system development cycle. Host computer software using VB610 to design, easy to achieve user needs a variety of monitoring functions. PC software includes system security module, system communication parameter setting module, database module and valve control module and other parts. Figure 2 shows the relationship between the various software modules of the host computer. It can be seen from the figure that the host computer software not only realizes the valve control function, but also fully considers the system security and database operations required as a control software. Among them, the valve control module is the core PC software. Figure 2, PC software module diagram Host computer software's main function is to achieve the entire system within the state of the valve to monitor and provide users on-site remote control valve operation. After the host computer software starts, first carries on the system initialization, then enters the system monitoring operation mode, if is the initial application, but also according to the concrete situation after the initialisation carries on the configuration. In the operation mode, the host computer and the lower valve control unit adopt a question-answer method to exchange information. The upper computer analyzes the various status and fault information returned by each valve and then refreshes the corresponding data in the database and refreshes the master The corresponding part of the monitoring interface. Due to the large number of valves on the main monitoring interface, the basic operating status (start, stop, fault) and opening of each valve can only be briefly illustrated. To view the detailed operating information of a valve, you can click on the interface The valve icon to switch to a single monitoring interface of the valve, then in addition to the current valve can be given the current opening, stop the state and other basic information, but also can be displayed motor phase loss, turn limit, the motor overheating alarm, accident details. Figure 3 shows the software flow for this process. In order to improve the response speed of the remote control, the host computer designed the remote control function of a single valve in the system. In this working mode, the user will request the valve opening to be transmitted to the lower computer in the corresponding valve through the CAN bus Lower machine control valve start and stop, and the entire process of real-time status of the PC passed to the host. In practical application, if different valves in the system have linkage requirements, it can also be realized through host computer programming. 3, the next crew design The valve action is embedded into the valve by the lower computer control, the next crew after receiving the specified opening command will analyze the operation of the valve at this time and a variety of conditions, if the valve is allowed Action status, the next crew issued an analysis of the command (open or closed) until the valve opening reaches the specified opening, the implementation of shutdown. The following will be from the hardware and software on the next crew design a more detailed description. 3.1 Lower machine hardware design Lower machine is a "autonomous" function of SCM control system, based on the original electrical control circuit fault signal acquisition and external communication CAN bus interface. Lower machine circuit from the structure and function can be divided into master control module, power monitoring module, data acquisition and control interface module, man-machine interface module, bus communication module. The relationship between them as shown in Figure 4. ①, the main control unit module The main control module is the core of the lower machine, the smallest system by the microcontroller, the coordination of the other four modules to complete the next crew control functions. Taking into account the number of valve operation information collection point and fault information collection point and the ease of system development, the system chose the PHILIP company MCS51 series microcontroller 80C552, which has 256 bytes of RAM can read and write data memory, 5 8 Bit I / O port, an 8-bit input port, two 16-bit timer / counter, a 16-bit timer configured capture / compare module, 15 interrupt sources, two interrupt priority, eight 10-bit A / D converter, 2 pulse width modulation output, 2 serial ports (asynchronous serial port and I2C bus port), also incorporates a watchdog timer. ②, the power monitoring module valve in the course of their work because of some reasons, the main power circuit power-down situation, the user requirements in this case, the next crew system monitoring section can still work for a short time, and timely upload of such failures To the host computer monitoring system, so that operators early detection, timely exclusion. For this reason, this article designs the power monitoring module in the lower position machine control machine, realizes the monitoring to the power supply condition of the valve, and can realize the switchover between the main power source and the spare power source, the circuit structure is shown as in Fig. As the main power circuit power-down, the backup power supply for the single-chip system, coupled with SCM system at this time work in power-saving mode of operation, low power consumption, so the backup power supply using ordinary batteries or rechargeable batteries. Experiments show that in the case of the main power circuit power-down, the standby power supply can work more than 12h, fully meet the needs of maintenance. ③, data acquisition and control interface module This part is the next crew control system input and output part of the main valve to complete a variety of alarm signals, the opening of the collection, the valve open, close, stop control, the structure shown in Figure 6 As shown. In the data acquisition circuit, in addition to collecting the basic operating status, it also increases the number of signal acquisition points such as motor phase loss, torque limit, motor overheating, fuse damage, limit switch in place and emergency braking state, Lower computer monitoring capabilities. Most of the collected signals and control signals in the valve are strong electrical signals. In order to prevent the SCM system from being affected, the isolation design is adopted in the circuit, which increases the reliability of the system. Figure 6 input / output circuit structure ④ man-machine interface module on the valve operation in addition to PC remote control, but also retains the on-site control function, which is mainly done through the field terminal, which is the lower computer in the human-machine interface Module. Communicator by the keyboard and digital tube display circuit. The I2C bus technology is adopted in the design of the terminal. The keyboard circuit uses the I / O expansion chip PCF8574 with I2C interface. The display circuit uses the SAA1064 digital tube display driver IC with I2C interface. The microcontroller 80C552 itself has integrated I2C bus Interface, the system hardware and software design provides a convenient. Handheld hardware structure shown in Figure 7. In addition, I2C bus supports hot swap, to the use of handheld devices brought great convenience, users can without prejudice to the normal operation of the valve, removable terminal. Figure 7, the man-machine interface circuit principle ⑤ communication function module communication circuit is the lower part of the CAN bus interface, is to provide remote control valve function of the core part. It consists of CAN controller SJA1000, CAN driver 82C250 and optoelectronic isolation circuit, the circuit structure shown in Figure 8. The module uses a DC-DC power supply module due to the need for optical isolation. In order to improve the universality of the communication module and meet the needs of different applications, a micro switch is also designed in the lower computer for setting different communication baud rates and address selection of different valves. Figure 8, communication function circuit structure 3.2 lower computer software design Lower computer software written in C51 language, program readability, portability greatly improved. Lower computer software to complete the main state of the valve and fault collection, the valve opening collection, the implementation of the switch valve action and communication functions. Due to the length of the relationship, the following describes only the main control program and CAN bus communication interrupt service routine. ①the main program design The next bit machine software is the main task of collecting the valve signal to control valve movement and response PC requests or orders. The lower computer system into the main program cycle after initialization, in order to accurately collect the valve opening and to avoid false alarms, the input signal is a simple digital filter, the next crew of a comprehensive analysis of these signals, according to the opening requirements of the control valve to open, Off, stop working. The lower-position machine has the scene control, the long-distance control two kinds of control modes, may by the scene switch to distinguish, in these two kinds of control modes, the lower position machine may carry on the operation data uploading according to the upper computer request. The difference is that in the field control, the operator at the scene with the terminal controller to control, then the host computer on the next crew can only monitor, can not control; remote control, the next crew by analyzing the PC command to the valve control. The lower part of the main program software flow shown in Figure 9. Figure 9, the lower computer software flow chart ② CAN interrupt service routine design When the host computer to the next bit machine sends a data request or command, the next crew will enter the CAN interrupt service routine. After entering the CAN interrupt service routine, the first site protection, and then read the SJA1000 interrupt register, analyze what kind of interrupt and the corresponding flag, if it is receiving interrupt, then set the data flag and read the data receiver, and then release Cached, the final restoration of the scene, interrupted to return. CAN interrupt service routine shown in Figure 10. Figure 10, CAN interrupt service subroutine flow chart As the lower machine to be embedded into the valve electrical cavity, serious electromagnetic interference in the design of a variety of hardware and software anti-jamming design, due to space reasons, no longer one by one Detailed. 4, Conclusion The technology mentioned in this article has been applied to the series of electric valves such as QT, OOM, SMC, ZA manufactured by Tianjin Valve Company, making it an electric valve with remote control function and fault diagnosis function. The remote valve control system formed by these valves has been in actual operation for nearly a year, running well, meeting the design requirements and passing the appraisal of experts organized by Tianjin Science and Technology Commission. At present, the pilot products are being prepared and at the same time the standardization of application protocols is being stepped up. The goal of DEVICENET's electric valve products is to be released as soon as possible. Believe that with the introduction of such products to the market, will promote the development of fieldbus actuators in China.
Uv Laser Marking Machine,Uv Laser Marking,Uv Laser Engraver,Uv Laser Machine
Feiquan Laser Technology Wuxi Co., Ltd. , https://www.fq-lasers.com