Closed prjemian closed 3 years ago
Several things are off:
energy_units, not
energy_EGU`hkl.diffract.Diffractometer.energy
in the Diffractometer()
classself.calc.energy
, instead call self._update_calc_energy()
value
argument in self._update_calc_energy()
When testing including a real EPICS IOC, used PVs from a soft IOC in lieu of a real monochromator. Here's the test daatabase record file for EPICS softIoc -d registers.db
test command"
# file: registers.db
#
# purpose: test example for issue #72
# connect control system energy with diffractometer
record(ao, "EPICS:energy") {
field(DESC, "monochromator energy")
field(PREC, 5)
field(EGU, "keV")
field(VAL, 12.0)
}
record(ao, "EPICS:energy:offset") {
field(DESC, "monochromator energy offset")
field(PREC, 5)
field(EGU, "keV")
field(VAL, 0.0)
}
record(bo, "EPICS:energy:lock") {
field(DESC, "lock hkl to mono?")
field(ONAM, "locked")
field(ZNAM, "unlocked")
field(VAL, 0)
}
Example was revised and tested. The tests have exposed some problems with how changes in units and offset are handled by the
Diffractometer()
class.Need to revise how
Diffractometer()
responds to changes in units and offset signals. One problem observed is how the energy signal is affected when offset is changed.Originally posted by @prjemian in https://github.com/bluesky/hklpy/issues/121#issuecomment-824388061