From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

LabVIEW subPanel demo

Code and Documents

Attachment

Download All

Overview

This is a simple implementation of LabVIEW subpanel structure. This demo shows how to run different VIs in a single app.

Description

Each VI is executed in another thread; each VI runs independently at a time, data can be shared between VIs after each execution, a shared file is very helpful in case of multiple VIs shares multiple set of data. After each run the next VI read and write data while performs a task, so this process will be repeated by each VI in the subpanel after a call.


For each individual VI running into a subpanel structure you can share data using shared files. I have used shared files with awesome results, other techniques like shared variables could work, but noticed in some cases prone to race conditions.


Steps to Implement or Execute Code

  1. Unzip the attached file to a temporary folder or
  2. Move into your personal project folder
  3. Open the "subPanel" folder and run the VI called Mainframe5.vi
  4. Typedef controls must be in the same root as unzipped.

Requirements

Software

Download LabVIEW 2014

Hardware

Windows Compatible Computer

Additional Images or Video


subpanel_1.png

Figure 1. shows the main program or mainframe

subpanel_2.png

Figure 2. shows the Block Diagram

Have Fun!

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
nolsqn
Active Participant
Active Participant
on

can u upload in 2012 as well .. Thanks

Regards
palm-harbor
Member
Member
on

pl try lv12

nhatnguyen1001
Member
Member
on

Please convert all subVIs to 12.0 .

dennis.chen
Member
Member
on

does it build by labview 2012?

JUMO
Member
Member
on

Can you please upload it for LabView 2011?

patty23
Member
Member
on

Can I using subpanel controls into subpunelcontrols? I mean multiply Inteface structers more complex, and I'm not sure is the good solution.

crossrulz
Knight of NI Knight of NI
Knight of NI
on

patty23 wrote:


                       

Can I using subpanel controls into subpunelcontrols? I mean multiply Inteface structers more complex, and I'm not sure is the good solution.


                   

I have put subpanels on VIs that I load into subpanels.  It does become interesting explaining how that works and it only really worked well due to the object oriented design I had for the instrument control I was doing.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Contributors