<<

GT7400 Programmable DC Power Supply

User’s Guide

GEOTEST

MARVIN TEST SYSTEMS, INC. 2851 SOUTH PULLMAN STREET

IRVINE, 92705-5713

Revision 2

Part No. GT97608

Preface i

Safety and Handling

Each product shipped by Geotest is carefully inspected and tested prior to shipping. The shipping carton provides protection for shipment and can be used to store both hardware and . The power supply is extremely delicate and requires care in handling and installation. Do not remo ve the power supply from its protective shipping carton or plastic covering until you are ready to install it. If the power supply is removed from the computer for any reason, be sure to store it in its original shipping carton. Do not store the power supply on a workbench or anywhere it can be dropped or subjected to strong electromagnetic or electrostatic fields. It is good practice to store the power supply in a protective, anti-electrostatic wrapper away from electromagnetic fields. Make a single backup copy of the software diskette and store the original in a place safe from heat or electromagnetic or electrostatic fields.

Warranty

Geotest’s products are warranted against defects in materials and workmanship for a period of 12 months (6 months for software products). Geotest shall repair or replace (at Geotest’s discretion) any defective product during the stated warranty period. The software warranty includes any upgrades released during the warranty period. If you need to return the power supply, please call 949-263-2222 for an RMA number.

If You Need Help

If you need help at any time with the installation or use of this product, call Geotest technical support at 949-263-2222. In addition, you may get updated product information and drivers from our Internet Web Site at www.geotestinc.com.

ii GT7400 User’s Guide Disclaimer

Geotest products are not intended for medical use, including certification, calibration or testing of medical instruments or devices. In no event shall Geotest or any of its representatives be liable for any consequential damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other loss) arising out of the use of or inability to use this product, even if Geotest has been advised of the possibility for such damages.

Copyright

Copyright Ó 1996-1999 by Geotest, Marvin Test Systems, Inc. All rights reserved. No part of this document may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of Geotest.

Trademarks

386, 486, Pentium Intel Corporation ATEasy, GTXI Geotest – MTS, Inc. Borland ++ and Borland Corporation IBM or IBM-PC/AT International Business Machines Corp. (IBM). Developer Studio Microsoft Corporation Microsoft Visual Basic Microsoft Corporation Microsoft Visual C++ Microsoft Corporation MS-DOS Microsoft Corporation Windows 3.1, Windows 95, Microsoft Corporation Windows 98 and Windows NT LabView National Instruments

Table of Contents iii

Table of Contents

Safety and Handling...... i Warranty...... i If You Need Help ...... i Disclaimer...... ii Copyright ...... ii Trademarks ...... ii Chapter 1 - Introduction...... 1

About this Manual...... 1 Scope and Organization...... 1 Conventions Used in This Manual...... 2 Technical Support...... 3 General Information...... 3 Internet Home Page Download Area ...... 3 Calibration ...... 3 Geotest Address and Telephone Numbers ...... 3 Chapter 2 – Overview ...... 5

Introduction...... 5 Features ...... 6 Architecture ...... 7 Block Diagram...... 7 GTXI Interface and Power Supply Control ...... 7 Power Conditioning Unit ...... 8 Software ...... 8 Virtual Panel...... 8 iv GT7400 User’s Guide Function Library ...... 9 Programming Example ...... 10 Chapter 3 – Setup and Installation ...... 11

Introduction...... 11 Packing List...... 11 System Requirements...... 11 Unpacking and Inspection...... 11 Discharge Static Electricity...... 12 Setting the I/O Address...... 13 Power Supply Installation ...... 15 Software Installation ...... 15 Installation Under Windows ...... 15 Windows NT Kernel Mode Driver Installation ...... 16 Installing Under DOS...... 17 Overview of GTPS Files...... 18 Driver Files ...... 18 Example Programs ...... 20 Distributing the Software ...... 22 Chapter 4 – Using the Virtual Panel...... 23

Introduction...... 23 Opening the Panel...... 23 Initializing ...... 24 Displaying Channels ...... 25 Setting a Channel’s Voltage...... 25 Setting a Channel’s Current Limit ...... 25 Setting Channels to On or Standby...... 26

Table of Contents v Storing Values to EEPROM ...... 26 Recalling Values from EEPROM ...... 26 Resetting the Power Supply ...... 26 Closing the Virtual Panel ...... 26 Chapter 5 – Programming the Power Supply ...... 27

Introduction...... 27 Windows 95/98/NT, Windows 3.1 and DOS Drivers ...... 28 Import Libraries ...... 28 Using the DLL Driver with Windows NT ...... 29 How Does the HW Driver Work? ...... 29 Using the Windows 32-bit DLL...... 30 Using the Windows 16-bit DLL...... 31 Programming with the DOS Static Library ...... 31 Supported Development Tools ...... 31 Programming with C/C++ Tools ...... 32 Programming with Visual Basic ...... 32 Programming with Borland Pascal/Delphi...... 32 Programming with ATEasy 2.0 ...... 33 Programming with the Driver...... 33 Initialization and the Power Supply Handle ...... 34 Power Supply Handles...... 34 Reset ...... 34 Error Handling ...... 35 Driver Version...... 35 Virtual Panel...... 35 Programming Example ...... 35

vi GT7400 User’s Guide Compiling the Example ...... 36 MAK Files...... 37 Example Program Listing...... 39 Chapter 6 – Functions Reference...... 45

Introduction...... 45 Parameter Prefix Names ...... 46 Common Parameters ...... 47 Functions by Category ...... 48 GtPsGetCurrent...... 50 GtPsGetCurrentLimit ...... 54 GtPsGetDriverSummary ...... 56 GtPsGetErrorString ...... 58 GtPsGetStandby...... 59 GtPsGetState...... 60 GtPsGetType ...... 61 GtPsGetVoltage...... 63 GtPsInitialize ...... 65 GtPsPanel...... 67 GtPsReset...... 69 GtPsSetCurrentLimit ...... 70 GtPsSetStandby...... 74 GtPsSetVoltage ...... 76 Appendix A - Error Codes...... 79

Information codes ...... 79 Resource Errors ...... 79 Parameter Errors ...... 79

Table of Contents vii Board Errors (Fatal) ...... 80 Miscellaneous Errors ...... 80 Appendix B – Specifications...... 79

General ...... 81 Outputs ...... 81 Input Power ...... 82 Protection Circuitry ...... 82 Physical...... 83 Index ...... 85

viii GT7400 User’s Guide

Chapter 1 - Introduction 1

Chapter 1 - Introduction

About this Manual

This GT7400 User’s Guide provides all the information needed to install, program, and use Geotest’s GT7400 power supply. This manual assumes that the user has a general knowledge of PC-based computers, Windows 3.1/95/98/NT operating systems and an electronics background. Some knowledge of programming and development tools will permit computer program control of the power supply.

Scope and Organization

This manual is organized as follows: Chapter Content Chapter 1 Introduces this GT7400 User’s Guide. Chapter 2 Summarizes power supply features, architecture, hardware and software. Chapter 3 Furnishes step-by-step directions for installing and setting up the hardware and GTPS software. Chapter 4 Provides instructions for using the Virtual Panel. Chapter 5 Presents details on how to program the power supply by using the supplied driver and example files. Chapter 6 Contains an alphabetical list of driver functions including syntax, variables, programming comments and samples. Appendix A A reference for GTPS driver error codes. Appendix B Summarizes GT7400 specifications. Index A keyword list of important topics and concepts in this manual.

2 GT7400 User’s Guide Conventions Used in This Manual

Naming conventions used throughout this manual are: Example Description

Copy or Paste Commands are indicated in bold type. Shift+F1 Keys are often used in combinations. The example to the left instructs the user to hold down the shift key while pressing the FI key at the same time. When key combination instructions are separated by commas, such as ALT+D, A, hold the ALT key while pressing D, then press A.

Direction Keys Refer to the up arrow (•), down arrow (¯), right arrow (®), and left arrow (¬) keys. cd bold Bolded text must be entered from the keyboard exactly as shown. cd directory name Italicized text is a placeholder for variables or other items that the user must define and enter from the keyboard. examples Examples and source code are indicated in Courier, a fixed pitch font.

0xhexnumber An integer in hexadecimal notation, E.g., 0x10A equals 266 in decimal.

Chapter 1 - Introduction 3

Technical Support

General Information

Geotest provides both pre-sales and post-sales technical support for all products. Our Technical Support engineers can help you select hardware and software for your application, understand the specifications, and assist you in designing a complete system. Call our Technical Support department from 8:30AM to 5:30PM Pacific Standard Time (PST). Call 949-263-2222 or send email to [email protected].

Internet Home Page Download Area

Use Geotest’s Internet download area to obtain new instrument drivers, application notes, and other valuable resource information for the power supply. Our Internet address is: www.geotestinc.com

Calibration

Geotest offers calibration services for some measurement instrumentation. For more information, please contact Geotest Technical Support at 949-263-2222.

Geotest Address and Telephone Numbers

Geotest – Marvin Test Systems, Inc. 2851 S. Pullman Street Santa Ana, CA 92705 Phone: 949-263-2222 Fax: 949-263-1203 Email (sales): [email protected] Email (support): [email protected]

4 GT7400 User’s Guide

Chapter 2 – Overview 5

Chapter 2 – Overview

Introduction

The GT7400 is a triple-output, programmable DC power supply designed for use in the GTXI Instrumentation chassis series. It provides power for a unit under test (UUT) and is fully integrated with other ATE tools. The GT7400 occupies two slots of the GT7700/GTXI-700 and is controlled via an ISA bus. AC power is provided using a panel-mounted receptacle. The outputs are fully isolated and can be connected in series externally to provide higher voltage. Two outputs are programmable, while the third is a fixed DC power supply module that can be configured from a selection of five offered by Geotest. The GT7400 has been designed to interface with worldwide AC mains. The GT7400 is the sub-chassis containing the ISA interface and power conversion electronics. It includes an input power switch for selecting 115VAC or 230VAC input voltages. Power is provided by up to three independent and isolated output channels. The sub- chassis provides space for the three (two programmable and one fixed) output modules. The programmable modules are rated up to 150W. Available voltage levels are 0 to 30 V @ 5 amps and 0 to 60 V @ 2.5 amps. They have the added advantage of a constant power operating envelope, thereby providing higher currents at lower operating voltages. Programmable current limits, programmable isolation relays, over-voltage and over-current, and remote sense, are standard for each of the channels. Channel 3 provides a configurable fixed DC output level rated up to 100W. Available voltage levels are 3.3VDC @ 10A, 5VDC @ 10A, ±12VDC (dual outputs) @ 8.4A, ±15VDC (dual outputs) @ 7.6A and 28VDC @ 3.6A. Outputs are routed through an on-board isolation relay and include remote sensing capability.

