def __init__(self): self.seconds = SysActionParamTime() self.kVoltsMinus = SysActionParamFloat(spellmanMinus.vars['V'], name='V-') self.kVoltsPlus = SysActionParamFloat(spellmanPlus.vars['V'], name='V+') SysAction.__init__(self, 'HV separation', (self.seconds, self.kVoltsMinus, self.kVoltsPlus))
def __init__(self): self.volume = SysActionParamFloat(range=[0, syringeUsableVolume_ul], name='Volume', units='ul', value=syringeUsableVolume_ul) self.repeat = SysActionParamInt('Repeat', [0, 100], value=1) self.speed = SysActionParamFloat(pump.vars['Speed'], value=10) SysAction.__init__(self, 'Sample->interface', (self.volume, self.speed, self.repeat))
class SysActionSetFlows(SysAction): def __init__(self): self.flow1 = SysActionParamFloat(mfc1.vars['Flow'], name='Flow 1') self.flow2 = SysActionParamFloat(mfc2.vars['Flow'], name='Flow 2') self.flow3 = SysActionParamFloat(mfc3.vars['Flow'], name='Flow 3') self.flow4 = SysActionParamFloat(mfc4.vars['Flow'], name='Flow 4') SysAction.__init__(self, 'Set Flows', (self.flow1, self.flow2, self.flow3, self.flow4)) def Command(self): mfc1.vars['Flow'].Set(self.flow1.Get()) mfc2.vars['Flow'].Set(self.flow2.Get()) mfc3.vars['Flow'].Set(self.flow3.Get()) mfc4.vars['Flow'].Set(self.flow4.Get())
def __init__(self): self.seconds = SysActionParamTime(name='Time') self.flow1 = SysActionParamFloat(mfc1.vars['Flow'], name='Flow 1') self.flow2 = SysActionParamFloat(mfc2.vars['Flow'], name='Flow 2') self.flow3 = SysActionParamFloat(mfc3.vars['Flow'], name='Flow 3') self.flow4 = SysActionParamFloat(mfc4.vars['Flow'], name='Flow 4') SysAction.__init__(self, 'Start', (self.seconds, self.flow1, self.flow2, self.flow3, self.flow4))
class ActionFlushCapillary(SysAction): def __init__(self): self.prs = SysActionParamFloat(pressureController.vars['P']) self.seconds = SysActionParamTime() self.trigger = SysActionParamInt('trigger?', [0, 1]) SysAction.__init__(self, 'Flush capillary', (self.seconds, self.prs, self.trigger)) def Command(self): valves.vars['anions liquids'].Set('closed') valves.vars['cations liquids'].Set('closed') valves.vars['pressure'].Set(pressureVenting) valves.vars['pump/pressure'].Set(pressureToInterfaces) valves.vars['pressure'].Set(pressureOn) if self.trigger.Get(): ecorder.vars['trigger'].Set('on') setPressure(self.prs.Get()) cfg.Sleep(self.seconds.Get()) pressureController.vars['P'].Set(0) print 0 if self.trigger.Get(): ecorder.vars['trigger'].Set('off') valves.vars['pressure'].Set(pressureVenting) valves.vars['pump/pressure'].Set(pumpToInterfaces) valves.vars['pressure'].Set('closed')
class ActionSample2Interfaces(SysAction): def __init__(self): self.volume = SysActionParamFloat(range=[0, syringeUsableVolume_ul], name='Volume', units='ul', value=syringeUsableVolume_ul) self.repeat = SysActionParamInt('Repeat', [0, 100], value=1) self.speed = SysActionParamFloat(pump.vars['Speed'], value=10) SysAction.__init__(self, 'Sample->interface', (self.volume, self.speed, self.repeat)) def Command(self): valves.vars['anions liquids'].Set(anionsSample) valves.vars['cations liquids'].Set(cationsSample) for _ in range(self.repeat.Get()): supplyLiquids(self.volume.Get(), self.speed.Get())
class SetThermostat(SysAction): def __init__(self): self.temp = SysActionParamFloat(boxThermostat.vars['T']) SysAction.__init__(self, 'Thermostat', (self.temp, )) def Command(self): boxThermostat.vars['T'].Set(self.temp.Get()) boxThermostat.vars['enable'].Set('on')
class SysActionSetPins(SysAction): def __init__(self): self.seconds = SysActionParamTime() self.pinA = SysActionParamFloat(analPins.vars['A']) self.pinB = SysActionParamFloat(analPins.vars['B']) SysAction.__init__(self, 'Set pins', (self.seconds, self.pinA, self.pinB)) def Command(self): # Set pins analPins.vars['A'].Set(self.pinA.Get()) analPins.vars['B'].Set(self.pinB.Get()) # Wait some time cfg.Sleep(self.seconds.Get()) # Zero pins analPins.vars['A'].Set(0) analPins.vars['B'].Set(0)
class SysActionStart(SysAction): def __init__(self): self.seconds = SysActionParamTime(name='Time') self.flow1 = SysActionParamFloat(mfc1.vars['Flow'], name='Flow 1') self.flow2 = SysActionParamFloat(mfc2.vars['Flow'], name='Flow 2') self.flow3 = SysActionParamFloat(mfc3.vars['Flow'], name='Flow 3') self.flow4 = SysActionParamFloat(mfc4.vars['Flow'], name='Flow 4') SysAction.__init__(self, 'Start', (self.seconds, self.flow1, self.flow2, self.flow3, self.flow4)) def Command(self): mfc1.vars['Flow'].Set(self.flow1.Get()) mfc2.vars['Flow'].Set(self.flow2.Get()) mfc3.vars['Flow'].Set(self.flow3.Get()) mfc4.vars['Flow'].Set(self.flow4.Get()) cfg.Sleep(self.seconds.Get()) mfc1.vars['Flow'].Set(0) mfc2.vars['Flow'].Set(0) mfc3.vars['Flow'].Set(0) mfc4.vars['Flow'].Set(0)
class ActionSeparation(SysAction): def __init__(self): self.seconds = SysActionParamTime() self.kVoltsMinus = SysActionParamFloat(spellmanMinus.vars['V'], name='V-') self.kVoltsPlus = SysActionParamFloat(spellmanPlus.vars['V'], name='V+') SysAction.__init__(self, 'HV separation', (self.seconds, self.kVoltsMinus, self.kVoltsPlus)) def Command(self): valves.vars['pump/pressure'].Set('closed') valves.vars['pressure'].Set('closed') valves.vars['anions liquids'].Set(anionsBGE) valves.vars['cations liquids'].Set(cationsBGE) spellmanMinus.vars['I'].Set(spellmanMinus.vars['I'].range[1]) spellmanPlus.vars['I'].Set(spellmanPlus.vars['I'].range[1]) spellmanMinus.vars['enable'].Set('on') spellmanPlus.vars['enable'].Set('on') ecorder.vars['trigger'].Set('on') spellmanMinus.vars['V'].Set(self.kVoltsMinus.Get()) spellmanPlus.vars['V'].Set(self.kVoltsPlus.Get()) cfg.Sleep(self.seconds.Get()) spellmanMinus.vars['V'].Set(0) spellmanPlus.vars['V'].Set(0) ecorder.vars['trigger'].Set('off') spellmanMinus.vars['enable'].Set('off') spellmanPlus.vars['enable'].Set('off') spellmanMinus.vars['I'].Set(0) spellmanPlus.vars['I'].Set(0)
class SysActionFillContainer(SysAction): def __init__(self): self.seconds = SysActionParamTime() self.psi = SysActionParamFloat(pressureController.vars['P']) SysAction.__init__(self, 'Fill Container', (self.seconds, self.psi)) def Command(self): # Connect container to pressure controller valves.vars['V1'].Set(valvePortPressure) # Start pressure pressureController.vars['P'].Set(self.psi.Get()) # Wait some time cfg.Sleep(self.seconds.Get()) # Close container valves.vars['V1'].Set('closed')
def __init__(self): self.seconds = SysActionParamTime() self.psi = SysActionParamFloat(pressureController.vars['P']) SysAction.__init__(self, 'Fill Container', (self.seconds, self.psi))
def __init__(self): self.prs = SysActionParamFloat(pressureController.vars['P']) self.seconds = SysActionParamTime() self.trigger = SysActionParamInt('trigger?', [0, 1]) SysAction.__init__(self, 'Flush capillary', (self.seconds, self.prs, self.trigger))
def __init__(self): self.temp = SysActionParamFloat(boxThermostat.vars['T']) SysAction.__init__(self, 'Thermostat', (self.temp, ))
def __init__(self): self.flow1 = SysActionParamFloat(mfc1.vars['Flow'], name='Flow 1') self.flow2 = SysActionParamFloat(mfc2.vars['Flow'], name='Flow 2') self.flow3 = SysActionParamFloat(mfc3.vars['Flow'], name='Flow 3') self.flow4 = SysActionParamFloat(mfc4.vars['Flow'], name='Flow 4') SysAction.__init__(self, 'Set Flows', (self.flow1, self.flow2, self.flow3, self.flow4))
def __init__(self): self.seconds = SysActionParamTime() self.pinA = SysActionParamFloat(analPins.vars['A']) self.pinB = SysActionParamFloat(analPins.vars['B']) SysAction.__init__(self, 'Set pins', (self.seconds, self.pinA, self.pinB))