3 sending firmware commands to the mca, Description of the mca communication dll – GBS Elektronik MCA-166 Communication DLL User Manual
Page 7

Description of the MCA Communication DLL
3 Sending Firmware Commands to the MCA
For information about MCA firmware commands (CMD_
XXX
) see document “Description of the
MCA527 Firmware Commands” or appendix “Description of the MCA166 firmware functions” within
the MCA-166 User's Manual
.
Name
MCA_COMM, MCA_COMM6
Description
These functions allow to send single firmware commands to the MCA. These function are only intended
for testing. The function MCA_COMM6 has been added because new MCA527 commands need more
than 4 parameters. For the real work with the MCA you should use the other functions (MMCA_ ...)
described in chapter 4.
Regardless of its type, each parameter of the firmware command is passed to one unsigned long
parameter each. It will be cast within the function to the required type.
Declaration
ERROR_FLAG CALLBACK MCA_COMM(LPSTR command,LPSTR rec_data,
unsigned long param1=0,unsigned long param2=0,
unsigned long param3=0,unsigned long param4=0);
ERROR_FLAG CALLBACK MCA_COMM6(LPSTR command,LPSTR rec_data,
unsigned long param1=0,unsigned long param2=0,
unsigned long param3=0,unsigned long param4=0
unsigned long param5=0,unsigned long param6=0);
command
Command name (e. g. “CMD_START”)
rec_data
Pointer to RECDATA or command specific structure in which the received data is returned.
param1
1
st
parameter if required
param2
2
nd
parameter if required
param3
3
rd
parameter if required
param4
4
th
parameter if required
param5
5
th
parameter if required
param6
6
th
parameter if required
Return value
ERROR_OK
= 0
successful data transfer
ERROR_INTERFACE
= 1
communication port is not initialized
ERROR_UNKNOWN_COMMAND
= 2
unknown command
ERROR_COMMUNICATION
= 3
faulty data transfer
ERROR_INVALID_PARAM
= 4
invalid parameter
ERROR_RUNNING_MEAS
= 5
measuring is running, but stopped
measurement is required for this command
ERROR_VIOLATED_RIGHT
= 6
execution right violation
ERROR_STOPPED_MEAS
= 7
measurement is stopped, but running
measurement is required for this command
ERROR_WRONG_MODE
= 8
wrong mode for using this command
ERROR_UNHANDLED_COMMAND
= 9
not handled by this firmware version
ERROR_FILE_WRITING_IN_PROCCESS
= 10
file writing is in process; this command must
not be called before the process is finished
7