Ejemplo n.º 1
0
 def __init__(self, name):
     Sensor.__init__(self, name)
     self.descriptors = [
         *self.descriptors,
         *['balance', 'weight', 'VWR', 'P2'],
     ]
     self.requirements['Connect']['COM'] = {
         'value': '',
         'source': 'apparatus',
         'address': '',
         'desc': 'Serial COM port to communcate through',
     }
     self.requirements['Measure'] = {}
     self.requirements['Measure']['address'] = {
         'value': '',
         'source': 'apparatus',
         'address': '',
         'desc': 'address to store value',
     }
     self.requirements['Measure']['addresstype'] = {
         'value': '',
         'source': 'apparatus',
         'address': '',
         'desc': 'addres type of address',
     }
     self.requirements['Measure']['stable'] = {
         'value': '',
         'source': 'apparatus',
         'address': '',
         'desc': 'whether balance should wait to stabilize before sending reading',
     }
     self.driver_address = ''
     self.name = name
Ejemplo n.º 2
0
    def __init__(self, name):
        Sensor.__init__(self, name)
        self.returnformat=''
        self.A3200handle = ''
        self.DOaxis = '' #ZZ1
        self.DObit = '' #0
        self.AIaxis = '' #ZZ2
        self.AIchannel = '' #0
        self.axis = 'ZZ2'
        self.dependent_device = True
        self.dependencies =['A3200', 'system']
        self.extend_delay = 1
        self.extended = False
        self.def_num_points = 5

        #used during initialization, take more samples
        self.init_number = 10
        self.init_delay = 0.1
        
        #used during movement, take less samples
        self.fast_number = 3
        self.fast_delay = 0.01
        self.min_step = 0.01
        self.speed = 10
        self.step = 1 #note, bad things may happen if this gets too big
        
        #machine parameters
        self.z_window = 1
        self.v_window = 4
        self.extend_delay = 1
        self.safe_positions = dict(ZZ1 = 0, ZZ2 = 0, ZZ3 = 0, ZZ4 = 0)
        self.configured = False
        self.sampleresult = 0
        self.zresult = 0
        
        # Elemental Procedures
        self.requirements['Connect']['A3200name'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'name of the system device'}
        self.requirements['Connect']['A3200address'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'pointer to the system device'}        
        self.requirements['Connect']['systemname'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'name of the A3200 device'}
        self.requirements['Connect']['systemaddress'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'pointer to the A3200 device'}
        self.requirements['Connect']['axis'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'motion axis'}
        self.requirements['Connect']['DOaxis'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'DO axis on A3200'}
        self.requirements['Connect']['DObit'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'bit on the DO axis being used'}    
        self.requirements['Connect']['AIaxis'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'AI axis on A3200'}
        self.requirements['Connect']['AIchannel'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'channel on the AI axis being used'} 

        self.requirements['Initialize'] = {}
        self.requirements['Initialize']['num_points'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'I dont really know what this number is for'}
        
        self.requirements['Measure'] = {}
        self.requirements['Measure']['address'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'address to store value'}
        self.requirements['Measure']['addresstype'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'addres type of address'} 
        self.requirements['Measure']['retract'] = {'value': '', 'source': 'apparatus', 'address': '', 'desc': 'whether to retract the probe at end of measurement'}
Ejemplo n.º 3
0
    def __init__(self, name):
        Sensor.__init__(self, name)
        self.descriptors.append('ueye')
        self.descriptors.append('camera')
        self.handle = ''
        self.requirements['StartFeed'] = {}
        self.requirements['StopFeed'] = {}
        self.requirements['StartRecord'] = {}
        self.requirements['StartRecord']['file'] = {
            'value': '',
            'source': 'direct',
            'address': '',
            'desc': 'file to store video in',
        }
        self.requirements['StopRecord'] = {}
        self.requirements['AutoConfigure'] = {}
        self.requirements['AutoConfigure']['brightness_reference'] = {
            'value': '',
            'source': 'direct',
            'address': '',
            'desc': 'Brightness reference for guiding autto contrast',
        }
        self.requirements['Configure'] = {}
        self.requirements['Configure']['parameters'] = {
            'value': '',
            'source': 'direct',
            'address': '',
            'desc': 'manual configuration for camera settings',
        }
        self.requirements['Measure'] = {}
        self.requirements['Measure']['file'] = {
            'value': '',
            'source': 'direct',
            'address': '',
            'desc': 'filename to store image at',
        }
        self.requirements['LoadConfiguration'] = {}
        self.requirements['LoadConfiguration']['file'] = {
            'value': '',
            'source': 'direct',
            'address': '',
            'desc': 'filename to store image at',
        }
        self.requirements['SaveConfiguration'] = {}
        self.requirements['SaveConfiguration']['file'] = {
            'value': '',
            'source': 'direct',
            'address': '',
            'desc': 'filename to store image at',
        }

        self.name = name
