Skip to content

WIP: DT54xxPS Current Monitor Autoranging

Karol Krizka requested to merge dt54xxps-autorange into devel

WIP: Need to rethink how the auto-ranging. The DT5472 takes a long time to update the measurement after the range is changed and there is no indication for the updated measurement.

The DT54xx power supplies have two resolutions for current (high and low). This adds functionality to automatically pick the current range.

Note the confusing terminology. To get high resolution, you have to set a low range. And vice versa.

The auto-ranging functionality first measures the current at high range. If it is low enough (<13μ, empirically derived from DT5472), it sets the low range. High range is restored at the end of the measurement.

The range switching is necessary, because the high resolution also determines the maximum allowed current.

The auto-ranging can be enabled (default) or disabled though the hardware configuration JSON ("autorange" key) or through the setIMonAutoRange() function.

A few other updates to the DT54xxPS class:

  • Move wait for ramp to finish to a waitRamp function for easier reusability.
  • Add get/setIMRange function to directly retrieve/set the current monitor range on the power supply.
  • Fix parsing of status, which is returned as hex not decimal by the power supply.
  • Change invalid channel message to "Invalid channel: "+channel for consistency with other classes.
Edited by Karol Krizka

Merge request reports