print "FILE PATH IS " + str(cur_filepath)+"." splitted = cur_filepath.split('/') n=len(splitted) cur_dir = ''.join((dir+'/') for dir in splitted[:n-1]) #------------------------------------------------------------------------------ # RTruby, 2014.09.10 - Code below commented out during Experiment C-95: # #importFileDir = cur_dir+"mecode\\automation_values.json" # # Code below added when previous code was commented out: importFileDir = cur_dir+"automation_values.json" #------------------------------------------------------------------------------ print "Importing nozzle offsets from file " + str(importFileDir) automator = AerotechAutomator() automator.load_state(importFileDir) Ax_groove, Ay_groove, zA_granite = automator.home_positions['A'] Bx_groove, By_groove, zB_granite = automator.home_positions['B'] x_grooves = [Ax_groove, Bx_groove] y_grooves = [Ay_groove, By_groove] z_granites = [zA_granite, zB_granite] print "Nozzle A home at (" + str(Ax_groove) + ", " + str(Ay_groove) + ", " + str(zA_granite) + ")" print "Nozzle B home at (" + str(Bx_groove) + ", " + str(By_groove) + ", " + str(zB_granite) + ")" tool_axis = (["A","B","C","D"] )#if e3De3DPGlobals.Aerotech else ["z","z","z","z"]) line_pressures = [85,33,87,88] com_ports = [1, 4, 9, 9]
g.abs_move(**{ref:(automator.substrate_origins['slide1'][ref][2]+ 0.2)}) g.direct_write = False ################ Full Setup Run reference_nozzle = 'A' #setup(ref = reference_nozzle, move_to_ref = True) ######### ################Rezero some nozzles but use the rest of the old info ### automator.setup() automator.load_state(r"C:\Users\Lewis Group\Desktop\Calibration\alignment_data.txt") automator.zero_nozzle('A') automator.save_state(r"C:\Users\Lewis Group\Desktop\Calibration\alignment_data.txt") g.direct_write = True g.abs_move(x=automator.substrate_origins['slide1'][reference_nozzle][0], y=automator.substrate_origins['slide1'][reference_nozzle][1] + 5) #g.abs_move(**{reference_nozzle:(automator.substrate_origins['slide1'][reference_nozzle][2]+ 0.2)}) g.direct_write = False # #automator.setup() ##automator.load_state(r"C:\Users\Lewis Group\Desktop\Calibration\alignment_data.txt") #automator.rezero_nozzles(['A','B','C'], alignment_path=r"C:\Users\Lewis Group\Desktop\Calibration\alignment_data.txt", cal_file=True) ## Reset zeros ############