GBS Elektronik MCA-527 Firmware Commands User Manual

Page 3

Advertising
background image

Description of the MCA527 Firmware Commands

ATTENTION! This description is subject to change. The current one refers to MCA527 firmware
version 14.05.

The MCA527 provides all MCA166 firmware functions. They are identical or else at least compatible to the
MCA166 firmware functions. But there are also entirely new firmware functions. Older software applications
that use only the MCA166 firmware functions are still usable to operate the MCA527. However, they waste
the new capabilities of the MCA527.

Since the MCA527 can be operated by different interfaces (RS232, USB or Ethernet) concurrently, the
MCA527 grants an execution right for commands which must not be executable by different applications at
the same time.

The execution right is granted to that application that calls first such a command.

An application keeps the

granted execution right as long as it communicates continuously with the MCA527. It loses the execution
right when it does not communicate for more than 15 seconds.

The execution right is valid only for one communication path. For example, if an application owns the
execution right for the RS232 interface, it has to release that execution right by interrupting the
communication for at least 15 seconds before it or another application can obtain the execution right for the
Ethernet.

The communication between computer and MCA527 runs in the following way. The computer sends a 12
bytes long command. Each command consists of the preamble (0xA5, 0x5A), the command number (2
bytes), the parameters (6 bytes) and the end flag (0xB9, 0x9B). The MCA527 usually responses
immediately, but for some commands the response time is up to 1 second. The result data array is
embedded between the preamble and the end flag. The preamble is always 0xA5, 0x5A. The end flag
informs about the result of the command according the following table.

0xB9, 0x9B: successful

0xA7 0xAA µSD memory card error

0xA8 0xAA file writing is presently in process, but this is forbidden for this command

0xA9, 0xAA: not handled by this firmware version (either generally or customized)

0xAA, 0xAA: invalid parameter

0xAB, 0xAA: unknown command

0xAC, 0xAA: measurement is running, but stopped measurement is required for this command

0xAD, 0xAA: execution right violation

0xAE, 0xAA: measurement is stopped, but running measurement is required for this command

0xAF, 0xAA: wrong mode for using this command (with this parameters)

If the end flag indicates an unsuccessful command, the result data array contains always 132 bytes without
further information. If the end flag indicates a successful command, the standard result data array contains
132 bytes with the 8 sent data bytes (without preamble and end flag) at byte offset 106 and a two byte
checksum calculated from the preamble, the result data array and the end flag at byte offset 126. Result
data arrays which contains more information or differs from the standard are extra specified within the
command description.

The RS232 interface is able to communicate with 38.400, 115.200 and 307.200 baud, the USB interface
communicates additionally with 3.000.000 baud. In order to set a baud rate on the MCA527, the desired
baud rate has to be set on the computer. Different baud rates on computer and MCA527 causes frame
errors. If the MCA527 detects frame errors, it swaps the baud rate (38.400

115.200

307.200

3.000.000

38.400). Unfortunately, the MCA527 is unable to detect frame errors in all cases. If the current

baud rate on MCA527 is 38.400 or 115.200 and the baud rate on the computer is set to 3.000.000, the
MCA527 does not detect frame errors and does not swap the baud rate. This behavior has to be considered
if the baud rate is set.

3

Advertising