beautypg.com

Cmd_query_user_data, Cmd_query_spectra – GBS Elektronik MCA-527 Firmware Commands User Manual

Page 42

background image

MCA527

Command name

CMD_QUERY_USER_DATA

Compatibility

Compatible to the MCA166 command.

Execution right

Not necessary

Description

The command reads sixteen 32 bit values from the MCA memory.
e: 0 ... 255

start entry number

Format

integer

integer

integer

long

integer

Parameter

preamble

command

e

0

end flag

Byte string (HEX)

A5

5A

5E

00

e

00

00

00

00

00

B9

9B

Result data array

Byte offset 0

Sixteen 32 bit values

32 bit [16]

Byte offset 64

unused

42 bytes

Byte offset 106

Command flag and parameters

8 bytes

Byte offset 114

unused

12 bytes

Byte offset 126

Checksum

unsigned short

Byte offset 128

unused

4 bytes

Command name

CMD_QUERY_SPECTRA

Compatibility

Compatible to the MCA166 command.

Execution right

Conditionally necessary (see buffer control and remarks)

Description

The command reads the spectrum data.
n:

Number of first channel and buffer control (Bit 15 ... 12)

c:

Compress factor (1 ... 128)

Format

integer

integer

integer

integer

integer

integer

Parameter

preamble

command

n

c

0

end flag

Byte string (HEX)

A5

5A

5B

00

n

l

n

h

c

l

c

h

00

00

B9

9B

Buffer control

See CMD_QUERY_SPECTRA_EX (next command).

Result data array

Byte offset 0

Channels counts

unsigned long [32]

Byte offset 128

Read out buffer state

unsigned short OCCUPIED

= 0x2000

OVERRUN

= 0x4000

FILLED

= 0x8000

Byte offset 130

Checksum

unsigned short

Remarks

The compress factor determines how many channels each are combined to one value. This value is
the maximum of the combined channels. The transfer of combined channels can be used to reduce
data transfer if the data are only intended for displaying the accumulation of the spectrum during a
measurement. If the spectrum data are intended for evaluation, the whole spectrum with compress
factor 1 has to be transferred.
See also the remarks of CMD_QUERY_SPECTRA_EX (next command).

42