GBS Elektronik MCA166-USB User Manual

Page 37

Advertising
background image

The other arguments are the parameters of the firmware command. These arguments are optional since

not all commands use the same number of parameters. Unnecessary arguments you can leave out.
Information about the parameters you can find in appendix 4. You can ignore the parameters

”preamble”, ”command” und ”end flag” listed in this document. These parameters are assigned the right
value automatically. The parameters that you pass to the function MCA_COMM are always long integer.

Within the function these parameters are partially passed on to variables with another data type,
therefore it is imperative that the maximum values specified in the document are not exceeded. The

return value indicates the result of the data transfer. It can be one of the following values:

ERROR_OK

= 0

successful data transfer

ERROR_INTERFACE

= 1

communication port is not initialized

ERROR_INVALID_COMMAND

= 2

unknown command

ERROR_COMMUNICATION

= 3

faulty data transfer

ERROR_INVALID_PARAM

= 4

invalid parameter

A3.1.3

Functions to work with the MCA

For the work with the MCA a lot of functions are available. You can subdivide all functions in five groups:

Function for resetting the MCA (MMCA_RESET)

Functions for starting and stopping the data acquisition (MMCA_..._AQUIRE)

Functions for clearing (MMCA_CLEAR_...)

Functions for setting (MMCA_SET_...)

Functions for query (MMCA_QUERY_...)

The query functions are handed over a reference to a specific data structure. You can derive the name of

the structure from the name of the function, by leaving out ”MMCA_” from the function name. (e. g.
function MMCA_QUERY_STATE requires the data structur QUERY_STATE). The functions and data

structures are listed and described in chapter A3.2. You can also find important information in the files
mca32com.bas (Visual Basic) and mca_comm.h (C/C++).

The return value indicates the result of the data transfer. It can be one of the following values:

ERROR_OK

= 0

successful data transfer

ERROR_INTERFACE

= 1

communication port is not initialized

ERROR_COMMUNICATION

= 3

faulty data transfer

ERROR_INVALID_PARAM

= 4

invalid parameter

37

Advertising
This manual is related to the following products: