23
4. FIRMWARE COMMANDS AND RESPONSES
Software communication with the EASY-MCA will take place through the C
ONNECTIONS
soft-
ware layer. C
ONNECTIONS
is used by all ORTEC software and can be accessed for other software
development with our C
ONNECTIONS
Programmer’s Toolkit with Microsoft ActiveX
®
Controls
(A11-BW). Use the DLL interface call
MIOComm
or the ActiveX control UCONN’s
Comm
method to send commands to instruments and receive responses.
4.1. Command Format
The commands consist of a command header that may be followed by numeric parameter values.
The header consists of a verb; a verb and noun; or a verb, noun, and modifier; each separated by
underscores. The first four letters of a word in a command will always be enough to uniquely
identify that word when composing commands for the instrument. For example, the command
ENABLE_GAIN_STABILIZATION can be abbreviated to ENAB_GAIN_STAB.
Numeric parameters are unsigned integer numbers that follow the command header separated by
one or more spaces. Specific commands require multiple parameters, separated by commas, that
specify numeric quantities related to the operation of the MCB, such as live time or conversion
gain. The command SET_WINDOW 0,8192 has two parameters, 0 and 8192, which set the
window of interest to start at channel 0 and continue for 8192 channels.
Some parameters are optional and are delimited by square brackets in the command prototype
line to distinguish them from mandatory parameters (e.g., SET_WINDOW [start,length]). Com-
mands with optional parameters can be sent to the MCB without the optional parameters, in
which case the instrument behavior will be explained in the command description.
4.2. Error Codes
On each completion of the command, the MCB returns a macro error code and micro error code.
The macro error code represents the general class of error with 0 meaning no error, and the
micro error code represents the sub-class of error with 0 meaning no error. In case of error con-
dition, you can use the
MIOGetLastError
(DLL interface) or
GetErrMajor, GetErrMinor
(ActiveX control interface).
Macro error codes:
0
Success
1
Power-up just occurred
2
Battery-backed data lost
129
Command syntax error