Page: 39/81 User Manual PSU-CTRL-2D, Rev.1-00: Software Interface
Software Interface
The software interface for the device consists of a 32- or 64-bit dy-
namic link library
COM-HVPSU2D.dll
. Both versions are located in
the directory "Program" of the enclosed software package. The soft-
ware interface is a stand-alone software package, it does not require
any additional library or driver, except for the virtual port driver (see
section "Driver Installation").
The user functions in the dynamic link library
COM-HVPSU2D.dll
can
be called from any conventional programming language. For the de-
tails, please consult the user manual of your compiler. The definition
of the interface functions is located in the declaration file
COM-HVPSU2D.h
written in C/C++. If your compiler cannot create an
import library from the dynamic link library
COM-HVPSU2D.dll
,
please link the library
COM-HVPSU2D.lib
instead of the dynamic link
library to your project.
Functionality of the Software Interface
The software interface typically controls up to 16 communication
channels for the data transfer to and from the device
(see the constant
COM_HVPSU2D_MAX_PORT
in the declaration file
COM-HVPSU2D.h
). This means it can control up to 16 devices at a
time.
Before utilizing any function from the dynamic link library
COM-HVPSU2D.dll
, the software should check the version of the li-
brary by calling the function
that a library with a different version number can contain different im-
plementations of the functions and calling them may lead to unpre-
dictable results; in most cases, the software will crash.
Each communication channel must be opened before starting
the communication. The opening procedure (function
) configures the used physical (RS-232) or vir-
tual (USB) serial port and clears the port buffers.
The communication channel should be closed at the end of the pro-
gram. If this does not happen, the software interface automatically
does it for you when the dynamic link library
COM-HVPSU2D.dll
is
unloaded from the system memory.
CGC Instruments
Tel.: +49 (371) 355 098–55
Hübschmannstr. 18 | D–09112 Chemnitz
Fax: +49 (371) 355 098–60
internet: www.cgc-instruments.com
e–mail: [email protected]