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:


Move goniometer

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

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]

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

Operate Shutter

→ [x02]XS¤1¤A[CR][LF]

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)
→ [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]

A: HV in volts

Pulse Height Analyser (PHA)

→ [x02]PH¤1¤¤¤A¤¤¤B[CR][LF]

A: Baseline
B: Window

Datum Move (Move goniometer to datum calibration)

→ [x02]DM¤1¤1¤A[CR][LF]

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]

How to Set Datum

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

Commands I have not yet Identified

→ SR1, SR2, XG1

← CX, C2

2 thoughts on “Rigaku Geigerflex XRD Communication Protocol

  1. Hello Mike, I have an old Rigaku XRD DMAX and was planning to do exactly the same as you did with the Geigerflex but the computer stoped talking to the Rigaku. It seems to be a computer problem because I don´t see any activity on the rs232 at the Rigaku interfaces. Do you think these commands are applicable to the DMAX? Do you have any suggestions?

    1. I assume you don’t have the original software anymore? Did you run your own program when the communication stopped? It might be problem with how the RS232 is accessed. You have to constantly read the port to empty the send buffer on the Rigaku side. If you don’t the data transmission stops at some point until you start reading data.

      I’m not 100% sure if the commands also work for the DMAX, but I would think so. The parameters that follow the command may be different depending on how the instrument is equipped.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.