From 8a35d9e498ddd10b2e7524eeb8e0d00cb483a498 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Thu, 30 Dec 2021 17:34:31 -0500 Subject: logging magnetic field current --- examples/lock_eit.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'examples') diff --git a/examples/lock_eit.py b/examples/lock_eit.py index 0dba19d..579a818 100644 --- a/examples/lock_eit.py +++ b/examples/lock_eit.py @@ -101,6 +101,8 @@ def adjustRFandLog(apparatus): rfPout = apparatus.getRFAmplitude() + apparatus.getBCurrent(); # this automatically logs value to TSDB + log.addPointToTrace(timenow) log.addPointToTrace(err, "error") log.addPointToTrace(freq0, "frequency") @@ -147,13 +149,17 @@ async def main(): ai['lockin'] = lockin ai['pid'] = pid ai['scope.feedback'] = scope_fdbk - # scope_fdbk.setTimePerDiv(0.0005) - # scope_fdbk.setChanVoltsPerDiv(1, 0.02) - # scope_fdbk.setChanVoltsPerDiv(3, 0.02) + scope_fdbk.setRoll(False) + scope_fdbk.setRun(True) + scope_fdbk.setTimePerDiv(0.0005) + scope_fdbk.setChanVoltsPerDiv(1, 0.02) + scope_fdbk.setChanVoltsPerDiv(3, 0.02) ai['scope.monitor'] = scope_mon - # scope_mon.setTimePerDiv(0.0005) - # scope_mon.setChanVoltsPerDiv(2, 0.002) - # scope_mon.setVoltageOffset(2, -0.0726) + scope_mon.setRoll(False) + scope_mon.setRun(True) + scope_mon.setTimePerDiv(0.0005) + scope_mon.setChanVoltsPerDiv(2, 0.002) + scope_mon.setChanVoltageOffset(2, -0.0726) apparatus.state = None apparatus.runStatus = False @@ -220,7 +226,7 @@ async def main(): logger.info(f'dE = {dE}') logger.info(f'slope = {slope}') - # apparatus.getBCurrent(); # this automatically logs value to TSDB + apparatus.getBCurrent(); # this automatically logs value to TSDB return slope -- cgit v1.2.3