From e473f15e90fac4fc74942f8ffd0bfcc9b9c02de4 Mon Sep 17 00:00:00 2001 From: "Peana, David" Date: Wed, 6 Apr 2022 11:25:54 -0400 Subject: [PATCH] Pre Shift Speed Changes --- andor_repo/andor.egg-info/PKG-INFO | 8 +- andor_repo/andor/andor_driver.py | 5 +- andor_repo/andor/atmcd.py | 4 +- flir_repo/driver_spyder.py | 234 ++++++++++++++++++ flir_repo/flir.egg-info/PKG-INFO | 9 +- flir_repo/flir.egg-info/entry_points.txt | 1 - .../flir/__pycache__/__init__.cpython-38.pyc | Bin 171 -> 161 bytes .../__pycache__/aqctl_flir.cpython-38.pyc | Bin 1702 -> 1702 bytes .../flir/__pycache__/driver.cpython-38.pyc | Bin 3984 -> 3956 bytes flir_repo/flir/driver.py | 11 +- flir_repo/flir/testing.py | 97 ++++---- .../build/lib/picomotor/picomotor_driver.py | 4 +- picomotor_repo/picomotor.egg-info/PKG-INFO | 9 +- .../picomotor.egg-info/entry_points.txt | 1 - .../__pycache__/__init__.cpython-38.pyc | Bin 259 -> 259 bytes .../aqctl_picomotor.cpython-38.pyc | Bin 1688 -> 1688 bytes .../picomotor_driver.cpython-38.pyc | Bin 3779 -> 3828 bytes picomotor_repo/picomotor/aqctl_picomotor.py | 2 +- picomotor_repo/picomotor/picomotor_driver.py | 4 +- 19 files changed, 306 insertions(+), 83 deletions(-) create mode 100644 flir_repo/driver_spyder.py diff --git a/andor_repo/andor.egg-info/PKG-INFO b/andor_repo/andor.egg-info/PKG-INFO index 39a60ec..94f1555 100644 --- a/andor_repo/andor.egg-info/PKG-INFO +++ b/andor_repo/andor.egg-info/PKG-INFO @@ -1,10 +1,10 @@ -Metadata-Version: 1.0 +Metadata-Version: 2.1 Name: andor Version: 0.0.0 Summary: UNKNOWN Home-page: UNKNOWN -Author: UNKNOWN -Author-email: UNKNOWN License: UNKNOWN -Description: UNKNOWN Platform: UNKNOWN + +UNKNOWN + diff --git a/andor_repo/andor/andor_driver.py b/andor_repo/andor/andor_driver.py index cb60e2b..358a8bd 100644 --- a/andor_repo/andor/andor_driver.py +++ b/andor_repo/andor/andor_driver.py @@ -11,13 +11,12 @@ def __init__(self): self.cam = atmcd()# atmcd("") was working. Switch back if a problem! Without the "" also appears to be working #load the atmcd library # self.reset() - (ret) = self.cam.Initialize("/usr/local/etc/andor") #initialise camera # C:\Program Files\Andor SDK (ret, iSerialNumber) = self.cam.GetCameraSerialNumber() (ret) = self.cam.CoolerON() (ret) = self.cam.SetCoolerMode(1) - (ret) = self.cam.SetTemperature(-40) #David added this + (ret) = self.cam.SetTemperature(-60) #David added this (ret) = self.cam.SetHSSpeed(0,0) #David added this 0 (ret) = self.cam.SetVSSpeed(4)#.3) #David added this (ret) = self.cam.SetVSAmplitude(0) #David added this @@ -49,7 +48,7 @@ def __init__(self): (ret, self.xpixels, self.ypixels) = self.cam.GetDetector() self.imageSize = self.xpixels*self.ypixels (ret) = self.cam.SetImage(1, 1, 1, self.xpixels, 1, self.ypixels) - (ret) = self.cam.SetExposureTime(0.012) # Set exposure time here! + (ret) = self.cam.SetExposureTime(0.001) # Set exposure time here! 0.012 (ret, self.fminExposure, self.fAccumulate, self.fKinetic) = self.cam.GetAcquisitionTimings() ############################################################## diff --git a/andor_repo/andor/atmcd.py b/andor_repo/andor/atmcd.py index 03a3281..5cf5b78 100644 --- a/andor_repo/andor/atmcd.py +++ b/andor_repo/andor/atmcd.py @@ -52,9 +52,9 @@ def __init__(self): self.dll = cdll.LoadLibrary(dllname) elif sys.platform == "win32": if platform.architecture()[0] == "64bit" : - dllname = "C:\\Program Files\\Andor SDK\\atmcd64d.dll" + dllname = "C:\\Program Files\\Andor SOLIS\\atmcd64d.dll" else: - dllname = "C:\\Program Files\\Andor SDK\\atmcd32d.dll" + dllname = "C:\\Program Files\\Andor SOLIS\\atmcd32d.dll" self.dll = windll.LoadLibrary(dllname) else: print("Cannot detect operating system, will now stop") diff --git a/flir_repo/driver_spyder.py b/flir_repo/driver_spyder.py new file mode 100644 index 0000000..d978b85 --- /dev/null +++ b/flir_repo/driver_spyder.py @@ -0,0 +1,234 @@ + +import math +import logging +import asyncio +import asyncserial +import os +import matplotlib.pyplot as plt +import keyboard +import time +import PySpin +import sys +import time +import numpy as np +from PIL import Image +import os +os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE" + +GAIN_VALUE = 23.8 #in dB, 0-40; +#GAMMA_VALUE = 0.5 #0.25-1 + +# MOT_OFFSET_HEIGHT = 0 #These corrections are for a MOT that is not at the center of the frame +# MOT_OFFSET_WIDTH = 0 +#OFFSET = 964 #52 #652 #This will be the pixel width and height of the roi +IMAGE_HEIGHT = 964 #964 #OFFSET #964 pixels default +IMAGE_WIDTH = 1288 #1288 #OFFSET #1288 pixels default +# HEIGHT_OFFSET = round((964+1-IMAGE_HEIGHT-MOT_OFFSET_HEIGHT)/2)#(964-IMAGE_HEIGHT)/2) # Y, to keep in middle of sensor +# WIDTH_OFFSET = round((1288+1-IMAGE_WIDTH-MOT_OFFSET_WIDTH)/2)#(1288-IMAGE_WIDTH)/2) # X, to keep in middle of sensor + +global continue_recording +continue_recording = True + +CHOSEN_TRIGGER = 2 + +logger = logging.getLogger(__name__) + + +class UnexpectedResponse(Exception): + pass + +# Set camera serial numbers +serial_1 = '20343286' + +# Get system +system = PySpin.System.GetInstance() + +# Get camera list +cam_list = system.GetCameras() + +# Get cameras by serial +cam_1 = cam_list.GetBySerial(serial_1) + +###################### init ################################# + +# Initialize cameras +cam_1.Init() + +# Set acquisition mode to acquire a single frame, this ensures acquired images are sync'd since camera 2 and 3 are setup to be triggered +cam_1.AcquisitionMode.SetValue(PySpin.AcquisitionMode_Continuous) +cam_1.ExposureAuto.SetValue(PySpin.ExposureAuto_Off) +cam_1.ExposureMode.SetValue(PySpin.ExposureMode_Timed) #Timed or TriggerWidth (must comment out trigger parameters other that Line) +cam_1.ExposureTime.SetValue(1000) +cam_1.GainAuto.SetValue(PySpin.GainAuto_Off) +cam_1.Gain.SetValue(GAIN_VALUE) + +#cam_1.Gamma.SetValue(GAMMA_VALUE) #always fails? +#cam_1.AdcBitDepth.SetValue(PySpin.AdcBitDepth_Bit16) #always fails? + +cam_1.PixelFormat.SetValue(PySpin.PixelFormat_Mono16) +cam_1.Width.SetValue(IMAGE_WIDTH) +cam_1.Height.SetValue(IMAGE_HEIGHT) +# cam_1.OffsetX.SetValue(WIDTH_OFFSET) +# cam_1.OffsetY.SetValue(HEIGHT_OFFSET) + +#This takes an image quickly. The first image is always corrupt for whatever reason. This picture is not saved. +cam_1.TriggerMode.SetValue(PySpin.TriggerMode_Off) +cam_1.BeginAcquisition() +cam_1.EndAcquisition() + +cam_1.TriggerSource.SetValue(PySpin.TriggerSource_Line0) +cam_1.TriggerSelector.SetValue(PySpin.TriggerSelector_FrameStart) +cam_1.TriggerActivation.SetValue(PySpin.TriggerActivation_RisingEdge) + +cam_1=cam_1 + +print("FLIR driver initialization successful...") + +#################### await_trigger ################################### + +cam_1.ExposureTime.SetValue(int(4000)) # microseconds +cam_1.TriggerMode.SetValue(PySpin.TriggerMode_Off) +cam_1.TriggerMode.SetValue(PySpin.TriggerMode_On) +cam_1.BeginAcquisition() + +#################### convert_images ################################### +images=[] + +image = cam_1.GetNextImage() +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() + +cam_1.EndAcquisition() + +#################### save_image ################################### + +image = Image.fromarray(images[0]) + +# Save images +msec = str(time.time())[11:14] +filename = 'H%s_M%d_S%g_MS' % (int(time.strftime("%H", time.localtime())), int(time.strftime("%M", time.localtime())),int(time.strftime("%S", time.localtime()))) +filename = filename+msec +##########################Save locally############################################ +pre1 = time.time() +if os.path.isfile(r"S:\flir_images\Image_"+filename+".png") == True: + image.save(r"S:\flir_images\Image_"+filename+"(2).png") + post1=time.time()-pre1 + print("Saved image "+filename+"(2).png locally in",post1*1000, "millisecond") +else: + image.save(r"S:\flir_images\Image_"+filename+".png") + post1=time.time()-pre1 + print("Saved image "+filename+".png locally in",post1*1000, "millisecond") + ##########################Save locally############################################ + + #########################Save to datadepot############################################ + # pre2 = time.time() + # if os.path.isfile(r"N:\data\flir_images\Image_"+filename+".png") == True: + # image.save(r"N:\data\flir_images\Image_"+filename+"(2).png") + # post2=time.time()-pre2 + # print("Saved image "+filename+"(2).png to datadepot in",post2*1000, "millisecond") + # else: + # image.save(r"N:\data\flir_images\Image_"+filename+".png") + # post2=time.time()-pre2 + # print("Saved image "+filename+".png to datadepot in",post2*1000, "millisecond") + #########################Save to datadepot############################################ + + # print((post2-post1)*1000, "millisecond lag between datadepot and local saves") + + +# def reset(): +# cam_1.DeInit() +# cam_1.EndAcquisition() +# del cam +# cam_list.Clear() +# PySpin.System.CloseInstance() + + + + ##################################################################### + # async def _ser_readline(): + # c = await port.read(1) + # print(c) + # r = c + # while c != b"\n": + # c = await port.read(1) + # r += c + # return r + + # async def _ser_send( cmd, get_response=True): + # """Send a string to the serial port.""" + + # Low-level routine for sending serial commands to device. It sends + # strings and listens for a response terminated by a carriage return. + # example: + # ser_send("F0 1.0") # sets the freq of channel 0 to 1.0 MHz + + # if simulation: + # logger.info("simulation _ser_send(\"%s\")", cmd) + # else: + # logger.debug("_ser_send(\"%s\")", cmd) + # port.ser.reset_input_buffer() + # await port.write((cmd + "\r\n").encode()) + # if get_response: + # result = (await _ser_readline()).rstrip().decode() + # logger.debug("got response from device: %s", result) + # if result != "OK": + # errstr = error_codes.get(result, "Unrecognized reply") + # s = "Erroneous reply from device: {ec}, {ecs}".format( + # ec=result, ecs=errstr) + # raise ValueError(s) + # else: + # pass + + # async def setup(): + # """Initial setup of FLIR.""" + # await _ser_send("E d", get_response=False) + + + + + + + + + + + + + + + + + + + + + + + + + + + +# 1. Get image +# 2. Convert to array immediately +# 3. Bin it (roi) (trash most of array) +# 4. (For abs imaging: background ) + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/flir_repo/flir.egg-info/PKG-INFO b/flir_repo/flir.egg-info/PKG-INFO index bfed401..7fcead8 100644 --- a/flir_repo/flir.egg-info/PKG-INFO +++ b/flir_repo/flir.egg-info/PKG-INFO @@ -1,10 +1,9 @@ -Metadata-Version: 1.0 +Metadata-Version: 2.1 Name: flir Version: 0.0.0 Summary: UNKNOWN -Home-page: UNKNOWN -Author: UNKNOWN -Author-email: UNKNOWN License: UNKNOWN -Description: UNKNOWN Platform: UNKNOWN + +UNKNOWN + diff --git a/flir_repo/flir.egg-info/entry_points.txt b/flir_repo/flir.egg-info/entry_points.txt index 62c21bb..d690a2e 100644 --- a/flir_repo/flir.egg-info/entry_points.txt +++ b/flir_repo/flir.egg-info/entry_points.txt @@ -1,3 +1,2 @@ [console_scripts] aqctl_flir = flir.aqctl_flir:main - diff --git a/flir_repo/flir/__pycache__/__init__.cpython-38.pyc b/flir_repo/flir/__pycache__/__init__.cpython-38.pyc index 814003d42a7363593446d2b4a413c9cd5699cc41..37cc3dff7201228dcb668c2b89285b9c5da95eef 100644 GIT binary patch delta 78 zcmZ3@xR8-2l$V!_0SI342qaD9u{Lu{wu&h&PAw{q$;i)7$%#qHPcF?(%_}L6NzW|F bC{2pV%quP_f(oVOWERC2r55B*Y*zsQz~vjf delta 88 zcmZ3;xSEkCl$V!_0SF%N{u4iu$J!yl*(xTqIJKxaCL=#TB`3xuKe;qFHLs*N#yzvd jqckbTGq1R$2rA^};~5kKB9ik{Qsa|KGjmcV)~WyiEaD%P diff --git a/flir_repo/flir/__pycache__/aqctl_flir.cpython-38.pyc b/flir_repo/flir/__pycache__/aqctl_flir.cpython-38.pyc index 85d45b35c79348951fd7b9f12b635142486e6ed6..5cc8b6b2632d0d32339c217e96b8f7f7bd3a0c0d 100644 GIT binary patch delta 21 bcmZ3+yNs77l$V!_0SI342qbOfnZ*VGG8zQ2 delta 21 bcmZ3+yNs77l$V!_0SI*0sU>XWnZ*VGF&YG_ diff --git a/flir_repo/flir/__pycache__/driver.cpython-38.pyc b/flir_repo/flir/__pycache__/driver.cpython-38.pyc index ea625c27c9e4707140d68266e1e97dee489d70de..fa06fec193c6692c03aa0b0914d4db85768c7505 100644 GIT binary patch delta 899 zcmZuwO=uHA6rS0iWRmV~t4%02wM{6BsbZ5h3Pn7KrV_#0+6HR`*KKwQTbfOr-Kr_Q z^`bY++yo&-PhNWH#k&{5izg2Yf*wRf@Z`mt?`@FU>cV`?d*8hGzIpTZ>DbRvy{hX; z0^iD)^2(2G{S{4bzh0nUMUuXwhWJ3c69d3<;~?~-$pCV&dRJr9rz=-e@RW=3zd6jG8eIhq}uvuZE z;RL4Jv>MLiy}o2cVxbbaO^1()J6drZh4*d~<%strC!_Ng=T?WG5W89~b0}%jw;njX ztk1=F?a76xA()~TyW&(lH{i$6P%p1J7SGct?cuAd^|hAoycN58_TIq(3*)9~x9X~geio5LD4Rni!=~O`q+0y70PBX5c delta 939 zcmZvby-yTD6u@WpgZ<$4IK2~u1A%BXCj{ZR5Mqpo3gi+!X$XAU2kA8aq0fkz!eurLtwQc))Rx*#&Y1ID}#zaae3D z#e%cd`F!n!5`9RC$Z^zZR`Tzg` diff --git a/flir_repo/flir/driver.py b/flir_repo/flir/driver.py index 1fb4cd3..b03459a 100644 --- a/flir_repo/flir/driver.py +++ b/flir_repo/flir/driver.py @@ -29,7 +29,7 @@ global trigtype SOFTWARE = 1 HARDWARE = 2 -trigtype=SOFTWARE +trigtype=HARDWARE class TriggerType(): def __init__(self, softtrig): global trigtype @@ -53,8 +53,7 @@ def __init__(self): # try: # Set camera serial numbers - serial_1 = '20343286' # abs camera - #serial_2 = '20409335'# fluorescence camera + serial_1 = '20409335' # 20343286' # abs camera (286 was the original abs camera and 335 is the new one) # Get system self.system = PySpin.System.GetInstance() @@ -77,7 +76,7 @@ def __init__(self): cam.ExposureMode.SetValue(PySpin.ExposureMode_Timed) #Timed or TriggerWidth (must comment out trigger parameters other that Line) cam.ExposureTime.SetValue(100) #us cam.GainAuto.SetValue(PySpin.GainAuto_Off) - cam.Gain.SetValue(1)# Previously 23.8 + cam.Gain.SetValue(23.8)# Previously 23.8 #cam.Gamma.SetValue(GAMMA_VALUE) #always fails? #cam.AdcBitDepth.SetValue(PySpin.AdcBitDepth_Bit16) #always fails? @@ -109,7 +108,7 @@ def __init__(self): def await_trigger(self, EXPOSURE_TIME): try: - time.sleep(0.01) + # time.sleep(0.01) self.cam_1.ExposureTime.SetValue(int(EXPOSURE_TIME)) self.cam_1.BeginAcquisition() @@ -140,7 +139,7 @@ def get_image(self,num_of_im): images=[] for i in range(num_of_im): # print("Before GetNextImage") - image = self.cam_1.GetNextImage(20000) #timeout (ms) 10000 + image = self.cam_1.GetNextImage(50000) #timeout (ms) 20000 # 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/flir_repo/flir/testing.py b/flir_repo/flir/testing.py index bd2667b..71a5d68 100644 --- a/flir_repo/flir/testing.py +++ b/flir_repo/flir/testing.py @@ -1,27 +1,20 @@ -# -*- coding: utf-8 -*- -""" -Created on Fri Feb 12 09:23:31 2021 +# #%% +# import matplotlib.pyplot as plt +# import driver +# t = driver.FLIR() -@author: ho -""" +# #%% -#%% -import matplotlib.pyplot as plt -import driver -t = driver.FLIR() - -#%% - -t.await_trigger(int(50)) +# t.await_trigger(int(50)) -output = t.convert_image(1) -img = output[0] +# output = t.convert_image(1) +# img = output[0] -plt.imshow(img) +# plt.imshow(img) -t.reset() +# t.reset() #%% Import libraries @@ -33,7 +26,7 @@ import matplotlib.pyplot as plt import keyboard import time -import PySpin +imporKeyboardInterrupt import sys import time import numpy as np @@ -81,6 +74,8 @@ #cam.BeginAcquisition() #cam.EndAcquisition() +print("FLIR driver initialization successful... (pretrig)") +#%% cam.V3_3Enable.SetValue(True) cam.TriggerMode.SetValue(PySpin.TriggerMode_Off) cam.TriggerSource.SetValue(PySpin.TriggerSource_Line0) @@ -91,7 +86,7 @@ -print("FLIR driver initialization successful...") +print("FLIR driver initialization successful... (posttrig)") #%% Begin Acquisition #cam.TriggerMode.SetValue(PySpin.TriggerMode_Off) @@ -117,7 +112,7 @@ #print('num images in use', cam.GetNumImagesInUse()) #print('data streams', cam.GetNumDataStreams()) -#% Plot image +#%% Plot image for i in range(num_of_im): img = images[i] print( np.amax(img) , np.amin(img) ) @@ -152,36 +147,36 @@ -cam.FactoryReset() -cam.FileAccessBuffer() - 'ExposureActiveMode', - 'ExposureAuto', - 'ExposureMode', - 'ExposureTime', - 'ExposureTimeMode', - 'ExposureTimeSelector', - 'Gain', - 'GainAuto', - 'GainAutoBalance', - 'GainSelector', - 'Gamma', - 'GammaEnable', - 'GetNextImage', -print(cam.GetUserBufferCount()) #user buffer is not image buffer -print(cam.GetUserBufferSize) -print(cam.GetUserBufferTotalSize) - 'Init', - 'IsInitialized', - 'IsStreaming', +# cam.FactoryReset() +# cam.FileAccessBuffer() +# 'ExposureActiveMode', +# 'ExposureAuto', +# 'ExposureMode', +# 'ExposureTime', +# 'ExposureTimeMode', +# 'ExposureTimeSelector', +# 'Gain', +# 'GainAuto', +# 'GainAutoBalance', +# 'GainSelector', +# 'Gamma', +# 'GammaEnable', +# 'GetNextImage', +# print(cam.GetUserBufferCount()) #user buffer is not image buffer +# print(cam.GetUserBufferSize) +# print(cam.GetUserBufferTotalSize) +# 'Init', +# 'IsInitialized', +# 'IsStreaming', - 'TriggerEventTest', - 'V3_3Enable', +# 'TriggerEventTest', +# 'V3_3Enable', - cam.TriggerMode.SetValue(PySpin.TriggerMode_Off) -cam.TriggerSource.SetValue(PySpin.TriggerSource_Line0) -cam.TriggerSelector.SetValue(PySpin.TriggerSelector_FrameStart) -cam.TriggerActivation.SetValue(PySpin.TriggerActivation_RisingEdge) -cam.TriggerMode.SetValue(PySpin.TriggerMode_On) - -PayloadSize -TransferQueueCurrentBlockCount \ No newline at end of file +# cam.TriggerMode.SetValue(PySpin.TriggerMode_Off) +# cam.TriggerSource.SetValue(PySpin.TriggerSource_Line0) +# cam.TriggerSelector.SetValue(PySpin.TriggerSelector_FrameStart) +# cam.TriggerActivation.SetValue(PySpin.TriggerActivation_RisingEdge) +# cam.TriggerMode.SetValue(PySpin.TriggerMode_On) + +# PayloadSize +# TransferQueueCurrentBlockCount \ No newline at end of file diff --git a/picomotor_repo/build/lib/picomotor/picomotor_driver.py b/picomotor_repo/build/lib/picomotor/picomotor_driver.py index de71f34..05582ad 100644 --- a/picomotor_repo/build/lib/picomotor/picomotor_driver.py +++ b/picomotor_repo/build/lib/picomotor/picomotor_driver.py @@ -28,8 +28,8 @@ def __init__(self, COM_port): #print(self.serial.is_open) except: self.serial.close() # don't know if this will help - print(self.serial.is_open) - print('Cannot open.') + #print(self.serial.is_open) + print('Cannot start server. Check COM port is correct. COM is currently set to '+self.serial.port) # Initialize positions self.positions = dict.fromkeys(self.axis_names, 0) #{'MOTz_x': 0, 'MOTz_y': 0, ...} #units steps diff --git a/picomotor_repo/picomotor.egg-info/PKG-INFO b/picomotor_repo/picomotor.egg-info/PKG-INFO index 191b946..dc01607 100644 --- a/picomotor_repo/picomotor.egg-info/PKG-INFO +++ b/picomotor_repo/picomotor.egg-info/PKG-INFO @@ -1,10 +1,9 @@ -Metadata-Version: 1.0 +Metadata-Version: 2.1 Name: picomotor Version: 0.0.0 Summary: UNKNOWN -Home-page: UNKNOWN -Author: UNKNOWN -Author-email: UNKNOWN License: UNKNOWN -Description: UNKNOWN Platform: UNKNOWN + +UNKNOWN + diff --git a/picomotor_repo/picomotor.egg-info/entry_points.txt b/picomotor_repo/picomotor.egg-info/entry_points.txt index 0a7b59a..15a7216 100644 --- a/picomotor_repo/picomotor.egg-info/entry_points.txt +++ b/picomotor_repo/picomotor.egg-info/entry_points.txt @@ -1,3 +1,2 @@ [console_scripts] aqctl_picomotor = picomotor.aqctl_picomotor:main - diff --git a/picomotor_repo/picomotor/__pycache__/__init__.cpython-38.pyc b/picomotor_repo/picomotor/__pycache__/__init__.cpython-38.pyc index a1dc5e21507a2da613a33cd071abe5d164c336dd..e39aa8e40047fb0bd285f5e83d9c7bc3428f6beb 100644 GIT binary patch delta 57 zcmZo>YG&dI<>lpK0D@OM0!b5jCMhOc#grDO78S>2YG&dI<>lpK0D?^m6%!`%Oj2~ViU}=FEh>)5$j?v7iE+tKF3nBND=Cg~&n)pM LO^WfHxZec;)$bDb diff --git a/picomotor_repo/picomotor/__pycache__/aqctl_picomotor.cpython-38.pyc b/picomotor_repo/picomotor/__pycache__/aqctl_picomotor.cpython-38.pyc index dcc57cad79b09db3fcaee47fb1eba6d641a0f74f..7f04d735336490fab5ca673d313d779e228003de 100644 GIT binary patch delta 111 zcmbQiJA;=el$V!_0SMO3QA*m#BhIXtY!y>loLW>IlaZgFk`t4XpIn-onpaXBlb%_U zQJNH!x!HwTpOMjcatX^7#;D1jtW{#tK>fEk;^T7@GxOr(H3f>efdWyJZ?Z-L6&SNA LF-lJkV{-xkOTZwU delta 111 zcmbQiJA;=el$V!_0SH(YDkf~?5ocC(wu%WYPAw{q$;i)7$%%2vPcF?(%_}L6anCIA zC{2p--0Z@v&&X&pxrF5kfEk;^T7@GxOr(H3f>eK?0L+vPJ?G7_%uc K%1jPpa{>VQ;UKpF diff --git a/picomotor_repo/picomotor/__pycache__/picomotor_driver.cpython-38.pyc b/picomotor_repo/picomotor/__pycache__/picomotor_driver.cpython-38.pyc index 856e60a5ecc10ce4f266646471c80f924694d36b..27fd2cc198504962d5f3879e30119f23e801648c 100644 GIT binary patch delta 788 zcmZ9K&ui2`6vs1@Y?93;+wIy`ENzX}t{bbnfH)v`$Stip( zWe-Zle_+6qhxQ<%Hz{~7^z6|~F5U$3>cyMyWuXmb;4?Gt``&k6hB=u2Gi|L}mLb9S z`Tgm~KfYLxD0wLYy40u;3CBR%lyA^-K7I* zqac3K^#`|_tuTzZ9rG3gdaUoUn%#WrwV&C|`*-bL1Ytk6+Yw`4n}Y;F+;71?ko1BDcGpL<#)R zb5-W?ek))lh_lf{l=npLEg_be)E3BySk^9;rVhn4t-SY6n<1x)7tO*8R_d4bfcq-NX5x^S|d_=B#vFVvCG9n)+US zpQ!B|vX_*6lubJQc#LRR9c@+Hv-VXKn}}EKO@g?d!M>z%`a+Addydj_b#tF~v=vwW zrprZlrp9>`4@K<;uLz<}c-Uv+5h}UaPaY^Mx{{;$1-!j`o^~_n5Bri9t`}xv^n3NTc zj;#T5vk%!Z1wSj`Ep90Ub~{=N<1pgFmo!_=k3vbg%ct2dv*YN}#cgPC5b*M?zcwOi z^C8^29=?>^}< z2Vj=3q-T*n?N@H|MxxQwoaus3Zl^c_he;r<6xhZUkwf;uztRD#76*|WQt)ZAEnt_Y zZ2Va=Q1VQdQG+Y?9_%indq5d@2uuNw0Q`)p0g_P)@~t;Ng69e{{9UX4A)vf1=zl9u Gyn#RZdxGcy diff --git a/picomotor_repo/picomotor/aqctl_picomotor.py b/picomotor_repo/picomotor/aqctl_picomotor.py index dbfa2c1..007815d 100644 --- a/picomotor_repo/picomotor/aqctl_picomotor.py +++ b/picomotor_repo/picomotor/aqctl_picomotor.py @@ -37,7 +37,7 @@ def main(): # if args.device is None: # print("Starting in Simulation mode...") # dev = andor(args.device if not args.simulation else None) - dev = picomotor("COM4") + dev = picomotor("COM3") #asyncio.get_event_loop().run_until_complete(dev.setup()) try: print("picomotor server startup on port",args.port,"successful...") diff --git a/picomotor_repo/picomotor/picomotor_driver.py b/picomotor_repo/picomotor/picomotor_driver.py index 967bdcc..18659bd 100644 --- a/picomotor_repo/picomotor/picomotor_driver.py +++ b/picomotor_repo/picomotor/picomotor_driver.py @@ -29,8 +29,8 @@ def __init__(self, COM_port): #print(self.serial.is_open) except: self.serial.close() # don't know if this will help - print(self.serial.is_open) - print('Cannot open.') + #print(self.serial.is_open) + print('Cannot start server. Check COM port is correct. COM is currently set to '+self.serial.port) # Initialize positions self.positions = dict.fromkeys(self.axis_names, 0) #{'MOTz_x': 0, 'MOTz_y': 0, ...} #units steps