This page last changed on Apr 07, 2008 by skim.


The purpose of a CAPA/LabVIEW assessment is to have the student operate a simulated instrument in a LabVIEW VI and assess her performance by analyzing her answers to questions and the detailed log of her activity.

From the VI devoloper's perspective, there are three components in the CAPA/LabVIEW assessment environment:

  • Otrunk: is an application framework from CC. Let's simplify and think of it as the initial Java web start window the student sees when running the assessment activity.
  • Activity VI: is the LabVIEW VI that represent the instrument the student will be tested on.
  • Monitor: is the program that monitors and logs all the student activities on the activity VI. Currently the monitor is another LabVIEW VI that runs in the background.

For an "activity VI" to run as part of a CAPA assessment it should meet certain requirements.

Wrapper VI

There must be a wrapper VI that will be stored in the same directory as the activity VI. The monitor runs the wrapper, and the wrapper runs the activity. (The reason we need a wrapper is to make the monitor VI free of any activity-specific code.)

Let's say we have a wrapper for the activity

The requirements for the wrapper are:

Running the activity

The otrunk/monitor assumes minimal control over the third party activity. Still we need the monitor to be able to send various signals to the activity while it is running, e.g., stop and close the VI.
Hence the following requirements:

  • The wrapper must run the activity dynamically.
  • The wrapper must exit immediately after running the activity. (other wise it must be reentrant.)
  • The wrapper must hide itself.


The wrapper must have the following controls with the same names.


  • function: enum ('run', 'close')


  • vi_to_track: path - let the monitor know where the activity VI is.
  • ready: boolean - let the monitor know when to start monitoring (ensures initialization is complete before being monitored)


The wrapper must implement two cases for the two possible values of the input parameter function:

  • run: launch the activity VI.
  • close: send a signal to stop the VI AND hide it.


Below is an example of a simple wrapper that runs an activity named "":

Front panel:

Block diagram in "run" case:

Block diagram in "close" case:

Note that the "Hide front panel" switch in the above VI is not required, but it is useful for development/debugging since you want to test the VI with the front panel open while in production the VI should run hidden.

Note also that it is not necessary to set up the connector pane since the wrapper itself will be run dynamically.

Here's the link to the VI so you can use it as a template:

"ready" was just set to true in the above example, but the wrapper can be more complex on some occasions. For example,
in the example below, we wanted "amplitude" and "frequency" to be set to certain values before the monitor begins to log the activity:

Activity VI

Controls and Labels

Here's the algorithm that the monitor uses to get data from activity VI:

WHILE in monitoring loop DO
   IF mouse clicked THEN
       FOR_EACH control IN the vi DO
           IF control value has changed from last time THEN
               add current time, control label, control value to log 

The monitor can only monitor controls with a label in the front panel. Embedded controls (e.g., controls inside a tab control) are not visible to the monitor. If their values are needed for assessment, they have to pulled out to the top level of the front panel in a way that the values will change only at the time of mouse click.

Stopping the VI

A boolean contol that can end the main loop in the activity should exist and labeled so that the monitor can set its value to end the activity. It doesn't need to be at the top level.

wrap_my_vi.png (image/png)
wrap_my_vi_block_close.png (image/png) (application/octet-stream)
wrap_my_vi_block_run.png (image/png)
wrap_my_vi_block_run.png (image/png)
wrap_scope_vi_block_run.png (image/png) (application/octet-stream)
wrap_my_vi.png (image/png)
wrap_my_vi.png (image/png) (application/octet-stream)
Document generated by Confluence on Jan 27, 2014 16:52