LabHelper X    D-A menu
LabHelper
has six active menus available when the program is not busy gathering data.  There is also a Help menu, and three other functions are found in the LabHelper menu at the left of the menu bar.

The 'D-A' menu is for handling the analog voltage outputs for the Sable Systems UI2.  This menu doesn't work for the ADC-1 or the DataTaker, and is not available for the Oscilloscope recording mode.

The Sable UI2 contains two separate analog voltage output (AO) channels (designated 1 and 2), which are independent of each other.  You can use these voltage outputs to automatically adjust any device that is capable of using an externally-applied voltage as a control signal (the range of possible control voltages is 0 V to +5 V in steps of approximately 0.00244 V).  Timing is in units of minutes, and the resolution limit of the timing control system is 0.000278 minutes (1/60 second).

LabHelper X lets you control the analog outputs (and the devices they are attached to) in two ways:

Analog output scripts are timed sequences of output voltages.  Different scripts can be running simultaneously on each of the two AO channels.  What you do with analog output scripts is more or less up to your imagination.  There is an upper limit of 100 steps (but you can also set up a looping structure that will repeat part or all of the sequence).

Another option is feedback control,. The computer reads a value (using the normal acquisition channels) and uses negative feedback principles to adjust a control voltage to an effector (such as a heater, pump, etc.) so as to maintain some user-set condition (or setpoint).  An example would be a thermostat: you specify a desired temperature (the setpoint), and the computer reads the actual temperature and then adjusts a heater (or cooler) appropriately.

Analog output scripts and feedback control can be very useful, but.....

If you want to use the analog voltage output options,
you need to read the following cautions!

The Sable UI2 can only supply a control voltage at very low amperage.  It cannot provide any significant power. Therefore, external devices, unless they run with extremely small current drains, cannot be driven directly by the UI2. Instead, use the UI2's voltage output only as a control or reference voltage for external devices that respond to control inputs in the range of 0 - 5 volts.

 Warning: If you connect ANY external device to a computer, the responsibility for safe operation is yours, and yours aloneThere are NO guarantees or warranties associated with Warthog systems, and I and the University of California accept no liability of any kind for the use of this software.