6 GT7400 User’s Guide

An illustration of the power supply is shown below: The GT7400 may be operated from either 115VAC or 230VAC input mains selected via a side-mounted selection switch. This switch must be set to the proper operating voltage to prevent damage to the instrument. The GT7400 plugs into Geotest’s GTXI chassis and is controlled via the GTXI bus by the system controller. The GT7400 receives input AC line power from a connector on the front panel. A DC output connector for the UUT is also located on the front of the module, along with an On/Off switch. The GT7400 is fully enclosed and shielded.

Features

· Two (user defined) programmable outputs · One fixed output Figure 2-1: GT7400 Power Supply · 115VAC or 230VAC Input (switch selectable) · Conveniently located AC Input, DC Output and Power Switch on the front panel

· Read back actual voltage and current at output (programmable output only) · Over-voltage and over-current protection · Over-temperature and short circuit protection · Remote inhibit via front panel output connector · Isolated power outputs

Chapter 2 – Overview 7 Architecture

Block Diagram

The figure below shows a block diagram of the GT7400. The GT7400 consists of a dual slot GTXI unit housing the GTXI bus interface, power conditioning and rectification circuitry and power conversion stages. The GT7400 utilizes GTXI power for the GTXI bus interface and AC line power for all other needs.

Power Conditioning AC IN Unit

Current & Module Voltage DC OUT #1 DATA Readout Current & Module Voltage DC OUT ADDR #2 Readout UUT GTXI Opto Interface isolation Module DC OUT Cntrl #3 GTXI BUS Status A/D & Status Display

Figure 2-2: The GT7400 Block Diagram

GTXI Interface and Power Supply Control

The GT7400 power supply control consists of the GTXI bus interface and the power supply control logic. The GTXI bus interface consists of buffers, a decoder and registers. The GTXI bus interface uses the bus signals required for communication with the system controller, including address lines, data lines, read/write and status lines. These signals are buffered and then used to decode access to read and write the registers. Regis ters can be read back at any time. The power supply control is isolated from the GTXI bus through opto-isolators. A power on signal is output by the interface board to the GTXI bus whenever the external AC line power switch is on. The GTXI interface board has an on-board non-volatile RAM (EEPROM) for storing calibration. Each module is controlled by

8 GT7400 User’s Guide dedicated logic, which handles the A/D and D/A unit and control/protection of the module.

Power Conditioning Unit

The 115/230V AC line voltage is converted to DC voltage by a power conditioning unit. The power conditioning unit accommodates up to three power modules. Power modules are completely isolated from each other, from the line input, and from the controlling logic, and communicate with the power supply control through a bi-directional serial link. Protection circuits protect against over-voltage, over-current, over-temperature and shorted output lines. The available power modules are described in detail in Appendix B, “Specifications.”

Software

The GT7400 software module, also referred to as the GTPS module, includes the following:

· Function Library · Virtual Panel · Programming Examples · Windows Help File · Installation and Setup utility.

Virtual Panel

The GTPS DLL driver includes a front panel program that provides access to all configuration and control modes.

Chapter 2 – Overview 9 This Virtual Panel (Figure 2-3) interactively sets up and programs the GT7400 power supply. This functionality is provided by the DLL driver, GtPsPanel, and a stand-alone executable file, Gtpsp16.exe and Gtpsp32.exe.

Figure 2-3: GT7400 Virtual Panel

Function Library

This part of the module contains functions that perform the following: · Initializing the board and retrieving the board handle. · Resetting the power supply to the default state.. · Setting, controlling or retrieving power supply parameters. The drivers provided are in various formats to support different operating systems and development tools. Drivers are supplied in three formats: · Windows 16-bit DLL. Used by Windows 3.x applications. · Windows 32-bit DLL. Used by Windows 95-, 98-, and NT- based applications. · DOS Static Library. Used by DOS-based applications. Exported functions are declared using Pascal calling conventions to provide access from various development tools. Interface files and

10 GT7400 User’s Guide examples are provided for various development tools and programming languages, such as C/C++, VB, Pascal, Borland, and Geotest’s ATEasy.

Programming Example

The example in Chapter 5 demonstrates how to program the power supply with the supplied driver. The example is provided in various formats to demonstrate the use of different development tools and operating systems. Complete discussions of the Virtual Panel, files, drivers, examples, and Function Library are contained in chapters Four, Five and Six.

Chapter 3 – Setup and Installation 11

Chapter 3 – Setup and Installation

Introduction

This chapter describes how to install the GT7400 power supply and software module referred to as GTPS. This product consists of both the power supply and the software module.

Packing List

This package includes one each: · GT7400 User’s Guide · GTPS/GT7400 Driver Disk · GT7400 Programmable DC Power Supply · Any optional purchased modules

System Requirements

The GT7400 power supply is designed to run in two slots of a GT7700/GTXI-700.

Unpacking and Inspection

Caution: Static-sensitive devices are present. Ground yourself to discharge static.

1. Remove the power supply from the static bag by handling only the metal portions.

2. Check the contents of the shipping carton to verify that all of the items found in it match the packing list.

12 GT7400 User’s Guide

3. Inspect the power supply for possible damage. If there is any sign of damage, return the power supply immediately. Please refer to the warranty information at the beginning of this manual.

Discharge Static Electricity

To reduce the risk of damaging the GT7400, observe the following precautions:

· Leave the power supply in the anti-static bag until you install it. The anti-static bag protects the power supply from harmful static electricity. · Save the anti-static bag in case the power supply is removed from the computer in the future. · Carefully unpack and install the power supply. Do not drop the power supply or handle it roughly.

Caution: Turn off the GTXI power before attempting installation. Do not attempt to insert or remove the power supply with the GTXI power on.

Chapter 3 – Setup and Installation 13

Setting the I/O Address

The GT7400 I/O address is set as a four part hexadecimal (hex) number. Physically, two 8-bit DIP switch assemblies, SW1 and SW2, are used. Each switch sets two hex digits. Looking at the switch from the board edge, SW1, on the left, sets the most significant digits.

Note: When setting addresses, use numbers displayed on the board, not the numbers on the switch faces. The factory-set (default) I/O address is 0x1300. This can be changed in steps of 8. Therefore the next possible higher address is 0x1308 and the next lower address is 0x12F8.

Note: Record any new I/O address for use when setting up the GTPS software. There are 16 address bus lines, A0 – A15. Positions A0 – A2 are not settable and fixed at logical zero. The settable positions are marked 3 – 15 on the board. These four hex digits map as follows: Digit 3: A12 – A15, range 0-F. Most significant digit. Digit 2: A8 – A11, range 0-F. Digit 1: A4 – A7, range 0-F. Digit 0: A3, can be 0 or 8 only. Least significant digit. Table 3-1 maps switch positions to a broad range of I/O addresses a digit at a time. For example, the switch position for default address 0x1300 can be easily set up using Table 3-1: Hex Digit Switch Settings (OFF = 1, ON = 0) Digit 3 = 1 OFFÅA12; ONÅA13 - A15 Digit 2 = 3 OFFÅA8, A9; ONÅA10, A11 Digit 1 = 0 ONÅA4 - A7 Digit 0 = 0 ONÅA3 The above hex digits are highlighted in gray in the table.

14 GT7400 User’s Guide To change the default I/O address to 0x1310, first power down the ISA bus and remove the GT7400 board. Then flip switch A4 to OFF. That changes Digit 1 from 0 to 1 (0x1310 instead of 0x1300). Switch on the ISA power bus and change the I/O address in the GTPS software. (See the “Software Installation” topic below).

A15 A14 A13 A12 Digit 3

A11 A10 A9 A8 Digit 2 HEX

DIGIT A7 A6 A5 A4 Digit 1

A3 NU NU NU Digit 0 0 ON ON ON ON 1 ON ON ON OFF 2 ON ON OFF ON 3 ON ON OFF OFF 4 ON OFF ON ON 5 ON OFF ON OFF 6 ON OFF OFF ON 7 ON OFF OFF OFF 8 OFF ON ON ON 9 OFF ON ON OFF A OFF ON OFF ON B OFF ON OFF OFF C OFF OFF ON ON D OFF OFF ON OFF E OFF OFF OFF ON F OFF OFF OFF OFF

Table 3-1: I/O Address Settings by Hex Digit

Note: Under Windows NT, hardware drivers trap I/O addresses between 0x100 - 0xFFFE, excluding 0x3BB - 0x3BF.

Chapter 3 – Setup and Installation 15 Power Supply Installation

Warning: Turn off the GTXI (GTXI700 or GT7700) before attempting installation. Do not attempt to insert or remove the power supply while the ISA bus is powered on. keep the power supply in the anti-static bag with which it is shipped until it is ready for installation, and do not break the seal. This greatly reduces the risk of damage from static electricity. Install the GT7400 with properly set I/O address as follows: 1. Power off the GTXI chassis.

2. Allocate two GTXI slots to the GT7400. If a blank panel blocks a vacant slot, remove this panel.

3. Carefully remove the GT7400 power supply from the anti- static bag. Save the anti-static bag for future storage if the power supply is ever removed from the system.

4. Carefully insert the GT7400 power supply into the GTXI slots until it mates with the backplane DIN connector. The front panel should be flush with other GTXI panels.

5. Tighten the top and bottom mounting screws.

6. Connect AC cable to the front panel receptacle.

7. Turn on the GTXI and proceed with software installation.

Software Installation

Installing the GTPS module is straightforward and easy. The software can be installed under Windows (3.x, 95, 98, or NT), or under DOS. Both environments are described in the following sections.

Installation Under Windows

