932512A / 0114
ORTEC
®
EASY-NIM
™
928 Suite
41
5.
HARDWARE COMMANDS AND RESPONSES
Communication with a Model 928 consists of sending commands to and receiving commands from the MCB. Use the
DLL interface call
MIOComm
or the ActiveX control UCONN’s
Comm
method to send commands to instruments and
receive responses.
5.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 928. For
example, the command
ENABLE_OVERFLOW_PRESET
can be abbreviated to
ENAB_OVER_PRES
.
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]
). Commands 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.
5.2.
ERROR CODES
Upon 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 condition, 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
131
Command execution error
132
Invalid Command
For macro code 129 (syntax error) or 131 (execution error), the following apply:
1
Invalid Verb
2
Invalid Noun
4
Invalid Modifier