Page: 70/81 User Manual PSU-CTRL-2D, Rev.1-00: Software Interface
Function COM_HVPSU2D_GetConfigName
int COM_HVPSU2D_GetConfigName
(WORD PortNumber, unsigned ConfigNumber,
char Name [COM_HVPSU2D_CONFIG_NAME_SIZE]);
Command: A
NN
©
Response: A
NNS
..
S
©
Saves the name of the configuration in the NVM with the number
given by the variable
ConfigNumber
in the variable
Name
and returns
an error code according to Tab. 10.
For the configuration number in the variable
ConfigNumber
, see
.
The variable
Name
passed to the function must be created
before calling the function. Its size must match the value of the
constant
COM_HVPSU2D_CONFIG_NAME_SIZE
(see the declaration
file
COM-HVPSU2D.h
).
Note that the return value is a copy of the data from the NVM,
thus there is no guarantee that the value is a null-terminated
character string. To generate this string format, allocate the
variable
Name
with one additional character and set the value of
the last character of the array to 0 after calling the function
.
The call to the function
not modify the configuration name, this is only possible with the func-
tion
The direct command (
A
NN
©
) contains two hexadecimal digits (
NN
)
for the variable
ConfigNumber
. If the command is executed
successfully, the device response (
A
NNS
..
S
©
) has the
same beginning as the command and additionally returns
2*COM_HVPSU2D_CONFIG_NAME_SIZE
hexadecimal digits (
S
..
S
)
for the variable
Name
. Note that in this way, the variable
Name
is trans-
ferred in a binary format and thus can be used to store any general
character, not only ASCII ones.
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]