1. Boot the computer and, if running Windows NT, log on as Administrator or with administrator rights.

16 GT7400 User’s Guide Under Windows NT, the Setup program installs the kernel mode driver, HW.SYS. To successfully install the kernel mode driver, you must be logged on as a user with administrator privileges. Note that the kernel mode driver can also be installed manually after the Setup. Please refer to the section “Windows NT Kernel Mode Driver Installation” below.

2. Insert the 3.5-inch diskette into the floppy drive.

3. In Windows 95/98 or NT, click Start and select Run.

In Windows 3.x, select File, Run from Program Manager.

4. In the command line field, enter A:\setup.exe.

5. Type a destination directory if you want to install the software into a directory different from the default, C:\GTPS. The Installation program copies the necessary files to the local hard disk.

Windows NT Kernel Mode Driver Installation

Under Windows NT, the kernel mode device driver, HW.SYS, must be installed and executed before the GTPS driver can be used. Before installing the kernel mode driver, you must be logged on as a user with an administrator privilege. The GTPS Setup program normally installs the kernel mode driver and starts it automatically. However, in the case when the current user is not logged on as an administrator, the kernel mode driver installation will fail. This section exp lains how to install the kernel mode driver manually when the Setup program fails to do so. To manually install the kernel mode driver, do the following: 1. Log on with administrator privileges.

2. Open a Command Prompt window.

3. Change to the installation destination directory by using the CD command (e.g., CD \GTPS).

4. From the command prompt, execute the following command:

Chapter 3 – Setup and Installation 17 HWSETUP –vdd install start If the current working directory is different from the directory where HW.SYS resides, you may specify your own custom path. For Example: HWSETUP –vdd install=a:\start The Setup program installs the driver as a service. The service can be started or stopped from the Windows NT control panel Devices applet. The –vdd switch can be removed from the command if support for 16-bit drivers is not required (only the 32-bit DLL will be used in this case). The Setup program, HWSETUP.EXE, the device driver HW.SYS, the driver library, HWVDD.DLL, and the GTPS driver files may be distributed with an application for the GT7400 power supply. Additional HWSETUP.EXE command line options are available. To display these options, type HWSETUP with no command line options.

Installing Under DOS

The Setup program that is shipped with the GTPS software module disk can only be used from Windows. To install the GTPS module under DOS, manually copy the files in Table 3-2 to the local hard drive.

Filename Purpose README.1ST Text file that includes latest information and changes. GTPS16.BAS Used with Visual Basic for DOS (with minor changes). GTPS16 .PAS Used with (with minor changes). GTPS.H C header file for GT7400 driver functions and constants. GTPSBC.LIB Borland static library for DOS applications. GTPSMS.LIB Microsoft static library for DOS applications. Table 3-2. Files Installed Under DOS

18 GT7400 User’s Guide Overview of GTPS Files

The Setup program installs the GTPS software module including: · Driver Files · Example Programs · Virtual Panel (16-bit and 32-bit) A complete discussion of how to use the files can be found in “Chapter 5 - Programming the Power Supply.”

Driver Files

Tables 3-3 through 3-6 describe the files included in the software.

Filename Purpose GTPSBC.LIB Borland static library for DOS applications GTPSMS.LIB Microsoft static library for DOS applications GTPS16.DLL 16-bit DLL for /Windows 3.x applications CTL3DV2.DLL Supports 3D Controls/Dialogs for GTPS16.DLL GTPS16.LIB 16-bit import library for GTPS16.DLL GTPS32.DLL 32-bit DLL for Windows 95/NT applications GTPS32.LIB 32-bit import library for GTPS32.DLL GTPS32B.LIB 32-bit import library for GTPS32.DLL for Borland applications Table 3-3. GTPS Library Files

Filename Purpose GTPSP16.EXE 16-bit virtual panel for GTPS boards GTPSP32.EXE 32-bit virtual panel for GTPS boards Table 3-4. GTPS Virtual Panel Executable Files

Chapter 3 – Setup and Installation 19

Filename Purpose HW.SYS Windows NT Kernel mode driver for the GTPS32.DLL HWVDD.DLL Windows NT virtual device driver for use with the 16-bit DLL under Windows NT HWSETUP.EXE Setup program to install/uninstall the Windows NT kernel driver HW.SYS HWTEST.EXE Verification program to test the HW.SYS driver installation Table 3-5. GTPS NT Kernel Mode Device Drivers

Filename Purpose GTPS.H C header file for driver functions and constants GTPS16.BAS Visual Basic (16 bit) file that contains 16-bit DLL function and constant declarations GTPS32.BAS Visual Basic (32 bit) file that contains 16-bit DLL function and constant declarations GTPS.INS ATEasy 2.x driver for GT7400 power supply GTPS.PAS Driver for use with Borland Pascal or Delphi Table 3-6. GTPS Interface Files

20 GT7400 User’s Guide

Example Programs

The GTPS software module includes a C source file that is used for all C samples, and a MAK file (IDE file for Borland C++) for each of the following development tools: · DOS Static Library · Microsoft Visual C++ · Borland Static Library (16- and 32-bit DLLs) · ATEasy

The actual samples demonstrate how the resulting output module (executable file) uses the appropriate library and MAK file. Tables 3-7 through 3-11 explain the sample files in the software module.

File Name Description GTPSX32.EXE Output module (executable) GTPSX32.MAK VC++/MS-C Make file GTPSX.C C source file GTPSX.RC Resource file GTPSX.ICO Icon file GTPS32.LIB 32-Bit DLL import LIB Table 3-7. Files Used for Microsoft Visual C 2.0 or above (32-bit Windows application)

Chapter 3 – Setup and Installation 21

File Name Description GTPSX16.EXE Output module (executable) GTPSX16.MAK VC++/MS-C Make file GTPSX.C C source file GTPSX.DEF Module definition file GTPSX.RC Resource file GTPSX.ICO Icon file GTPS16.LIB 16-Bit DLL import Library Table 3-8. Files Used for Microsoft Visual C 1.5 (16-bit Windows application)

File Name Description GTPSXMS.EXE Output module (executable) GTPSXMS.MAK VC++/MS-C Make file GTPSX.C C source file (same source for all samples) GTPSMS.LIB DOS Static Library Table 3-9. Files used with Microsoft C Static Library (DOS Example)

22 GT7400 User’s Guide

File Name Description GTPSBC.IDE Borland C++ 5.0 contains 3 projects: Windows 32, Windows 16 and DOS. GTPSX.C C source file GTPSX.DEF Module definition file GTPSX.RC Resource file GTPSX.ICO Icon file GTPSB32.LIB Borland Static Library GTPSB16.LIB GTPSBC.LIB Table 3-10. Files Used for Borland Sample (DOS, Windows 16- and 32-bit applications)

File Name Description GTPS.PRG GTPS example program GTPS.CFG GTPS.PRG example CFG file GTPS.INS Driver file for ATEasy version 2.x Table 3-11. Files Used for ATEasy Sample

Distributing the Software

The setup program HWSETUP.EXE, the device drivers HW.SYS and HWVDD.DLL, and the GTPS driver files may be distributed with any application that uses the GT7400 power supply.

Chapter 4 – Using the Virtual Panel 23

Chapter 4 – Using the Virtual Panel

Introduction

This chapter provides the for using the GT7400 power supply and the Virtual Instrument Panel. We assume the user has carefully read “Chapter 2 – Overview,” which provides important information on the theory of operation and function for both the GT7400 power supply and the GTPS software module. Other procedures, such as programming the power supply and using supplied drivers and functions, are discussed in Chapters Five and Six of this manual.

Opening the Panel

The GTPS software module includes a DLL for each supported operating system. Depending on the operating system installed on the PC, the Virtual Panel is executed differently. In Windows 95/98/NT, the 32-bit Virtual Panel is executed by clicking the Start button on the taskbar, then highlighting Programs , GTPS, and clicking on GTPS Panel – 32 bit. In Windows 3.x, run the 16-bit Virtual Panel by clicking the GT7400 icon in the GTPS group window in Program Manager. The 16-bit Virtual Panel will also run under Windows 95/98/NT and may be accessed using the Start button, selecting Programs and GTPS, and clicking GTPS Panel – 16 bit.

24 GT7400 User’s Guide Initializing

After GTPSP16.EXE or GTPSP32.EXE is executed, the Virtual Panel appears with all options disabled, as shown below.

Figure 4-1: GT7400 Virtual Panel with Options Disabled

Before any of the options can be selected, the GT7400 power supply must be initialized. To do so, click the Initialize… button. When the Initialize button has been clicked, the following dialog

box appears: Figure 4-2: Entering the Base Address (See Caution)

Type the Base Address that is set on the power supply and click OK. Note that initializing the power supply has no effect on the power supply setting.

Caution: The Base Address (default 0x1300) is set prior to installing the power supply. If the Base Address conflicts with other system hardware, change it. Refer to the section “I/O Address Settings” in Chapter 3 for appropriate switch settings for other I/O addresses.

Chapter 4 – Using the Virtual Panel 25

Figure 4-3: GT7400 Virtual Panel with Options Enabled

When the GT7400 power supply has been successfully initialized, the Virtual Panel appears with all functions and values enabled as displayed in Figure 4-3.

Displaying Channels

The Virtual Panel has a separate section for each of the GT7400’s three channels. To limit the Virtual Panel display to selected channels, click any of the check boxes labeled Channel 1, Channel 2, or Channel 3.

Setting a Channel’s Voltage

To set the voltage for a channel, enter a positive numeric value (nn.nn format) in the Voltage text box for that channel and click Set.

Setting a Channel’s Current Limit

To set the maximum allowable current for a channel, enter a positive numeric value (n.nn format) in the Current Limit text box for that channel and click Set. If the channel’s current exceeds the limit, the channel returns a status of fail.

26 GT7400 User’s Guide Setting Channels to On or Standby

To set a channel to the On state, click the On button for that channel. To set a channel to Standby mode, click the Standby button for that channel.

Storing Values to EEPROM

To store the voltage and current limit for channels 1 and 2, and the On/Standby value for all three channels, to EEPROM, click Store. (Channel 3 is a fixed channel, and its voltage and current limit values cannot be stored.)

