Skip to content

Ensure readbacks of values are always the values as reported by the hardware registers.

In our codebase i noticed that when writing parameters to the hardware we often have this pattern:

    def write_I_value(self, value):
        flowbusparameters["I_value"].write(self.instrument, value)

        return value 

I would like to change it to this:

    def write_I_value(self, value):
        flowbusparameters["I_value"].write(self.instrument, value)#

## readback taken directly from hardware ##
        return self.read_I_value() 

this ensures that the readback taken directly from the hardware reaches the user immediately when setting a new value, instead of being updated, when the next slow poll intervall calls read_paramx()

This will be at the cost of a little slower function calls when setting values, since we need to write and read from the hardware instead of just wrting to it.