KEPCO KLP Series Developer's Guide, Rev 1 User Manual

Page 49

Advertising
background image

KLP-DEV 031113

4-7

• Model - a string providing the model type for the functions.
• Error out - If the function did not fail, this is a 0.

The first block of Figure 4-6, KepcoDCPWR initialize function, performs the open, creating the
connection between the LabView program and the power supply using the VISA.dll supplied
with LabView. The KepcoDCPWR initialize function has two optional settings: reset unit and
identify unit. The reset unit option sends *RST to the unit which sets the output to 0 volts, mini-
mum current, turns the output off, and stops list execution. The identify unit option sends an
*IDN query to the power supply.

The recognize unit utility function parses the response to determine the proper model number
output. If the identify unit flag is not set, the MODEL OUT of the initialize function reports Stan-
dard as the power supply type. The Standard model is a unit that only supports setting voltage,
current and output on/off, and performing measurements; all other functions are bypassed. The
function KepcoDCPWR initialize with options (not used in the example) uses KepcoDCPWR ini-
tialize
except that Kepco-recommended options are preset: the reset and identify flags set.

All subsequent functions have at least two inputs: VISA session and Model In. VISA session is
the output of viOpen. Model In is a string; for the KLP the string is KLP.

The second block, KepcoDCPWR Query Voltage Limit, is needed to verify the virtual model set-
tings. It is recommended that the response from this block be checked to insure that the power
supply is configured to supply the voltage and current needed. For example, if the virtual model
for a KLP 75-33-1200 was set to 36 Volts, 33 Amperes, the response will be 36 to this query,
indicating that the program will not respond to a command to set the output to 50 Volts.

The third subVi is KepcoDCPWR Configure Voltage Mode. This block sets the mode to Fixed. It
is recommended that the mode be set to Fixed in order to stop a list if it is running, however if
the Reset Device input into the first block is true, this block is not needed since *RST also stops
a list.

NOTE: It is recommended that when debugging a new application in LabView 5, use the GPIB

port during initial Debug, then use the LAN interface port. The KepcoDCPWR initialize
function performs differently with LabView 5 than LabView 6 (and later). In LabView 5,
the VISA open does not reuse VISA sessions. In a GPIB environment this is not a
problem as the computer has an infinite pool of numbers for this requirement. However
on LAN-based -1.2K Models, the VXI-11 (Instrument) port 1024 allows only four con-
nections and the SCPI Raw port 5025 (Socket) allows only two connections. Since
LabView 5 does not reuse the connection, after a few debug sessions, the KepcoD-
CPWR initialize
function will fail.

Advertising