Recalling Values from EEPROM

Click Recall to recall the last set of stored values from EEPROM.

Resetting the Power Supply

Click Reset. Resetting the GT7400 sets current limits and voltages in the programmable modules to zero and sets all channels to standby.

Closing the Virtual Panel

Click Close. Closing the virtual panel leaves the power supply settings unchanged.

Chapter 5 – Programming the Power Supply 27

Chapter 5 – Programming the Power Supply

Introduction

This chapter contains information on how to program the GT7400 power supply using the GTPS software package. The GTPS drivers contain functions to initialize, reset, and control the GT7400 power supply. A description of the functions, as well as how and when to use them, is included in this chapter. Chapter Six describes these functions in detail. This chapter also describes how the GTPS driver supports different operating systems and development tools and includes an example showing how to program the GT7400 power supply with the C programming language. Since the driver functions and parameters are identical for all operating systems and development tools, the example can serve as an outline for other programming languages, programming tools, and other GTPS driver formats. The following development tools are supported: · ATEasy

· Borland C++ · Borland Delphi/Pascal · Microsoft Visual Basic (16/32) · Microsoft Visual C++ (16/32/DOS) Refer to the README.1ST file on the installation disk for the latest list of programming languages and development tools that are supported, as well as other example files that are available on the disk.

28 GT7400 User’s Guide

Windows 95/98/NT, Windows 3.1 and DOS Drivers

The GTPS driver file comes in three main formats · 32-Bit MS-Windows DLL (Dynamic Link Library) – GTPS32.DLL - Used by WIN32 application running under Windows 95, 98 and Windows NT. · 16-Bit MS-Windows DLL - GTPS16.DLL - Used by 16-bit Windows application running under Windows 3.x/95/98/NT.

· DOS static libraries – GTPSMS.LIB (Microsoft format) and GTPSBC.LIB (Borland format) - Used by DOS applications that are compiled with Microsoft or Borland development tools. The libraries are compiled in large memory model libraries with floating point emulation.

Import Libraries

The following files should also be used during development with specific applications, as follows: · GTPS16.LIB is the import library for GTPS16.DLL (Microsoft and Borland applications). · GTPS32.LIB is the import library for GTPS32.DLL (Microsoft applications).

· GTPS32B.LIB is the import library for Borland 32-bit applications.

Note: These three import libraries must be linked into the Windows applications just like any other static library. The GTPS.H header file contains prototypes of the GTPS driver functions. It can be included at the beginning of any C/C++ file that makes GTPS function calls.

Chapter 5 – Programming the Power Supply 29

Using the DLL Driver with Windows NT

Under NT, direct access to hardware (e.g. I/O ports) is limited to code that runs in kernel mode. Windows applications (16 or 32-bit) cannot access the hardware because they run in user mode. To access hardware, these applications rely on drivers that reside in kernel mode. The GTPS package has built-in support that overcomes some of the limitations of Windows applications. HW.SYS (kernel-mode device driver) and HWVDD.DLL (virtual device driver) are both installed with the GTPS module. HW.SYS enables any 16-bit or 32-bit Windows application to access the I/O ports. The HWVDD.DLL driver traps any I/O-to-PC port from a Windows 16-bit application and routes these calls to HW.SYS, which then executes the command.

Note: When under NT, the HW drivers will trap any I/O port in the range of 0x100-0xFFFE excluding the range 0x3BB- 0x3BF.

How Does the HW Driver Work?

Figure 5-1 depicts how HW.SYS works. The following steps explain Figure 5-1: 1. Assume a 16-bit Windows application attempts to write to an I/O port.

2. NT traps the I/O port write attempt and routes it to HWVDD.DLL.

3. HWVDD.DLL routes the call to HW.SYS.

4. HW.SYS executes the port I/O (write) instruction and returns. A similar process is executed when reading from a port.

30 GT7400 User’s Guide

Figure 5-1. How the Hardware Driver works

Using the Windows 32-bit DLL

The Windows 32-bit GTPS32.DLL can be used for applications that are developed for Windows 95, 98 or NT. Refer to Chapter 3, “Setup and Installation” for special installation instructions for Windows NT. To use the DLL driver from an application, the DLL must reside in one of the following directories: · Application directory · Windows (e.g., \Windows or \WinNT) · Windows System (e.g., \Windows\System or WinNT\System32)

· One of the directories specified in the PATH statement The GTPS32.DLL file may be distributed with the GT7400 power supply and any associated applications.

Chapter 5 – Programming the Power Supply 31

Note: Under Windows NT, HWVDD.DLL and HW.SYS must be installed before using the 32-bit DLL. Refer to Microsoft’s Windows NT Kernel Mode Driver Installation procedure.

Using the Windows 16-bit DLL

The Windows 16-bit DLL, GTPS16.DLL, is used for writing 16-bit applications that run under Windows 3.1/95/98/NT. To use the DLL driver from an application, the DLL must reside in one of the following directories: · Application directory · Windows directory · Windows System directory · One of the directories specified in the PATH statement The GTPS16.DLL file may be distributed with the GT7400 power supply and any associated applications.

Note: Under Windows NT, HW.SYS must be installed before the 16-bit DLL can be used. See “NT Kernel Mode Driver Installation procedure” on page 16.

Programming with the DOS Static Library

When programming the power supply under DOS, the application must be linked with either GTPSBC.LIB (Borland static library) or GTPSMS.LIB (Microsoft static library). These files are static libraries in which functions reside. The Setup disk contains static libraries for many development tools.

Supported Development Tools

The GTPS driver supports C/C++, Visual Basic, Borland Pascal/Delphi, Geotest ATEasy, and any other language that can use a Windows DLL, such as LabView.

32 GT7400 User’s Guide Programming with C/C++ Tools

The following steps are required to use the GTPS driver with C/C++ development tools: · Include the GTPS.H header file in the C/C++ source file that uses the GTPS function. This header file is used for all driver formats. The file contains function prototypes and constant declarations to be used by the compiler for the application. · For Windows applications, make sure the DLL is installed in the proper directory (see previous sections beginning on page 29 that describe how to use the DLL). · Add the required .LIB file to the project. This can be the import library GTPS32.LIB for 32-bit applications, GTPS32B.LIB for 32-bit applications that use Borland C++, GTPS16.LIB for 16- bit applications, or any of the DOS static libraries for DOS applications. Windows based applications that explicitly load the DLL by calling the Windows LoadLibrary API need not include the .LIB file in the project.

· Add code to call the GTPS as required by the application. · Build the project. · Run, test, and debug the application.

Programming with Visual Basic

GTPS16.BAS and GTPS32.BAS files contain function declarations for the GTPS16.DLL and GTPS32.DLL drivers, respectively. These BAS files must be loaded using Load File from the Visual Basic File menu before the functions can be used.

Programming with Borland Pascal/Delphi

To use the driver with Borland Pascal or Delphi, include GTPS.PAS in the project. The GTPS.PAS file contains a unit with function prototypes for all the 16- and 32-bit DLLs. Include the GTPS unit in the USES statement before making calls to the GTPS functions.

Chapter 5 – Programming the Power Supply 33 Programming with ATEasy 2.0

The ATEasy driver (GTPS.INS) supplied with this product uses the GTPS16.DLL to program the power supply. These files must reside in the ATEasy INS and DLL directories, respectively. To use the driver, the INS, CFG, PRG and 16-bit DLL files must be copied to the appropriate ATEasy directory. The GTPS.INS driver must also be included in the current system configuration file (.CFG) in order to program the power supply. GTPS.INS is also supplied with an example that contains a program and a system file configured with the instrument driver set to the default base address (in the System Editor Driver Setup dialog - module number field). The ATEasy driver contains commands that are similar to the DLL functions in name and parameters, with the following exceptions: · The nHandle parameter is omitted. This parameter is handled automatically by the driver. (ATEasy uses driver logical names). · The nStatus parameter is omitted. Use the Get Status commands instead to check status. The ATEasy driver also contains additional commands to permit easier access to the GT7400 power supply features (instead of typing parameter values). The commands are self-documenting. Their syntax is similar to English sentences and can be generated from the program editor in the Instruments menu. GTPS.INS is documented in the ATEasy Notes dialog, which can be viewed from the Driver Editor Summary contained within the Edit menu. In addition, more detailed documentation exists in the ATEasy knowledge base, ATEASYKB.HLP, that is shipped with ATEasy. The GTPS Setup program updates the ATEasy directory with the new DLL-based driver and example files.

Programming with the Driver

The GTPS driver contains a set of functions that initialize the power supply driver, reset the power supply, and display the instrument

34 GT7400 User’s Guide virtual panel. In addition, the GTPS driver uses handles (see below) to access the GT7400 power supply and process errors. The following paragraphs describe the steps and topics that are required to control the power supply.

Initialization and the Power Supply Handle

The GtPsInitialize function initializes the driver for the power supply at the specified base address. The function returns a handle that must be used later when calling other functions to program the power supply. This handle is usually saved in the program as a global variable for later use when calling other functions. The initialize function does not change the state of the power supply.

Power Supply Handles

The power supply handle parameter - nHandle - is a short integer number that is used by the GTPS driver functions to identify the power supply being accessed by the application. The nHandle parameter is required to identify the power supply being programmed. nHandle is created when the application calls the GtPsInitialize function. There is no need, or command, to destroy the handle. Calling GtPsInitialize with the same base address returns the same handle. Once the power supply is initialized, the handle can be used with other functions calls to control the power supply.

Reset

The Reset function, GtPsReset, opens all switches in the power supply and sets it to the default state. Voltages and current limits are set to zero and outputs are set to standby. Reset is usually performed after the power supply is initialized. See Chapter 6 in this manual for more information regarding the power supply reset.

Chapter 5 – Programming the Power Supply 35 Error Handling

All the GTPS functions return the status, pnStatus, as the last parameter. This parameter can be used for error handling. pnStatus returns zero if the function completes successfully. It returns negative if an error occurred. The error description can be retrieved using the GtPsGetErrorString function.

Driver Version

The GtPsGetDriverSummary function can be used to return the current GTPS driver description summary and version number. This can be used to check for driver changes. See Chapter 6 in this manual for more information.

Virtual Panel

