Cmd_query_extension_rs232_rx, Cmd_query_histogram – GBS Elektronik MCA-527 Firmware Commands User Manual

Page 45

Advertising
background image

Description of the MCA527 Firmware Commands

Name

CMD_QUERY_EXTENSION_RS232_RX

Compatibility

New MCA527 command.

Execution right

Conditionally necessary (see remarks)

Description

The command returns the last 1024 bytes received by the RS232 interface of the extension port

.

b:

Buffer control:

0 = current data
1 = buffered data
2 = buffered data, unlock buffer
3 = buffered data, lock buffer

Format

integer

integer

integer

long

integer

Parameter

Preamble

command

b

0

end flag

Byte string (HEX)

A5

5A

25

01

b

l

b

h

00

00

00

00

B9

9B

Result data array

Byte offset 0

Number of bytes received since the last RS232 data transmission.

Byte offset 2

Data

1024 bytes

Byte offset 1026

Command flag and parameters

8 bytes

Byte offset 1034

Checksum

unsigned short

Remarks

If the MCA527 measures in repeat mode, the execution right is necessary.
The capability to lock and unlock the buffer is relevant if the MCA527 measures in repeat mode. It is
also used with the commands CMD_QUERY_SPECTRA and CMD_QUERY_SPECTRA_EX.
Locking the buffer makes sure that the buffer is not overwritten with the data of the next measuring
cycle before the buffer is not unlocked again.
If the MCA527 measures in a repeat mode which writes to the microSD memory card, the access to
the buffer is denied. In this case the buffer is exclusively controlled by the MCA527.

Name

CMD_QUERY_HISTOGRAM

Compatibility

New MCA527 command.

Execution right

Not necessary

Description

The command causes the MCA to acquire a histogram from 500.000 ADC samples (= 50 ms).
s:

start (0 ... 16384 – 256 * class interval width)

c:

class interval width (1, 2, 4 ... 64)

The command is ignored and responds with an error value if a measurement is still running.

Format

integer

integer

integer

integer

integer

integer

Parameter

Preamble

command

s

c

0

end flag

Byte string (HEX)

A5

5A

09

01

s

l

s

h

c

00

00

00

B9

9B

Result data array

Byte offset 0

Sample counts within the 256 class intervals

unsigned long [256]

Byte offset 1024

Command flag and parameters

8 bytes

Byte offset 1032

Checksum

unsigned short

45

Advertising