Fast acquisition solution of the hottest MCGS Embe

2022-08-13
  • Detail

MCGS embedded configuration system fast acquisition solution

Beijing Kunlun Tongtai Automation Software Technology Co., Ltd. is a well-known high-tech enterprise in China. The company mainly approves specific operation tests from the dynamic circle, and deals with the development of professional automation software and the integration of application systems in the static self loading system, and provides users with the overall design scheme from hardware to software. The products are widely distributed in dozens of industries such as petroleum, chemical industry, metallurgy, mining, transportation, machinery, food and so on, and are applied to many industrial control sites in the country and even the world. On this occasion, we introduce the company's software MCGS embedded configuration system fast acquisition solution

we organize solutions according to the target solutions. When using this document, you first need to confirm whether your project conforms to the listed target scheme. You can find out what kind of project you need to deal with by checking whether the project conforms to the characteristics of the target system. If you find that your project is inconsistent with the features listed, you may need to deal with a new type of project. In this case, please contact the embedded product line manager through technical support to confirm the solution required by your project

at present, the embedded configuration system can solve the following three kinds of rapid acquisition projects:

1, high-speed acquisition and continuous control scheme

target system

this scheme mainly solves the requirements of embedding the configuration system in small control equipment. Such systems include injection machines, road sweepers and other small control equipment

system characteristics

these devices are characterized by simple pictures, generally batch work, and relatively complex working states and state transition relationships. The operation logic is complex. Moreover, in order to reduce costs, generally only simple ad, DA and IO are used, and configuration software is used to solve control logic and timing problems, instead of PLC. Sometimes there are report output, etc

entering the rapid acquisition is predicted in advance. For example, the operator decides to enter the rapid acquisition and control, rather than entering the rapid acquisition and control due to some event such as alarm. If it is the latter case, please refer to the quick switch to high-speed acquisition scheme

for items requiring a response period of more than 50 milliseconds, you can directly use the corresponding functions in the configuration software, such as cycle strategy, timing strategy, etc

for items with a response period of less than 50 milliseconds, the general reason is that one or several position control PID operations are required, and its control period is required to be between 1~10 milliseconds compared with PLC

solution

mcgs configuration system has the following solutions for such systems:

functions other than high-speed control are completed by using the general configuration function. Pay attention to the performance parameters of the general configuration function

for high-speed control, the solution is as follows:

1. Construct a user policy, which is started when the system is initialized

2. Add a script program to this user policy

3. At the beginning of this script program, use the script function setrealtimestgy to upgrade this policy to a hard real-time policy. If it is not upgraded to a hard real-time policy, it is easy to be disturbed by other threads

4. In this script program, construct a while loop body. In the loop body, repeat the following repeatedly

● wait for the arrival of the timing interval. There are two ways to wait for the timing interval, one is to use! Sleep function. Using this function, when the parameter is 1, the delay is about 2 milliseconds, and when the parameter is 3, the delay is 4 milliseconds, that is, the specified delay length, plus the task switching time of 1 millisecond. This performance index is measured on 4866mhz. Another way is to use the function waitforinterupt to wait for an interrupt to occur. The 2m timer on the hardware board can be used to trigger interrupts in conjunction with the counter to achieve this function. This method can reach a scanning cycle of 1 millisecond, but the disadvantage is that it requires hardware cooperation

● check whether this quick scan control is no longer necessary, such as system exit or state transition to manual. If yes, exit the loop body

● start AD conversion and di and collect data

● calculate the control algorithm and logic. At this time, various set values can be read from the real-time database. And output various values

● start DA conversion and do, and output control commands

● enter the next cycle

2. High speed acquisition and post analysis scheme

target system

this scheme mainly solves the requirements of embedding configuration system in experimental acquisition equipment. Such systems include various tester equipment

system characteristics

the characteristics of these devices are that their working states include high-speed acquisition state and post analysis state. The usual method is to conduct a test, turn on high-speed acquisition, collect data at a high speed, such as 1 millisecond, store the collected data in memory, and do some relatively simple data processing, such as average value, etc. Generally, the acquisition time is 1-20 seconds, no more than 1 minute at most. After the high-speed acquisition stops (often because the test is completed), save the data to the data file on the disk. Then enter the analysis state, read the data from the data file, display it through the relative curve, and view the data through the data browsing component. Additional requirements include the naming, management, backup and transmission of data files to the upper computer

entering the rapid acquisition is predicted in advance. For example, the experimenter decides to enter the rapid acquisition and control, rather than entering the rapid acquisition and control due to some event such as alarm. If it is the latter case, please refer to the quick switch to high-speed acquisition scheme

for items requiring a response period of more than 50 milliseconds, you can directly use the corresponding functions in the configuration software, such as cycle strategy, timing strategy, etc

for items with a response period of less than 50 milliseconds, the general reason is that one or several high-speed acquisition channels are required, and the acquisition period is between 1 and 50 milliseconds

solution

mcgs configuration system has the following solutions for such systems:

in addition to high-speed acquisition, the functions are completed by using the general configuration function. Pay attention to the performance parameters of the general configuration function

for high-speed control, the solutions are as follows:

5. Construct a user strategy that uses Jinan new era Gold Testing Instrument Co., Ltd. as the main laboratory machine. Some models have more outstanding detection limits, and the strategy is started when the system is initialized

6. Add a script program to this user policy

7. At the beginning of this script program, make

Copyright © 2011 JIN SHI