Пример #1
0
 def Prepare(self):
     self.name = 'InitialImage'
     self.requirements['samplename'] = {
         'source': 'apparatus',
         'address': '',
         'value': '',
         'desc': 'name of this sample for logging purposes'
     }
     self.requirements['nozzlename'] = {
         'source': 'apparatus',
         'address': '',
         'value': '',
         'desc': 'name of the nozzle'
     }
     self.requirements['zOffset'] = {
         'source': 'apparatus',
         'address': '',
         'value': '',
         'desc': 'z offset of nozzle during alignment pictures'
     }
     self.motionset = Procedures.Aerotech_A3200_Set(self.apparatus,
                                                    self.executor)
     self.move = Procedures.Motion_RefRelLinearMotion(
         self.apparatus, self.executor)
     self.pmove = Procedures.Motion_RefRelPriorityLineMotion(
         self.apparatus, self.executor)
     self.image = Procedures.Camera_Capture_Image(self.apparatus,
                                                  self.executor)
     self.getPos = Procedures.Aerotech_A3200_getPosition(
         self.apparatus, self.executor)
     self.apparatus.createAppEntry([
         'information', 'ProcedureData', 'SpanningSample', 'cur_parameters',
         'StartAlignFile'
     ])
     self.apparatus.createAppEntry([
         'information', 'ProcedureData', 'SpanningSample', 'cur_parameters',
         'StartAlignPosition'
     ])
     self.apparatus.createAppEntry([
         'information', 'ProcedureData', 'SpanningSample', 'cur_parameters',
         'EndAlignFile'
     ])
     self.apparatus.createAppEntry([
         'information', 'ProcedureData', 'SpanningSample', 'cur_parameters',
         'EndAlignPosition'
     ])
     self.apparatus.createAppEntry([
         'information', 'ProcedureData', 'SpanningSample', 'cur_parameters',
         'InitialFile'
     ])
     self.apparatus.createAppEntry([
         'information', 'ProcedureData', 'SpanningSample', 'cur_parameters',
         'InitialPosition'
     ])
Пример #2
0
GenTP.setMaterial(mat0)
GenTP.setGenerator('TemplateTPGen')
GenTP.setParameters()  # Creates the parameter structure for TPGen
TP_gen = MyApparatus['information']['ProcedureData']['Toolpath_Generate']
TP_gen['parameters']['tiph'] = 4
TP_gen['parameters']['length'] = 5

# Create instances of the procedures that will be used
# Procedures that will almost always be used at this level
AlignPrinter = Procedures.User_FlexPrinter_Alignments_Align(
    MyApparatus, MyExecutor)
CalInk = Procedures.User_InkCal_Calibrate(MyApparatus, MyExecutor)
PrintTP = Procedures.Toolpath_Print(MyApparatus, MyExecutor)
Planner = Procedures.Planner_Combinatorial(MyApparatus, MyExecutor)
GenTP = Procedures.Toolpath_Generate(MyApparatus, MyExecutor)
SnapPic = Procedures.Camera_Capture_Image(MyApparatus, MyExecutor)
SnapPicXY = Procedures.Camera_Capture_ImageXY(MyApparatus, MyExecutor)

# Do the experiment
AlignPrinter.Do({'primenoz': 'n' + mat0})
CalInk.Do({'material': mat0})
print('Generating toolpath')
GenTP.Do()
# Let's assume that you just want to take a picture where ever the camera  is
# This procedure needs a time to wait after motion for the camer to settle
# and the name of the camera (it doesn't autofind the camera because there
# could easily be several)
SnapPic.Do({'file': 'Data//image.png', 'camera_name': 'camera'})
print('Printing toolpath')
PrintTP.Do()
# Now, let's take a picture at the center of the what we printed.  We can use