Fixed data logging.

This commit is contained in:
2021-10-15 10:05:30 +02:00
parent de4e54e7e0
commit a08ba26384
+8 -8
View File
@@ -105,19 +105,19 @@ def log_datapoint(settings):
if axis.psu:
psu_state = axis.psu.cached_channel_state(axis.channel)
else:
psu_state = {'limit_voltage': None,
'actual_voltage': None,
'limit_current': None,
'actual_current': None}
psu_state = {'voltage_setpoint': None,
'voltage': None,
'current_setpoint': None,
'current': None}
if settings['v']:
d[pre + 'v'] = psu_state['limit_voltage']
d[pre + 'v'] = psu_state['voltage_setpoint']
if settings['v_actual']:
d[pre + 'v_actual'] = psu_state['actual_voltage']
d[pre + 'v_actual'] = psu_state['voltage']
if settings['i']:
d[pre + 'i'] = psu_state['limit_current']
d[pre + 'i'] = psu_state['current_setpoint']
if settings['i_actual']:
d[pre + 'i_actual'] = psu_state['actual_current']
d[pre + 'i_actual'] = psu_state['current']
# All the rest
if settings['tgt_field']:
d[pre + 'tgt_field'] = axis.target_field