Top of page

  •   Analog output scripts let you program timed sequences of analog output voltages ("scripts") from either of the two analog output channels on National Instruments cards.  These can be used to control any instrument or other external device that responds to voltages (0-5 volt range).  You can program two separate scripts, one for each channel, that run simultaneously and independently (but you cannot use channel 2 for both output scripts and feedback control at the same time).  There are separate (but identical) menu selections for setting up scripts for each of the two AO channels ("Analog out #1 script" and "Analog out #2 script").

    • Remember that the outputs can supply low-current control voltages only

    Each AO script can contain up to 100 steps.  For each step you need to specify:

    • the output voltage, which may be constant or 'ramped' (gradually changing between the starting and ending values). 
    • the duration of the step (any duration may be entered in the edit field, but time is measured in units of 1/60 second so no step can be shorter than this). 

    When these data are entered, press the 'add step' button to append the step to the script.  As steps are added or modified, the computer shows a graphical display of the current script, including the total number of steps and the cumulative time (see example below).

    For the script as a whole, you need to set:

    • the starting condition (when the script sequence starts: at the first sample, at the first marker, or at marker 's'). 
    • the ending condition (when the script sequence stops: at the end of the script sequence, at marker 'x', or at marker 'q').  AO script sequences can come to an end end in several different ways.  If a loop exists, the script will run indefinitely until data gathering ceases, unless the operator intervenes and stops the sequence.  Alternately, if a script doesn't contain a loop, it will simply end after all the steps have been completed -- again, the operator can stop the sequence manually. 
    • the pre-run volts (the voltage output before the script starts).  This voltage normally appears when data acquisition starts, but you can switch it on immediately by clicking the 'switch to pre-run value' button, which sends the value in the 'pre-run volts' edit field directly to the voltage output port. 
    • the post-run volts (the voltage level after the script stops).  If you use the 'keep existing voltage' option for the end of script condition, the computer will maintain whatever voltage was present when the script ended.  Because you can stop a script at any point ('x' or 'q' keys; see above), This is less predictable than the alternative 'set volts to' option, which always ends the script with the same voltage. 

    Top of page

    Scripts may loop back upon themselves, in which case they will run indefinitely unless interrupted by an ending condition or by the conclusion of sampling.  A loop can return to any step in the script.

    You may modify a script by editing any step ('update' button), appending new steps ('add step' button), inserting new steps into the middle of the sequence ('insert' buttons), removing any step ('delete' button), or removing the entire script ('clear' button).

    You can store and retrieve output scripts using the Open and Save selections in the D-A menu.

    • CAUTION:  using analog outputs may slightly reduce the maximum possible sampling rate.  At less than maximal rates, it has little or no effect on acquisition speed. 

    The AO script setup window looks like this example:

    This script (for output channel 1) contains 8 steps lasting a total of 10 minutes.  Ramped outputs occur in steps 2, 5, and 7.  At the end of the sequence, a loop returns control to the first step.  The script sequence will terminate if the "x" key is struck.  It will start when the "s" key is struck (this is shown being selected from the pop-up menus in the upper right corner of the window).  The pre-run voltage is zero and the post-run condition (when the "x" key is struck or data gathering ceases) is to switch to a value of 0.44 volts.

    Top of page

  •    The Feedback control option (channel 2 only) lets you use the principle of negative feedback to control an external variable (such as temperature, flow rate, etc.).  The computer reads an input channel to get the current condition of the variable, compares it to a user-defined setpoint, and adjusts the output voltage to the effector (a device -- such as a heater or flow control valve -- that influences the variable of interest).  Note that the current condition and the setpoint are in converted units (degrees C, ml/min, etc.) -- not 'raw' voltages.

    The main advantage of using the feedback control routines is flexibility and precision: you can specify a series of setpoints (up to 100) that occur at different times.  This allows pre-programmed control of complex experimental conditions.  It also helps insure that identical protocols are used in repeated experiments, which is critical in maintaining consistency.

     However, you need to remember that feedback control is abolished when LabHelper is not running. More importantly, if the computer is unattended and a malfunction occurs, the feedback mechanism will fail, leaving the effector in an unpredictable condition.  In some circumstances this could have very serious consequences. For example, you don't want to leave a high-wattage heating unit in an unregulated condition unless you are willing to risk overheating or even a fire. 

    Accordingly, feedback control should always be used with caution, and whenever possible, with safety back-ups that are independent of the computer (for example, thermal cut-offs for emergency temperature control).

    Two additional caveats to keep in mind:

    • The feedback routine uses analog output channel 2; you cannot use this channel for feedback control and a voltage output script simultaneously (you'll get a warning message if such a conflict exists). 
    • The computer can supply a low-current control voltage only. 

    Top of page

    To set up a feedback control system, you need to tell the computer what's being regulated and how it should handle the regulation.  As you enter data, the script is shown graphically (see the example below).  For the script as a whole, you need to set:

    • The slope of the feedback system (negative or positive).  Note that a positive slope does not indicate positive feedback.  It simply means that the signal to the effector must increase when the regulated variable exceeds setpoint.  For example, the output of a cooling unit must increase if temperature is above setpoint, and this would require a positive slope setting (in contrast, the output of a heater must increase if temperature is below setpoint, and this would require a negative slope setting). 
    • the regulated channel (the input channel that shows the current condition of the regulated variable)
    • the ending condition (at the end of the script sequence, at marker 'x', etc.)
    • the post-run setpoint (the setpoint after the script stops).  Click the 'enter values as the end state' button to set the post-run conditions equal to the currently visible data.  At any time you can click the 'show' button to view the post-run conditions. 
    • the 'update interval', or how frequently the program checks and updates feedback control.  This interval can range from 0.25 to 30 seconds and is selected from the pop-up menu at the bottom of the window. 
    • Feedback scripts may loop back upon themselves, in which case they will run indefinitely unless interrupted by an ending condition or by the conclusion of sampling.  A loop can return to any step in the script using the 'loop to step' button. 

    For each step you need to specify:

    • the setpoint and precision (± range) for the variable of interest
    • the maximum control voltage (the highest voltage that should be presented to the effector; 0 to 5 volts)
    • the minimum control voltage (the lowest voltage that should be presented to the effector; 0 to 5 volts)
    • the duration of the step (any duration may be entered, but time is measured in units of 1/60 second so no step can be shorter than this). 

    When these data are entered, press the 'enter these values as a new step' button to append the step to the script.  As steps are added or modified, the computer shows a graphical display of the current script.

    You can modify a feedback script by first indicating the step to be changed ('edit step' button).  You can then edit the step (by changing the setpoint, etc.  and then clicking the 'modify as above' button) or remove the step ('delete' button).  You can also remove the entire script ('clear' button).

    You can store and retrieve output scripts using the Open and Save selections in the D-A menu.

    • CAUTION:  using feedback may slightly reduce the maximum possible sampling rate.  At less than maximal rates, it has little or no effect on acquisition speed. 

    Top of page

    A typical feedback setup is shown here:

    In this example, we are using negative-slope feedback to control temperature (channel 4).  This means that as temperature falls below the setpoint, an increasing control voltage is sent to the effector (here, a heater).

    The feedback script contains series of decreasing temperature setpoints, starting at 20 C and eventually declining to -6 C before returning to 15 C.  Each setpoint is maintained for several minutes and has a precision of ± 1 C and a regulatory voltage range of 0 to 5 volts.  This means that when the temperature is exactly equal to (or higher than) the setpoint, a control signal of 0 volts will be sent to the effector.  As temperature falls below setpoint, the control voltage to the effector increases.  When temperature is more than 1 C below setpoint, the maximum control voltage (5 volts) is sent to the effector.

    This script loops back to step 2 at the conclusion of the last step (step 6); it will stop when the 'q' key is struck.  When not gathering data, LabHelper X will check and update the feedback condition every second.

  •    OPEN AO DATA...     Loads a stored script file into memory.  After loading the script, the program checks to see if a script sequence exists for either of the AO channels.  If a script does exist, that channel's menu selection is highlighted with a check-mark.

  •    SAVE AO DATA...     Saves an existing script file to disk (these files have special icons, shown at right; these icons may appear different depending on which version of OS X is in use).  The saved file contains complete data for both AO channels and for feedback control.


    go to: