From bd85a00e92d7f911c8ec107575f1ce058b4e2f40 Mon Sep 17 00:00:00 2001 From: Leonardo Sala Date: Tue, 26 Sep 2017 11:53:58 +0200 Subject: [PATCH] Script execution --- script/put_test.py | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 script/put_test.py diff --git a/script/put_test.py b/script/put_test.py new file mode 100644 index 0000000..0a21e52 --- /dev/null +++ b/script/put_test.py @@ -0,0 +1,54 @@ +import datetime +import time + +from datetime import datetime + +#ticks = time.time() +#print "Number of ticks since 12:00am, January 1, 1970:", ticks + +dt = datetime.now() +print "datetime.now at start", dt + + +caput ("X12SA-OP-BPM6:Acquire", "Stop") #stops the acquisition +#pico_amp_6.stop() +dt = datetime.now() +print "stopping", dt + +#to configure measuring parameters: + +#caput ("X12SA-OP-BPM6:AcquireMode" ,"Continuous") + +caput ("X12SA-OP-BPM6:Range", "+- 2.5 nA" ) #(or bigger with beam ) + +#caput ("X12SA-OP-BPM6:Geometry", "Square") + +#caput ("X12SA-OP-BPM6:ValuesPerRead", 1) + +caput ("X12SA-OP-BPM6:AveragingTime", 0.1) + +dt = datetime.now() +print "datetime.now after 2 puts", dt + +#caput ("X12SA-OP-BPM6:NumChannels", "4") + +#caput ("X12SA-OP-BPM6:ReadFormat", "Binary") + +#caput ("X12SA-OP-BPM6:TriggerMode", "Ext. trig.") #if it should wait for the HW Trigger + +#caput ("X12SA-OP-BPM6:TriggerMode", "Free run" ) #without HW Trigger + +#caput ("X12SA-OP-BPM6:Resolution", "16 bits" ) + +#caput ("X12SA-OP-BPM6:TS:TSAveragingTime", 0.0001536) #for acq. 6.5 kHz" + +#time.sleep(1.0) + +#pico_amp_6.start() + +dt = datetime.now() +print "datetime.now after acquire", dt +caput ("X12SA-OP-BPM6:Acquire", "Acquire") +#ticks = time.time() +#print "Number of ticks since 12:00am, January 1, 1970:", ticks +