Rigaku Geigerflex XRD Communication Protocol

Rigaku Geigerflex XRD Communication Protocol

In order to write  a LabView progam to update the original MSDOS data acquisition software for the Rigaku I needed to know how the Rigaku controller (D/Max-B) talked to the computer.

The computer and the controller are connected via RS-232. To learn about the communication protocol, some port sniffing was needed. Port sniffing software running on the PC allowed me to eavesdrop on the communication while performing various tasks in the XRD control program.

Here’s what I found so far:

Manual Scan

→ [x02]M1¤1¤A¤B¤¤¤¤¤C¤1¤¤¤DD.DDD¤¤¤¤EE.EEE¤¤¤¤F.FFF¤¤¤¤G.GGG¤¤¤¤H.HH¤¤¤¤JJJJ¤¤K¤¤0¤¤0¤¤0¤¤¤0.000¤0¤¤¤¤1.5406¤¤0¤1¤¤¤¤¤¤¤[NULL][NULL][CR][LF]

→: That’s input
¤: Space (ASCII character)
[x02]: ASCII character x02 (STX, start of text) in hex notation.
[CR]: Carriage return character
[LF]: Line feed character

A: Acqusition Type: 1 for Continuous acq., 2 for Step
B:  1 (Standard), 2 (Summation), 3 (Skip)
C: Threshold or Iteration (depending on B)
D: Start angle (format xx.xxx) in degree
E: Stop angle (format xx.xxx) in degree
F: Scan speed
G: Sampling interval
H: Fixed Time (I guess for Step mode, not sure)
J: Intensity corresponding to Full Scale
K: 1 (cps), 2 (counts)

The 1.5406 is for Cu Kα. Please be aware that the space characters are used as padding. For example, if the start angle is 123.234, one space character left of DD.DDD will be used. In other words the total length of the string should always be the same.

Here’s what comes back from the instrument:

← [NULL]D1¤¤¤¤¤¤¤¤A[CR][NULL]

A: Data sent back from instrument.

This will be one string per data point. Serial port therefore has to be constantly read to empty buffer.

Transmission ends with:

← [NULL]C1[CR][NULL]

Move goniometer

→ [x02]MV¤1¤1¤A¤¤¤BB.BBB[CR][LF]
← [NULL]C1[CR][NULL]

A: 1 (2-Theta/Theta mode), 2 (2-Theta), 3 (Theta)
B: Angle to move to

Read goniometer angle

→ [x02]AR¤1¤1¤A[CR][LF]
← [NULL]¤¤BB.BBB[CR][NULL]
← [NULL]C1[CR][NULL]

A: 1 (2-Theta/Theta mode), 2 (2-Theta), 3 (Theta)
B: Current goniometer angle

Operate Shutter

→ [x02]XS¤1¤A[CR][LF]
← [NULL]C1[CR][NULL]

A: 0 (close shutter), 1 (open shutter)

Fixed Time Read (stay on one angle and measure intensity)

→ [x02]XS¤1¤1[CR][LF] (open shutter first)
← [NULL]C1[CR][NULL]
→ [x02]FT¤1¤¤¤A.AA¤¤¤¤¤¤¤0¤B¤¤¤CC¤1[CR][LF]
← [NULL]D1¤¤¤¤¤¤¤¤D[CR][LF]

A: Fixed  measurement time in seconds (I believe)
B: 1 (cps), 2 (counts)
C: Repeats
D: Measured data

Detector High Voltage

→ [x02]HV¤1¤1¤AAA[CR][LF]
← [NULL]C1[CR][NULL]

A: HV in volts

Pulse Height Analyser (PHA)

→ [x02]PH¤1¤¤¤A¤¤¤B[CR][LF]
← [NULL]C1[CR][NULL]

A: Baseline
B: Window

Datum Move (Move goniometer to datum calibration)

→ [x02]DM¤1¤1¤A[CR][LF]
← [NULL]C1[CR][NULL]

A: 2 (2-Theta), 3 (Theta)

Add 2-Theta/theta Offsets to Goniometer Readings

→ [x02]CL¤1¤A¤¤¤B.BBB[CR][LF]

A: 2 (2-Theta), 3 (Theta)
B: Angle Offset

Stop all Operations

→ [x02]SP¤0[CR][LF]
← [NULL]C0[CR][NULL]

How to Set Datum

→ [x02]DM¤1¤1¤2[CR][LF] (move 2-theta gears)
← [NULL]C1[CR][NULL]
→ [x02]CL¤1¤2¤¤¤1.354[CR][LF]
← [NULL]C1[CR][NULL]
→ [x02]DM¤1¤1¤3[CR][LF] (move theta gears)
← [NULL]C1[CR][NULL]
→ [x02]CL¤1¤3¤¤¤0.123[CR][LF]
← [NULL]C1[CR][NULL]

Commands I have not yet Identified

→ SR1, SR2, XG1

← CX, C2

Leave a Reply

Your email address will not be published. Required fields are marked *