In principle it is possible to change measurement groups frequently depending on the application. The following sections explain how this is done. However, it may be more efficient not to change MGs but to switch between pre-defined MGs. Section 11.2.5 explains how measurement groups can be defined in online.xml. This procedure has the advantage that MGs mentioned in online.xml are automatically created by a SardanaAIO action.