The panel function, GtPsPanel, displays the instrument front panel in a window. The panel can be used to initialize the power supply and to control and read all power supply settings. The panel function may be used by the application to allow direct interaction with the power supply. The GtPsPanel function is also used by GTPSP16.EXE and GTPSP32.EXE, which are supplied with the GTPS package and provide a stand alone Windows application that displays the instrument panel. This function is available only under the Windows version of the driver and is not supported under the DOS driver.

Programming Example

The programming example shown in this section demonstrates how to program the power supply using the C programming language under Windows and DOS. To run the example, enter the following on the command line: GTPSXxx Where:

36 GT7400 User’s Guide

xx 16 or 32, depending on the operating system I/O Base Address in hexadecimal. For example: 0x1310 Specifies whether you want to set current limit or voltage: Where: C current limit V voltage 1 or 2 current limit or voltage value to be set For example, to assign 20.5V to channel 1 using 0x1300 as the base address, you would enter: GTPSX16 0x1300 V 1 20.5 To set channel 2’s current limit to 1.2A using 0x1300 as the base address, you would enter: GTPSX16 0x1300 C 2 1.2 To assign 0V to channel 2 using 0X1300 as the base address, you would enter: GTPSX16 0x1300 V 2 0

Compiling the Example

To compile the Windows 32-bit DLL example in Microsoft Visual C++ 2.0 or above: 1. Load GTPSX32.MAK from the Project / File/Open menu.

2. Select Project/Rebuild all from the menu.

To compile the Windows 32-bit DLL example in Borland C++ 4.0 or above: 1. Load GTPSXBC.IDE from the Project/Open Project menu.

2. Select Project/Build all from the menu.

Chapter 5 – Programming the Power Supply 37 To compile the Windows 16-bit DLL example in Microsoft VC++ 1.0/1.5 or above: 1. Load GTPSX16.MAK from the Project/Open menu.

2. Select Project/Rebuild all from the menu.

To compile the Windows 16-bit DLL example in Microsoft C 5.1 or above using the command line compiler, run NMAKE GTPSX16.MAK /A from the DOS command line. To compile the Windows 16-bit DLL example in Borland C++ 4.0 or above: 1. Load GTPSXBC.IDE from the Project/Open Project command.

2. Select Project/Build all.

To compile the DOS example in Microsoft VC++: 1. Load GTPSXMS.MAK from the Project/Open command.

2. Select Project/Rebuild all.

To compile the DOS example in Microsoft C 5.1 or above, run NMAKE GTPSXMS.MAK /A from the DOS command line. To compile the DOS example in Borland C++ 4.0 or above: 1. Load GTPSXBC.IDE from the Project/Open Project command.

2. Select Project/Build all.

MAK Files

The C++ sample includes a MAK file for each of the following tools: DOS Static Library - Microsoft C (VC++/MS-C) Example File: · GTPSXMS.EXE - Sample for DOS (with MS C Static Library)

· GTPSXMS.MAK - VC++/MS-C Make file for the example

38 GT7400 User’s Guide · GTPSX.C - C source file for the example (the same source file is used for all C examples) 16-bit DLL (Windows 3.x) - Microsoft C (VC++/MS-C) Example Files: · GTPSX16.EXE - Sample for Windows 3.x/95/98 · GTPSX16.MAK - VC++/MS-C Make file for the example · GTPSX.C - C source file for the example (same source for all C examples)

· GTPSX.DEF - Module definition file · GTPSX.RC - Resource file · GTPSX.ICO - Icon file 32-bit DLL (Windows 95/98/NT) example files: · GTPSX32.EXE - Sample for Windows NT/95/98 · GTPSX32.MAK - VC++/MS-C Make file for the example · GTPSX.C - C source file for the example (same source for all C examples) · GTPSX.RC - Resource file · GTPSX.ICO - Icon file Borland Static/16-bit DLL/32-bit DLL Examples: · GTPSEX.IDE - Borland C++ 5.0 contains 3 projects · GTPSX.C - C source file for the example (same source for all C examples) · GTPSX.DEF - Module definition file · GTPSX.RC - Resource file · GTPSX.ICO - Icon file ATEasy Example Files

· GTPS.PRG - example program · GTPS.CFG - example CFG file

Chapter 5 – Programming the Power Supply 39

Example Program Listing

/********************************************************** FILE: GTPSX.C PURPOSE: Windows16|32|DOS sample program for GTPS boards using GTPS drivers. CREATED: Jan. 1999 COPYRIGHT: Copyright 1999 GEOTEST Inc. COMMENTS : To compile the Windows 32 bit DLL example: 1. Microsoft VC++ 2.0 or above: - Load GTPSX32.MAK from the Project/File/Open... menu - Select Project/Rebuild all from the menu 2. Borland C++ 4.0 or above: - Load GTPSXBC.IDE from the Project/Open Project... menu - Select Project/Build all from the menu To compile the Windows 16 bit DLL example: 1. Microsoft VC++ 1.0/1.5 or above: - Load GTPSX16.MAK from the Project/Open... menu - Select Project/Rebuild all from the menu 2. Microsoft C 5.1 or above using command line compiler: - Run 'NMAKE GTPSX16.MAK /A' from DOS command line 3. Borland C++ 4.0 or above: - Load GTPSXBC.IDE from the Project/Open Project... menu - Select Project/Build all from the menu To compile the DOS example with: 1. Microsoft VC++: - Load GTPSXMS.MAK from the Project/Open... menu - Select Project/Rebuild all from the menu 2. Microsoft C 5.1 or above: - Run 'NMAKE GTPSXMS.MAK /A' from DOS command line 3. Borland C++ 4.0 or above:

40 GT7400 User’s Guide - Load GTPSXBC.IDE from the Project/Open project... menu - Select Project/Build all from the menu **********************************************************/ #if defined(_WINDOWS) || defined(_WIN32) || defined (_Windows) #include #elif !defined(_DOS) #define _DOS #endif #include #include #include #include #include "gtps.h"

//********************************************************* // DispMsg //********************************************************* void DispMsg(LPSTR lpszMsg) { #ifndef _DOS //if windows use MessageBox MessageBeep(0); MessageBox(0, lpszMsg,"GTPS", MB_OK); #else // use printf for DOS printf("%s \r\n",lpszMsg); #endif return; }

//********************************************************* // DispUsage //********************************************************* void DispUsage(void)

Chapter 5 – Programming the Power Supply 41 { DispMsg( "\r\nThis example shows how to " "assign current limit/voltage to a certain channel\r\n"

"Usage:\r\n" "GTPSXxx " "\r\n\r\nWhere:\r\n" "" "\t(example: 0x1300)\r\n" " specify whether you want to set current\r\n" "limit or voltage:\r\n" "\t \r\n" "\tWhere: CV Qualifier: C=current limit, V=voltage" " 1 or 2\r\n" " = number to set\r\n" "\nExample1 assigning 20.5V to channel 1 using 0x1300\r\n" "as the base address:\r\n" "GTPSX16 0x1300 V 1 20.5\r\n" "\nExample2 setting channel 2's current limit\r\n" "to 1.2A using 0x1300 as the base address:\r\n" "GTPSX16 0x1300 C 2 1.2 \r\n" "\nExample3 assigning 0V to channel 2 using 0x1300\r\n " "as the base address:\r\n" "GTPSX16 0x1300 V 1 0 \r\n"

#ifdef _WINDOWS "\r\nTo change command line under Windows \r\n" "Select File/Properties from Program Manager \r\n" "Menu and change the command line edit box as \r\n" "shown above." #else #endif );

42 GT7400 User’s Guide exit(1); } //********************************************************* // CheckStatus //********************************************************* void CheckStatus(SHORT nStatus) { CHAR sz[128]; if (!nStatus) return; GtPsGetErrorString(nStatus, sz, sizeof sz, &nStatus); DispMsg(sz); DispMsg("Aborting the program..."); exit(nStatus); } //********************************************************* // This main function receives four user command line arguments: // (1) The GTPS board base address (e.g. 0x1300) // (2) Current limit or voltage (C/V) specifier: // C=current limit, V=voltage // (3) Channel number 1 or 2 // (4) Value to be set //********************************************************* int main(int argc, char **argv) { SHORT nBaseAddr; // Board base address CHAR cOperation;// Board Operation (C/V) SHORT nChannel; // Channel number DOUBLE dVal,dVal1,dVal2; SHORT nHandle; // Board handle SHORT nStatus; // Returned status CHAR acBuf[64];

// ** Check number of arguments rcvd if (argc != 5) DispUsage();

Chapter 5 – Programming the Power Supply 43

// ** Parse command line parameters nBaseAddr=(SHORT)strtol(*(++argv), NULL, 0); cOperation=**(++argv);

// ** Process operation (Current/Voltage) cOperation=(char)toupper(cOperation); if (cOperation != 'C' && cOperation != 'V' ) DispUsage();

// ** Initialize and retrieve a handle GtPsInitialize (nBaseAddr, &nHandle, &nStatus); CheckStatus(nStatus); switch(cOperation) { case 'C': nChannel = (SHORT)strtol(*(++argv), NULL, 0); dVal = atof(*(++argv)); GtPsSetCurrentLimit(nHandle, nChannel, dVal, &nStatus); CheckStatus(nStatus); break; case 'V': nChannel = (SHORT)strtol(*(++argv), NULL, 0); dVal = atof(*(++argv)); GtPsSetVoltage(nHandle, nChannel, dVal, &nStatus); CheckStatus(nStatus); break; default: break; } GtPsGetVoltage(nHandle,1,&dVal,&nStatus); GtPsGetCurrent(nHandle,1,&dVal1,&nStatus); GtPsGetCurrentLimit(nHandle,1,&dVal2,&nStatus);

44 GT7400 User’s Guide sprintf(acBuf,"\nModule1: %3.2fV, %3.2fA, current limit:%3.2fA",dVal, dVal1, dVal2); printf (acBuf);

GtPsGetVoltage(nHandle,2,&dVal,&nStatus); GtPsGetCurrent(nHandle,2,&dVal1,&nStatus); GtPsGetCurrentLimit(nHandle,2,&dVal2,&nStatus); sprintf(acBuf,"\nModule2: %3.2fV, %3.2fA, current limit:%3.2fA",dVal, dVal1, dVal2); printf (acBuf);

GtPsGetVoltage(nHandle,3,&dVal,&nStatus); sprintf(acBuf,"\nModule3: %3.2fV,",dVal); printf (acBuf); return 0; }

