Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Keep LabVIEW Front Panel Open In VBAI Inspection

Primary Software: Vision Builder for Automated Inspection
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
How do I keep the front panel open for the user when I call a Run LabVIEW VI step in VBAI?

Solution:
This can be done by manually setting the Front Panel»Open property to True whenever the Run LabVIEW VI step is first called, and then using the Front Panel»Close method later on. The attached VI and inspection show an example implementation of this method. The call front panel status is controlled by putting all of the code inside a case structure connected to a boolean. This boolean's value is controlled from VBAI. Effectively then, VBAI controls the opening and closing of the front panel of the VI.

The images below describe how to open and close the front panel programmatically from within LabVIEW.



Figure 1. Setting Front Panel » Open property to True



Figure 2. Calling Front Panel»Close method

Note that this does not allow the VI to run in parallel to a VBAI Inspection.  When the first Run LabVIEW VI step is called, the VI opens and executes the true case.  It then remains open but stopped. 

Instructions for LabVIEW 8.0 and VBAI 3.0 or higher
  1. Download Display Front Panel80.viand save as C:\Display Front Panel80.vi.
  2. Download Display Front Panel30.vbai and save to C:\Display Front Panel30.vbai.
  3. Open and run the inspection.

Instructions for LabVIEW 7.1 and VBAI 2.6
  1. Download Display Front Panel71.viand save as C:\Display Front Panel71.vi
  2. Download Display Front Panel71 Inspection.zip and extract to C:\
  3. Open VBAI 2.6.
  4. Click Configure Inspection.
  5. Click File»Open....
  6. Click Tools»Import Inspection.
  7. Browse to C:\Display Front Panel71.
  8. Click Select Cur Dir.
  9. Run the inspection.


Related Links:
KnowledgeBase 496H20MJ: Error Calling a VI in VBAI
Developer Zone Tutorial: Introduction to Vision Builder for Automation Inspection Webcast
Product Manuals: NI Vision Builder for Automation Inspection Tutorial

Attachments:


Display Front Panel 71 Inspection.zipDisplay Front Panel71.viDisplay Front Panel80.viDisplay Front Panel30.vbai


Report Date: 05/03/2007
Last Updated: 06/17/2009
Document ID: 4923NP9

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit