Slow control: configuring
This page covers the ODB settings of slow control equipment.
For the concepts and day-to-day use, see Slow control: overview.
For writing slow control frontends and drivers, see Slow control: programming.
A slow control equipment keeps its settings in /Equipment/<name>/Settings, like any other equipment. Which keys it has depends on the framework that its frontend uses: see Class driver framework or mdev framework. If you don't know which one, look at the equipment's Settings directory: a Devices subdirectory means the class driver framework.
Settings for both frameworks
Many of the keys are also used by the equipment page, e.g. Names, Unit <variable>, Format <variable> and Editable. See Frontends: configuring for how the equipment page uses them, and for the settings in Common (e.g. how often events are sent, and Log history).
Class driver framework
The class driver creates the keys below the first time the frontend starts, with their default values. A class driver usually takes the defaults from the device driver, and otherwise uses the defaults listed here. Most arrays have one element per channel.
The class drivers watch most of their settings, so a change in the ODB takes effect straight away.
generic
| ODB key | Meaning |
|---|---|
Variables/Demand |
The values to set. When you change a value, the frontend sets it in the device |
Variables/Measured |
The values read back from the device |
Settings/Names |
Name of each channel. The default is the name from the device driver, or Default%CH <n> |
Settings/Update Threshold Measured |
A measured value is only written to the ODB when it has changed by more than this. The default comes from the device driver, or is 1 |
The generic class driver doesn't create an Editable key. To change the demand values on the equipment page, set Settings/Editable to Demand.
hv
| ODB key | Default | Meaning |
|---|---|---|
Variables/Demand |
The voltages to set. A value larger than Voltage Limit is reduced to the limit, in the ODB too |
|
Variables/Measured, Variables/Current |
The voltages and currents read back from the device | |
Variables/ChStatus, Variables/ChState, Variables/Temperature |
Only if the device driver reports them (with the DF_REPORT_ flags) |
|
Settings/Names |
From the device, or Default%CH <n> |
Name of each channel |
Settings/Editable |
Demand (and ChState) |
The variables that can be changed on the equipment page. Set again every time the frontend starts, so your own changes are lost |
Settings/Unit Demand, Unit Measured, Unit Current |
V, V, uA |
Units shown on the equipment page |
Settings/Format Demand, Format Measured, Format Current |
%f2 |
Formats of the values on the equipment page |
Settings/Update Threshold Measured |
0.5 |
A measured voltage is only written to the ODB when it has changed by more than this |
Settings/Update Threshold Current |
1 |
The same, for the current |
Settings/Zero Threshold |
20 |
Changes of a measured voltage are only written to the ODB while its size is above this, to ignore noise around zero |
Settings/Voltage Limit |
3000 |
Largest voltage that can be set. Also sent to the device, if it supports a limit |
Settings/Current Limit |
3000 |
Current limit of each channel, sent to the device. What happens when it is reached depends on the device |
Settings/Trip Time |
10 |
Trip time of each channel, sent to the device. Its meaning depends on the device |
Settings/Ramp Up Speed, Ramp Down Speed |
0 |
How fast the voltage changes, in units per second (e.g. V/s). 0 sets the new voltage straight away. When the polarity changes, the voltage first ramps down to zero. Devices that ramp by themselves (DF_HW_RAMP) get the new voltage straight away, and the speeds are sent to the device |
multi
| ODB key | Default | Meaning |
|---|---|---|
Variables/Input |
The values read from the input channels, after the conversion below | |
Variables/Output |
The values to set on the output channels | |
Settings/Names Input, Names Output |
From the device, or Input Channel <n> and Output Channel <n> |
Names of the input and output channels |
Settings/Update Threshold |
0.1 |
An input value is only written to the ODB when it has changed by more than this |
Settings/Input Factor, Input Offset |
1, 0 |
Input is the value from the device × Input Factor − Input Offset |
Settings/Input Formula |
Empty | If set, used instead of the factor and offset: Input is the result of the formula, with x as the value from the device, e.g. x*x/100. Errors in a formula are written to the message log |
Settings/Output Factor, Output Offset |
1, 0 |
The value sent to the device is Output × Output Factor − Output Offset |
Settings/Unit Input, Unit Output |
Empty | Units shown on the equipment page |
Settings/Format Input, Format Output |
%f2 |
Formats of the values on the equipment page |
The multi class driver doesn't create an Editable key. To change the outputs on the equipment page, set Settings/Editable to Output.
Other class drivers
cd_rf, cd_fgd and cd_ivc32 are class drivers for particular hardware. See their source files in $MIDASSYS/drivers/class for their settings.
Device settings
Each device in the equipment has a directory Settings/Devices/<device>, named after the device in the frontend's device driver list:
| ODB key | Meaning |
|---|---|
Enabled |
Set it to n to run the frontend without this device. The hv and multi equipment is then shown as Partially disabled on the Status page. Default y |
DD |
Settings of the device driver, e.g. the number of the crate. Some device drivers put their settings directly in Settings/Devices/<device> instead (e.g. Channel name for EPICS) |
BD |
Settings of the bus driver, e.g. RS232 Port and Baud for the rs232 bus driver |
The device and bus drivers create their settings with default values the first time the frontend starts. Most of them only read their settings when the frontend starts, so restart the frontend after changing them.
Troubleshooting class driver equipment
The equipment is shown as an error (e.g. Hardware error) on the Status page. A device couldn't be started when the frontend started, so the whole equipment was disabled. The rest of the frontend keeps running. The message log says which equipment, and the frontend's output says which device. Fix the connection (e.g. in Settings/Devices/<device>/BD) and restart the frontend, or set Settings/Devices/<device>/Enabled to n to run without that device.
The values in the ODB don't change. A measured value is only written to the ODB when it changes by more than its update threshold (and, for hv, while its size is above Zero Threshold). Make the threshold smaller if you need to see small changes.
You can't change the values on the equipment page. The generic and multi class drivers don't create Settings/Editable, so add it yourself (see above). The hv class driver sets Settings/Editable again every time the frontend starts.
The values aren't recorded in the history. The values are only recorded if Log history in the equipment's Common directory is set, and mlogger is running. See History: configuring.
mdev framework
Each mdev driver creates its own keys, and doesn't use the class driver keys above. The frontend code chooses the channels, so most of these keys are written from the code each time the frontend starts.
mdev_mscb
The mdev_mscb driver for MSCB devices creates:
| ODB key | Meaning |
|---|---|
Variables/MSCB |
The values of all the MSCB variables in the frontend, one element per variable. NaN until a value has been read |
Settings/Names MSCB, Unit MSCB, Format MSCB |
Name, unit and format of each variable, from the frontend code |
Settings/Editable |
Boolean array: y for the variables that are outputs |
Settings/Group |
Boolean array: y for the variables where the frontend code started a new group (with start_new_group()). The equipment page draws a line above them |
Settings/MSCB/<node>/Enabled |
Set it to n to skip this node. Default y |
Settings/MSCB/<node>/Device, Pwd, Address, Variables |
The submaster, password, node address and MSCB variable names of the node, from the frontend code. They are written every time the frontend starts, so change them in the code instead |
mdev_revpi
The mdev_revpi driver for the Revolution Pi creates keys like those of mdev_mscb. They are all written from the frontend code each time the frontend starts:
| ODB key | Meaning |
|---|---|
Variables/RevPi |
The values of the Revolution Pi variables in the frontend, one element per variable. NaN until a value has been read |
Settings/Names RevPi, Unit RevPi, Format RevPi |
Name, unit and format of each variable |
Settings/Editable |
Boolean array: y for the variables that are outputs |
Settings/Group |
Boolean array: draws a line above the variables where the frontend code started a new group |
Settings/RevPi/Variables |
The names of the variables in the Revolution Pi's process image |
mdev_tdk
The mdev_tdk driver for TDK power supplies has one array element per power supply. Unlike the other mdev drivers, most of its settings are read from the power supplies when the frontend starts, and your changes are sent to them:
| ODB key | Meaning |
|---|---|
Variables/Demand |
The voltages to set, in V. Read from the power supplies when the frontend starts. When you change a value, it is sent to the power supply |
Variables/Voltage, Variables/Current |
The voltages and currents read back from the power supplies |
Settings/Output On |
Whether the output of each power supply is on. Change it to switch an output on or off. The frontend code can refuse to switch an output off, in which case the value goes back to y and an error is written to the message log |
Settings/Over-voltage protection |
The over-voltage protection level of each power supply, in V. Changes are sent to the power supply |
Settings/Current limit |
The current limit of each power supply, in A. Changes are sent to the power supply |
Settings/Allow write access |
Set it to n to only monitor the power supplies: changes to Demand, Output On, Over-voltage protection and Current limit are then not sent. Default y |
Settings/Enabled |
Set an element to n to skip that power supply. Default y |
Settings/Mode, Settings/Fault Register, Settings/Interlock Trigger |
Written by the driver: the operating mode reported by each power supply, its fault register, and whether its interlock has tripped |
Settings/IP Address, Settings/Names |
The address and name of each power supply, from the frontend code. They are written every time the frontend starts |
Settings/Display, Grid display, Editable, Group, and the units |
How the equipment page shows the power supplies. Created with default values, which you can change |
Troubleshooting mdev equipment
The frontend stops when it starts. Unlike the class driver framework, an mdev frontend doesn't start at all if it can't connect to a device. The message log says which device (e.g. Cannot connect to MSCB device "mscb394:43"). Fix the connection, or disable the device so that the frontend runs without it: set Settings/MSCB/<node>/Enabled to n for mdev_mscb, or the device's element of Settings/Enabled to n for mdev_tdk.
A value is shown as NaN. With mdev_mscb or mdev_revpi, the value hasn't been read yet, or (for mdev_mscb) its node is disabled.
You can't change a value on the equipment page. With mdev_mscb and mdev_revpi, only the variables that the frontend code adds as outputs are editable. Change the frontend code, not Settings/Editable, as it is written again every time the frontend starts.
Changes to a TDK power supply have no effect. Check that Settings/Allow write access is y, and that the power supply is enabled in Settings/Enabled.
The values aren't recorded in the history. The values are only recorded if Log history in the equipment's Common directory is set, and mlogger is running. See History: configuring.