Realization of Multithreading Method in Testing and Control System of Test Bed

In the test and control of the test bed, the load control system has high requirements on real-time performance. For such systems, multi-threaded programming is generally used. Therefore, data security between multiple threads needs to be considered.

CVI provides a thread pool and asynchronous timer mechanism for multithreading. Vein display thread pools are suitable for tasks that are executed multiple times or in cycles, while asynchronous timers are suitable for tasks that are performed in fixed time intervals. In addition, the measurement and control system itself has a high requirement for the acquisition frequency and requires a high-precision timer.

Multi-thread real-time acquisition and processing Compared to the CVI Timer control, the asynchronous timer is based on multi-thread processing and Windows multimedia timers perform timing operations with a high priority. However, different machines can be set up with different intervals than the Boshan fire pump. If you set a time interval smaller than the system's available large resolution, the behavior is unpredictable. At the same time, a multimedia timer thread runs all the asynchronous timer callback functions registered in a single program. To use multiple threads, a thread pool must be used.

The control software of the upper computer software includes three sub threads. Among them, the priority of the main thread is high, and secondly, it is considered that the command of the master controller and the alarm signal received and transmitted to the host computer by the slave controller should be received in real time, and the priority of the communication module is second only to the master thread. The display and drawing threads have low priority and are executed only when the CPU is idle, which not only meets the requirements of the system, but also ensures the real-time requirements of the measurement and control system.

Filling Sealing Machine

Filling Sealing Machine,Filling And Sealing Machine,Cans Filling And Sealing,Cans Filling And Sealing Machine

Zhoushan Wellman Machinery Technology Co., Ltd.   , https://www.zhoushanwillman.com