beautypg.com

3 get measurement and status, 4 close connection, 6 interactive demonstration program – KEPCO KLP Series Developer's Guide, Rev 1 User Manual

Page 51: 1 kepcodcpwr interactive example.vi, Get measurement and status -9, Close connection -9, Interactive demonstration program -9, Kepcodcpwr interactive example.vi -9

background image

KLP-DEV 031113

4-9

4.5.3

GET MEASUREMENT AND STATUS

Three functions are needed to retrieve a measurement (either voltage or current), determine the
output state and determine if there have been any errors.

• KepcoDCPWR Measure [MSR] - Measures the output (voltage in voltage mode, current

in current mode). This function is explained in detail in paragraph 4.4.2.

KepcoDCPWR Query Output State - Queries the output state and returns 1 for output

on, 0 for output off.

KepcoDCPWR Error-Query - Retrieves the first error from the error queue. The internal

logic of this subVi changes the “0- no error” response to a null string, so no eror returns
nothing, but if an error is detected returns an error string is returned.

4.5.4

CLOSE CONNECTION

The last section is the close function, KepcoDCPWR close. This function is required to remove
the connection to the instrument and clean up RAM usage in LabView. It is very important to
release the connections in a 1.2K unit as there are only four connections possible over VXI-11
(Port 1024) and only two connections possible over SCPI Raw (Port 5025). The KepcoDCPWR
close
function releases the connection for other programs to utilize the device.

When the LabView program completes, it must close the driver, however the output is not auto-
matically turned off. Therefore it is recommended that the KepcoDCPWR Configure Output
State
function precede the KepcoDCPWR close function. This is not shown in the simplied
example (Figure 4-6), however it is illustrated in the full block diagram showing implementation
of the ramp function, Figure 4-12.

4.6

INTERACTIVE DEMONSTRATION PROGRAM

The interactive demo program allows the user to operate the power supply and provides sam-
ples of how to implement the functions.

4.6.1

KepcoDCPwr Interactive Example.vi

KepcoDCPwr Interactive Example.vi is the main demonstration program. The file is located in
program files\national Instruments\labview\drivers\kepco. Either doubleclick on the file or open
the file using File > Open from within LabView. When the program is opened, the Front Panel
(Figure 4-7) is displayed.

NOTE: When accessed via TCP/IP the four buttons at the bottom of the panel (Software

Ramp, Programmed List, Function Generator and Arbitrary Waveform) are not visible.