matlab rename, adapt for new software

This commit is contained in:
2019-02-19 16:34:49 +01:00
parent 4c676269fc
commit 46aab5ae36
10 changed files with 52 additions and 20 deletions

View File

@@ -41,7 +41,7 @@ Enc 7: Interferometer X
'''
from __future__ import print_function
import os, sys
import os, sys, time
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
@@ -735,7 +735,7 @@ class ShapePath(MotionBase):
prg.append('{')
prg.append(' linear abs')
prg.append('X%g Y%g' % tuple(pv[0, (0,1)]))
prg.append('dwell 100')
prg.append('dwell %d' % dwell)
prg.append('goto 100')
prg.append('}')
else:
@@ -866,9 +866,14 @@ if __name__=='__main__':
sp.setup_motion(fnPrg=fn+'.prg', mode=3, scale=1,dwell=10)
#sp.setup_motion(fnPrg=fn + '.prg', mode=1, scale=1,dwell=10)
#sp.setup_motion(fnPrg=fn + '.prg', mode=1, scale=0,dwell=10)
sp.homing()
sp.run()
sp.homing() #homing if needed
sp.run() #start motion program
sp.wait_armed() # wait until motors are at first position
sp.trigger(0.5) #send a start trigger (if needed) ater given time
while True:
p=sp.progress()
if p<0: break
print('progress %d'%p);time.sleep(.1)
sp.gather_upload(fnRec=fn+'.npz')
dp=DebugPlot(sp);dp.plot_gather(mode=11)