//********************************************************* // End Of File //*********************************************************

Chapter 6 – Functions Reference 45

Chapter 6 – Functions Reference

Introduction

This chapter presents information about the GTPS driver functions in alphabetical order. Each function begins with a syntax example of the function followed by a short description of the function parameters and types, Comments, Example (written in C), and See Also sections. All function parameters follow the same rules:

· All pointers are far pointers (applicable only to 16-bit driver). · Strings are ASCIIZ (null or zero character terminated). · The first parameter for most functions is nHandle (16-bit integer), which is required and returned by the GtPsInitialize function. The nHandle parameter identifies the power supply when calling a function to program and control the power supply. · All functions return a status with the last parameter, named pnStatus. pnStatus is 0 if the function was successful, or < 0 on error. The description of the error can be retrieved by using the GtPsGetErrorString function, or by using a predefined constant, defined in the driver interface file. See Appendix A for error codes.

46 GT7400 User’s Guide

Parameter Prefix Names

Parameter names are prefixed as follows: Type Prefix Type Description Example a Array; put this before the aArray simple type. BOOL b Signed 8-bit integer as Boolean. TRUE is 0, FALSE otherwise. BYTE uc Unsigned 8-bit integer (unsigned CHAR type). CHAR c Signed 8-bit integer. cKeyPress DOUBLE d Double - 8 bytes floating point dReading DWORD dw Double word (unsigned 32-bit) dwTimeout DWORD hwnd Windows handle (32-bit hwndPanel unsigned, DWORD). Under Windows 3.1, only the lower 16 bits are used. LONG l Long (signed 32-bit) lBits LPSTR sz Zero-terminated string szMsg LPtype p 32-bit pointer (far pointer for pnStatus DOS and Windows 3.1); pointer for WIN32 applications (Windows NT and Windows 95). Use this parameter to return a value. Preceeds the simple type. SHORT n Short (signed 16-bit) nMode WORD w Unsigned short (unsigned 16- nMode bit)

Chapter 6 – Functions Reference 47

Common Parameters

The parameters listed in the table below are commonly used by GT7400 functions to configure and control the board. Information about the GT7400 components that these parameters reference are in Chapter 2, “Overview.” Parameter Meaning Values nBaseAddress SHORT Base address of the board. nChannel GT7400 output channel. 1-3 Channels A and B are programmable, channel. Channel C is fixed. Channel A, the first module installed, is closest to the AC connector. Channels B and C follow in order. nHandle SHORT Handle to a GT7400. pnStatus LPSHORT Returned status: 0 on success, <0 on failure. dCurrentLimit DOUBLE Current to be set. Programmable 0-30V: 0.00A-5.00A Programmable 0-60V: 0.00A-2.5A pdCurrentLimit LPDOUBLE Returned current limit. dVoltage DOUBLE Voltage. Programmable 0-30V: 0.00V-30.00V Programmable 0-60V: 0.00V-60.00V pdVoltage LPDOUBLE Returned voltage.

48 GT7400 User’s Guide

Functions by Category

Category Function Description Initialization GtPsInitialize Initializes the driver for the power supply at the specified base address. The function returns a handle that can be used with other GT7400 functions to program the power supply. GtPsReset Sets all channels to standby, disconnects the loads, and opens the isolation relays. Operations GtPsGetCurrent Returns the specified channel’s current. GtPsGetCurrentLimit Gets the specified channel’s current limit.

GtPsGetStandby Returns the specified channel’s state (standby/on).

GtPsGetVoltage Returns the specified channel’s voltage.

GtPsRecallSetting Recalls power supply setting from EEPROM. GtPsSaveSetting Saves power supply setting to EEPROM. GtPsSetCurrentLimit Sets the specified channel’s current limit.

GtPsSetStandby Sets the specified channel to “STANDBY” or “ON”.

GtPsSetVoltage Sets the specified channel’s voltage.

Chapter 6 – Functions Reference 49

Category Function Description Status GtPsGetBoardSummary Returns the board summary from EEPROM. GtPsGetDriverSummary Returns the driver description string and version number. GtPsGetErrorString Returns the error string as specified by the error

number. GtPsGetState Returns the channel’s status (inhibit/fail). GtPsGetType Returns the module identifier (configuration) of a channel. Panel GtPsPanel Opens a virtual panel used to interactively control the GT7400.

50 GT7400 User’s Guide

GtPsGetBoardSummary

Returns the board summary from EEPROM.

Syntax

GtPsGetBoardS ummary (nHandle, pszBoardSum, nSumMaxLen, pnStatus)

Name Type Comments nHandle SHORT Handle to a GT7400. pszBoardSum LPSTR Buffer to contain the returned board info string (null terminated string) nSumMaxLen SHORT Size of the buffer to contain the error string. pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

The board info string reads from the on-board EEPROM the following data in that order:· · Name· · Hardware Version · Software Revision (EEPROM) · Serial Number· · Calibration time & date For example the returned string look as follow:""GT7400, Version 1.00, Revision A, S/N 7400001, last calibrated time Mon Dec 08 14:39:02 1998\n"

Chapter 6 – Functions Reference 51 Example

The following example returns the board summary. SHORT nHandle, nStatus; CHAR szBoardSum[128]; GtPsGetBoardSummary(nHandle, szBoardSum, sizeof (szBoardSum), &nStatus);

See Also

GtPsGetErrorString, GtPsInitialize

52 GT7400 User’s Guide

GtPsGetCurrent

Returns the specified channel’s current.

Syntax

GtPsGetCurrent (nHandle, nChannel, pdCurrent, pnStatus)

Name Type Comments nHandle SHORT Handle to a GT7400. nChannel SHORT Specifies the Channel number from which to get the current: 1 – channel A 2 – channel B pdCurrent LPDOUBLE Returned current. Programmable 0-30V: 0.00A-5.00A Programmable 0-60V: 0.00A-2.5A pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

Current resolution is as follow: Programmable 0-30V: 0.0001525 amps. Programmable 0-60V: 0.0003051 amps. If total power exceeds 150 W (maximum output power), output voltages will drop to satisfy the power limit.

Example

The following example returns the current from channel A.

Chapter 6 – Functions Reference 53 SHORT nHandle, nStatus; DOUBLE dCurrent; GtPsGetCurrent (nHandle, 1, &dCurrent, &nStatus);

See Also

GtPsGetVoltage, GtPsGetCurrentLimit, GtPsSetCurrentLimit, GtPsGetErrorString, GtPsInitialize

54 GT7400 User’s Guide

GtPsGetCurrentLimit

Gets the specified channel’s current limit.

Syntax

GtPsGetCurrentLimit (nHandle, nChannel, pdCurrentLimit, pnStatus) Name Type Comments nHandle SHORT Handle to a GT7400. Channel SHORT Specifies the Channel for which to get the Current Limit: 1 – channel A 2 – channel B pdCurrentLimit LPDOUBLE Returned current limit. Programmable 0-30V: 0.00A-5.00A Programmable 0-60V: 0.00A-2.5A pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

Current resolution is as follow: Programmable 0-30V: 0.0001525 amps. Programmable 0-60V: 0.0003051 amps. If total power exceeds 150 W (maximum output power), output voltages will drop to satisfy the power limit.

Example

The following example gets the CurrentLimit from Channel B.

Chapter 6 – Functions Reference 55 SHORT nHandle, nStatus; DOUBLE dCurrentLimit; GtPsGetCurrentLimit (nHandle, 2, &dCurrentLimit, &nStatus);

See Also

GtPsSetCurrentLimit, GtPsGetVoltage, GtPsGetCurrent GtPsSetVoltage, GtPsGetErrorString, GtPsInitialize

56 GT7400 User’s Guide

GtPsGetDriverSummary

Returns the driver description string and version number.

Syntax

GtPsGetDriverSummary(szSummary, nSummaryMaxLen, pdwVersion, pnStatus)

Name Type Comments pszSummary LPSTR Buffer to receive the summary string. nSummaryMaxLen SHORT Buffer size passed by pszSummary. pdwVersion LPDWORD Returned version number. The high 16 bits contain the major version number, while the low 16 bits contain the minor version number. pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Example

The following example returns the driver summary. SHORT nHandle, nStatus; DWORD dwVersion; CHAR szSummary[128]; GtPsGetDriverSummary(szSummary, 128, &dwVersion, &nStatus) SzSummary will contain "GtPs Driver for GTPS, Version 1.0 1999, Copyright (c) Geotest Marvin Test Systems Inc." After the function call.

Chapter 6 – Functions Reference 57 See Also

GtPsGetErrorString

58 GT7400 User’s Guide

GtPsGetErrorString

Returns the error string as specified by the error number.

Syntax

GtPsGetErrorString(nError, pszError, nErrorMaxLen, pnStatus)

Name Type Comments nError SHORT Error number as returned by the pnStatus of any of the functions. (See Appendix A, “Error Codes,” for a list of error codes.) For errors, the number should be less than zero. If the number is zero, the function returns the "No error has occurred" string. pszMsg LPSTR Buffer to contain the returned error (null terminated) string. nStrMaxLen SHORT Size of the buffer to contain the error string. pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Example

The following example initializes the power supply at addresses 0x1310 and gets the error string. SHORT nHandle, nStatus; CHAR szError[128]; GtPsInitialize(0x1310, &nHandle, &nStatus) GtPsGetErrorString (nStatus, &szError, sizeof(szError), &nStatus);

Chapter 6 – Functions Reference 59

GtPsGetStandby

Returns the specified channel’s state (standby/on).

Syntax

GtPsGetStandby (nHandle, nChannel, pnStdby, pnStatus)

Name Type Comments nHandle SHORT Handle to a GT7400. nChannel SHORT Specifies the Channel number: 1 – Channel A 2 – Channel B 3 – Channel C pnStdby LPSHORT Returned value. 0. The channel is in “ON” mode. 1. The channel is in “STANDBY” mode. pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

