示例#1
0
cur_filepath = os.path.dirname(os.path.realpath(__file__))
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]
from mecode import G
g = G()
# This dictionary contains all the information about multiple substrates
#substrates = {
#    'slide1': { # We need to name substrates so we can refer to them later
#        'origin': (176, 112), # Lower left of substrate (or point anywhere on substrate if size='auto')
#        'size': 'auto', # Size of substrate. If set to 'auto', the size is detected automatically
#        'profile': True, # Whether or not to profile this substrate
#        'profile-spacing': (25, 25),# Spacing between profile points
#        },
#}
axes = ['A', 'B']  #The axes that will be used in this experiment

# Create the AerotechAutomator instance with axes and substrate info
automator = AerotechAutomator(axes=axes,
                              #substrates=substrates,
                              )

automator.setup(
)  # setup() method must be called to connect to the printer and sensors
#automator.automate() # this call performs all the steps for a full automation

automator.zero_all_nozzles()
automator.find_alignment_grooves()
automator.find_z_ref()
automator.go_to_heaven()

#------------------------------------------------------------------------------
# RTruby, 2014.09.10 - Code below commented out during Experiment C-95:
#
#automator.save_state('automation_values.json') # save all the collected data to a file
    },
}

#Defining substrate location and profilometry mesh size
SUBSTRATES = {
    'slide1': {
        'origin': (204.47,127.68),
        'size': 'auto',
        'profile': True,
        'profile-spacing': (30,30),
    },
}
#Defining profilometry parameters
automator = AerotechAutomator(
    calfile_path=r'C:\Users\Lewis Group\Desktop\Calibration\CAL_output.cal',
    axes=AXES_USED,
    axes_data = AXES_DATA,
    substrates = SUBSTRATES,
)

#Defining mecode parameters
g = G(
    direct_write=True,
    outfile=outfile,
    header=None,
    footer=None,
    print_lines=False,
    )


def setup(ref, move_to_ref = False):
    automator.setup()
示例#4
0
g = G()

# This dictionary contains all the information about multiple substrates
#substrates = {
#    'slide1': { # We need to name substrates so we can refer to them later
#        'origin': (176, 112), # Lower left of substrate (or point anywhere on substrate if size='auto')
#        'size': 'auto', # Size of substrate. If set to 'auto', the size is detected automatically
#        'profile': True, # Whether or not to profile this substrate
#        'profile-spacing': (25, 25),# Spacing between profile points
#        },
#}
axes = ['A', 'B'] #The axes that will be used in this experiment

# Create the AerotechAutomator instance with axes and substrate info
automator = AerotechAutomator(
    axes=axes,
    #substrates=substrates,
)

automator.setup() # setup() method must be called to connect to the printer and sensors
#automator.automate() # this call performs all the steps for a full automation

automator.zero_all_nozzles()
automator.find_alignment_grooves()
automator.find_z_ref()
automator.go_to_heaven()

#------------------------------------------------------------------------------
# RTruby, 2014.09.10 - Code below commented out during Experiment C-95:
#
#automator.save_state('automation_values.json') # save all the collected data to a file
#
        'origin': (150,40),
        'size': 'auto',
        'profile': True,
        'profile-spacing': (10,10),
    },
    'slide3': {
        'origin': (230,26),
        'size': 'auto',
        'profile': True,
        'profile-spacing': (10,10),
    }
}
#Defining profilometry parameters
automator = AerotechAutomator(
    calfile_path=r'C:\Users\Lewis Group\Desktop\Calibration\CAL_output.cal',
    axes=AXES_USED,
    axes_data = AXES_DATA,
    substrates = SUBSTRATES,
)

#Defining mecode parameters
g = G(
    direct_write=False,
    outfile=outfile,
    header=None,
    footer=None,
    print_lines=False,
    )