Ejemplo n.º 4
0
 def __init__(self, name):
     Sensor.__init__(self, name)
     self.descriptors.append('ueye')
     self.descriptors.append('camera')
     self.handle = ''
     self.requirements['Measure'] = {}
     self.requirements['Measure']['file'] = {
         'value': '',
         'source': 'direct',
         'address': '',
         'desc': 'filename to store image at'
     }
     self.requirements['Configure'] = {}
     self.requirements['Configure']['gain'] = {
         'value': '',
         'source': 'direct',
         'address': '',
         'desc': 'values for master and RGB gains (0-100)'
     }
Ejemplo n.º 5
0
 def __init__(self, name):
     Sensor.__init__(self, name)
     self.descriptors = [*self.descriptors, *['sensor', 'User', 'consol']]
     self.requirements['GetInput'] = {}
     self.requirements['GetInput']['message'] = {
         'source': 'apparatus',
         'address': '',
         'value': '',
         'desc': 'Message to be displayed'
     }
     self.requirements['GetInput']['options'] = {
         'source': 'apparatus',
         'address': '',
         'value': '',
         'desc': 'Possible answers'
     }
     self.requirements['GetInput']['default'] = {
         'source': 'apparatus',
         'address': '',
         'value': '',
         'desc': 'default response'
     }
Ejemplo n.º 6
0
    def __init__(self, name):
        Sensor.__init__(self, name)
        self.A3200handle = ''
        self.DOaxis = ''  # X
        self.DObit = ''  # 0
        self.DIaxis = ''  # X
        self.DIbit = ''  # 1
        self.axis = 'D'
        self.name = name
        self.extended = False
        self.dependent_device = True
        self.dependencies = ['A3200', 'system']

        # Parameters defining probe behaviour
        self.fast_speed = 10
        self.slow_speed = 1
        self.backstep_speed = 0.1
        self.backstep_dist = 0.2
        self.measure_speed = 0.01
        self.extend_delay = 2
        self.reading_gvariable = 4
        self.latest_reading = None

        # Variables to store results
        self.measure_reading = None
        self.grid_reading = None

        # Elemental Procedures
        self.requirements['Connect']['A3200name'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'name of the system device',
        }
        self.requirements['Connect']['A3200address'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'pointer to the system device',
        }
        self.requirements['Connect']['systemname'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'name of the A3200 device',
        }
        self.requirements['Connect']['systemaddress'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'pointer to the A3200 device',
        }
        self.requirements['Connect']['axis'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'motion axis',
        }
        self.requirements['Connect']['DOaxis'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'DO axis on A3200',
        }
        self.requirements['Connect']['DObit'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'bit on the DO axis being used',
        }
        self.requirements['Connect']['DIaxis'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'DO axis on A3200',
        }
        self.requirements['Connect']['DIbit'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'bit on the DO axis being used',
        }

        self.requirements['Measure'] = {}
        self.requirements['Measure']['address'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'address to store value',
        }
        self.requirements['Measure']['addresstype'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'address type of address',
        }
        self.requirements['Measure']['retract'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'whether to retract the probe at end of measurement',
        }
Ejemplo n.º 7
0
    def __init__(self, name):
        Sensor.__init__(self, name)
        self.A3200handle = ''
        self.DOaxis = ''  # X
        self.DObit = ''  # 7
        self.dependent_device = True
        self.dependencies = ['A3200', 'system']

        # Variables to store state
        self.XY_active = None

        # Elemental Procedures
        self.requirements['Connect']['A3200name'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'name of the system device',
        }
        self.requirements['Connect']['A3200address'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'pointer to the system device',
        }
        self.requirements['Connect']['systemname'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'name of the A3200 device',
        }
        self.requirements['Connect']['systemaddress'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'pointer to the A3200 device',
        }
        self.requirements['Connect']['axis'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'motion axis',
        }
        self.requirements['Connect']['COM'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'Serial COM port to communcate through',
        }
        self.requirements['Connect']['DOaxis'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'DO axis on A3200',
        }
        self.requirements['Connect']['DObit'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'bit on the DO axis being used',
        }

        self.requirements['Measure'] = {}
        self.requirements['Measure']['address'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'address to store value',
        }
        self.requirements['Measure']['addresstype'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'addres type of address',
        }
        self.requirements['Measure']['mode'] = {
            'value': '',
            'source': 'apparatus',
            'address': '',
            'desc': 'whether to measure "XY" position of "Z" position',
        }