当前位置:网站首页>Program to change the priority of the process in LabVIEW
Program to change the priority of the process in LabVIEW
2022-07-27 03:47:00 【LabVIEW development】
LabVIEW Program to change the priority of the process
stay labVIEW Can be called kernel32 Dynamic link library to change the priority of the process . You need two functions :GetCurrentProcess() and SetPriorityClass().
Yes 6 There are priorities to choose from , this 6 The priority and its identification code are listed below :
Free (IDLE): IDLE_PRIORITY_CLASS
Second low (BELOWNORMAL): BELOW_NORMAL_PRIORITY_CLASS
Ordinary (NORMAL): NORMAL_PRIORITY_CLASS
Secondary high (ABOVENORMAL): ABOVE_NORMAL_PRIORITY_CLASS
senior (HIGHPRIORITY): HIGH_PRIORITY_CLASS
real time (REALTIME): REALTIME_PRIORITY_CLASS
stay LabVIEW in , First, create a call library function node , And point to kernel32.dll( Generally located c:\windows\system32). The appearance of the function prototype after the call is :
unsigned longGetCurrentProcess(void)
Because this is called Windows Of API function , Call mode changed to stdcall(WINAPI). The second one calls the library function VI Similar to the first , Besides using SetPriorityClass function . After establishing the second call library function node, the function prototype looks like :
unsigned longSetPriorityClass(unsigned long handle, unsigned long priority)
alike , Call mode changed to stdcall(WINAPI). GetPriorityClass The return value of the function and SetPriorityClass Function handle related , The corresponding priority type is hexadecimal (hex). stay winbase.h In file ( Included in Microsoft Of WIN32 SDK in ), You can find declarations that define priorities . They are :
#defineIDLE_PRIORITY_CLASS 0x00000040
#defineBELOW_NORMAL_PRIORITY_CLASS 0x00004000
#define NORMAL_PRIORITY_CLASS0x00000020
#defineABOVE_NORMAL_PRIORITY_CLASS 0x00008000
#defineHIGH_PRIORITY_CLASS 0x00000080
#defineREALTIME_PRIORITY_CLASS 0x00000100
Use these values , You can specify the priority of threads . for instance , If you want to set the priority of the process to idle (IDLE), As long as a hexadecimal value of 40 Constant of .
open 、 Run the example in the attachment . When running the example , open Windows Task manager , Changing LabVIEW The priority of the program can be observed LabVIEW Priority status .

edit
Add picture comments , No more than 140 word ( Optional )
LabVIEW、LabVIEW Development 、LabVIEW Programming 、LabVIEW Program
Examples and information mentioned above , Both in word In the attachment in , Click to download . Learn more , Contact us .
边栏推荐
- Banyan loan,
- Introduction to database - a brief introduction to MySQL
- 【树链剖分】模板题
- Use websocket to realize a web version of chat room (fishing is more hidden)
- [tree chain dissection] template question
- Ring counting (Northern Polytechnic machine test questions) (day 83)
- Code practice when the queue reaches the maximum length
- MySQL Chinese failure
- DTS is equipped with a new self-developed kernel, which breaks through the key technology of the three center architecture of the two places Tencent cloud database
- 榕树贷款,
猜你喜欢

Spark: calculate the average value of the same key in different partitions (entry level - simple implementation)

Customer cases | pay attention to the elderly user experience, and the transformation of bank app to adapt to aging should avoid falsehood and be practical

Spark Learning Notes (VI) -- spark core core programming RDD action operator

Application, addition and deletion of B-tree

redis秒杀案例,跟着b站尚硅谷老师学习

Contour detection based on OpenCV (1)
![Machine learning [Matplotlib]](/img/d1/31ec2f96ca96465c6863798c7db179.jpg)
Machine learning [Matplotlib]

数据库概论 - 数据库的介绍

MySQL中文失败问题

【无标题】JDBC连接数据库读超时
随机推荐
Typescript TS basic knowledge interface, generics
DTS搭载全新自研内核,突破两地三中心架构的关键技术|腾讯云数据库
Data analysis and disassembly method of banyan tree in Bairong
数字孪生实际应用:智慧城市项目建设解决方案
Tool class of localdatetime sorted out by yourself
Introduction to database - Introduction to database
flask_ Reqparse parser inheritance in restful
[1206. Design skip table]
The application and significance of digital twins are the main role and conceptual value of electric power.
[understanding of opportunity -52]: the depth of communication varies from person to person
Debug mode in pycharm for detailed debugging
Method of converting curtain article OPML into markdown
Vector to SVG method
Number of 0 at the end of factorial
基于OpenCV的轮廓检测(1)
明汯投资裘慧明:长期优异超额的背后考验的是团队的投研能力和策略的完整性
C语言力扣第43题之字符串相乘。优化竖式
Contour detection based on OpenCV (2)
ZJCTF_ login
Number of square arrays (day 81)