Summary: this article describes the spray valve control unit adopts the industrial control computer as the primary controller, PLC for auxiliary controller, supplemented by data acquisition, analog output, digital input/output DAS card.
In programming using several applications seamlessly connect technology and multithreaded programming techniques, to a variety of hardware and software anti-interference measures, an effective guarantee the reliability and usefulness of the device.Keywords: spray valve; system design; control; multiple threads; anti-jamming
Preface
In marine power engineering design, there is an important device, i.e. the oil spray valve, its performance is good or bad a direct impact on diesel generator for power efficiency and performance.
This article in an extensive analysis of spray valve injection process, based on the performance of spray valve designed monitoring device. The device with the pressure transmitter, accelerometer transmitters, etc, through computer acquisition spray valve outlet pressure, air pressure, target package acceleration signals, can real-time online assessment spray valves performance quality, adapt to different structures and sizes of spray valve monitoring needs.Monitoring the amount of the State are:
Spray valve outlet pressure waveform and slew rate (); injection make target resulting acceleration; regulated gas pressure change inside the package; injection volume waveforms (△ Q); electrospray time (te).
Monitoring and implementation of the monitoring process
Air compressor-gas stabilized voltage supply compressed air package, through pressure-regulating valve adjustment to the desired pressure, from computers to spray valve opening instructions issued by spray injection (time delay setting time off, electrospray time adjustable), the computer sends to the spray valve opening instructions at the same time start the sampling procedures, sampling gas package pressure, pressure spray valve outlet (full pressure), target acceleration signals, and sample data into the computer, the sampling data analysis, real-time online paint spray valve outlet pressure, the pressure regulator gas Pack and target acceleration waveform diagram.
By analyzing the above graphic, you can assess the performance of spray valve quality. The primary function of the device are as follows:1) signal acquisition capabilities: mainly completed including spray valve outlet pressure, air pressure, target package acceleration signals such as real-time data acquisition and sampling frequency adjustable;
2) screen display function: to curve and digitally displays the channel data trend lines and analysis of data and spectral line data;
3) storage and playback features: complete collection of data and analysis of data storage, playback analysis, signal separation and data analysis for time and frequency;
4) of the aerosol valve performance evaluation function: by entering the calibration data to the data of fitting.
System configuration
To meet the test device on control system design requirements, we use the Advantech's IPC-610P-industrial control computer (PCA6180 motherboard, CPU PIII 1GH 256MSDRAM,) as the primary controller, complete human-computer interaction, real time data acquisition, analysis, storage, graphics rendering and printing and other tasks; the integration of WP series (sensor and transmitter combined) pressure transmitter, the acceleration of integration CA-GT series transmitter variable aspirated Pack pressure respectively, spray valve outlet pressure and target acceleration signals; high-performance, high sampling rate of the data acquisition board PCL-818HD used to capture three standard electrical signal transmitter, at the same time, due to electromagnetic valve open at the same time start sampling thread, choose Mitsubishi PCL to assist the master controller to control the electromagnetic valve opening, delay, such as action, its closed driven by relay output Board PCL-725.
PCL-818HD guaranteed in all gain (x 1, 2, 4 or 8, programmable) and enter the range has 100kHz sample rate and conversion speed.
It has a 1 K of the FIFO (first in, first out) buffer for faster data transfer and Windows for better performance. This is the system selects the important basis for the Board. At the same time to improve the signal of common mode interference capability, the system uses the differential analog input mode.In order to improve the entire control system anti-interference ability, the selection of the relay, isolated digital input and output cards, its onboard PCL-725 eight SPDT relays suited for the system of the solenoid valve on/off control.
Each relay red LED display relay on/off State.Analog output boards PCL-728, can output-10V to + 10V analog signal, real-time control inverter reverse, forward, PCL-728 using optical isolation measures to improve the system anti-interference ability.
In order to guarantee the reliability of the spray valve action and get different spray valve opening time, spray valves opening delay with Mitsubishi's FX2N series programmable controllers (PLC).
Spray valve solenoid valve opens-delay from PLC internal timer automatic delay, delay period to 20ms, 30ms, 50ms, delay time of the selection by changing the PLC of the address of the external input point. System block diagram shown in Figure 1.
Figure 1 system block diagram
Monitoring system of several key technologies
A/D trigger mode selection
Because the program runs on Windows platform, while Windows is a multitasking, multi-user instead of real-time operating systems, high speed data acquisition with possible data loss, data loss means that the test data is incomplete.
In order to satisfy the control system for high-speed data acquisition needs, ensure the acquisition data continuity, integrity, using a timer to trigger A synchronization/D and FIFO data transmission method of combining, greatly improvingA system of sampling frequency and data reliability, improved in the Windows environment data transfer performance.A wide variety of applications for seamless connection technology
Visual C ++ is Windows platform powerful application development environment, MATLAB is a powerful numerical calculation and results visualization software.
If the MATLAB and Visual C ++ combine complementary undoubtedly is an effective way. This design using MATLAB Compile (compiler), MATLAB function compiled as you can from the MATLAB environment used by the C function in Visual c++ this C function compiled into dynamic-link libraries, in Visual C ++ to load the dynamic link library, which can realize the seamless connections, you only need to use related MATLAB application program interface (API) functions to write a C language interface function.Multi-threaded data acquisition software design
Because the entire application needs in a relatively short period of time to complete the data collection, go to the noise, data processing and analysis, and pressure data real-time chart display, data analysis, and data storage and management task, if you use only the single threading model to design systems that will not be able to complete the data collection and analysis tasks and, therefore, consider using multi-threading model, use multiple threads to complete various tasks respectively.
This system through the parallel design makes full use of Win32 operating system multitasking features a different task distribution to each thread, so that each task synchronization and do not affect each other.
System of the primary thread is responsible for creating user interfaces, receiving messages, etc. In addition, because the Win32 system is preemptive systems, in order to ensure that data collection is not interrupted by other threads will create a higher priority thread to collect data. At the same time, to ensure that the relevant part of the system hardware and the hardware is not part of the independent, the sample module into a dynamic-link library, collected data into memory pool, and then calls the dynamic link library of the corresponding function regularly gets memory pool data. As a result of data analysis, storage and performance online assessment time-consuming, and each task takes time, so it is on a different thread, the data acquisition and data analysis of storage and the channel's roving monitoring, each thread (data collection threads, data analysis and processing threads, and data dynamically displays thread) to complete the work done in parallel, thread communication through message responses accomplished PostMessage function.Because this system is an industrialization of continuous operation of the system, the reliability of the system is very important, you must coordinate the following work:
1) attention to free memory, System commissioning process to avoid blocking threads.
In the Windows environment to have a sustainable long-running task, will cause the storage space will be gradually expanded, so sometimes because of memory free space is too small to show the thread blocking phenomenon, even panic, so it is in the process of developing the program, you must consider effective measures to make the program can automatically releases the memory.2) saving CPU time.
System requirements of data acquisition and data processing thread's priority is the highest, with the remaining tasks must be careful to save CPU time, otherwise it will reduce the system's operating efficiency.3) reasonable planning thread content, control the number of threads.
Although the system uses the multithreaded model effectively increase the efficiency of collection and monitoring, the system has the thread should not be too many. Because threads can be run more on all threads polling time, the longer it takes, the more the system delay. At the same time system throughput is reduced, when the system overall delay exceeds a certain limit, the system will become unavailable.4) reasonable solution data buffer of concurrency and synchronization.
Multithreaded applications can be based on priority preemptive scheduling and unpredictability, makes its synchronization problems become very important. How to properly and efficiently implement multithreaded system communication between various threads, which can be related threads on critical areas of access to the synchronization, reached multi-threaded data acquisition system efficiency an important role to play. In this system, use of event Event method for the embargo on a resource's access until you reach a certain thread [1] [2]
No comments:
Post a Comment