Using Function Panels

LabWindows/CVI 2017 Help

Edition Date: May 2017

Part Number: 370051AG-01

»View Product Info

DOWNLOAD (Windows Only)
LabWindows/CVI 2010 Help
LabWindows/CVI 2012 Help
LabWindows/CVI 2013 Help
LabWindows/CVI 2015 Help
LabWindows/CVI 2017 Help

A function panel is a graphical representation of the functions in LabWindows/CVI libraries and instrument drivers. The controls on the function panels represent parameters. Some controls provide dialog boxes to help you select input for parameters. These controls have a ... button next to them. You can use function panels to help generate and test function calls within LabWindows/CVI.

Normally, you use function panels to call into instrument drivers and libraries in the Library Tree. Also, you can use function panels to call functions in the project, as long as the functions are declared in the Interactive Execution window. Thus, you can create function panels for functions that you call frequently, even if you do not keep the functions in a separate file.

Running Function Panels Interactively

A Function Panel window generates one or more function calls with the function parameters you specify in the function panel. LabWindows/CVI can execute these functions immediately in the Interactive Execution window. When you execute a function panel, LabWindows/CVI copies the generated code to the Interactive Execution window and executes it. The first time you execute a function panel for an instrument driver or library, LabWindows/CVI creates and executes a #include statement for the header file associated with the instrument driver or library.

If you want to run functions from certain libraries in the Interactive Execution window while a LabWindows/CVI project is suspended, make sure you complete the following to avoid unresolved symbol errors:
  • Select the Enable LoadExternalModule option in the Target Settings dialog box.
  • Click the Add Files to Executable button in the Target Settings dialog box and select the .lib or .obj file that corresponds to the LabWindows/CVI library function you want to execute in the Interactive Execution window. For example, to execute the WhiteNoise function, select analysis.lib.

Adding Code to Source Windows from Function Panels

Instead of executing the function call, you can choose to copy the function call code to a Source window by selecting Code»Insert Function Call. You can later recall the function panel from the Source window by selecting View»Recall Function Panel.

WAS THIS ARTICLE HELPFUL?

Not Helpful