In Standby mode, board voltages and current limits can be set; however, outputs are disconnected.

Example

The following example returns the standby status of channel A. SHORT nHandle, nStatus, nStdby; GtPsGetStandby (nHandle, 1, &nStdby, &nStatus);

See Also

GtPsSetStandby, GtPsGetErrorString, GtPsInitialize

60 GT7400 User’s Guide

GtPsGetState

Returns the channel’s state (inhibit/fail).

Syntax

GtPsGetState (nHandle, nChannel, pnStatus)

Name Type Comments nHandle SHORT Handle to a GT7400. nChannel SHORT Specifies the Channel number: 1 – Channel A 2 – Channel B 3 – Channel C pnStatus LPSHORT Returned status: 0. GTPS_NOERROR if neither failed nor inhibited. 1. GTPS_CHANNEL_FAIL if the channel’s status is FAIL. 2. GTPS_CHANNEL_INHIBIT if the channel’s status is INHIBIT.

Example

The following example gets channel A’s status. SHORT nHandle, nStatus; GtPsGetState (nHandle, 1, &nStatus);

See Also

GtPsGetErrorString, GtPsInitialize

Chapter 6 – Functions Reference 61

GtPsGetType

Returns the module identifier (configuration) of a channel.

Syntax

GtPsGetType (nHandle, nModule, pnType, pnStatus)

Name Type Comments nHandle SHORT Handle to a GT7400. nModule SHORT Specifies the Channel number: 1 – channel A 2 – channel B 3 – channel C pnType LPSHORT Returned values for channel A or B: GTPS_MOD_PMP30 (1) GTPS_MOD_PMP60 (2) Returned values for channel C: GTPS_MOD_PMC3 (3) GTPS_MOD_PMC5 (4) GTPS_MOD_PMC12 (5) GTPS_MOD_PMC15 (6) GTPS_MOD_PMC28 (7) See Appendix B, “Specifications,” for a description of the GT7400 power supply modules. pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

62 GT7400 User’s Guide

Example

The following example gets channel A’s configuration. SHORT nHandle, nStatus, nType; GtPsGetType (nHandle, 1, &nType, &nStatus);

See Also

GtPsGetErrorString, GtPsInitialize

Chapter 6 – Functions Reference 63

GtPsGetVoltage

Returns the specified channel’s voltage.

Syntax

GtPsGetVoltage (nHandle, nChannel, pdVoltage, pnStatus) Name Type Comments nHandle SHORT Handle to a GT7400. nChannel SHORT Specifies the Channel from which to get the voltage: 1 – Channel A 2 – Channel B 3 – Channel C pdVoltage LPDOUBLE Returned voltage. Programmable 0-30V: 0.00V-30.00V Programmable 0-60V: 0.00V-60.00V pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

Current resolution is as follow: Programmable 0-30V: 0.0001525 amps. Programmable 0-60V: 0.0003051 amps. If total power exceeds 150 W (maximum output power), output voltages will drop to satisfy the power limit.

Example

The following example returns the voltage from channel A. SHORT nHandle, nStatus;

64 GT7400 User’s Guide DOUBLE dVoltage; GtPsGetVoltage (nHandle, 1, &dVoltage, &nStatus);

See Also

GtPsSetVoltage ,GtPsGetCurrentLimit, GtPsGetCurrent, GtPsSetCurrentLimit, GtPsGetErrorString, GtPsInitialize

Chapter 6 – Functions Reference 65

GtPsInitialize

Initializes the driver for the power supply at the specified base address. The function returns a handle that can be used with other GT7400 functions to program the power supply.

Syntax

GtPsInitialize(nBaseAddress, pnHandle, pnStatus)

Name Type Comments nBaseAddress SHORT Base address of the power supply. pnHandle LPSHORT Returned handle for the power supply. The handle is set to zero on error and <> 0 on success. pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

The GT7400 uses 3 16-bit ports in the I/O space following the base address. The factory default base address is 0x1300. Using a DIP switch, you can change the power supply base address to any address between 0x200 and 0xF3FF. The GtPsInitialize function verifies whether the power supply does or does not exist. However, the function does not have any effect on the power supply settings. The returned handle pnHandle is used by other GT7400 functions to identify the specified power supply.

66 GT7400 User’s Guide

Example

The following example initializes the GT7400 at addresses 0x1310. SHORT nHandle, nStatus; GtPsInitilize (0x1300, &nHandle, &nStatus); if ( nHandle==0) { printf("Unable to Initialize the power supply") return; }

See Also

GtPsGetErrorString, GtPsGetBoardSummary

Chapter 6 – Functions Reference 67

GtPsPanel

Opens a virtual panel used to interactively control the GT7400.

Syntax

GtPsPanel(pnHandle, hwndParent, nMode, phwndPanel, pnStatus)

Name Type Comments pnHandle LPSHORT Handle to a GT7400. This number may be zero if the power supply is to be initialized by the panel window. hwndParent DWORD Sets the panel parent window handle. A value of 0 sets the desktop as the parent window. nMode SHORT The mode in which the panel main window is created. 0¾Modeless window. 1¾Modal window. phwndPanel LPDWORD Returned window handle for the panel (for modeless panels only). pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

The panel window may be opened as a modal or a modeless window depending on the nMode parameter value. If the mode is set to modal (nMode=1), the panel disables the parent window (hwndParent) and the function returns only after the window was closed by the user. In that case, pnHandle may return the handle created by the user using the panel Initialize dialog. If the mode is set to modeless (nMode=0), the function returns immediately after creating the panel window, returning the window

68 GT7400 User’s Guide handle (phwndPanel) to the panel. It is the responsibility of the calling program to dispatch Windows messages to this window so that the window can respond to messages. This function is supplied only with the DLL versions of the driver.

Chapter 6 – Functions Reference 69

GtPsReset

Sets all channels to standby, opens the isolation relays and sets the voltages and current limits to zero.

Syntax

GtPsReset(nHandle, pnStatus)

Name Type Comments nHandle SHORT Handle to a GT7400. pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Example

The following example resets the power supply. SHORT nHandle, nStatus; GtPsReset(nHandle, &nStatus);

See Also

GtPsGetErrorString, GtPsInitialize

70 GT7400 User’s Guide

GtPsRecallSetting

Recall the last set of stored values from EEPROM.

Syntax

GtPsRecallSetting (nHandle, pnStatus)

Name Type Comments nHandle SHORT Handle to a GT7400. pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

This function can be called any time to set the board to the user predefined state. It recalls the voltage and current limit for channels 1 and 2, and the On/Standby value for all three channels from EEPROM In case the user did not save any setting to the EEPROM prior to calling the function, the default values will be same as for GtPsReset.Example The following example recalls the last parameters from the EEPROM. SHORT nHandle, nStatus; GtPsRecallSetting (nHandle, &nStatus);

See Also

GtPsGetCurrentLimit, GtPsGetVoltage, GtPsGetCurrent, GtPsGetErrorString, GtPsReset,

Chapter 6 – Functions Reference 71 GtPsSaveSetting

Saves to EEPROM voltages and current limits for channels 1 and 2, and On/Standby states for all three channels.

Syntax

GtPsSaveSetting (nHandle, pnStatus)

Name Type Comments nHandle SHORT Handle to a GT7400. pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

This function can be called any time without affecting the board setting.

Example

The following example saves the board setting. SHORT nHandle, nStatus; GtPsSaveSetting (nHandle, &nStatus);

See Also

GtPsGetCurrentLimit, GtPsGetVoltage, GtPsGetCurrent, GtPsGetErrorString

72 GT7400 User’s Guide

GtPsSetCurrentLimit

Sets the specified channel’s current limit.

Syntax

GtPsSetCurrentLimit (nHandle, nChannel, dCurrentLimit, pnStatus)

Name Type Comments nHandle SHORT Handle to a GT7400. nChannel SHORT Specifies the Channel for which the current limit is to be set: 1 – Channel A 2 – Channel B dCurrentLimit DOUBLE Current to be set. Programmable 0-30V: 0.00A-5.00A Programmable 0-60V: 0.00A-2.5A pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

Current resolution is as follow: Programmable 0-30V: 0.0001525 amps. Programmable 0-60V: 0.0003051 amps. If total power exceeds 150 W (maximum output power), output voltages will drop to satisfy the power limit.

Chapter 6 – Functions Reference 73 Example

The following example sets the current limit to Channel B to 2 amps. SHORT nHandle, nStatus; GtPsSetCurrentLimit (nHandle, 2, 2.0, &nStatus);

See Also

GtPsGetCurrentLimit, GtPsGetVoltage, GtPsGetCurrent, GtPsSetVoltage, GtPsGetErrorString, GtPsInitialize

74 GT7400 User’s Guide

GtPsSetStandby

Sets the specified channel to “STANDBY” or “ON”.

Syntax

GtPsSetStandby (nHandle, nChannel, bStdby, pnStatus)

Name Type Comments nHandle SHORT Handle to a GT7400. nChannel SHORT Specifies the Channel number: 1 – Channel A 2 – Channel B 3 – Channel C nStdby SHORT Operation to perform. 0. The channel is in “ON” mode. The channel is in “STANDBY” mode. pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

In Standby mode board voltages and current limits can be set; however, the outputs are disconnected.

Example

The following example sets channel A to “STANDBY” mode. SHORT nHandle, nStatus; GtPsSetStandby (nHandle, 1, 1, &nStatus);

Chapter 6 – Functions Reference 75 See Also

GtPsGetStandby, GtPsGetErrorString, GtPsInitialize

76 GT7400 User’s Guide

GtPsSetVoltage

Sets the specified channel’s voltage.

Syntax

GtPsSetVoltage (nHandle, nChannel, dVoltage, pnStatus)

Name Type Comments nHandle SHORT Handle to a GT7400. nChannel SHORT Specifies the Channel for which to set the voltage: 1 – Channel A 2 – Channel B dVoltage DOUBLE Voltage. Programmable 0-30V: 0.00V-30.00V Programmable 0-60V: 0.00V-60.00V pnStatus LPSHORT Returned status: 0 on success, <0 on failure.

Comments

Current resolution is as follow:

