Updated: 17-Nov-2005 16:08 | ||||||
Analog Output Plug-In Specification |
||||||
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:
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. The 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. The example also contains a VI that can be used to test AOPIs. >>> Under Construction <<< VI Interface PatternThe 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. The 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. The 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 ExplainedSorry for the inconsistent naming ;-) AO Plug-In ParametersThe 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. The settings contained in the AO Plug-In Parameters cluster (type defined):
Update Rate - and Expected FsExpected 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. ClassRarely used... Initialize
DC Offset
ErrorOptional FunctionalityEach 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. |
||||||