Page: 73/81 User Manual PSU-CTRL-2D, Rev.1-00: Software Interface
Function COM_HVPSU2D_GetConfigList
int COM_HVPSU2D_GetConfigList
(WORD PortNumber,
bool Active [COM_HVPSU2D_MAX_CONFIG],
bool Valid [COM_HVPSU2D_MAX_CONFIG]);
Command: W
©
Response: W
F
..
F
©
Saves the flags of all configurations in the NVM in the variables
Active
and
Valid
, and returns an error code according to Tab. 10.
The variables
Active
and
Valid
passed to the function are
Boolean arrays that must be created before calling the
function. Their size must match the value of the constant
COM_HVPSU2D_CONFIG_NAME_SIZE
(see the declaration file
COM-HVPSU2D.h
).
For the detailed description of the values
Active
and
Valid
, see
.
can be used to obtain
a list of valid configurations without the necessity of periodically calling
the function
. This would take a
long time, especially with devices using a USB interface with a long
latency.
The response to the direct command (
W
©
) contains
[(COM_HVPSU2D_MAX_CONFIG*2)/4]
hexadecimal digits (
F
..
F
),
where the brackets
[]
denote the integer part of the enclosed argu-
ment. The received digits are coded as bit arrays. Analogously to the
flag coding for the function
least significant bit (bit 0) of the first digit corresponds to the variable
Active
and the next bit (bit 1) to the variable
Valid
of the first con-
figuration (i.e.
ConfigNumber = 0
). The following bits (bit 2 and
bit 3) of the digit correspond to the variables
Active
and
Valid
, re-
spectively, of the second configuration (i.e.
ConfigNumber = 1
).
The next hexadecimal digit is composed in the same way and con-
tains the data of the next configuration pair (i.e.
ConfigNumber = 2
and
ConfigNumber = 3
), etc.
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]