Steps towards automated XRD analysis

Did you know that:

  • Your Malvern Panalytical X-ray diffraction (XRD) flor standing system comes with components for automation (free of charge!)?
  • Automatic Program Processing (APP) is running on your PC waiting to realize your automation needs?
  • Setting up a simple automation is just a matter of a few mouse clicks?
  • The key of a powerful full automation is the command line functionality of Malvern Panalytical’s analysis software?

At Malvern Malvern Panalytical, we deliver each XRD instrument with the basic components to add automation to the data flow. It is fairly easy to set up a few frequently required steps by selecting provided predefined scripts. You would use the batch functionality of the Data Collector software and the Automatic Processing Program (APP) to do so. You can quickly realize automation by effectively using the command-line interface in our analysis software, like XRD2DScan, AMASS, and even third-party analytical software. This blog will guide you through the first steps to add automation to your XRD data flow.

The basic components

Data Collector (DC) software is controlling the majority of Malvern Panalytical’s Empyrean and X’pert3 MRD XL systems. With this software, the Automatic Processing Program (APP) is installed in the autostart of the PC so that the APP starts automatically at each start of the PC. The software is active if its icon appears in the system tray at the bottom right of the desktop screen.

APP is configured by defining and activating rules that are linked to the measurement programs of the DC. When DC saves measured data at the end of a measurement program, a trigger is sent to APP. It checks if a proper rule, which defines an action, is present. This action will then be executed (see Figure 1).

Figure 1. Schematic workflow of Automatic Processing Program (APP)

This process is repeated after each measurement. APP also includes some predefined script files for common processes [1].

Another important feature for realizing automation projects is the command-line interface that is supplied by the analysis software packages. The command-line interface of the software allows interacting with it by sending defined commands. The general pattern is: Program.exe [files] [options].

Depending on the program [files] can be several input files including full path information. The demanded action is set in the [options] section. It will send the measured data together with the necessary additional information for automatic fitting to the analysis software. Result files will be saved and an HTML report generated which will be printed.

Refer to the Help of the analysis software for detailed information about the supported commands.[2]

Figure 2 shows a simple example of a .cmd batch.

Figure 2. Windows batch for automated fitting analysis. The batch is called with data filename as an argument. The analysis program (here: AMASS) and other files are defined including their paths.

Steps for automated analysis

Make sure that you prepare all necessary input files (for instance: sample model, settings, etc.) and that they are available in predefined folders. Then, you would need to create rule(s) in APP. We highly recommend a script to run the analysis using the analysis software’s command-line interface call. For each data environment, a tailored solution can be created. Even simple batch files (.bat or .cmd) that are supported by Microsoft Windows can do the job. Such a batch is a text file containing a series of defined commands. The script supports constructs enabling conditional branching and looping. Check the internet for a full list of supported commands. A .cmd batch for automated analysis. The batch is called with data filename as argument. The analysis program and other files are defined including their paths. Such a script will be added as a command to an APP rule.

Figure 3. Configuring an APP rule using analysis.cmd script

Of course, you could also use more advanced script languages like Visual Basics or Powershell. To accomplish more complex tasks, we recommend using a well-defined file name structure that contains information separated by pre-defined separators, for instance ‘_’:


Any of the parameters (EpiID, SubID, etc.) can be easily extracted from the filename using the separator and can be used to control the workflow by for example applying lookup tables, etc.:

Figure 4. Example of an analysis control from an extracted parameter utilizing a lookup table

The XML-based Data Collector data format conveniently enables well-known transformation tools to extract information within the file. XML result files can be transferred by the same technique into customized HTML or pdf reports.

The Automatic Program Processing is key

In conclusion, automation can be initiated by the Data Collector software using the Automatic Program Processing (APP). The command-line interface of our analysis software packages supports any kind of automation solution. The XML document structure is designed to facilitate automation solutions. Script solutions (from simple to advanced) are a flexible way to fulfill any requirement. Malvern Panalytical can provide expertise to support you in creating your own solutions or providing a tailored solution. Please contact us if you’d like to learn more.

[1] Quick Start Guide Automatic Program Processing
[2] Help of any Malvern Panalytical analysis software

Further reading