Page: 53/81 User Manual PSU-CTRL-2D, Rev.1-00: Software Interface
Function COM_HVPSU2D_GetMainState
int COM_HVPSU2D_GetMainState
(WORD PortNumber, WORD & State);
Command: M
©
Response: M
SSSS
©
Saves the main device status in the variable
State
and returns an
error code according to Tab. 10.
The possible values of the variable
State
are given by the constants
COM_HVPSU2D_XXX
(see the declaration file
COM-HVPSU2D.h
). If the
device is working properly, the variable
State
returns the value
COM_HVPSU2D_STATE_ON
. Values higher or equal to
COM_HVPSU2D_STATE_ERROR
indicate an error. Note that the de-
tected errors are also indicated by the LED on the front panel.
The response to the direct command (
M
©
) contains 4 hexadecimal
digits (
SSSS
) for the variable
State
.
Function COM_HVPSU2D_GetDeviceState
int COM_HVPSU2D_GetDeviceState
(WORD PortNumber, DWORD & DeviceState);
Command: S
©
Response: S
DDDDDDDD
©
Saves the detailed state of the device in the variable
DeviceState
and returns an error code according to Tab. 10.
The variable
DeviceState
is a bit combination of the constants
COM_HVPSU2D_DEVST_XXX
(see the declaration file
COM-
HVPSU2D.h
). If the device is working properly, the variable
DeviceS-
tate
returns the value
COM_HVPSU2D_DEVST_OK
(i.e. zero), nonzero
values indicate an error. The errors detected
by the firmware set the state of the device (see function
).
The response to the direct command (
S
©
) contains 8 hexadecimal
digits (
DDDDDDDD
) for the variable
DeviceState
.
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]