Section 5 - vxi plug&play driver, 1 introduction, 2 vxi plug&play instrument driver – KEPCO KLR Series Developers Guide User Manual

Page 63: 3 vxi plug&play instrument driver functions, Vxi plug&play instrument driver -1, Vxi plug&play instrument driver functions -1, Klr vxi plug&play driver functions -1, Ion 5)

Advertising
background image

KLR-DEV 060713

5-1

SECTION 5 - VXI plug&play DRIVER

5.1

INTRODUCTION

The VXI plug&play driver can be used with all KLR models for remote programming.

The driver can be used in a program created by a user with any C compiler to program all ports
accessible via a resource string of the KLR power supply.

5.2

VXI PLUG&PLAY INSTRUMENT DRIVER

The VXI plug&play instrument driver provides support for the VXI plug&play environment. This
driver can be downloaded from Kepco’s web site at www.kepcopower.com/drivers/. The driver
includes an executable demonstration program and two files which provide the source code for
the driver and the functional prototypes. In addition, the examples found in this section are also
included with the driver as separate C files.

5.3

VXI PLUG&PLAY INSTRUMENT DRIVER FUNCTIONS

Kepco’s KLR VXI plug&play instrument driver provides programming support for Kepco’s KLR
Power Supply via all remote interfaces. It contains functions for opening, configuring, taking
measurements from, testing, calibrating and closing the instrument. To successfully use this
module, the instrument must be connected to the appropriate port using the proper resource
string for the initialize function (see Table 1-1).

The initialize function opens the session, and communicates with the KLR to validate it as a sup-
ported model and determines the voltage and current limits of the unit. This driver validates the
model to insure it is the proper driver for the unit. The driver differs from the IVI and LabView G
driver in that it will only operate on a Kepco KLR product and has not support for generic opera-
tion or operating other Kepco supplies.

Table 5-1 lists the functions that are available.

TABLE 5-1. KLR VXI PLUG&PLAY DRIVER FUNCTIONS

Purpose

Function Name

Description

INITIALIZE FUNCTION

Initialize Unit

Kpklr_Init

A resource string is passed to this function and the driver is opened.
The handle returned is used in all other functions. This function uses
Kpklr_reset and also performs an *IDN? query to verify the unit is a
Kepco, KLR unit.

Reset

Kpklr_psReset

Resets the instrument to a known state and sends initialization com-
mands to the instrument.

Close

Kpklr_close

This function takes the instrument off-line.

SETTING AND MONITORING OUTPUT FUNCTIONS

Set Value

Kpklr_SetValue

Sets the output voltage, the output current of the power supply,
depending on the slide selection position. The values are checked
against the maximum acceptable values for the corresponding power
supply: 0 - voltage, 1 - current, 2 - voltage protection, 3 - current pro-
tection

Get Value

Kpklr_GetValue

Gets the output voltage, the output current, voltage protection or cur-
rent protection of the power supply depending on slide selection
position0 - voltage, 1 - current, 2 - voltage protection, 3 - current pro-
tection.

Advertising