From 29fa21c49a1516bb233cc16df9b5866633a88aa3 Mon Sep 17 00:00:00 2001 From: "Hood, Jonathan D" Date: Thu, 4 Mar 2021 12:12:25 -0500 Subject: [PATCH] Routine Push --- .../flir/__pycache__/driver.cpython-38.pyc | Bin 3984 -> 3984 bytes flir_repo/flir/driver.py | 2 +- .../picomotor_driver.cpython-38.pyc | Bin 3782 -> 3729 bytes picomotor_repo/picomotor/picomotor_driver.py | 11 ++++++----- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/flir_repo/flir/__pycache__/driver.cpython-38.pyc b/flir_repo/flir/__pycache__/driver.cpython-38.pyc index 2d7a24c8955097f2c8b2268074f675913d41dfc7..ea625c27c9e4707140d68266e1e97dee489d70de 100644 GIT binary patch delta 28 icmbOrKS7>5l$V!_0SL6&bvAN)a55?QZ4TwMW&;38p#=~C delta 28 icmbOrKS7>5l$V!_0SGqD)!NAI!O0|`zB!cBnhgM0N(J-) diff --git a/flir_repo/flir/driver.py b/flir_repo/flir/driver.py index a689a32..1fb4cd3 100644 --- a/flir_repo/flir/driver.py +++ b/flir_repo/flir/driver.py @@ -140,7 +140,7 @@ def get_image(self,num_of_im): images=[] for i in range(num_of_im): # print("Before GetNextImage") - image = self.cam_1.GetNextImage(10000) #timeout (ms) 10000 + image = self.cam_1.GetNextImage(20000) #timeout (ms) 10000 # print("Picture Successfully taken at: ",time.strftime("%d %b %Y %H:%M:%S", time.localtime())) images.append(np.array(image.GetData(),dtype="uint16").reshape((image.GetHeight(),image.GetWidth()))) #convert PySpin ImagePtr into numpy array image.Release() diff --git a/picomotor_repo/picomotor/__pycache__/picomotor_driver.cpython-38.pyc b/picomotor_repo/picomotor/__pycache__/picomotor_driver.cpython-38.pyc index b3186b6e9ce1c20881f83f36f91dcfea4cffb7bd..7c3ff2c4038ad56580c8bed9cba7a6849851f170 100644 GIT binary patch delta 324 zcmX>mJ5iP|l$V!_0SHm}%lZsa?~C~J4!Asr;t5OEj6U?{uhkRA#GL030_Wz=V4 z6x^)J;=#zMJvomxgt2MzVb*A+8ioZdH5>~W85v4g7qF#(Szs}CkQk7~KG}n9r8q|s zAJFJq%*7=|w^)nvOY>50F()P!Pv&JWl(YcK6pMkZX5nKJVB%n8V`5_hgqYwN?2+*ni&}xY8V!<)^IEYvP#$%u&01oU@>-(7?8y= z*@11P3}+D^(285k#U(|zSc~#Y^HOdxCngmaaRNmru@_341LQ{*tCFUuVCuWu?6qhC^rxq8d zmFDDBrq7xQ0w?XOShf5EobCNIS;3B+JfF)+FdO7bkVhDpSQuG=ZkzmpYc*rp1P f8LK8+@$@s+Pd>%d!`L!8oOc%^*JL5SIz|=%Nq%9W diff --git a/picomotor_repo/picomotor/picomotor_driver.py b/picomotor_repo/picomotor/picomotor_driver.py index 964509a..19701c8 100644 --- a/picomotor_repo/picomotor/picomotor_driver.py +++ b/picomotor_repo/picomotor/picomotor_driver.py @@ -6,13 +6,14 @@ import numpy as np #import os +# 'sipyco_rpctool ::1 3210 list-methods' will list the methods of this driver. use 'sipyco_rpctool ::1 3210 call ' e.g. sipyco_rpctool ::1 3210 call move 'MOTx_x' class picomotor: axis_names = { "MOTz_x": "112", "MOTz_y": "122", "MOTy_x": "232", "MOTy_y": "242", "MOTx_x": "212", "MOTx_y": "222"} - steps_in_turn = { "MOTz_x": [45650/3, 48500/3], "MOTz_y":[58000/3, 59400/3], "MOTy_x": [90150/3, 69000/3], "MOTy_y": [87400/3, 62500/3], + steps_in_turn = { "MOTz_x": [45650/3, 48500/3], "MOTz_y":[58000/3, 71400/3], "MOTy_x": [90150/3, 69000/3], "MOTy_y": [65500/3, 62500/3], "MOTx_x": [45300/3, 51000/3], "MOTx_y": [51100/3, 51900/3]} # [CW, CCW] number of steps for 1 turn, using numbers from OneNote 2/8/20 calibration - - + # Original MOTY values: "MOTy_x": [90150/3, 69000/3], "MOTy_y": [87400/3, 62500/3], + # "MOTz_y":[58000/3, 59400/3] [58000/3, 69400/3] def __init__(self, COM_port): """Open serial connection for NewFocus 8732 controller""" """COM_port: ie 'COM3' (check device manager) """ @@ -68,7 +69,7 @@ def move(self, axis="MOTx_x", steps=1000, velocity=1500): cmd4 = ":SOUR:PULS:COUN " + str(round(abs(steps))) cmd = cmd1 + "; " + cmd2 + "; " + cmd3 #+ "; " + cmd4 - print(cmd) + # print(cmd) self.sendreceive(cmd) time.sleep(0.01) self.sendreceive(cmd4) @@ -108,7 +109,7 @@ def wait_for_move(self): """ Wait for picomotor to finish moving """ timeout = 120 # timeout seconds moving = 0 - print("ran wait successfully") + # print("ran wait successfully") while moving==0: #OPC returns 1 if all channels are finished time.sleep(0.2) text = self.sendreceive("*OPC?")