Switcher classes

class nicos.generic.switcher.Switcher

Bases: Moveable

The switcher is a device that maps switch states onto discrete values of a continuously moveable device.

This is useful if you have for example a motor that only every moves to certain discrete positions, e.g. a monochromator changer. Then you can control it using

move(changer_switch, 'up')
move(changer_switch, 'down')

instead of moving the axis to positions hard to understand:

move(changer, 14.55)
move(changer, 51.3)

and still have the underlying continuously moveable device available for debugging purposes.

Attached devices

moveable

The continuous device which is controlled. Type: Moveable.

Parameters

precision (float, mandatory in setup)

Precision for comparison.

states (a list of str, mandatory in setup)

List of state names.

values (a list of any value, mandatory in setup)

List of values to move to.

Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit

class nicos.generic.switcher.ReadonlySwitcher

Bases: Readable

Same as the Switcher, but for read-only underlying devices.

Attached devices

readable

The continuous device which is read. Type: Readable.

Parameters

precision (float)

Precision for comparison. Default value: 0.

states (a list of str, mandatory in setup)

List of state names.

values (a list of any value, mandatory in setup)

List of values to move to.

Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit

Previous topic

Slit class

Next topic

Manual moveable classes