Programmable 0-30V: 153.5 mA/step. Programmable 0-60V: 305.1 mA/step. If the power output from a module exceeds 150 W (output power limit), the output voltage is reduced to satisfy the power limit.

Chapter 6 – Functions Reference 77

Example

The following example sets the voltage in Channel A to 3.42 volts. SHORT nHandle, nStatus; GtPsSetVoltage (nHandle, 1, 3.42, &nStatus);

See Also

GtPsGetVoltage, GtPsSetCurrentLimit, GtPsGetCurrent, GtPsGetCurrentLimit, GtPsSetErrorString, GtPsInitialize

78 GT7400 User’s Guide

Appendix A - Error Codes 79

Appendix A - Error Codes The following tables show error codes returned by the GT7400. Information codes

0 No error has occurred 1 Channel has Failed 2 Channel is Inhibited Resource Errors

-1 Board does not exist -2 Too many boards -3 Unable to create Windows panel -4 Unable to get timer -5 Unable to allocate memory Parameter Errors

-20 Invalid parameter -21 Invalid base address -22 Invalid handle -23 Invalid channel -24 Invalid DAC voltage -25 Invalid DAC current -26 Invalid string length -27 Operation timed out -28 Invalid mode -29 Invalid calibration mode

80 GT7400 User’s Guide Board Errors (Fatal)

These errors indicate that the board has a malfunction. -50 Mode error -51 Power supply not found -52 DAC source error -53 EEPROM offset error

Miscellaneous Errors

-99 Invalid or unknown error

Appendix B – Specifications 81

Appendix B – Specifications

General

GT7430 GT7460 GT7420- GT7420- GT7420- GT7420- GT7420- 03 05 12 15 28 Type Prog. Prog. Fixed. Fixed. Fixed. Fixed. Fixed. output output output output output output output Voltage 0-30V 0-60V 3.3V 5V 12V 15V 28V Power 150W 150W 33W 50W 100W 100W 100W Max 5A 2.5A 10A 10A 8.4A 7.6A 3.6A Current Programming 10mV 20mV N/A N/A N/A N/A N/A Accuracy RMS 8mV 8mV Not Not Not Not Not spec’d spec’d spec’d spec’d spec’d P-P 30mV 30mV 100mV 100mV 150mV 150mV 280mV Load 10mV 10mV *0.8% *0.8% *0.8% *0.8% *0.8% Regulation or or or or or 40mV 40mV 40mV 40mV 40mV Line 10mV 10mV *0.4% *0.4% *0.4% *0.4% *0.4% Regulation or or or or or 20mV 20mV 20mV 20mV 20mV

* whichever is greater

Outputs

Modes of Operation: Constant Voltage (GT7430/60) Current Limit Programming Resolution: 14 bits Readback Resolution: 16 bits Remote/Local Sense: Up to 2 VDC may be dropped across sense loads. Drop decreases voltage available at load.

82 GT7400 User’s Guide

Input Power

Configuration: Single Phase Voltage: 115 VAC or 230 VAC Frequency: 47-63 Hz Efficiency: Typ.>75% (depends on programmed volt. & current) Power Factor: >0.9

Protection Circuitry

Over Voltage: 105% of full scale. Current Limit: Programmable from 0 to FS. Output will automatically switch into constant current mode when limit is reached. Current Trip: 110% of full scale (fixed). Over Temperature: Automatically disables output if maximum allowable temperature is exceeded. UUT Discharge: Active when output is down programmed. Circuit will discharge at a constant rate. Short Circuit: Outputs are protected in the event of a short across output terminals. Isolation Relays: Independently controllable for each output. Circuitry is provided to protect relays from current switching. Remote Inhibit: Provides for more remote hardware shutdown of outputs via front panel interlock pins.

Appendix B – Specifications 83

Physical

Format: GTXI dual slot Size: 6.7”(h) x 2.4”(w) x 15.5”(d) Approximate Weight: 7 lbs. Operating Temp.: -10 to 50 °C Humidity: 20% - 95% non-condensing Cooling: GTXI Chassis airflow

84 GT7400 User’s Guide

Index 85

Index

16-bit DLL...... 18 Disclaimer...... ii

16-bit import library ...... 18 Displaying channels ...... 25

32-bit DLL...... 18, 20 DLLs ...... 28

32-bit import library ...... 18 DOS...... 28

Address DOS static library ...... 31

Geotest...... 3 Download files

ATEasy ...... 19, 33 from Geotest...... 3

driver ...... 33 Driver files ...... 18

Block diagram...... 7 dVoltage ...... 47

Board errors ...... 76 Dynamic-link-libraries ...... 28

Borland ...... 18, 20 Electricity

examples ...... 22 discharge ...... 12

Pascal...... 19, 32 Email addresses

C++...... 32 Geotest...... 3

Calibration services Error codes ...... 75

from Geotest...... 3 Error handling...... 35

Closing the Virtual Panel...... 26 Example programs ...... 20

Conventions Fatal errors...... 76

notation...... 2 Files installed under DOS...... 17

Copyright ...... ii files used for ATEasy sample...... 22

CTL3DV2.DLL ...... 18 Function library ...... 9 dCurrentLimit ...... 47 Function parameters

Delphi ...... 32 common ...... 47

Development tools...... 10, 31 GT7400

Discharge static electricity...... 12 architecture ...... 7

86 GT7400 User’s Guide

features...... 6 GTPS.PRG...... 22

introduction...... 5 GTPS16.BAS...... 19

programming...... 27 GTPS16.DLL...... 18, 31

setting I/O base address ...... 13 GTPS16.LIB ...... 18, 21, 28

software...... 8 GTPS32.BAS...... 19

GT7400 DLL...... 8 GTPS32.DLL...... 18, 30

GT7400 software GTPS32.LIB ...... 18, 20, 28

distributing...... 22 GTPS32B.LIB...... 18, 28

GT7420-03...... 77 GTPSB16.LIB...... 22

GT7420-05...... 77 GTPSB32.LIB...... 22

GT7420-12...... 77 GTPSBC.IDE...... 22

GT7420-15...... 77 GTPSBC.LIB...... 18, 22

GT7420-28...... 77 GtPsGetCurrent...... 50

GT7430...... 77 GtPsGetCurrentLimit...... 52

GT7460...... 77 GtPsGetDriverSummary...... 54

GTPS...... 11 GtPsGetErrorString...... 56

GTPS driver functions ...... 45 GtPsGetStandby ...... 57

GTPS files ...... 18 GtPsGetStatus...... 58

GTPS interface files ...... 19 GtPsGetType ...... 59

GTPS library files ...... 18 GtPsGetVoltage...... 61

GTPS NT kernel mode device drivers GtPsInitialize...... 63 ...... 19 GTPSMS.LIB...... 18, 21 GTPS Virtual Panel executable files 18 GTPSP16.EXE...... 18 GTPS.CFG...... 22 GTPSP32.EXE...... 18 GTPS.H...... 19 GtPsPanel...... 65 GTPS.INS...... 19, 22 GtPsReset...... 67 GTPS.PAS...... 19 GtPsSetCurrentLimit...... 68

87

GtPsSetStandby ...... 70 hardware ...... 15

GtPsSetVoltage ...... 72 software...... 15

GTPSX.C...... 20, 21, 22 under DOS...... 17

GTPSX.DEF...... 21, 22 under Windows...... 15

GTPSX.ICO...... 20, 21, 22 Windows NT kernel mode driver16

GTPSX.RC...... 20, 21, 22 Internet download area ...... 3

GTPSX16.EXE...... 21 Kernel mode driver ...... 19

GTPSX16.MAK...... 21 MAK files ...... 37

GTPSX32.EXE...... 20 Manual organization ...... 1

GTPSX32.MAK...... 20 Manual scope...... 1

GTPSXMS.EXE...... 21 Microsoft C static library...... 21

GTPSXMS.MAK...... 21 Microsoft Visual C 2.0 ...... 20

GTXI interface...... 7 nBaseAddress...... 47

HW.SYS ...... 16, 19, 22, 29 nChannel ...... 47

HWSETUP ...... 17 nHandle...... 47

HWSETUP.EXE...... 19 Packing list...... 11

HWTEST.EXE...... 19 Parameter errors...... 75

HWVDD.DLL ...... 19, 22, 29 Parameter prefix names ...... 46

I/O base address...... 13, 24 Pascal ...... 32

Import libraries ...... 28 pdCurrentLimit ...... 47

Information codes ...... 75 pdVoltage ...... 47

Initialization...... 34 pnStatus...... 47

power supply handle...... 34 Power conditioning unit...... 8

Initializing Power supply control...... 7

Virtual Panel...... 24 Power supply handles ...... 34

Inspecting the GT7400...... 12 Programming

Installation ...... 11, 12 ATEasy ...... 33

88 GT7400 User’s Guide

Borland-Delphi ...... 32 Static library ...... 18

C/C++ ...... 32 Storing values to EEPROM ...... 26

DOS static library ...... 31 System-requirements...... 11

error handling...... 35 Table of contents...... iii

GTPS driver...... 33 Technical support ...... i, 3

Virtual Panel...... 35 Telephone numbers

Visual Basic ...... 32 Geotest...... 3

Programming example ...... 35 Trademarks...... ii

compiling...... 36 Unpacking the GT7400...... 11

Programming languages ...... 10 Virtual panel...... 8

Programming the GT7400 ...... 27 Virtual Panel ...... 23, 35

Recalling values from EEPROM... 26 initializing...... 24

Reset function ...... 34 Visual Basic ...... 19, 32

Resetting the power supply ...... 26 Warranty...... i

Resource errors ...... 75 Web site

Resource file ...... 20, 21 Geotest...... 3

Safety ...... i Windows 16-bit DLL driver ...... 31

Sample program...... 39 Windows 32-bit DLL...... 30

Setting a channel’s current limit .... 25 Windows 95 ...... 16

Setting a channel’s voltage ...... 25 Windows 98 ...... 16

Setting channels to on or standby .. 26 Windows NT...... 29

Setting I/O base address...... 13 kernel mode driver ...... 16, 19

Setup...... 11 Windows NT kernel mode driver

Software ...... 8 manual installation...... 16

supported development tools..... 10

Software installation ...... 15

Specifications...... 77