当前位置:网站首页>LabVIEW program code update is slow
LabVIEW program code update is slow
2022-06-30 07:19:00 【LabVIEW development】
LabVIEW Program code update is slow
LabVIEW Loading large VI Will cause slow response . When moving a control or function on the front panel or block diagram , It will hang for a second , Or moving very slowly . Once in a while , When the block diagram has been opened , Some connections will not be displayed completely , Only when operating this block diagram , Will slowly show . however , When running LabVIEW Other procedures , I haven't encountered the slow running behavior of the program , How can we improve this situation ?
Solution
This may be because the computer screen uses high resolution and multiple color settings . When large VI This phenomenon also occurs when the front panel of the has many controls that need to be updated . Whenever you move the mouse and control the controls on the front panel ,LabVIEW The front panel drawing must be constantly updated .LabVIEW Use double buffering to make screen updates smoother and faster . This process involves drawing the contents of the window in the offline buffer that is being updated , Then copy the contents of the new window to the front panel . As the resolution and color depth increase , Copying the contents of the window will take up more memory .
Troubleshooting has three main paths :
Computer settings
LabVIEW Set up
The code architecture
If in any VI We can see this kind of slow phenomenon on the Internet , And with its size or saved sub VI The number of independent , From the computer or LabVIEW Settings start . If this is only in large VI Occur in the , Is probably caused by code structure problems .
Computer settings
To correct this problem , First try changing the resolution and color settings . Please set the computer to 800 x 600 Pixel resolution ,256 Color and 60 Hz The refresh rate of , Then change the resolution and color display settings .
Another possible solution is to change the computer's “ Hardware acceleration ” Set up .
about Windows 7, Right click on the desktop , Select display settings >> Screen resolution >> Advanced settings >> Troubleshooting >> change setting . From here, you can adjust the hardware acceleration settings . It is recommended to try to reduce the acceleration , To achieve the desired operation . After reboot , New settings will take effect .
LabVIEW Set up
The next suggestion is to try disabling the front panel “ Smooth update ” Set up .
stay LabVIEW2010 And later :
Right click the graphic on the front panel , Then choose advanced » Smooth update . Be careful : This method is only applicable to figure (Graphs), Not applicable to charts (Charts).
Reduce save undo times to free up some memory .LabVIEW The default value for undo quantity is 99 Time , And these undo will use memory to store .
To change the number of undo , Please go to tools » Options . And select the environment category . Each one VI The maximum number of undo steps allowed has been changed to approximately 10, To limit memory usage , But still keep the Undo function .
The code architecture
You can also start from the code architecture to alleviate LabVIEW Slow update of program code .
Another solution to slow programs is to monitor VI memory management . This includes putting large VI Some small parts of are saved as children VI, Restrict the use of global and local variables , And make sure there are no overlapping controls on the front panel . Click file »VI Properties can be found VI Memory usage , Change the category to memory usage .
From the program block diagram , You can create children from existing code VI, The method is to choose to be a child VI Code for , Then click Edit... On the toolbar » Create a child VI, The code will be replaced with a child VI Icon . You can edit the child by double clicking the icon VI.
The main program VI The editor becomes independent VI Can reduce program lag . So , Please from LabVIEW establish VI, Instead of creating one from the project VI, Then save the file VI, Edit normally .
The silver input and display controls on the front panel occupy more memory than the classic controls . To change this setting , Please go to the file »VI attribute » Editor options . In the editor options , Change the control style to new or classic . You can also right-click and select “ Replace ” To change the input control and the display control respectively .
If a large input control or display control ( For example, multiple figures ) With default , Please try to clear the default data and set the cleared or empty state to the new default state . This will release VI Some memory in .
To clear a drawing , Please right-click the figure , Select data operation >> Clear graphics .
To set the default , Please right-click data operation >> Set the current value to the default value .
If the project was originally written in a previous version , And has not yet been compiled to the current version , This may cause the program to run slower . stay VI in , By going to the file » Save all to save .
The size of the block diagram may be correct VI Has a big impact on the performance of . It is recommended to keep the size of the block diagram within an appropriate range , The best size is to make VI The program block diagram can be displayed on the screen , And you can see all the content in the code with a minimum of up, down, left and right sliding . When the block diagram is too large and requires a lot of sliding , May damage VI Performance of .
LabVIEW、LabVIEW Development 、LabVIEW Programming 、LabVIEW Program
Examples and information mentioned above , Both in word In the attachment in , Click to download . Learn more , Can you contact us .
LabVIEW Program code update is slow - Beijing Hanwen Wangxing Technology Co., Ltd (bjcyck.com)
边栏推荐
- 【已解决】ERROR 1290 (HY000): Unknown error 1290
- Swiftui creates a beautiful custom press feedback button
- 解决:div获取不到键盘事件
- Network security - detailed explanation of VLAN and tunk methods
- 02 - bare metal and RTOS development modes: five development modes of bare metal and the introduction of RTOS
- Stm32g0 and FreeRTOS learning summary
- How to use string branches for switch case
- The maximum expression in Oracle database message list is 1000 error
- Starting MySQL ERROR! Couldn‘t find MySQL server (/usr/local/mysql/bin/mysqld_safe)
- 2021-07-02
猜你喜欢
踩坑记录:supervisor 日志返回信息:redis扩展未安装
SwiftUI打造一款美美哒自定义按压反馈按钮
动态内存管理
Merge: extension click the El table table data to expand
Use of ecostruxure (3) creating composite function blocks
Deploying web projects using idea
Win10 step pit - power on 0xc0000225
Calculation and parameter quantity of neural network
[most complete] install MySQL on a Linux server
Install go language development tools
随机推荐
01 - embedded learning route and career planning: embedded basic knowledge and development process
系统软件开发基础知识
oracle数据库报列表中最大表达式为1000错误
[most complete] install MySQL on a Linux server
Daemon and user threads
【已解决】ERROR 1290 (HY000): Unknown error 1290
Linux服務器安裝Redis
Qtcreator debug code after configuring CDB debugger view variable value display card
Thread network
年轻人搞副业有多疯狂:月薪3000,副业收入3W
记录开发过程中无法使用管理员身份修改系统文件问题
Class template case - encapsulation of array classes
MySQL encounters the problem of expression 1 of select list is not in group by claim and contains nonaggre
网络安全-抓包和IP包头分析
Introduction to ecostruxure (1) IEC61499 new scheme
Win10 step pit - power on 0xc0000225
Network security - routing principle
Win10踩坑-开机0xc0000225
Vs2019 and SQL
Local unloading traffic of 5g application