This paper aims to optimize the parameters of a portable
device that combines X-ray diffraction (XRD) and X-ray fluorescence
(XRF) analysis techniques. By using the same X-ray source and
detector, the device enables the simultaneous acquisition of
two-dimensional XRD and XRF information from a sample with the
advantage of high analysis efficiency and consistency in the
measurement points. The equipment and slit materials are discussed,
including the selection of the X-ray source (Moxtek MAGNUM) and the
detector (Andor CCD camera). We also explore two different slit
designs (the bottom-hole and side-hole) and optimize their
dimensions using rectangular holes instead of inclined trapezoidal
holes. Considering the fluorescence X-rays of the filters in the
X-ray tube spectra, a theoretical formula is derived for rapid and
accurate calculation. The calculated results are compared with the
experimental results of Al and Ni filters, demonstrating good
agreement across various tube voltages and filter
thicknesses. Furthermore, an XRD/XRF comprehensive analysis platform
is established. The effects of tube voltage, tube current, exposure
time, and pixel-binning on the single-pixel events of the CCD camera
are investigated and can be used to guide the selection of
appropriate device parameters. The effects of the frame and tube
voltage on the XRD/XRF analysis efficiency are examined for several
sample materials, including Al, α-Fe, Zn, and
ZrO2(Y2O3).