def main(): """ Main function """ codenames = ['sniffer_inlet_gas_pressure'] mfc = AnalogMFC(1, 10, 5) mfcs = {} mfcs[codenames[0]] = mfc flow_control = FlowControl(mfcs, 'sniffer') flow_control.start() loggers = {} loggers[codenames[0]] = ValueLogger(flow_control, comp_val=0.02, comp_type='lin', low_comp=0.01, channel=codenames[0]) loggers[codenames[0]].start() db_logger = ContinuousDataSaver(continuous_data_table='dateplots_sniffer', username=credentials.user, password=credentials.passwd, measurement_codenames=codenames) db_logger.start() while True: time.sleep(0.5) for name in codenames: if loggers[name].read_trigged(): print(name + ': ' + str(loggers[name].value)) db_logger.save_point_now(name, loggers[name].value) loggers[name].clear_trigged()
def main(): """ Main function """ mfc = AnalogMFC(1, 2, 1.5) mfcs = {} mfcs['1'] = mfc try: micro = chr(0x03BC) # Python 3 except ValueError: micro = unichr(0x03BC) # Python 2 flow_control = FlowControl(mfcs, micro + '-reactor') flow_control.start() while True: time.sleep(0.5)
def main(): """ Main function """ mfc = AnalogMFC(1, 2, 1.5) mfcs = {} mfcs['1'] = mfc try: # Python 3 micro = chr(0x03BC) except ValueError: # Python 2 micro = unichr(0x03BC) # pylint: disable=undefined-variable flow_control = FlowControl(mfcs, micro + '-reactor') flow_control.start() while flow_control.is_alive(): time.sleep(0.5)