Analog Output Plug-In Specification

Mr Kick Home

The idea behind Analog Output Plug-Ins (AOPIs) is to allow the user or programmer to extend the analog output capabilities of Mr Kick without the need of updating the programme itself. This document will give the background for developing AOPIs.

A plug-in is really a set of two VIs (LabVIEW Virtual Instruments), a user-interface and a pattern generator. The two VIs share filename as follows:

  • User-interface: AOPIname Setup.vi
  • Pattern Generator: AOPIname.pi

Where AOPIname is the name of the plug-in. Note the different extensions, vi and pi. When you load an AOPI into Mr Kick you can choose from the pi-files.

AOPI Ramp-Hold-Ramp SetUpThe related Setup.vi-file must exist in the same folder and will be loaded automatically.

Both VIs can use sub-VIs (which must be available at load-time). All VIs must be developed in the same version of LabVIEW as Mr Kick.

An example AOPI is available here. This set of VIs will serve as illustration in the following. It is equivalent to the Ramp-Hold-Ramp plug-in.

AOPI Test IconThe example also contains a VI that can be used to test AOPIs.

>>> Under Construction <<<


VI Interface Pattern

The VIs are called dynamically from Mr Kick by use of the call by reference method. They must comply with a specific interface pattern as descibed below. Parameters and data types are explained later.

AOPI Template Set - RHR Setup.viThe user interface (vi)

The user-interface VI is called when the user wants to change settings, ie. prior to data acquisition. It has five inputs and two outputs.


AOPI Template Set - RHR.piThe pattern generator (pi)

The pattern generator VI is called during acquisiton, when Mr Kick prepares to acquire a new sweep.

The generated pattern (maybe superimposed with another pattern) is output on the analog output of the board; synchronized to acquisition of the sweep.

The VI has two inputs and three outputs.

Parameters Explained

Sorry for the inconsistent naming ;-)

AO Plug-In Parameters

The AO Plug-In Parameter List In/Out, Default Parameters and General Parameters are based on this set of parameters (settings) contained in a single cluster.

The AO Plug-In Parameter Lists contain settings for each defined class forming 2D arrays. Each element in addition contains a parameter, called Active, indicating if the plug-in is to be applied in the given class.

AO Plug-In Parameter clusterThe settings contained in the AO Plug-In Parameters cluster (type defined):

  • Amplitude: Amplitude of the analog output pattern. Scaling is applied by Mr Kick as specified under analog output settings.
  • Delay: Time in seconds from trigger to start of pattern generation.
  • Repetitions: The number of times the pattern should be repeated.
  • Parameters: A 1D array of SGL that can contain any number of parameters of your choice.
  • Data: A 1D array of SGL that can contain any number of data points.
  • String: A string that can be used for text or any complex data-structure flattened to string.

Update Rate - and Expected Fs

Expected Fs is the update rate as set at the time when the user edits the settings. Update Rate is the real update rate when the pattern is applied.

Class

Rarely used...

Initialize

 

DC Offset

 

Error

Optional

Functionality

Each of the VIs must offer a minimum of functionality as explained hereafter. The user-interface may offer additional services to the user.

The user interface (vi)

Settings can differ from class to class. They are contained in a 2D array (list) - supplied to the VI when called, and the edited list is returned by the VI. It is strongly recommended to include a Cancel-option. If the user chooses to cancel editing the VI must return the original 2D array.

The pattern generator (pi)

Generates the pattern based on the General Parameters and actual Update Rate. If the pattern requires a DC offset (in addition to the offset specified by the user in the general Analog Output settings), then it should be returned through the DC Offset output and it will be applied to the analog output before acquisition of a sweep.

Top - Menu