TOELLNER LabVIEW Driver V6.1.x LITE of the Power Supply Series TOE8840, TOE8850 and TOE8870 for LabVIEW V6.1 =================================================================== 1. General """""""""" The functions of the TOELLNER VIs (VI = Virtual Instrument) present in the LabVIEW drivers are based on the command structure described in detail in the Instruction Manual for the TOE8840, TOE8850 and TOE8870 series DC power supplies. For the drivers described below, the abbreviation TOE88xx is sometimes used for the designations TOE8841, TOE8842, TOE8851, TOE8852, TOE 8871 and TOE8872. The LabVIEW driver TOE88xx represents the software interface between the computer, LabVIEW and power supply via the GPIB bus according to IEEE488.1 or via the RS232 interface. The driver is designed analogous to the regulations specified by National Instruments (NI). The interface card or the serial port of the computer must be correctly configured prior to operation of the TOE8840 and TOE8850 series power supplies. Routines from the driver can then be incorporated into a new application, or the example TOE88xx LITE V6.1.x (TOE88xx represents the type of power supply and Vx.x.x the version No., e.g. TOE8852 LITE V6.1.0) can be executed. 1.1 Introduction ---------------- The LabVIEW TOE8852 VIs are described as an example in this Instruction Manual. The differences to the device VIs are described separately in the explanations for the associated VIs. The general VIs belonging to the scope of delivery of the LabVIEW are not considered in this Manual. The variables of the individual VIs are displayed if the LabVIEW help is switched on. The default settings of the VI are used if one of these connections is not assigned. 1.2 Configuration of GPIB Interface Card ---------------------------------------- If the power supply is operated via the GPIB bus, the NI interface card must first be configured, using the supplementary program "WIBConf" or "Win Interactive Control" of LabVIEW. An example of a correct setting is listed below on the basis of the NI interface card PC II/IIA: Controller Setting Primary GPIB Address 0 Secondary GPIB Address NONE Timeout setting 3sec Terminate Read on EOS Yes Set EOI with EOS on Writes Yes Type of compare on EOS 7-Bit EOS byte 0Ah Send EOI at end of Write Yes System Controller Yes Assert REN when SC Yes Enable Auto Serial Polling Yes Enable CIC Protocol No Bus Timing 2æsec Parallel Poll Duration Default Use this GPIB interface Yes Board Type PC IIA Base I/O Address 02E1h DMA Channel 1 Interrupt Level 7 The following setting should be selected for the connected power supply under the corresponding device address (default value for the power supplies is address 9): Device Setting Primary GPIB Address 9 Secondary GPIB Address NONE Timeout setting 3sec Serial Poll Timeout 3sec Terminate Read on EOS Yes Set EOI with EOS on Writes Yes Type of compare on EOS 7-Bit EOS byte 0Ah Send EOI at end of Write Yes Enable Repeat Addressing Yes 2. Virtual Instruments (VIs) """""""""""""""""""""""""""" 2.1 Design of VIs in the Driver ------------------------------- All VIs have an analog design. The VIs have input and output variables. The most important variables are the "Error variable" and the "Instrument handle variable". Both variables are looped through every VI. The "Error variable" is used to transfer errors. At the end of the application, these errors can be used for troubleshooting. The "Instrument handle variable" is assigned a number by LabVIEW when passing through the TOE88xx Open.vi. Using this number, LabVIEW can unambiguously identify the addressed device in the individual VIs. The "Instrument handle variable" can also be used e.g. to access a "Global variable" belonging to a device. The "Global variables" are also present in a cluster. The power supply is initialised using the TOE88xx Open.vi. This VI must only be used once throughout the complete program, namely at the beginning in order to address the power supply. 2.2 Summary of all VIs ---------------------- Open, Close and Error Handler VIs In order to permit access to the power supply via the GPIB or RS232 interface, the TOE88xx Open.vi must be called at the beginning of an application. The TOE88xx Close.vi must be called to terminate the program so that the power supply can be released again for local operation. The TOE88xx Get Device.vi belongs to the TOE88xx Open.vi and reads all minimum and maximum values of the voltage and current as well as all further relevant parameters of a power supply using the IEEE488.2 standard commands "*idn?" and "*lrn?". These values are imported as "Global variables" into the TOE NG Global Data.vi, i.e. the fundamental device data are recognised automatically and need not be entered. A memory is reserved in the power supply for error messages. The error VI TOE Error Handler.vi can read these error messages and display them in a dialog box. Power Supply Settings The voltage and current settings on the power supply are carried out using the VIs TOE Voltage.vi and TOE Current.vi. CAUTION: The set voltage and current values are only connected to the output terminals when the power supply is switched to the execute status using the VI TOE STB/EXE.vi. System VIs The VIs TOE Self Test.vi, TOE Reset.vi and TOE Clear Status.vi are executed within the TOE88xx Open.vi when the program is started. These VIs set the power supply to a defined initial status. 3. TOE8840/8850 Power Supply VIs """"""""""""""""""""""""""""""""" 3.1 General Information on the Power Supply VIs ----------------------------------------------- The VIs usually have input and output variables. All variables which are not connected either lead to the action shown in brackets, e.g. "reset (t: yes)" executes the reset function, or the default values set in the VI are used. 3.2 All Power Supply VIs in Detail -------------------------------- Global Variables: TOE NG Global Data.vi The TOE NG Global Data.vi is initialised for the first time in the Open-VI TOE88xx Open.vi. The "Global variables" of the TOE NG Global Data.vi can be subsequently read and processed in all other VIs, and rewritten for subsequent VIs. The "Global variables" permit recognition of the power supply version and provision of this for all VIs. Open Application: TOE88xx Open.vi The TOE88xx Open.vi must be executed at the beginning of each application in order to initialise the power supply. This VI also selects and initialises the GPIB or RS232 interface. If an error occurs in this VI, it is transferred to the following VIs by means of the "error out" string. In addition, the selftest can be executed using the TOE Self Test.vi when the power supply is initialised, and the reset function using the TOE Reset.vi. The TOE88xx Open.vi has one property which deserves particular mention. During the initialisation, the VI uses the TOE88xx Get Device.vi to determine the power supply version, e.g. TOE8851, 16V, 20A. Using the read data, the device parameters are written into the TOE NG Global Data.vi and are subsequently available to all other VIs. These global data are used, for example, to set the maximum voltage and current on the rotary knobs in LabVIEW. CAUTION: The TOE88xx Open.vi automatically switches over the power supply to the SCPI language. Read Power Supply Version: TOE88xx Get Device.vi The TOE88xx Get Device.vi determines the power supply version, e.g. TOE8851, 16V, 20A. Using the read data, the device parameters are written into the TOE NG Global Data.vi. These global data are subsequently available to all other VIs. The Open-VI TOE88xx Open.vi accesses the TOE88xx Get Device.vi during initialisation of the power supply. Close Application: TOE Close.vi The TOE88xx Close.vi must be called to terminate the program so that the power supply can be released again for local operation. Set Voltage: TOE Voltage.vi The voltage is set using the TOE Voltage.vi. The input variable "VOLTAGE" is used to set the voltage value. With dual-output power supplies, it is additionally necessary to assign the input variable "Channel" a value of "1" (default value) or "2" for selection of the output channel. The maximum permissible voltage in each case can be obtained from the TOE NG Global Data.vi. Set Current: TOE Current.vi The current is set using the TOE Current.vi. The input variable "CURRENT" is used to set the current value. With dual-output power supplies, it is additionally necessary to assign the input variable "Channel" a value of "1" (default value) or "2" for selection of the output channel. The maximum permissible current in each case can be obtained from the TOE NG Global Data.vi. Activate Output: TOE STB/EXE.vi The TOE STB/EXE.vi can be used to switch the power supply output to standby or execute. A "true" is transferred to the input variable "STB/EXE" in order to switch the power supply output to execute mode. Measure Voltage and Current: TOE Measure.vi The TOE Measure.vi is used to measure the output voltage present on the terminals or the output current which is currently flowing. The determined values can then be output or processed further. Read Instrument Status: TOE88xx Get Value.vi The TOE88xx Get Value.vi is used to scan the current instrument status. The individual instrument parameters are available as output variables for other VIs. Reset Power Supply Unit: TOE Reset.vi The TOE Reset.vi executes the IEEE488.2 standard command "*rst" with which the power supply is set to a defined initial status (see Instruction Manual). The TOE88xx Open.vi calls the TOE Reset.vi during initialisation if a "true" has been transferred to the input variable "reset" of the Open-VI. Execute Selftest: TOE Self Test.vi The TOE Self Test.vi executes the IEEE488.2 standard command "*tst?" with which a selftest of the power supply is carried out (see Instruction Manual). The error coding of the selftest can be written into the Simple Error Handler.vi if a "true" (default value) has been transferred to the input variable "show dialog box". The TOE88xx Open.vi calls the TOE Self Test.vi during initialisation if a "true" has been transferred to the input variable "self test" of the Open-VI. Reset Power Supply Status: TOE Clear Status.vi The TOE Clear Status.vi executes the IEEE488.2 standard command "*cls" which activates a number of delete operations in the status registers (see Instruction Manual). The TOE88xx Open.vi also calls the TOE Clear Status.vi during initialisation. Wait for Message Available Bit (MAV): TOE MAV.vi The TOE MAV.vi is used to wait for replies from a power supply in GPIB bus mode. The MAV bit is set in the status byte register as soon as the power supply has its reply ready in the output buffer. Error Handler: TOE Error Handler.vi The TOE Error Handler.vi reads the memory reserved in the power supply for error messages. Several errors may have occurred before this VI is called. In order to display all errors, a "true" (default value) must be transferred to the input variable "until error queue empty". The errors can be written into the Simple Error Handler.vi if a "true" (default value) is transferred to the input variable "show dialog box". In the event of an error, the output variable "error out" delivers a "true" and the last error which has occurred if the input variable "produce error out" is "true". If the "produce error out" variable is "false" (default value) or not connected, "error out" does not deliver an error. 4. Programming with LabVIEW Drivers """"""""""""""""""""""""""""""""""" 4.1 Initialisation ------------------ The TOE88xx Open.vi must be called at the beginning of each program. Either the GPIB or RS232 interface which is to be used by the power supply is set there using the "Interface" switch. 4.2 Setting the GPIB Interface ------------------------------ When operating the power supply with the GPIB interface, the device address from 0 to 30 must be passed on to the Open-VI TOE88xx Open.vi using the input variable "GPIB Device". 4.3 Setting the RS232 Interface -------------------------------- When operating the power supply with the RS232 interface, the parameters "serial port", "baud rate", "data bits", "stop bits" and "parity" must be passed on to the Open-VI TOE88xx Open.vi using the input variable "RS232 Settings". These parameters must agree with those set on the power supply. CAUTION: The protocol mode on the power supply must be set to Software protocol.