Commit ff9b95cc authored by Jose Tiago Macara Coutinho's avatar Jose Tiago Macara Coutinho Committed by blissadm_ID31@bibhelm
Browse files

SPEC config: add massflow wago counter

parent 7437f886
......@@ -191,6 +191,7 @@ kellergaugesetup {serial_lines}
{add}
kellergaugecntsetup {counters}
gasrigsetup {wago}
{massflow}
"""
......@@ -1283,15 +1284,28 @@ class Generator(object):
mne=temperature, name=temperature)
self.spec_config.addCounter(temperature_counter)
massflow = config.get('massflow')
massflow_setup = ''
if massflow:
massflow_name = massflow['massflow_name']
massflow_wago = massflow.get('wago_channel', massflow_name)
massflow_counter = Counter(ctrl='NONE', unit=0, chan=0,
mne=massflow_name, name=massflow_name)
self.spec_config.addCounter(massflow_counter)
massflow_setup = 'mks910setup {0} {1}'.format(massflow_name, massflow_wago)
counters = ['{0} {1} {2}'.format(i+1, p, t)
for i,(p,t) in enumerate(counters)]
setup = SPEC_GASRIG_TEMPLATE.format(serial_lines=' '.join(serial_lines),
add='\n'.join(gauges),
counters=' '.join(counters),
wago=wago_name)
wago=wago_name,
massflow=massflow_setup)
self.__spec_setup.append(setup)
self.__spec_macros.add('kellergauge.mac')
self.__spec_macros.add('gasrig2.mac')
if massflow:
self.__spec_macros.add('mks910.mac')
####################
# Fuel cell
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment