Control When the Front Panel of a SubVI Opens in LabVIEW

您所在的位置:网站首页 labview好看的前面板 Control When the Front Panel of a SubVI Opens in LabVIEW

Control When the Front Panel of a SubVI Opens in LabVIEW

2024-05-08 18:22| 来源: 网络整理| 查看: 265

There are three options to control the behavior of a SubVI front panel: Set the VI to open its front panel whenever it's called

If you want the behavior of the SubVI front panel to be the same each and every time it is called, then you will want to modify the聽Window Appearance聽properties of the SubVI.

On the block diagram of the top-level VI , double click on the SubVI icon to open.Open the SubVI's properties by doing one of the following: Go to聽File禄VI PropertiesRight-click on the SubVI icon in the top, right-hand corner of the front panel or block diagram and choose聽VI PropertiesOn the SubVI, Press Ctrl+I In the聽Category聽drop-down menu choose聽Window Appearance聽Click the聽Customize...聽buttonHere you will find three options in the bottom left for controlling the behaviour of the SubVI front panel: Show front panel when called - opens the front panel when the SubVI is executedClose afterwards if originally closed - closes the front panel when the SubVI finishes executionShow front panel when loaded - opens the front panel when the SubVI is loaded into memory

If you want to open the front panel of a specific SubVI instance If you want the SubVI front panel to open when you call it, you will have to configure the top-level VI.聽 This second method is useful if your SubVI appears in your top-level VI several times and you only want it to open the front panel some of the time. From the block diagram of the top-level VI, right-click on the SubVI and choose聽SubVI Node Setup.

In the SubVI Node Setup,聽you will find four options for controlling the behaviour of the SubVI front panel: Open Front Panel when loaded - opens the front panel when the SubVI is loaded into memoryShow Front Panel when called - opens the front panel when the SubVI is executedClose afterwards if originally closed - closes the front panel when the SubVI finishes executionSuspend when called - halts execution and allows user to run the SubVI any number of times 聽 Programmatically decide if the front panel opens at Run-Time To programmatically determine whether the front panel loads or not during run-time you can use invoke nodes on the block diagram of the SubVI to control the front panel behavior. 鈥婥reate a VI Server Reference on the block diagram for a constant聽OR create a VI Refnum聽on the front panel of the SubVI.Place an invoke node and choose the聽Front Panel聽禄 Openor Front Panel聽禄聽Close methods to open and close your front panel.聽The image below shows how to programmatically open and close the front panel of a SubVI. The false case of each case structure contain no functions.聽 Additional Information If you are using the聽Start Asynchronous Call VI, be sure that its connector pane matches the connector pane of the VI you are calling. Read more about聽Asynchronously Calling a VI and Collecting the Results in the LabVIEW Help.聽


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3