Compare commits
147 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 38b8a7a118 | |||
| d73b8bc774 | |||
| ceb6e487a8 | |||
| eb08e31b62 | |||
| 4b88ece3be | |||
| c22e41c8e2 | |||
| 701d1f1735 | |||
| 400b314fc7 | |||
| ce3b3ddfd6 | |||
| 3045a11ff9 | |||
| de773f084d | |||
| 564bea63e4 | |||
| bd8a417112 | |||
| e6263cbcd0 | |||
| 7c06bbeec2 | |||
| d6947711c6 | |||
| 0938049e89 | |||
| 0053b7847c | |||
| 5c93953183 | |||
|
|
b60ad38fd0 | ||
| 7b0356b4ee | |||
| 7faf328141 | |||
| d07406c2fd | |||
| dbd4667c87 | |||
|
|
6e7514b718 | ||
| c49f15ce64 | |||
| 3bae6f8d7f | |||
| e46291eef6 | |||
| af746f59bb | |||
| a2a4d4332a | |||
| aff6a2381a | |||
| eb8eee02d1 | |||
| 9a818ab40b | |||
|
|
dc87a50c76 | ||
| 5974d759b0 | |||
| 396bbe9982 | |||
| ae98fa174c | |||
| 83ad7b1638 | |||
| 257b24a480 | |||
| 29f0e18c1e | |||
| 144083a54a | |||
| 748a39f932 | |||
| 8cea974f49 | |||
| 5768f096a5 | |||
| 94859fe2ef | |||
| fcf867675e | |||
| 09dce1aabd | |||
| eefe271cba | |||
| c42dd41dec | |||
| c545e36633 | |||
| ef985f094c | |||
|
|
55d399241c | ||
| aea56bb16a | |||
| 3b8f3586cf | |||
| 56bee015b3 | |||
| 1febb7bacf | |||
| df4dec6db5 | |||
| 7feee607e0 | |||
| 7c938a3bb1 | |||
| 904dd96f95 | |||
|
|
04fd8743a2 | ||
|
|
b59a98e4dc | ||
|
|
285c5c330f | ||
|
|
e3e27881d3 | ||
|
|
d26434f797 | ||
| c3b6aca7bc | |||
|
|
71372a450b | ||
|
|
79dbfdfad0 | ||
| 5c7fe37807 | |||
| e75b8b0b10 | |||
| 8d62375483 | |||
| 7c60daa568 | |||
| fdc868c2d7 | |||
| b66acd4d73 | |||
|
|
da24c6244e | ||
| 738c4c7a51 | |||
| 93fa2c818b | |||
|
|
88eb6e93bd | ||
|
|
5242c903ae | ||
| 4aec05c86b | |||
| a43590a3ff | |||
|
|
76e46f7c84 | ||
|
|
baf55baffc | ||
|
|
f7f77b168f | ||
| ebcf95e31e | |||
| ee29bea821 | |||
| 4fc4cd3687 | |||
| 1145493e81 | |||
| 3f7ef438e3 | |||
| 90dc5359b9 | |||
| 6d63c4e0df | |||
| 98fa19ce3b | |||
| 7f83f76d38 | |||
| 0ab849d0cf | |||
| 8ee49caba5 | |||
| b1de9218bd | |||
| 8eaad86b66 | |||
| 85400a2777 | |||
| dda4afbe5b | |||
| 9b079ddf4b | |||
| 898da75b89 | |||
| a7a846dfba | |||
| 6da671df62 | |||
| bdb14af4af | |||
| e57ad9826e | |||
| 8775103bf8 | |||
|
|
5636a76152 | ||
|
|
745cc69e9e | ||
|
|
b4c0a827f0 | ||
| d57416a73e | |||
|
|
8dcf6ca658 | ||
| bc66a314c4 | |||
| 6fac63d769 | |||
| e41692bf2c | |||
| dff3bd2f24 | |||
| b67e5a9260 | |||
| 4815f4e6b4 | |||
| e8ec9b415a | |||
| 5b9e36180e | |||
| f1b59e4150 | |||
| 17070ca732 | |||
|
|
d618fafe4b | ||
|
|
dd1dfb3094 | ||
| 8d6617e288 | |||
|
|
fdec531c99 | ||
| a246584c4a | |||
|
|
00ef174292 | ||
|
|
ada66f4851 | ||
|
|
a9be6475b1 | ||
|
|
f380289a84 | ||
|
|
528d80652c | ||
|
|
7c6df58906 | ||
|
|
1851c0ac43 | ||
| 880d472a4a | |||
|
|
25ff96873b | ||
|
|
82881049c4 | ||
|
|
60c9737cfe | ||
|
|
632db924eb | ||
|
|
261121297b | ||
|
|
1bd243f3d2 | ||
|
|
7c3f9f7196 | ||
| 9074dfda9d | |||
| de32eb09e6 | |||
| 2e97f0f0ce | |||
| 0b06acf304 | |||
| cc90291358 | |||
| 03b4604643 |
@@ -86,7 +86,7 @@ dummy-variables-rgx=_|dummy
|
|||||||
|
|
||||||
# List of additional names supposed to be defined in builtins. Remember that
|
# List of additional names supposed to be defined in builtins. Remember that
|
||||||
# you should avoid to define new builtins when possible.
|
# you should avoid to define new builtins when possible.
|
||||||
additional-builtins=Node,Mod,Param,Command,Group,IO
|
additional-builtins=Node,Mod,Param,Command,Group
|
||||||
|
|
||||||
|
|
||||||
[BASIC]
|
[BASIC]
|
||||||
|
|||||||
@@ -24,14 +24,12 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
import socket
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
# Add import path for inplace usage
|
# Add import path for inplace usage
|
||||||
sys.path.insert(0, str(Path(__file__).absolute().parents[1]))
|
sys.path.insert(0, str(Path(__file__).absolute().parents[1]))
|
||||||
|
|
||||||
from frappy.client.interactive import init, run, clientenv, interact
|
from frappy.client.interactive import init, run, clientenv, interact
|
||||||
from frappy.protocol.discovery import scan
|
|
||||||
|
|
||||||
|
|
||||||
def parseArgv(argv):
|
def parseArgv(argv):
|
||||||
@@ -39,9 +37,6 @@ def parseArgv(argv):
|
|||||||
parser.add_argument('-i', '--include',
|
parser.add_argument('-i', '--include',
|
||||||
help='file to execute after connecting to the clients', metavar='file',
|
help='file to execute after connecting to the clients', metavar='file',
|
||||||
type=Path, action='append', default=[])
|
type=Path, action='append', default=[])
|
||||||
parser.add_argument('-s', '--scan',
|
|
||||||
help='hosts to scan for (-s subnet for all nodes in subnet)',
|
|
||||||
action='append', default=[])
|
|
||||||
parser.add_argument('-o', '--only-execute',
|
parser.add_argument('-o', '--only-execute',
|
||||||
help='Do not go into interactive mode after executing files. \
|
help='Do not go into interactive mode after executing files. \
|
||||||
Has no effect without --include.', action='store_true')
|
Has no effect without --include.', action='store_true')
|
||||||
@@ -51,38 +46,9 @@ def parseArgv(argv):
|
|||||||
return parser.parse_args(argv)
|
return parser.parse_args(argv)
|
||||||
|
|
||||||
|
|
||||||
def own_ip():
|
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
||||||
s.settimeout(0)
|
|
||||||
try:
|
|
||||||
# doesn't even have to be reachable
|
|
||||||
s.connect(('10.254.254.254', 1))
|
|
||||||
return s.getsockname()[0]
|
|
||||||
except Exception:
|
|
||||||
return '127.0.0.1'
|
|
||||||
finally:
|
|
||||||
s.close()
|
|
||||||
|
|
||||||
|
|
||||||
args = parseArgv(sys.argv[1:])
|
args = parseArgv(sys.argv[1:])
|
||||||
|
|
||||||
nodes = args.node
|
success = init(*args.node)
|
||||||
hosts = args.scan
|
|
||||||
if not nodes and not hosts:
|
|
||||||
hosts = ['localhost']
|
|
||||||
if hosts:
|
|
||||||
answers = []
|
|
||||||
for host in hosts:
|
|
||||||
ans = scan()
|
|
||||||
if host == 'subnet': # all in subnet
|
|
||||||
answers.extend(ans)
|
|
||||||
else: # filter by ip
|
|
||||||
ip = socket.gethostbyname(host)
|
|
||||||
if ip == '127.0.0.1':
|
|
||||||
ip = own_ip()
|
|
||||||
answers.extend(a for a in ans if a.address == ip)
|
|
||||||
nodes.extend(f'{h.hostname}:{h.port}' for h in answers)
|
|
||||||
success = init(*nodes)
|
|
||||||
|
|
||||||
run_error = ''
|
run_error = ''
|
||||||
file_success = False
|
file_success = False
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
# *****************************************************************************
|
|
||||||
# Copyright (c) 2015-2024 by the authors, see LICENSE
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify it under
|
|
||||||
# the terms of the GNU General Public License as published by the Free Software
|
|
||||||
# Foundation; either version 2 of the License, or (at your option) any later
|
|
||||||
# version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
# details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along with
|
|
||||||
# this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
# Module authors:
|
|
||||||
# Markus Zolliker <markus.zolliker@psi.ch>
|
|
||||||
#
|
|
||||||
# *****************************************************************************
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
# Add import path for inplace usage
|
|
||||||
repo = Path(__file__).absolute().parents[1]
|
|
||||||
sys.path.insert(0, str(repo))
|
|
||||||
|
|
||||||
from frappy.lib import generalConfig
|
|
||||||
from frappy.tools.cfgedit import EditorMain
|
|
||||||
|
|
||||||
# merge cfg dirs from env variable and the ones typically used at psi
|
|
||||||
# use dicts instead of sets, as we want to keep order
|
|
||||||
cfgdirs = os.environ.get('FRAPPY_CONFDIR', None)
|
|
||||||
cfgdirs = cfgdirs.split(':') if cfgdirs else []
|
|
||||||
for cfgdir in 'cfg', 'cfg/main', 'cfg/stick', 'cfg/addons':
|
|
||||||
cfgpath = repo / cfgdir
|
|
||||||
if cfgpath.exists():
|
|
||||||
cfgdirs.append(str(cfgpath))
|
|
||||||
os.environ['FRAPPY_CONFDIR'] = ':'.join(cfgdirs)
|
|
||||||
generalConfig.init()
|
|
||||||
EditorMain(sys.argv[1]).run()
|
|
||||||
@@ -23,20 +23,54 @@
|
|||||||
"""SEC node autodiscovery tool."""
|
"""SEC node autodiscovery tool."""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import select
|
||||||
|
import socket
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from collections import namedtuple
|
||||||
# Add import path for inplace usage
|
from time import time as currenttime
|
||||||
sys.path.append(str(Path(__file__).absolute().parents[1]))
|
|
||||||
from frappy.protocol.discovery import scan, listen
|
UDP_PORT = 10767
|
||||||
|
|
||||||
|
Answer = namedtuple('Answer',
|
||||||
|
'address, port, equipment_id, firmware, description')
|
||||||
|
|
||||||
|
|
||||||
|
def decode(msg, addr):
|
||||||
|
msg = msg.decode('utf-8')
|
||||||
|
try:
|
||||||
|
data = json.loads(msg)
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
if not isinstance(data, dict):
|
||||||
|
return None
|
||||||
|
if data.get('SECoP') != 'node':
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
eq_id = data['equipment_id']
|
||||||
|
fw = data['firmware']
|
||||||
|
desc = data['description']
|
||||||
|
port = data['port']
|
||||||
|
except KeyError:
|
||||||
|
return None
|
||||||
|
addr, _scanport = addr
|
||||||
|
return Answer(addr, port, eq_id, fw, desc)
|
||||||
|
|
||||||
|
|
||||||
def print_answer(answer, *, short=False):
|
def print_answer(answer, *, short=False):
|
||||||
|
try:
|
||||||
|
hostname = socket.gethostbyaddr(answer.address)[0]
|
||||||
|
address = hostname
|
||||||
|
numeric = f' ({answer.address})'
|
||||||
|
except Exception:
|
||||||
|
address = answer.address
|
||||||
|
numeric = ''
|
||||||
if short:
|
if short:
|
||||||
# NOTE: keep this easily parseable!
|
# NOTE: keep this easily parseable!
|
||||||
print(f'{answer.equipment_id} {answer.hostname}:{answer.port}')
|
print(f'{answer.equipment_id} {address}:{answer.port}')
|
||||||
return
|
return
|
||||||
numeric = f' ({answer.address})' if answer.address == answer.hostname else ''
|
print(f'Found {answer.equipment_id} at {address}{numeric}:')
|
||||||
print(f'Found {answer.equipment_id} at {answer.hostname}{numeric}:')
|
|
||||||
print(f' Port: {answer.port}')
|
print(f' Port: {answer.port}')
|
||||||
print(f' Firmware: {answer.firmware}')
|
print(f' Firmware: {answer.firmware}')
|
||||||
desc = answer.description.replace('\n', '\n ')
|
desc = answer.description.replace('\n', '\n ')
|
||||||
@@ -44,6 +78,51 @@ def print_answer(answer, *, short=False):
|
|||||||
print('-' * 80)
|
print('-' * 80)
|
||||||
|
|
||||||
|
|
||||||
|
def scan(max_wait=1.0):
|
||||||
|
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||||
|
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
|
||||||
|
# send a general broadcast
|
||||||
|
try:
|
||||||
|
s.sendto(json.dumps(dict(SECoP='discover')).encode('utf-8'),
|
||||||
|
('255.255.255.255', UDP_PORT))
|
||||||
|
except OSError as e:
|
||||||
|
print('could not send the broadcast:', e)
|
||||||
|
# we still keep listening for self-announcements
|
||||||
|
start = currenttime()
|
||||||
|
seen = set()
|
||||||
|
while currenttime() < start + max_wait:
|
||||||
|
res = select.select([s], [], [], 0.1)
|
||||||
|
if res[0]:
|
||||||
|
try:
|
||||||
|
msg, addr = s.recvfrom(1024)
|
||||||
|
except socket.error: # pragma: no cover
|
||||||
|
continue
|
||||||
|
answer = decode(msg, addr)
|
||||||
|
if answer is None:
|
||||||
|
continue
|
||||||
|
if (answer.address, answer.equipment_id, answer.port) in seen:
|
||||||
|
continue
|
||||||
|
seen.add((answer.address, answer.equipment_id, answer.port))
|
||||||
|
yield answer
|
||||||
|
|
||||||
|
|
||||||
|
def listen(*, short=False):
|
||||||
|
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||||
|
if os.name == 'nt':
|
||||||
|
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||||
|
else:
|
||||||
|
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
|
||||||
|
s.bind(('0.0.0.0', UDP_PORT))
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
msg, addr = s.recvfrom(1024)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
break
|
||||||
|
answer = decode(msg, addr)
|
||||||
|
if answer:
|
||||||
|
print_answer(answer, short=short)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('-l', '--listen', action='store_true',
|
parser.add_argument('-l', '--listen', action='store_true',
|
||||||
@@ -57,5 +136,4 @@ if __name__ == '__main__':
|
|||||||
for answer in scan():
|
for answer in scan():
|
||||||
print_answer(answer, short=short)
|
print_answer(answer, short=short)
|
||||||
if args.listen:
|
if args.listen:
|
||||||
for answer in listen():
|
listen(short=short)
|
||||||
print_answer(short=short)
|
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
Node('measure.frappy.demo',
|
|
||||||
'''Measureable demo''',
|
|
||||||
'tcp://10770',
|
|
||||||
)
|
|
||||||
Mod('control',
|
|
||||||
'frappy_demo.acquisition.Controller',
|
|
||||||
'simple demo controller',
|
|
||||||
channels = {'first': 'chan1', 'second': 'chan2', 'third': 'chan3'},
|
|
||||||
pollinterval = 1,
|
|
||||||
)
|
|
||||||
Mod('chan1',
|
|
||||||
'frappy_demo.acquisition.Channel',
|
|
||||||
'simple channel demo',
|
|
||||||
goal = 50,
|
|
||||||
goal_enable = True,
|
|
||||||
pollinterval = 1,
|
|
||||||
)
|
|
||||||
Mod('chan2',
|
|
||||||
'frappy_demo.acquisition.Channel',
|
|
||||||
'simple channel demo',
|
|
||||||
pollinterval = 1,
|
|
||||||
)
|
|
||||||
Mod('chan3',
|
|
||||||
'frappy_demo.acquisition.Channel',
|
|
||||||
'simple channel demo',
|
|
||||||
pollinterval = 1,
|
|
||||||
)
|
|
||||||
Mod('single',
|
|
||||||
'frappy_demo.acquisition.SimpleAcquisition',
|
|
||||||
'Acquisition demo',
|
|
||||||
pollinterval = 1,
|
|
||||||
goal = 20,
|
|
||||||
goal_enable=True,
|
|
||||||
acquisition_key='single',
|
|
||||||
)
|
|
||||||
Mod('ng',
|
|
||||||
'frappy_demo.acquisition.NoGoalAcquisition',
|
|
||||||
'Acquisition demo',
|
|
||||||
pollinterval = 5,
|
|
||||||
)
|
|
||||||
@@ -3,16 +3,20 @@ Node('ah2700.frappy.psi.ch',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('cap_io',
|
Mod('cap_io',
|
||||||
'frappy_psi.ahcapbridge.IO', '',
|
'frappy_psi.ah2700.Ah2700IO',
|
||||||
uri='linse-leiden-ts:3002'
|
'',
|
||||||
|
uri='linse-976d-ts:3006',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cap',
|
Mod('cap',
|
||||||
'frappy_psi.ahcapbridge.AH2700',
|
'frappy_psi.ah2700.Capacitance',
|
||||||
'capacitance',
|
'capacitance',
|
||||||
io = 'cap_io',
|
io = 'cap_io',
|
||||||
loss_module = 'loss',
|
|
||||||
freq_module = 'freq',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Mod('loss',
|
||||||
|
'frappy_psi.parmod.Par',
|
||||||
|
'loss parameter',
|
||||||
|
read='cap.loss',
|
||||||
|
unit='deg',
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
Node('ah2700.frappy.psi.ch',
|
|
||||||
'Andeen Hagerlin 2700 Capacitance Bridge',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('cap_io',
|
|
||||||
'frappy_psi.ah2700.Ah2700IO',
|
|
||||||
'',
|
|
||||||
uri='linse-leiden-ts:3002',
|
|
||||||
timeout=60,
|
|
||||||
)
|
|
||||||
|
|
||||||
# this creates also cap_freq and cap_loss
|
|
||||||
Mod('cap',
|
|
||||||
'frappy_psi.ah2700.Capacitance',
|
|
||||||
'capacitance',
|
|
||||||
io = 'cap_io',
|
|
||||||
loss_name='loss',
|
|
||||||
freq_name='freq',
|
|
||||||
)
|
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ Mod('ah',
|
|||||||
'frappy_psi.sea.SeaReadable', '',
|
'frappy_psi.sea.SeaReadable', '',
|
||||||
io='sea_addons',
|
io='sea_addons',
|
||||||
sea_object='cap',
|
sea_object='cap',
|
||||||
extra_modules = ['cap', 'loss', 'freq']
|
extra_modules = ['cap', 'loss']
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cap',
|
Mod('cap',
|
||||||
@@ -32,12 +32,6 @@ Mod('loss',
|
|||||||
single_module='ah.loss',
|
single_module='ah.loss',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('freq',
|
|
||||||
'frappy_psi.sea.SeaWritable', '',
|
|
||||||
io='sea_addons',
|
|
||||||
single_module='ah.freq',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('capslope',
|
Mod('capslope',
|
||||||
'frappy_psi.sea.SeaReadable', '',
|
'frappy_psi.sea.SeaReadable', '',
|
||||||
io='sea_addons',
|
io='sea_addons',
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
Node('ahtwo.frappy.psi.ch',
|
|
||||||
'Andeen Hagerlin 2700 and 2550 Capacitance Bridges',
|
|
||||||
)
|
|
||||||
|
|
||||||
# TODO: adapt names (cap, cap2) to your experiment
|
|
||||||
|
|
||||||
Mod('cap_io',
|
|
||||||
'frappy_psi.ahcapbridge.IO', '',
|
|
||||||
uri='linse-leiden-ts:3002'
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('cap',
|
|
||||||
'frappy_psi.ahcapbridge.AH2700',
|
|
||||||
'capacitance',
|
|
||||||
io='cap_io',
|
|
||||||
loss_module = 'loss',
|
|
||||||
freq_module = 'freq',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('cap2_io',
|
|
||||||
'frappy_psi.ahcapbridge.IO', '',
|
|
||||||
uri='linse-leiden-ts:3001'
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('cap2',
|
|
||||||
'frappy_psi.ahcapbridge.AH2550',
|
|
||||||
'capacitance',
|
|
||||||
io='cap2_io',
|
|
||||||
loss_module = 'loss2',
|
|
||||||
)
|
|
||||||
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
Node('haake.frappy.psi.ch',
|
|
||||||
'additional haake waterbath',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('haake_io',
|
|
||||||
'frappy_psi.haake.HaakeIO',
|
|
||||||
'',
|
|
||||||
uri='sans-sample-ts:3006',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('T2',
|
|
||||||
'frappy_psi.haake.TemperatureLoop',
|
|
||||||
'second haake',
|
|
||||||
io = 'haake_io',
|
|
||||||
)
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
Node('pdld_laser.psi.ch',
|
|
||||||
'PDLD laser',
|
|
||||||
interface = 'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('laser_io',
|
|
||||||
'frappy_psi.pdld.IO',
|
|
||||||
'laser IO',
|
|
||||||
uri='serial:///dev/ttyUSB0?baudrate=9600',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('laser',
|
|
||||||
'frappy_psi.pdld.Laser',
|
|
||||||
'laser switch',
|
|
||||||
io='laser_io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('laser_power',
|
|
||||||
'frappy_psi.pdld.LaserPower',
|
|
||||||
'laser power',
|
|
||||||
io='laser_io',
|
|
||||||
)
|
|
||||||
@@ -5,7 +5,7 @@ Node('stickmotor.linse.psi.ch',
|
|||||||
Mod('stick_io',
|
Mod('stick_io',
|
||||||
'frappy_psi.phytron.PhytronIO',
|
'frappy_psi.phytron.PhytronIO',
|
||||||
'dom motor IO',
|
'dom motor IO',
|
||||||
uri='ldmcc05-ts:3006',
|
uri='ldmcc08-ts:3006',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('stickrot',
|
Mod('stickrot',
|
||||||
|
|||||||
@@ -3,15 +3,8 @@ Node('AH2700Test.psi.ch',
|
|||||||
'tcp://5000',
|
'tcp://5000',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('io',
|
|
||||||
'frappy_psi.ahcapbridge.IO', '',
|
|
||||||
uri='linse-leiden-ts:3002'
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('cap',
|
Mod('cap',
|
||||||
'frappy_psi.ahcapbridge.AH2700',
|
'frappy_psi.ah2700.Capacitance',
|
||||||
'capacitance',
|
'capacitance',
|
||||||
io='io',
|
uri='ldmse3-ts:3015',
|
||||||
loss_module = 'loss',
|
|
||||||
freq_module = 'freq',
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
Node('bronkhorsttest.psi.ch',
|
|
||||||
'bronkhorst test',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('io',
|
|
||||||
'frappy_psi.bronkhorst.IO',
|
|
||||||
'bronkhorst communication',
|
|
||||||
uri='tcp://localhost:3005',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('p',
|
|
||||||
'frappy_psi.bronkhorst.Controller',
|
|
||||||
'pressure controller',
|
|
||||||
io='io',
|
|
||||||
adr=128,
|
|
||||||
scale=18,
|
|
||||||
value=Param(unit='mbar')
|
|
||||||
)
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
Node('bronkhorst_test.psi.ch',
|
|
||||||
'bronkhorst test',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('io',
|
|
||||||
'frappy_psi.bronkhorst.IO',
|
|
||||||
'',
|
|
||||||
uri='dil4-ts:3002',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('flow',
|
|
||||||
'frappy_psi.bronkhorst.Sensor',
|
|
||||||
'flow',
|
|
||||||
io='io',
|
|
||||||
value=Param(unit='ln/min'),
|
|
||||||
)
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
Node('dil4_test.psi.ch',
|
|
||||||
'dil4 test',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('io',
|
|
||||||
'frappy_psi.oiclassic.IGH_IO',
|
|
||||||
'',
|
|
||||||
uri='dil4-ts:3005',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('p',
|
|
||||||
'frappy_psi.oiclassic.Pressure',
|
|
||||||
'pressure',
|
|
||||||
io='io',
|
|
||||||
addr='G2',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('P_mix',
|
|
||||||
'frappy_psi.oiclassic.MixPower',
|
|
||||||
'mix power',
|
|
||||||
io='io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('P_sorb',
|
|
||||||
'frappy_psi.oiclassic.SorbPower',
|
|
||||||
'sorb power',
|
|
||||||
io='io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('P_still',
|
|
||||||
'frappy_psi.oiclassic.StillPower',
|
|
||||||
'still power',
|
|
||||||
io='io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('mot_fast',
|
|
||||||
'frappy_psi.oiclassic.MotorValve',
|
|
||||||
'fast motor valve',
|
|
||||||
io='io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('mot_slow',
|
|
||||||
'frappy_psi.oiclassic.SlowMotorValve',
|
|
||||||
'slow motor valve',
|
|
||||||
io='io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('valve',
|
|
||||||
'frappy_psi.oiclassic.Valve',
|
|
||||||
'solenoid valve',
|
|
||||||
io='io',
|
|
||||||
addr='V2',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('valve_pulsed',
|
|
||||||
'frappy_psi.oiclassic.PulsedValve',
|
|
||||||
'pulsed valve',
|
|
||||||
io='io',
|
|
||||||
addr='V2',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('upperLN2',
|
|
||||||
'frappy_psi.oiclassic.N2Sensor',
|
|
||||||
'upper LN2',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('lowerLN2',
|
|
||||||
'frappy_psi.oiclassic.N2Sensor',
|
|
||||||
'lower LN2',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('pump',
|
|
||||||
'frappy_psi.oiclassic.Pump',
|
|
||||||
'pump feedback',
|
|
||||||
io='io',
|
|
||||||
addr='rotary_pump_He3',
|
|
||||||
upper_LN2='upperLN2',
|
|
||||||
lower_LN2='lowerLN2',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('io_flow',
|
|
||||||
'frappy_psi.bronkhorst.IO',
|
|
||||||
'',
|
|
||||||
uri='dil4-ts:3002',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('flow',
|
|
||||||
'frappy_psi.bronkhorst.Sensor',
|
|
||||||
'flow',
|
|
||||||
io='io_flow',
|
|
||||||
value=Param(unit='ln/min'),
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('fun',
|
|
||||||
'frappy_psi.softcal.Function',
|
|
||||||
'modified flow',
|
|
||||||
rawsensor='flow',
|
|
||||||
formula='x',
|
|
||||||
)
|
|
||||||
318
cfg/dil5_cfg.py
318
cfg/dil5_cfg.py
@@ -1,120 +1,219 @@
|
|||||||
# by id (independent of plug location, but may not neccessarly be unique)
|
# by ID (independent of plug location)
|
||||||
# to verify just do:
|
|
||||||
# ls /dev/serial/by-id
|
|
||||||
turbo_uri = '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A601PCGF-if00-port0'
|
turbo_uri = '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A601PCGF-if00-port0'
|
||||||
press_uri = '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AH07445U-if00-port0'
|
press_uri = '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AH07445U-if00-port0'
|
||||||
itc_uri = '/dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0'
|
itc_uri = '/dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0'
|
||||||
lsc_uri = '192.168.1.2:7777'
|
lsc_uri = '192.168.1.2:7777'
|
||||||
logo_ip = '192.168.0.3'
|
# by plug location:
|
||||||
# by plug location would also be possible (/dev/serial/by-path)
|
#turbo_uri='/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.1:1.0-port0'
|
||||||
|
#press_uri = '/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2:1.0-port0'
|
||||||
|
#itc_uri = '/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3:1.0-port0'
|
||||||
|
# over USB (does not work anymore)
|
||||||
|
#lsc_uri='serial:///dev/ttyACM1?baudrate=57600+parity=odd+bytesize=7+stopbits=1',
|
||||||
|
|
||||||
|
|
||||||
Node('dil5.psi.ch',
|
Node('dil5.psi.ch',
|
||||||
'dil5 on linse-dil5',
|
'dil5 with state machine for condensing and removing',
|
||||||
interface='tcp://5000',
|
interface='tcp://5000',
|
||||||
secondary = ['ws://8010']
|
secondary = ['ws://8010']
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('logo',
|
Mod('io',
|
||||||
'frappy_psi.logo.IO',
|
'frappy_psi.logo.IO',
|
||||||
'',
|
'',
|
||||||
ip_address = logo_ip,
|
ip_address = "192.168.0.3",
|
||||||
tcap_client = 0x3000,
|
tcap_client = 0x3000,
|
||||||
tsap_server = 0x2000
|
tsap_server = 0x2000
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('V1',
|
Mod('V1',
|
||||||
'frappy_psi.logo.DigitalActuator',
|
'frappy_psi.logo.Valve',
|
||||||
'Valves',
|
'Valves',
|
||||||
io = 'logo',
|
io = 'io',
|
||||||
feedback_addr ="V1025.0",
|
vm_address_input ="V1025.0",
|
||||||
output_addr ="V1064.3"
|
vm_address_output ="V1064.3"
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('V2',
|
Mod('V2',
|
||||||
'frappy_psi.logo.DigitalActuator',
|
'frappy_psi.logo.Valve',
|
||||||
'dil bypass',
|
'Valves',
|
||||||
io = 'logo',
|
io = 'io',
|
||||||
feedback_addr ="V1024.2",
|
vm_address_input ="V1024.2",
|
||||||
output_addr ="V1064.0",
|
vm_address_output ="V1064.0",
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('V4',
|
Mod('V4',
|
||||||
'frappy_psi.logo.DigitalActuator',
|
'frappy_psi.logo.Valve',
|
||||||
'compressor to dump',
|
'Valves',
|
||||||
io = 'logo',
|
io = 'io',
|
||||||
# feedback seems not to work
|
vm_address_input ="V1024.5",
|
||||||
output_addr ="V1064.7",
|
vm_address_output ="V1064.7",
|
||||||
target_addr ="V404.1",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('V5',
|
Mod('V5',
|
||||||
'frappy_psi.logo.DigitalActuator',
|
'frappy_psi.logo.Valve',
|
||||||
'compressor input',
|
'Valves',
|
||||||
io = 'logo',
|
io = 'io',
|
||||||
feedback_addr ="V1024.4",
|
vm_address_input ="V1024.4",
|
||||||
output_addr ="V1064.2",
|
vm_address_output ="V1064.2"
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('V9',
|
Mod('V9',
|
||||||
'frappy_psi.logo.DelayedActuator',
|
'frappy_psi.logo.Valve',
|
||||||
'dump output',
|
'Valves',
|
||||||
io = 'logo',
|
io = 'io',
|
||||||
delay_addr = 'VW24',
|
vm_address_input ="V1024.3",
|
||||||
feedback_addr ="V1024.3",
|
vm_address_output ="V404.1",
|
||||||
output_addr ="V1064.5",
|
|
||||||
target_addr ="V404.3",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('forepump',
|
Mod('pump',
|
||||||
'frappy_psi.logo.DigitalActuator',
|
'frappy_psi.logo.FluidMachines',
|
||||||
'forepump',
|
'Pump',
|
||||||
io = 'logo',
|
io = 'io',
|
||||||
output_addr ="V1064.6",
|
vm_address_output ="V414.1"
|
||||||
target_addr ="V404.4",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('compressor',
|
Mod('compressor',
|
||||||
'frappy_psi.logo.DigitalActuator',
|
'frappy_psi.logo.FluidMachines',
|
||||||
'',
|
'Compressor',
|
||||||
io = 'logo',
|
io = 'io',
|
||||||
output_addr ="V1064.4",
|
vm_address_output ="V400.1"
|
||||||
target_addr ="V404.2",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('p2',
|
Mod('p2',
|
||||||
'frappy_psi.logo.Value',
|
'frappy_psi.logo.Pressure',
|
||||||
'pressure after compressor',
|
'Pressure in mBar',
|
||||||
io = 'logo',
|
io = 'io',
|
||||||
addr ="VW0",
|
vm_address ="VW0",
|
||||||
value = Param(unit='mbar'),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('p1',
|
Mod('p1',
|
||||||
'frappy_psi.logo.Value',
|
'frappy_psi.logo.Pressure',
|
||||||
'dump pressure',
|
'Pressure in mBar',
|
||||||
io = 'logo',
|
io = 'io',
|
||||||
addr ="VW28",
|
vm_address ="VW2",
|
||||||
value = Param(unit='mbar'),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('p5',
|
Mod('p5',
|
||||||
'frappy_psi.logo.Value',
|
'frappy_psi.logo.Pressure',
|
||||||
'pressure after forepump',
|
'Pressure in mBar',
|
||||||
io = 'logo',
|
io = 'io',
|
||||||
addr ="VW4",
|
vm_address ="VW4",
|
||||||
value = Param(unit='mbar'),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('airpressure',
|
Mod('Druckluft',
|
||||||
'frappy_psi.logo.DigitalValue',
|
'frappy_psi.logo.Airpressure',
|
||||||
'Airpressure state',
|
'Airpressure state',
|
||||||
io = 'logo',
|
io = 'io',
|
||||||
addr ="V1024.7",
|
vm_address ="VW6",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Mod('SF1',
|
||||||
|
'frappy_psi.logo.safetyfeatureState',
|
||||||
|
'Safety Feature',
|
||||||
|
io = 'io',
|
||||||
|
vm_address ="V410.1",
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('SF2',
|
||||||
|
'frappy_psi.logo.safetyfeatureState',
|
||||||
|
'Safety Feature',
|
||||||
|
io = 'io',
|
||||||
|
vm_address ="V406.1",
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('SF3',
|
||||||
|
'frappy_psi.logo.safetyfeatureState',
|
||||||
|
'Safety Feature',
|
||||||
|
io = 'io',
|
||||||
|
vm_address ="V408.1",
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('SF4',
|
||||||
|
'frappy_psi.logo.safetyfeatureState',
|
||||||
|
'Safety Feature',
|
||||||
|
io = 'io',
|
||||||
|
vm_address ="V412.1",
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('p2max',
|
||||||
|
'frappy_psi.logo.safetyfeatureParam',
|
||||||
|
'Safety Feature Param',
|
||||||
|
io = 'io',
|
||||||
|
target = 2000,
|
||||||
|
vm_address ="VW8",
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('pcond',
|
||||||
|
'frappy_psi.logo.safetyfeatureParam',
|
||||||
|
'Safety Feature Param',
|
||||||
|
io = 'io',
|
||||||
|
target = 1800,
|
||||||
|
vm_address ="VW10",
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('p5min',
|
||||||
|
'frappy_psi.logo.safetyfeatureParam',
|
||||||
|
'Safety Feature Param',
|
||||||
|
io = 'io',
|
||||||
|
target = 0,
|
||||||
|
vm_address ="VW12",
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('p5max',
|
||||||
|
'frappy_psi.logo.safetyfeatureParam',
|
||||||
|
'Safety Feature Param',
|
||||||
|
io = 'io',
|
||||||
|
target = 900,
|
||||||
|
vm_address ="VW14",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Mod('io_ls273',
|
||||||
|
'frappy_psi.ls372.StringIO',
|
||||||
|
'io for Ls372',
|
||||||
|
uri=lsc_uri,
|
||||||
|
)
|
||||||
|
Mod('sw',
|
||||||
|
'frappy_psi.ls372.Switcher',
|
||||||
|
'channel switcher',
|
||||||
|
io = 'io_ls273',
|
||||||
|
)
|
||||||
|
Mod('T_mix',
|
||||||
|
'frappy_psi.ls372.TemperatureLoop',
|
||||||
|
'mix temperature chan 5',
|
||||||
|
channel = 5,
|
||||||
|
switcher = 'sw',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('T_ivc',
|
||||||
|
'frappy_psi.ls372.TemperatureLoop',
|
||||||
|
'mix temperature chan 2',
|
||||||
|
channel = 2,
|
||||||
|
switcher = 'sw',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('T_still',
|
||||||
|
'frappy_psi.ls372.TemperatureLoop',
|
||||||
|
'mix temperature chan 3',
|
||||||
|
channel = 3,
|
||||||
|
switcher = 'sw',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('T_sorb',
|
||||||
|
'frappy_psi.ls372.TemperatureLoop',
|
||||||
|
'mix temperature chan 1',
|
||||||
|
channel = 1,
|
||||||
|
switcher = 'sw',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('T_cp',
|
||||||
|
'frappy_psi.ls372.TemperatureLoop',
|
||||||
|
'mix temperature chan 4',
|
||||||
|
channel = 4,
|
||||||
|
switcher = 'sw',
|
||||||
|
)
|
||||||
|
|
||||||
Mod('io_pfeiffer',
|
Mod('io_pfeiffer',
|
||||||
'frappy_psi.pfeiffer_new.PfeifferProtocol',
|
'frappy_psi.pfeiffer_new.PfeifferProtocol',
|
||||||
@@ -262,80 +361,41 @@ Mod('T_cond',
|
|||||||
io='itc',
|
io='itc',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('safety',
|
Mod('stateMachine',
|
||||||
'frappy_psi.dilution.Interlock',
|
'frappy_psi.dilution_statemachine.DIL5',
|
||||||
'interlock mechanism',
|
'Statemachine',
|
||||||
io='logo',
|
|
||||||
dil='dil',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('dil',
|
|
||||||
'frappy_psi.dilution.DIL5',
|
|
||||||
'dilution state machine and parameters',
|
|
||||||
|
|
||||||
condenseline_pressure = "p2",
|
condenseline_pressure = "p2",
|
||||||
condense_valve = "V9",
|
condense_valve = "V9",
|
||||||
dump_valve = "V4",
|
dump_valve = "V4",
|
||||||
forepump = "forepump",
|
circulate_pump = "pump",
|
||||||
compressor = "compressor",
|
compressor = "compressor",
|
||||||
|
|
||||||
turbopump = "turbopump",
|
turbopump = "turbopump",
|
||||||
condenseline_valve = "V1",
|
condenseline_valve = "V1",
|
||||||
circuitshort_valve = "V2",
|
circuitshort_valve = "V2",
|
||||||
still_pressure = "p4",
|
still_pressure = "p3",
|
||||||
still_pressure_turbo = "p3",
|
|
||||||
#ls372 = "res1",
|
#ls372 = "res1",
|
||||||
dump_pressure = "p1",
|
V5 = "V5",
|
||||||
condensing_p_low = 1200,
|
p1 = "p1",
|
||||||
condensing_p_high = 1500,
|
|
||||||
|
MV10 = 'MV10',
|
||||||
|
MV13 ='MV13',
|
||||||
|
MV8 = 'MV8',
|
||||||
|
MVB = 'MVB',
|
||||||
|
MV2 = 'MV2',
|
||||||
|
|
||||||
|
MV1 = 'MV1',
|
||||||
|
MV3a = 'MV3a',
|
||||||
|
MV3b = 'MV3b',
|
||||||
|
GV1 = 'GV1',
|
||||||
|
MV14 = 'MV14',
|
||||||
|
MV12 = 'MV12',
|
||||||
|
MV11 = 'MV11',
|
||||||
|
MV9 = 'MV9',
|
||||||
|
GV2 = 'GV2',
|
||||||
|
condensing_p_low = 150,
|
||||||
|
condensing_p_high = 250
|
||||||
)
|
)
|
||||||
|
|
||||||
## Dilution lakeshore Temperature controller
|
|
||||||
|
|
||||||
Mod('io_ls273',
|
|
||||||
'frappy_psi.ls372.StringIO',
|
|
||||||
'io for Ls372',
|
|
||||||
uri=lsc_uri,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('sw',
|
|
||||||
'frappy_psi.ls372.Switcher',
|
|
||||||
'channel switcher',
|
|
||||||
io = 'io_ls273',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('T_ivc',
|
|
||||||
'frappy_psi.ls372.TemperatureChannel',
|
|
||||||
'mix temperature chan 2',
|
|
||||||
channel = 2,
|
|
||||||
switcher = 'sw',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('T_still',
|
|
||||||
'frappy_psi.ls372.TemperatureChannel',
|
|
||||||
'mix temperature chan 3',
|
|
||||||
channel = 3,
|
|
||||||
switcher = 'sw',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('T_sorb',
|
|
||||||
'frappy_psi.ls372.TemperatureChannel',
|
|
||||||
'mix temperature chan 1',
|
|
||||||
channel = 1,
|
|
||||||
switcher = 'sw',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('T_cp',
|
|
||||||
'frappy_psi.ls372.TemperatureChannel',
|
|
||||||
'mix temperature chan 4',
|
|
||||||
channel = 4,
|
|
||||||
switcher = 'sw',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('T_mix',
|
|
||||||
'frappy_psi.ls372.TemperatureLoop',
|
|
||||||
'mix temperature chan 5',
|
|
||||||
channel = 5,
|
|
||||||
htrrng = '1mA',
|
|
||||||
switcher = 'sw',
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
Node('dilhtrtest.psi.ch',
|
|
||||||
'dilhtr test',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('io',
|
|
||||||
'frappy_psi.dilhtr.IO',
|
|
||||||
'dilhtr communication',
|
|
||||||
uri='serial:///dev/tty.usbserial-21440?baudrate=9600',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('heater',
|
|
||||||
'frappy_psi.dilhtr.Heater',
|
|
||||||
'dilhtr box',
|
|
||||||
io='io',
|
|
||||||
)
|
|
||||||
@@ -45,14 +45,15 @@ Mod('T4',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('T',
|
Mod('T',
|
||||||
'frappy_psi.furnace.PIctrl',
|
'frappy_psi.picontrol.PI',
|
||||||
'controlled temperature ',
|
'controlled Temperature',
|
||||||
|
input_module='T_main',
|
||||||
|
output_module='htr',
|
||||||
value = Param(unit='degC'),
|
value = Param(unit='degC'),
|
||||||
input_module = 'T_htr',
|
|
||||||
output_module = 't_out',
|
|
||||||
output_min = 0,
|
output_min = 0,
|
||||||
output_max = 100,
|
output_max = 100,
|
||||||
p = 1,
|
# relais='relais',
|
||||||
|
p=0.1,
|
||||||
i=0.01,
|
i=0.01,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -83,7 +84,7 @@ Mod('flowswitch',
|
|||||||
true_level='low',
|
true_level='low',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('interlock',
|
Mod('interlocks',
|
||||||
'frappy_psi.furnace.Interlocks',
|
'frappy_psi.furnace.Interlocks',
|
||||||
'interlock parameters',
|
'interlock parameters',
|
||||||
main_T='T_main',
|
main_T='T_main',
|
||||||
@@ -96,7 +97,7 @@ Mod('interlock',
|
|||||||
wall_limit=50,
|
wall_limit=50,
|
||||||
main_T_limit = 1400,
|
main_T_limit = 1400,
|
||||||
extra_T_limit = 1400,
|
extra_T_limit = 1400,
|
||||||
vacuum_limit=0.001,
|
vacuum_limit=0.01,
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('p',
|
Mod('p',
|
||||||
|
|||||||
@@ -4,63 +4,64 @@ Node('fs.psi.ch',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('T',
|
Mod('T',
|
||||||
'frappy_psi.furnace.PI2',
|
'frappy_psi.picontrol.PI2',
|
||||||
'controlled Temperature on sample (2nd loop)',
|
'controlled Temperature on sample (2nd loop)',
|
||||||
value = Param(unit='degC'),
|
input = 'T_sample',
|
||||||
meaning = ['temperature', 30],
|
output = 'T_reg',
|
||||||
input_module = 'T_sam',
|
relais = 'relais',
|
||||||
output_module = 'T_reg',
|
|
||||||
p = 1.2,
|
p = 1.2,
|
||||||
i = 0.005,
|
i = 0.005,
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('T_reg',
|
Mod('T_reg',
|
||||||
'frappy_psi.furnace.PIctrl',
|
'frappy_psi.picontrol.PI',
|
||||||
'controlled Temperature on heater',
|
'controlled Temperature on heater',
|
||||||
value = Param(unit='degC'),
|
input = 'T_htr',
|
||||||
input_module = 'T_htr',
|
output = 't_out',
|
||||||
output_module = 't_out',
|
relais = 'relais',
|
||||||
output_min = 0,
|
|
||||||
output_max = 100,
|
|
||||||
p = 1,
|
p = 1,
|
||||||
i = 0.003,
|
i = 0.003,
|
||||||
)
|
)
|
||||||
|
|
||||||
#Mod('p_reg',
|
Mod('p_reg',
|
||||||
# 'frappy_psi.furnace.PI',
|
'frappy_psi.picontrol.PI',
|
||||||
# 'controlled pressure',
|
'controlled pressure',
|
||||||
# input_module = 'p',
|
input = 'p',
|
||||||
# output_module = 't_out',
|
output = 'p_out',
|
||||||
# p = 1,
|
relais = 'relais',
|
||||||
# i = 0.005,
|
p = 1,
|
||||||
# )
|
i = 0.005,
|
||||||
|
)
|
||||||
|
|
||||||
Mod('T_htr',
|
Mod('T_htr',
|
||||||
'frappy_psi.furnace.PRtransmitter',
|
'frappy_psi.ionopimax.CurrentInput',
|
||||||
'heater temperature',
|
'heater temperature',
|
||||||
addr = 'ai4',
|
addr = 'ai4',
|
||||||
valuerange = (0, 1372),
|
valuerange = (0, 1372),
|
||||||
value = Param(unit='degC'),
|
value = Param(unit='degC'),
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
Mod('T_sam',
|
Mod('T_sample',
|
||||||
'frappy_psi.furnace.PRtransmitter',
|
'frappy_psi.ionopimax.CurrentInput',
|
||||||
'sample temperature',
|
'sample temperature',
|
||||||
addr = 'ai2',
|
addr = 'ai3',
|
||||||
valuerange = (0, 1372),
|
valuerange = (0, 1372),
|
||||||
value = Param(unit='degC'),
|
value = Param(unit='degC'),
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('T_extra',
|
Mod('T_extra',
|
||||||
'frappy_psi.furnace.PRtransmitter',
|
'frappy_psi.ionopimax.CurrentInput',
|
||||||
'extra temperature',
|
'extra temperature',
|
||||||
addr = 'ai3',
|
addr = 'ai2',
|
||||||
valuerange = (0, 1372),
|
valuerange = (0, 1372),
|
||||||
value = Param(unit='degC'),
|
value = Param(unit='degC'),
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
Mod('T_wall',
|
Mod('T_wall',
|
||||||
'frappy_psi.ionopimax.VoltageInput',
|
'frappy_psi.ionopimax.VoltageInput',
|
||||||
'furnace wall temperature',
|
'furnace wall temperature',
|
||||||
@@ -85,38 +86,35 @@ Mod('htr',
|
|||||||
Mod('t_out',
|
Mod('t_out',
|
||||||
'frappy_psi.bkpower.Output',
|
'frappy_psi.bkpower.Output',
|
||||||
'heater output',
|
'heater output',
|
||||||
# p_value = 'p_out',
|
p_value = 'p_out',
|
||||||
io = 'htr_io',
|
io = 'htr_io',
|
||||||
maxvolt = 50,
|
maxvolt = 50,
|
||||||
maxcurrent = 2,
|
maxcurrent = 2,
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('relay',
|
Mod('relais',
|
||||||
'frappy_psi.ionopimax.DigitalOutput',
|
'frappy_psi.ionopimax.DigitalOutput',
|
||||||
'relais for power output',
|
'relais for power output',
|
||||||
addr = 'o2',
|
addr = 'o2',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('interlock',
|
Mod('interlocks',
|
||||||
'frappy_psi.furnace.Interlocks',
|
'frappy_psi.furnace.Interlocks',
|
||||||
'interlock parameters',
|
'interlock parameters',
|
||||||
input = 'T_htr',
|
input = 'T_htr',
|
||||||
wall_T = 'T_wall',
|
wall_T = 'T_wall',
|
||||||
htr_T = 'T_htr',
|
htr_T = 'T_htr',
|
||||||
main_T = 'T_sam',
|
main_T = 'T_sample',
|
||||||
reg_T = 'T_reg',
|
|
||||||
extra_T = 'T_extra',
|
extra_T = 'T_extra',
|
||||||
htr = 't_out',
|
|
||||||
vacuum = 'p',
|
vacuum = 'p',
|
||||||
relay = 'relay',
|
relais = 'relais',
|
||||||
control = 'T',
|
control = 'T',
|
||||||
wall_limit = 60,
|
wall_limit = 100,
|
||||||
vacuum_limit = 0.001,
|
vacuum_limit = 0.1,
|
||||||
disabled_checks = 'T_extra',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('p',
|
Mod('p',
|
||||||
'frappy_psi.furnace.PKRgauge',
|
'frappy_psi.ionopimax.LogVoltageInput',
|
||||||
'pressure reading',
|
'pressure reading',
|
||||||
addr = 'av1',
|
addr = 'av1',
|
||||||
rawrange = (1.82, 8.6),
|
rawrange = (1.82, 8.6),
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
Node('hcptest.psi.ch',
|
|
||||||
'high voltage supply test',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('io',
|
|
||||||
'frappy_psi.hcp.IO',
|
|
||||||
'hcp communication',
|
|
||||||
uri='serial:///dev/tty.usbserial-21440?baudrate=9600',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('voltage',
|
|
||||||
'frappy_psi.hcp.Voltage',
|
|
||||||
'fug hcp 14-6500 voltage',
|
|
||||||
io='io',
|
|
||||||
)
|
|
||||||
@@ -6,7 +6,11 @@ lakeshore_uri = environ.get('LS_URI', 'tcp://<host>:7777')
|
|||||||
Node('example_cryo.psi.ch', # a globally unique identification
|
Node('example_cryo.psi.ch', # a globally unique identification
|
||||||
'this is an example cryostat for the Frappy tutorial', # describes the node
|
'this is an example cryostat for the Frappy tutorial', # describes the node
|
||||||
interface='tcp://10767') # you might choose any port number > 1024
|
interface='tcp://10767') # you might choose any port number > 1024
|
||||||
IO('io', lakeshore_uri) # the communicator (its class will be detected automatically)
|
Mod('io', # the name of the module
|
||||||
|
'frappy_demo.lakeshore.LakeshoreIO', # the class used for communication
|
||||||
|
'communication to main controller', # a description
|
||||||
|
uri=lakeshore_uri, # the serial connection
|
||||||
|
)
|
||||||
Mod('T',
|
Mod('T',
|
||||||
'frappy_demo.lakeshore.TemperatureLoop',
|
'frappy_demo.lakeshore.TemperatureLoop',
|
||||||
'Sample Temperature',
|
'Sample Temperature',
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Mod('sea_main',
|
|||||||
Mod('te',
|
Mod('te',
|
||||||
'frappy_psi.sea.SeaDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io = 'sea_main',
|
io = 'sea_main',
|
||||||
|
meaning=['temperature', 20],
|
||||||
sea_object = 'te',
|
sea_object = 'te',
|
||||||
meaning=('temperature', 11),
|
meaning=('temperature', 11),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -13,11 +13,9 @@ Mod('th',
|
|||||||
io = 'sea_main',
|
io = 'sea_main',
|
||||||
sea_object = 'th',
|
sea_object = 'th',
|
||||||
extra_modules=['t2'],
|
extra_modules=['t2'],
|
||||||
value=Param(unit='degC'),
|
|
||||||
)
|
)
|
||||||
Mod('ts',
|
Mod('ts',
|
||||||
'frappy_psi.sea.SeaReadable', '',
|
'frappy_psi.sea.SeaReadable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
single_module='th.t2',
|
single_module='th.t2',
|
||||||
value=Param(unit='degC'),
|
|
||||||
)
|
)
|
||||||
@@ -1,15 +1,17 @@
|
|||||||
Node('haake.frappy.psi.ch',
|
Node('haake.config.sea.psi.ch',
|
||||||
'additional haake waterbath',
|
'Haake thermostat',
|
||||||
)
|
)
|
||||||
|
Mod('sea_main',
|
||||||
Mod('haake_io',
|
'frappy_psi.sea.SeaClient',
|
||||||
'frappy_psi.haake.HaakeIO',
|
'main sea connection for haakeuro.config',
|
||||||
'',
|
config = 'haake.config',
|
||||||
uri='sans-sample-ts:3006',
|
service = 'main',
|
||||||
)
|
)
|
||||||
|
Mod('th',
|
||||||
Mod('T2',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
'frappy_psi.haake.TemperatureLoop',
|
meaning = ('temperature', 10),
|
||||||
'second haake',
|
io = 'sea_main',
|
||||||
io = 'haake_io',
|
sea_object = 'th',
|
||||||
|
extra_modules=['t2'],
|
||||||
|
value=Param(unit='degC'),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('pauto',
|
Mod('pauto',
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Mod('tt',
|
|||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
rel_paths=['main', '.', 'set'],
|
rel_paths=['tt', 'set'],
|
||||||
value=Param(unit='K'),
|
value=Param(unit='K'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,224 +0,0 @@
|
|||||||
Node('leiden.psi.ch',
|
|
||||||
'''Leiden Dilution''',
|
|
||||||
)
|
|
||||||
|
|
||||||
ah2700_uri = 'linse-leiden-ts:3002' # used in cfg/addons/ahtwo_cfg.pt
|
|
||||||
ls370_uri = 'linse-leiden-ts:3004' # used in ~/sea/tcl/leiden.config
|
|
||||||
tcs_uri = 'linse-leiden-ts:3005'
|
|
||||||
#nanov_uri = 'linse-leiden-ts:3006' # used in ~/sea/tcl/leiden.config
|
|
||||||
k2601b_uri = 'linse-leiden-ts:3006' # used for HC experiment as heater
|
|
||||||
dilhtr_uri = 'linse-leiden-ts:3007'
|
|
||||||
srbridge_uri = 'linse-leiden-ts:3008'
|
|
||||||
|
|
||||||
Mod('sea_main',
|
|
||||||
'frappy_psi.sea.SeaClient',
|
|
||||||
'main sea connection for leiden.config',
|
|
||||||
config = 'leiden.config',
|
|
||||||
service = 'main',
|
|
||||||
)
|
|
||||||
|
|
||||||
for name in ['T3K', 'Tstill', 'T50mK', 'Tmxlow', 'Tmxhigh', 'Tmxcx', 'Tblueo',
|
|
||||||
'Tpt50', 'Tpt3high', 'Tpt3low', 'Twhite', 'Tgreen']:
|
|
||||||
mname = name.replace('T','T_')
|
|
||||||
Mod(mname,
|
|
||||||
'frappy_psi.sea.SeaReadable', '',
|
|
||||||
io='sea_main',
|
|
||||||
sea_object='tt',
|
|
||||||
rel_paths=[name],
|
|
||||||
value=Param(unit='K'),
|
|
||||||
extra_modules = ['raw'],
|
|
||||||
)
|
|
||||||
Mod(name.replace('T', 'R_'),
|
|
||||||
'frappy_psi.sea.SeaReadable', '',
|
|
||||||
io='sea_main',
|
|
||||||
value=Param(unit='Ohm'),
|
|
||||||
single_module=f'{mname}.raw'
|
|
||||||
)
|
|
||||||
|
|
||||||
#Mod('cmn',
|
|
||||||
# 'frappy_psi.sea.SeaReadable', '',
|
|
||||||
# io = 'sea_main',
|
|
||||||
# sea_object = 'cmn',
|
|
||||||
# extra_modules = ['u1', 'u2', 'temp'],
|
|
||||||
#)
|
|
||||||
|
|
||||||
#Mod('T_cmn',
|
|
||||||
# 'frappy_psi.sea.SeaReadable', '',
|
|
||||||
# io='sea_main',
|
|
||||||
# value=Param(unit='K'),
|
|
||||||
# single_module='cmn.temp',
|
|
||||||
#)
|
|
||||||
|
|
||||||
#Mod('V_fixp',
|
|
||||||
# 'frappy_psi.sea.SeaReadable', '',
|
|
||||||
# io='sea_main',
|
|
||||||
# value=Param(unit='V'),
|
|
||||||
# single_module='cmn.u2',
|
|
||||||
#)
|
|
||||||
|
|
||||||
#Mod('V_cmn',
|
|
||||||
# 'frappy_psi.sea.SeaReadable', '',
|
|
||||||
# io='sea_main',
|
|
||||||
# value=Param(unit='V'),
|
|
||||||
# single_module='cmn.u1',
|
|
||||||
#)
|
|
||||||
|
|
||||||
|
|
||||||
Mod('tcs_io',
|
|
||||||
'frappy_psi.tcs.IO',
|
|
||||||
'tcs communication',
|
|
||||||
uri=tcs_uri,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('still_htr',
|
|
||||||
'frappy_psi.tcs.Heater',
|
|
||||||
'still heater',
|
|
||||||
io='tcs_io',
|
|
||||||
channel=2,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('mix_io',
|
|
||||||
'frappy_psi.dilhtr.IO',
|
|
||||||
'dilhtr communication',
|
|
||||||
uri=dilhtr_uri,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('mix_htr',
|
|
||||||
'frappy_psi.dilhtr.WrappedHeater',
|
|
||||||
'mixing chamber heater',
|
|
||||||
io='mix_io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('drive_mix',
|
|
||||||
'frappy_psi.picontrol.PIctrl',
|
|
||||||
'controlled mix ch. temperature',
|
|
||||||
input_module = 'T_mxlow',
|
|
||||||
output_module = 'mix_htr',
|
|
||||||
output_min = 0,
|
|
||||||
output_max = 0.02,
|
|
||||||
p = 5,
|
|
||||||
itime = 60,
|
|
||||||
)
|
|
||||||
|
|
||||||
#Mod('drive_cmn',
|
|
||||||
# 'frappy_psi.picontrol.PIctrl',
|
|
||||||
# 'controlled cmn temperature',
|
|
||||||
# input_module = 'T_cmn',
|
|
||||||
# output_module = 'mix_htr',
|
|
||||||
# output_min = 0,
|
|
||||||
# output_max = 3e-2,
|
|
||||||
# p = 2,
|
|
||||||
# itime = 120,
|
|
||||||
# )
|
|
||||||
|
|
||||||
#Mod('drive_fixp',
|
|
||||||
# 'frappy_psi.picontrol.PI',
|
|
||||||
# 'controlled fixpoint voltage',
|
|
||||||
# value=Param(unit='V'),
|
|
||||||
# input_module = 'V_fixp',
|
|
||||||
# output_module = 'drive_mix',
|
|
||||||
# output_min = 0.0,
|
|
||||||
# output_max = 0.01,
|
|
||||||
# p = 1,
|
|
||||||
# itime = 120,
|
|
||||||
# )
|
|
||||||
|
|
||||||
Mod('simio',
|
|
||||||
'frappy_psi.bridge.BridgeIO',
|
|
||||||
'communication to sim900',
|
|
||||||
uri=srbridge_uri,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('res1',
|
|
||||||
'frappy_psi.bridge.Resistance',
|
|
||||||
'please add description',
|
|
||||||
io='simio',
|
|
||||||
port=1,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('res2',
|
|
||||||
'frappy_psi.bridge.Resistance',
|
|
||||||
'please add description',
|
|
||||||
io='simio',
|
|
||||||
port=3,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('phase1',
|
|
||||||
'frappy_psi.bridge.Phase',
|
|
||||||
'please add description',
|
|
||||||
resistance='res1',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('phase2',
|
|
||||||
'frappy_psi.bridge.Phase',
|
|
||||||
'please add description',
|
|
||||||
resistance='res2',
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
Mod('dev1',
|
|
||||||
'frappy_psi.bridge.Deviation',
|
|
||||||
'please add description',
|
|
||||||
resistance='res1',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('dev2',
|
|
||||||
'frappy_psi.bridge.Deviation',
|
|
||||||
'please add description',
|
|
||||||
resistance='res2',
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
Mod('vsource_io',
|
|
||||||
'frappy_psi.k2601b.K2601bIO',
|
|
||||||
'source meter',
|
|
||||||
# uri = '129.129.156.90:5025',
|
|
||||||
uri = k2601b_uri,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
Mod('source',
|
|
||||||
'frappy_psi.k2601b.SourceMeter'
|
|
||||||
'',
|
|
||||||
description = "keithley sourcemeter",
|
|
||||||
mode = 2,
|
|
||||||
vlimit = 0.5,
|
|
||||||
ilimit = .0005,
|
|
||||||
io = 'vsource_io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('hvolt',
|
|
||||||
'frappy_psi.k2601b.Voltage'
|
|
||||||
'',
|
|
||||||
description = "Heater Voltage",
|
|
||||||
active = False,
|
|
||||||
limit = 1.0,
|
|
||||||
target = 0.0,
|
|
||||||
sourcemeter = 'source',
|
|
||||||
io = 'vsource_io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('hcur',
|
|
||||||
'frappy_psi.k2601b.Current'
|
|
||||||
'',
|
|
||||||
description = "Heater Current Source",
|
|
||||||
active = True,
|
|
||||||
limit = 0.0001,
|
|
||||||
target = 0.0,
|
|
||||||
sourcemeter = 'source',
|
|
||||||
io = 'vsource_io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('hres',
|
|
||||||
'frappy_psi.k2601b.Resistivity'
|
|
||||||
'',
|
|
||||||
description = "Heater Resistance",
|
|
||||||
io = 'vsource_io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('hpow',
|
|
||||||
'frappy_psi.k2601b.Power'
|
|
||||||
'',
|
|
||||||
description = "Heater Power",
|
|
||||||
io = 'vsource_io',
|
|
||||||
)
|
|
||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -8,12 +8,11 @@ Mod('sea_main',
|
|||||||
service = 'main',
|
service = 'main',
|
||||||
)
|
)
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io = 'sea_main',
|
io = 'sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object = 'tt',
|
sea_object = 'tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
'frappy_psi.sea.SeaReadable', '',
|
'frappy_psi.sea.SeaReadable', '',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('th',
|
Mod('th',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('th',
|
Mod('th',
|
||||||
|
|||||||
@@ -15,12 +15,11 @@ Mod('sea_main',
|
|||||||
#)
|
#)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
|
io='sea_main',
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('th',
|
Mod('th',
|
||||||
@@ -35,8 +34,8 @@ Mod('ts',
|
|||||||
'frappy_psi.parmod.Converging',
|
'frappy_psi.parmod.Converging',
|
||||||
'test for parmod',
|
'test for parmod',
|
||||||
unit='K',
|
unit='K',
|
||||||
read='th.value',
|
value_param='th.value',
|
||||||
write='th.setsamp',
|
target_param='th.setsamp',
|
||||||
meaning=['temperature', 20],
|
meaning=['temperature', 20],
|
||||||
settling_time=20,
|
settling_time=20,
|
||||||
tolerance=1,
|
tolerance=1,
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -1,23 +1,31 @@
|
|||||||
# please edit this file with frappy edit
|
Node('mb11.psi.ch',
|
||||||
|
'MB11 11 Tesla - 100 mm cryomagnet',
|
||||||
doc="""MB11 11 Tesla - 100 mm cryomagnet
|
|
||||||
|
|
||||||
after conversion with frappy edit
|
|
||||||
"""
|
|
||||||
Node('mb11.psi.ch', doc,
|
|
||||||
interface='tcp://10767',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
IO('itc1', 'mb11-ts:3001')
|
sea_cfg = 'mb11.config'
|
||||||
|
|
||||||
IO('itc2', 'mb11-ts:3002')
|
Mod('itc1',
|
||||||
|
'frappy_psi.mercury.IO',
|
||||||
|
'ITC for heat exchanger and pressures',
|
||||||
|
uri='mb11-ts:3001',
|
||||||
|
)
|
||||||
|
|
||||||
IO('ips', 'mb11-ts:3003')
|
Mod('itc2',
|
||||||
|
'frappy_psi.mercury.IO',
|
||||||
|
'ITC for neck and nv heaters',
|
||||||
|
uri='mb11-ts:3002',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('ips',
|
||||||
|
'frappy_psi.mercury.IO',
|
||||||
|
'IPS for magnet and levels',
|
||||||
|
uri='mb11-ts:3003',
|
||||||
|
)
|
||||||
|
|
||||||
Mod('T_stat',
|
Mod('T_stat',
|
||||||
'frappy_psi.mercury.TemperatureAutoFlow',
|
'frappy_psi.mercury.TemperatureAutoFlow',
|
||||||
'static heat exchanger temperature',
|
'static heat exchanger temperature',
|
||||||
meaning = ('temperature_regulation', 27),
|
meaning=['temperature_regulation', 27],
|
||||||
output_module='htr_stat',
|
output_module='htr_stat',
|
||||||
needle_valve='p_stat',
|
needle_valve='p_stat',
|
||||||
slot='DB6.T1',
|
slot='DB6.T1',
|
||||||
@@ -37,11 +45,13 @@ Mod('p_stat',
|
|||||||
'frappy_psi.mercury.PressureLoop',
|
'frappy_psi.mercury.PressureLoop',
|
||||||
'static needle valve pressure',
|
'static needle valve pressure',
|
||||||
output_module='pos_stat',
|
output_module='pos_stat',
|
||||||
settling_time = 60,
|
settling_time=60.0,
|
||||||
slot='DB5.P1',
|
slot='DB5.P1',
|
||||||
io='itc1',
|
io='itc1',
|
||||||
tolerance = 1,
|
tolerance=1.0,
|
||||||
value = Param(unit='mbar_flow'),
|
value=Param(
|
||||||
|
unit='mbar_flow',
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('pos_stat',
|
Mod('pos_stat',
|
||||||
@@ -72,11 +82,13 @@ Mod('p_dyn',
|
|||||||
'frappy_psi.mercury.PressureLoop',
|
'frappy_psi.mercury.PressureLoop',
|
||||||
'dynamic needle valve pressure',
|
'dynamic needle valve pressure',
|
||||||
output_module='pos_dyn',
|
output_module='pos_dyn',
|
||||||
settling_time = 60,
|
settling_time=60.0,
|
||||||
slot='DB8.P1',
|
slot='DB8.P1',
|
||||||
io='itc1',
|
io='itc1',
|
||||||
tolerance = 1,
|
tolerance=1.0,
|
||||||
value = Param(unit='mbar_flow'),
|
value=Param(
|
||||||
|
unit='mbar_flow',
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('pos_dyn',
|
Mod('pos_dyn',
|
||||||
@@ -92,8 +104,10 @@ Mod('mf',
|
|||||||
slot='GRPZ',
|
slot='GRPZ',
|
||||||
io='ips',
|
io='ips',
|
||||||
tolerance=0.001,
|
tolerance=0.001,
|
||||||
wait_stable_field = 60,
|
wait_stable_field=60.0,
|
||||||
target = Param(max=11),
|
target=Param(
|
||||||
|
max=11.0,
|
||||||
|
),
|
||||||
persistent_limit=11.1,
|
persistent_limit=11.1,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -117,7 +131,7 @@ Mod('T_neck1',
|
|||||||
output_module='htr_neck1',
|
output_module='htr_neck1',
|
||||||
slot='MB1.T1',
|
slot='MB1.T1',
|
||||||
io='itc2',
|
io='itc2',
|
||||||
tolerance = 1,
|
tolerance=1.0,
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('htr_neck1',
|
Mod('htr_neck1',
|
||||||
@@ -133,7 +147,7 @@ Mod('T_neck2',
|
|||||||
output_module='htr_neck2',
|
output_module='htr_neck2',
|
||||||
slot='DB6.T1',
|
slot='DB6.T1',
|
||||||
io='itc2',
|
io='itc2',
|
||||||
tolerance = 1,
|
tolerance=1.0,
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('htr_neck2',
|
Mod('htr_neck2',
|
||||||
@@ -182,14 +196,18 @@ Mod('T_coil',
|
|||||||
io='ips',
|
io='ips',
|
||||||
)
|
)
|
||||||
|
|
||||||
IO('om_io', 'mb11-ts.psi.ch:3004')
|
Mod('om_io',
|
||||||
|
'frappy_psi.phytron.PhytronIO',
|
||||||
|
'dom motor IO',
|
||||||
|
uri='mb11-ts.psi.ch:3004',
|
||||||
|
)
|
||||||
|
|
||||||
Mod('om',
|
Mod('om',
|
||||||
'frappy_psi.phytron.Motor',
|
'frappy_psi.phytron.Motor',
|
||||||
'stick rotation, typically used for omega',
|
'stick rotation, typically used for omega',
|
||||||
io='om_io',
|
io='om_io',
|
||||||
target_min = '-360',
|
target_min=-360,
|
||||||
target_max = '360',
|
target_max=360,
|
||||||
encoder_mode='NO',
|
encoder_mode='NO',
|
||||||
target=Param(min=-360, max=360),
|
target=Param(min=-360, max=360),
|
||||||
)
|
)
|
||||||
228
cfg/main/mb11std_cfg.py
Normal file
228
cfg/main/mb11std_cfg.py
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
Node('mb11.psi.ch',
|
||||||
|
'MB11 11 Tesla - 100 mm cryomagnet',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('itc1',
|
||||||
|
'frappy_psi.mercury.IO',
|
||||||
|
'ITC for heat exchanger and pressures',
|
||||||
|
uri='mb11-ts:3001',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('itc2',
|
||||||
|
'frappy_psi.mercury.IO',
|
||||||
|
'ITC for neck and nv heaters',
|
||||||
|
uri='mb11-ts:3002',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('ips',
|
||||||
|
'frappy_psi.mercury.IO',
|
||||||
|
'IPS for magnet and levels',
|
||||||
|
uri='mb11-ts:3003',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('T_stat',
|
||||||
|
'frappy_psi.mercury.TemperatureAutoFlow',
|
||||||
|
'static heat exchanger temperature',
|
||||||
|
meaning=['temperature_regulation', 27],
|
||||||
|
output_module='htr_stat',
|
||||||
|
needle_valve='p_stat',
|
||||||
|
slot='DB6.T1',
|
||||||
|
io='itc1',
|
||||||
|
tolerance=0.1,
|
||||||
|
flowpars=((1,5), (2, 20)),
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('htr_stat',
|
||||||
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
|
'static heat exchanger heater',
|
||||||
|
slot='DB1.H1',
|
||||||
|
io='itc1',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('ts',
|
||||||
|
'frappy_psi.mercury.TemperatureLoop',
|
||||||
|
'sample temperature',
|
||||||
|
output_module='htr_sample',
|
||||||
|
slot='MB1.T1',
|
||||||
|
io='itc1',
|
||||||
|
tolerance=1.0,
|
||||||
|
visibility='expert',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('htr_sample',
|
||||||
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
|
'sample stick heater power',
|
||||||
|
slot='MB0.H1',
|
||||||
|
io='itc1',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('p_stat',
|
||||||
|
'frappy_psi.mercury.PressureLoop',
|
||||||
|
'static needle valve pressure',
|
||||||
|
output_module='pos_stat',
|
||||||
|
settling_time=60.0,
|
||||||
|
slot='DB5.P1',
|
||||||
|
io='itc1',
|
||||||
|
tolerance=1.0,
|
||||||
|
value=Param(
|
||||||
|
unit='mbar_flow',
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('pos_stat',
|
||||||
|
'frappy_psi.mercury.ValvePos',
|
||||||
|
'static needle valve position',
|
||||||
|
slot='DB5.P1,DB3.G1',
|
||||||
|
io='itc1',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('T_dyn',
|
||||||
|
'frappy_psi.mercury.TemperatureAutoFlow',
|
||||||
|
'dynamic heat exchanger temperature',
|
||||||
|
output_module='htr_dyn',
|
||||||
|
needle_valve='p_dyn',
|
||||||
|
slot='DB7.T1',
|
||||||
|
io='itc1',
|
||||||
|
tolerance=0.1,
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('htr_dyn',
|
||||||
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
|
'dynamic heat exchanger heater',
|
||||||
|
slot='DB2.H1',
|
||||||
|
io='itc1',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('p_dyn',
|
||||||
|
'frappy_psi.mercury.PressureLoop',
|
||||||
|
'dynamic needle valve pressure',
|
||||||
|
output_module='pos_dyn',
|
||||||
|
settling_time=60.0,
|
||||||
|
slot='DB8.P1',
|
||||||
|
io='itc1',
|
||||||
|
tolerance=1.0,
|
||||||
|
value=Param(
|
||||||
|
unit='mbar_flow',
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('pos_dyn',
|
||||||
|
'frappy_psi.mercury.ValvePos',
|
||||||
|
'dynamic needle valve position',
|
||||||
|
slot='DB8.P1,DB4.G1',
|
||||||
|
io='itc1',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('mf',
|
||||||
|
'frappy_psi.ips_mercury.Field',
|
||||||
|
'magnetic field',
|
||||||
|
slot='GRPZ',
|
||||||
|
io='ips',
|
||||||
|
tolerance=0.001,
|
||||||
|
wait_stable_field=60.0,
|
||||||
|
target=Param(
|
||||||
|
max=11.0,
|
||||||
|
),
|
||||||
|
persistent_limit=11.1,
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('lev',
|
||||||
|
'frappy_psi.mercury.HeLevel',
|
||||||
|
'LHe level',
|
||||||
|
slot='DB1.L1',
|
||||||
|
io='ips',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('n2lev',
|
||||||
|
'frappy_psi.mercury.N2Level',
|
||||||
|
'LN2 level',
|
||||||
|
slot='DB1.L1',
|
||||||
|
io='ips',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('T_neck1',
|
||||||
|
'frappy_psi.mercury.TemperatureLoop',
|
||||||
|
'neck heater 1 temperature',
|
||||||
|
output_module='htr_neck1',
|
||||||
|
slot='MB1.T1',
|
||||||
|
io='itc2',
|
||||||
|
tolerance=1.0,
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('htr_neck1',
|
||||||
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
|
'neck heater 1 power',
|
||||||
|
slot='MB0.H1',
|
||||||
|
io='itc2',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('T_neck2',
|
||||||
|
'frappy_psi.mercury.TemperatureLoop',
|
||||||
|
'neck heater 2 temperature',
|
||||||
|
output_module='htr_neck2',
|
||||||
|
slot='DB6.T1',
|
||||||
|
io='itc2',
|
||||||
|
tolerance=1.0,
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('htr_neck2',
|
||||||
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
|
'neck heater 2 power',
|
||||||
|
slot='DB1.H1',
|
||||||
|
io='itc2',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('T_nvs',
|
||||||
|
'frappy_psi.mercury.TemperatureLoop',
|
||||||
|
'static needle valve temperature',
|
||||||
|
output_module='htr_nvs',
|
||||||
|
slot='DB7.T1',
|
||||||
|
io='itc2',
|
||||||
|
tolerance=0.1,
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('htr_nvs',
|
||||||
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
|
'static needle valve heater power',
|
||||||
|
slot='DB2.H1',
|
||||||
|
io='itc2',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('T_nvd',
|
||||||
|
'frappy_psi.mercury.TemperatureLoop',
|
||||||
|
'dynamic needle valve heater temperature',
|
||||||
|
output_module='htr_nvd',
|
||||||
|
slot='DB8.T1',
|
||||||
|
io='itc2',
|
||||||
|
tolerance=0.1,
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('htr_nvd',
|
||||||
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
|
'dynamic needle valve heater power',
|
||||||
|
slot='DB3.H1',
|
||||||
|
io='itc2',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('T_coil',
|
||||||
|
'frappy_psi.mercury.TemperatureSensor',
|
||||||
|
'coil temperature',
|
||||||
|
slot='MB1.T1',
|
||||||
|
io='ips',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('om_io',
|
||||||
|
'frappy_psi.phytron.PhytronIO',
|
||||||
|
'dom motor IO',
|
||||||
|
uri='mb11-ts.psi.ch:3004',
|
||||||
|
)
|
||||||
|
|
||||||
|
Mod('om',
|
||||||
|
'frappy_psi.phytron.Motor',
|
||||||
|
'stick rotation, typically used for omega',
|
||||||
|
io='om_io',
|
||||||
|
target_min=-360,
|
||||||
|
target_max=360,
|
||||||
|
encoder_mode='NO',
|
||||||
|
target=Param(min=-360, max=360),
|
||||||
|
)
|
||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['.', 'tm', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io = 'sea_main',
|
io = 'sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object = 'tt',
|
sea_object = 'tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
17
cfg/main/ori7test_cfg.py
Normal file
17
cfg/main/ori7test_cfg.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
from frappy_psi.ccracks import Rack
|
||||||
|
|
||||||
|
Node('ori7test.psi.ch',
|
||||||
|
'ORI7 test',
|
||||||
|
'tcp://5000'
|
||||||
|
)
|
||||||
|
|
||||||
|
rack = Rack(Mod)
|
||||||
|
|
||||||
|
rack.lakeshore()
|
||||||
|
rack.sensor('Ts', channel='C', calcurve='x186350')
|
||||||
|
rack.loop('T', channel='B', calcurve='x174786', output_module='htr', target=10)
|
||||||
|
rack.heater('htr', output_no=1, max_heater='100W', resistance=25)
|
||||||
|
|
||||||
|
rack.he()
|
||||||
|
rack.n2()
|
||||||
|
rack.flow(min_open_pulse=0.03)
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
Node('TFA10.psi.ch',
|
|
||||||
'thermofisher water bath',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('io',
|
|
||||||
'frappy_psi.thermofisher.ThermFishIO',
|
|
||||||
'connection for ThermoFisher A10',
|
|
||||||
uri='tcp://ldm-fi-ts:3002',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('T',
|
|
||||||
'frappy_psi.thermofisher.TemperatureLoopA10',
|
|
||||||
'holder temperature',
|
|
||||||
io='io',
|
|
||||||
meaning=['temperature', 20],
|
|
||||||
target=Param(max=100),
|
|
||||||
tolerance=0.5,
|
|
||||||
settling_time=20,
|
|
||||||
)
|
|
||||||
@@ -10,12 +10,11 @@ Mod('sea_main',
|
|||||||
)
|
)
|
||||||
|
|
||||||
Mod('tt',
|
Mod('tt',
|
||||||
'frappy_psi.sea.LscDrivable', '',
|
'frappy_psi.sea.SeaDrivable', '',
|
||||||
io='sea_main',
|
io='sea_main',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning=['temperature_regulation', 27],
|
||||||
sea_object='tt',
|
sea_object='tt',
|
||||||
sensor_path='tm',
|
rel_paths=['tm', '.', 'set', 'dblctrl'],
|
||||||
set_path='set',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('cc',
|
Mod('cc',
|
||||||
|
|||||||
@@ -1,100 +0,0 @@
|
|||||||
Node('muwaba.psi.ch',
|
|
||||||
'multi waterbath',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('wio_1',
|
|
||||||
'frappy_psi.thermofisher.ThermFishIO',
|
|
||||||
'connection for water bath',
|
|
||||||
uri='serial:///dev/ttyUSB0?baudrate=19200', # 3001 = Port 1, 3002 = Port 2 ...
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('wio_2',
|
|
||||||
'frappy_psi.thermofisher.ThermFishIO',
|
|
||||||
'connection for water bath',
|
|
||||||
uri='serial:///dev/ttyUSB1?baudrate=19200', # 3001 = Port 1, 3002 = Port 2 ...
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('wio_3',
|
|
||||||
'frappy_psi.thermofisher.ThermFishIO',
|
|
||||||
'connection for water bath',
|
|
||||||
uri='serial:///dev/ttyUSB2?baudrate=19200', # 3001 = Port 1, 3002 = Port 2 ...
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('Tbath_1',
|
|
||||||
'frappy_psi.thermofisher.TemperatureLoopA10',
|
|
||||||
'water_bath_1',
|
|
||||||
io='wio_1',
|
|
||||||
control_active=0,
|
|
||||||
target=25,
|
|
||||||
tolerance=0.1,
|
|
||||||
settling_time=20,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('Tbath_2',
|
|
||||||
'frappy_psi.thermofisher.TemperatureLoopA10',
|
|
||||||
'water_bath_2',
|
|
||||||
io='wio_2',
|
|
||||||
control_active=0,
|
|
||||||
target=25,
|
|
||||||
tolerance=0.1,
|
|
||||||
settling_time=20,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('Tbath_3',
|
|
||||||
'frappy_psi.thermofisher.TemperatureLoopA10',
|
|
||||||
'water_bath_3',
|
|
||||||
io='wio_3',
|
|
||||||
control_active=0,
|
|
||||||
target=25,
|
|
||||||
tolerance=0.1,
|
|
||||||
settling_time=20,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('valve_1',
|
|
||||||
'frappy_psi.ionopimax.DigitalOutput',
|
|
||||||
'valve_for_fast_water_temperature_changing',
|
|
||||||
addr = 'o1',
|
|
||||||
target = 0,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('valve_2',
|
|
||||||
'frappy_psi.ionopimax.DigitalOutput',
|
|
||||||
'valve_for_fast_water_temperature_changing',
|
|
||||||
addr = 'o2',
|
|
||||||
target = 0,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('valve_3',
|
|
||||||
'frappy_psi.ionopimax.DigitalOutput',
|
|
||||||
'valve_for_fast_water_temperature_changing',
|
|
||||||
addr = 'o3',
|
|
||||||
target = 0,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('temp_sensor_tc',
|
|
||||||
'frappy_psi.ionopimax.SimpleVoltageInput',
|
|
||||||
'temperatur_sensor_sample',
|
|
||||||
rawrange = (0.0, 10.0),
|
|
||||||
valuerange = (5.0, 90.0),
|
|
||||||
addr = 'ai1_mv',
|
|
||||||
meaning = ['temperature', 20],
|
|
||||||
value = Param(unit='degC'),
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('temp_sensor_pt1000',
|
|
||||||
'frappy_psi.ionopimax.SimpleVoltageInput',
|
|
||||||
'temperatur_sensor_sample',
|
|
||||||
rawrange = (0.0, 10.0),
|
|
||||||
valuerange = (5.0, 90.0),
|
|
||||||
value = Param(unit='degC'),
|
|
||||||
addr = 'ai2_mv',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('switcher',
|
|
||||||
'frappy_psi.muwaba.Switcher',
|
|
||||||
'waterbath switcher',
|
|
||||||
valve1 = 'valve_1',
|
|
||||||
valve2 = 'valve_2',
|
|
||||||
valve3 = 'valve_3',
|
|
||||||
)
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
Node('haake.config.sea.psi.ch',
|
|
||||||
'Haake thermostat',
|
|
||||||
)
|
|
||||||
Mod('sea_main',
|
|
||||||
'frappy_psi.sea.SeaClient',
|
|
||||||
'main sea connection for haakeuro.config',
|
|
||||||
config = 'haake.config',
|
|
||||||
service = 'main',
|
|
||||||
)
|
|
||||||
Mod('th',
|
|
||||||
'frappy_psi.sea.SeaDrivable', '',
|
|
||||||
meaning = ('temperature', 10),
|
|
||||||
io = 'sea_main',
|
|
||||||
sea_object = 'th',
|
|
||||||
extra_modules=['t2'],
|
|
||||||
value=Param(unit='degC'),
|
|
||||||
)
|
|
||||||
@@ -1,21 +1,14 @@
|
|||||||
{"capff": {"base": "/capff", "params": [
|
{"cap": {"base": "/cap", "params": [{"path": "", "type": "none", "kids": 8},
|
||||||
{"path": "", "type": "none", "kids": 7},
|
{"path": "send", "type": "text", "readonly": false, "cmd": "cap send", "visibility": 3},
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "capff send", "visibility": 3},
|
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
{"path": "status", "type": "text", "visibility": 3},
|
||||||
{"path": "cap", "type": "float"},
|
{"path": "cap", "type": "float"},
|
||||||
{"path": "loss", "type": "float"},
|
{"path": "loss", "type": "float"},
|
||||||
{"path": "period", "type": "float", "readonly": false, "cmd": "capff period"},
|
{"path": "period", "type": "float", "readonly": false, "cmd": "cap period"},
|
||||||
{"path": "V", "type": "float", "readonly": false, "cmd": "capff V"},
|
{"path": "V", "type": "float", "readonly": false, "cmd": "cap V"},
|
||||||
{"path": "average", "type": "int", "readonly": false, "cmd": "capff average"}]},
|
{"path": "average", "type": "int", "readonly": false, "cmd": "cap average"}]}, "capslope": {"base": "/capslope", "params": [{"path": "", "type": "float", "kids": 6},
|
||||||
|
{"path": "send", "type": "text", "readonly": false, "cmd": "capslope send", "visibility": 3},
|
||||||
"capslopeff": {"base": "/capslopeff", "params": [
|
|
||||||
{"path": "", "type": "float", "kids": 6},
|
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "capslopeff send", "visibility": 3},
|
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
{"path": "status", "type": "text", "visibility": 3},
|
||||||
{"path": "node", "type": "text", "readonly": false, "cmd": "capslopeff node"},
|
{"path": "node", "type": "text", "readonly": false, "cmd": "capslope node"},
|
||||||
{"path": "unit", "type": "float", "readonly": false, "cmd": "capslopeff unit", "description": "unit=60: mainunits/minutes, unit=1: mainunits/sec"},
|
{"path": "unit", "type": "float", "readonly": false, "cmd": "capslope unit", "description": "unit=60: mainunits/minutes, unit=1: mainunits/sec"},
|
||||||
{"path": "ref", "type": "float", "readonly": false, "cmd": "capslopeff ref"},
|
{"path": "ref", "type": "float", "readonly": false, "cmd": "capslope ref"},
|
||||||
{"path": "bufperiod", "type": "float", "readonly": false, "cmd": "capslopeff bufperiod"}]},
|
{"path": "buffersize", "type": "float", "readonly": false, "cmd": "capslope buffersize"}]}}
|
||||||
|
|
||||||
"addonlock_ah2550": {"base": "/addonlock_ah2550", "params": [
|
|
||||||
{"path": "", "type": "text", "readonly": false, "cmd": "addonlock_ah2550 = "}]}}
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{"cap": {"base": "/cap", "params": [
|
{"cap": {"base": "/cap", "params": [{"path": "", "type": "none", "kids": 8},
|
||||||
{"path": "", "type": "none", "kids": 8},
|
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cap send", "visibility": 3},
|
{"path": "send", "type": "text", "readonly": false, "cmd": "cap send", "visibility": 3},
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
{"path": "status", "type": "text", "visibility": 3},
|
||||||
{"path": "cap", "type": "float"},
|
{"path": "cap", "type": "float"},
|
||||||
@@ -7,16 +6,10 @@
|
|||||||
{"path": "period", "type": "float", "readonly": false, "cmd": "cap period"},
|
{"path": "period", "type": "float", "readonly": false, "cmd": "cap period"},
|
||||||
{"path": "freq", "type": "float", "readonly": false, "cmd": "cap freq"},
|
{"path": "freq", "type": "float", "readonly": false, "cmd": "cap freq"},
|
||||||
{"path": "V", "type": "float", "readonly": false, "cmd": "cap V"},
|
{"path": "V", "type": "float", "readonly": false, "cmd": "cap V"},
|
||||||
{"path": "average", "type": "int", "readonly": false, "cmd": "cap average"}]},
|
{"path": "average", "type": "int", "readonly": false, "cmd": "cap average"}]}, "capslope": {"base": "/capslope", "params": [{"path": "", "type": "float", "kids": 6},
|
||||||
|
|
||||||
"capslope": {"base": "/capslope", "params": [
|
|
||||||
{"path": "", "type": "float", "kids": 6},
|
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "capslope send", "visibility": 3},
|
{"path": "send", "type": "text", "readonly": false, "cmd": "capslope send", "visibility": 3},
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
{"path": "status", "type": "text", "visibility": 3},
|
||||||
{"path": "node", "type": "text", "readonly": false, "cmd": "capslope node"},
|
{"path": "node", "type": "text", "readonly": false, "cmd": "capslope node"},
|
||||||
{"path": "unit", "type": "float", "readonly": false, "cmd": "capslope unit", "description": "unit=60: mainunits/minutes, unit=1: mainunits/sec"},
|
{"path": "unit", "type": "float", "readonly": false, "cmd": "capslope unit", "description": "unit=60: mainunits/minutes, unit=1: mainunits/sec"},
|
||||||
{"path": "ref", "type": "float", "readonly": false, "cmd": "capslope ref"},
|
{"path": "ref", "type": "float", "readonly": false, "cmd": "capslope ref"},
|
||||||
{"path": "bufperiod", "type": "float", "readonly": false, "cmd": "capslope bufperiod"}]},
|
{"path": "buffersize", "type": "float", "readonly": false, "cmd": "capslope buffersize"}]}}
|
||||||
|
|
||||||
"addonlock_ah2700": {"base": "/addonlock_ah2700", "params": [
|
|
||||||
{"path": "", "type": "text", "readonly": false, "cmd": "addonlock_ah2700 = "}]}}
|
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
{"cp2800": {"base": "/cp2800", "params": [
|
|
||||||
{"path": "", "type": "bool", "readonly": false, "cmd": "cp2800", "kids": 27},
|
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cp2800 send", "visibility": 3},
|
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
|
||||||
{"path": "comp_running_hrs", "type": "float"},
|
|
||||||
{"path": "cpu_t", "type": "float"},
|
|
||||||
{"path": "motor_current_a", "type": "float"},
|
|
||||||
{"path": "inp_water_t", "type": "float"},
|
|
||||||
{"path": "inp_water_t_min", "type": "float"},
|
|
||||||
{"path": "inp_water_t_max", "type": "float"},
|
|
||||||
{"path": "out_water_t", "type": "float"},
|
|
||||||
{"path": "out_water_t_min", "type": "float"},
|
|
||||||
{"path": "out_water_t_max", "type": "float"},
|
|
||||||
{"path": "helium_t", "type": "float"},
|
|
||||||
{"path": "helium_t_min", "type": "float"},
|
|
||||||
{"path": "helium_t_max", "type": "float"},
|
|
||||||
{"path": "oil_t", "type": "float"},
|
|
||||||
{"path": "oil_t_min", "type": "float"},
|
|
||||||
{"path": "oil_t_max", "type": "float"},
|
|
||||||
{"path": "high_side_p", "type": "float"},
|
|
||||||
{"path": "high_side_p_min", "type": "float"},
|
|
||||||
{"path": "high_side_p_max", "type": "float"},
|
|
||||||
{"path": "high_side_p_avg", "type": "float"},
|
|
||||||
{"path": "low_side_p", "type": "float"},
|
|
||||||
{"path": "low_side_p_min", "type": "float"},
|
|
||||||
{"path": "low_side_p_max", "type": "float"},
|
|
||||||
{"path": "low_side_p_avg", "type": "float"},
|
|
||||||
{"path": "high_side_delta_p_avg", "type": "float"},
|
|
||||||
{"path": "high_side_bounce", "type": "float"}]}}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
Node('cp1000.addon.sea.psi.ch',
|
|
||||||
'''dry system''',
|
|
||||||
)
|
|
||||||
Mod('sea_addons',
|
|
||||||
'frappy_psi.sea.SeaClient',
|
|
||||||
'addons sea connection for cp1000.addon',
|
|
||||||
config = 'cp1000.addon',
|
|
||||||
service = 'addons',
|
|
||||||
)
|
|
||||||
Mod('cp2800',
|
|
||||||
'frappy_psi.sea.SeaWritable', '',
|
|
||||||
io = 'sea_addons',
|
|
||||||
sea_object = 'cp2800',
|
|
||||||
)
|
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
{"path": "heaterselect", "type": "enum", "enum": {"sample": 0, "mix": 1, "mix(temporarely)": 2}, "readonly": false, "cmd": "ts heaterselect"},
|
{"path": "heaterselect", "type": "enum", "enum": {"sample": 0, "mix": 1, "mix(temporarely)": 2}, "readonly": false, "cmd": "ts heaterselect"},
|
||||||
{"path": "control", "type": "enum", "enum": {"off": 0, "sample": 6, "mix": 5, "samplehtr": 8}, "readonly": false, "cmd": "ts control", "description": "click off to reload list"},
|
{"path": "control", "type": "enum", "enum": {"off": 0, "sample": 6, "mix": 5, "samplehtr": 8}, "readonly": false, "cmd": "ts control", "description": "click off to reload list"},
|
||||||
{"path": "heatermode", "type": "enum", "enum": {"disabled": -1, "off": 0, "on": 1}, "readonly": false, "cmd": "ts heatermode"},
|
{"path": "heatermode", "type": "enum", "enum": {"disabled": -1, "off": 0, "on": 1}, "readonly": false, "cmd": "ts heatermode"},
|
||||||
{"path": "heaterrange", "type": "enum", "enum": {"off": 0, "2uW": 1, "20uW": 2, "200uW": 3, "2mW": 4, "20mW": 5}, "readonly": false, "cmd": "ts heaterrange"},
|
{"path": "heaterrange", "type": "enum", "enum": {"2uW": 1, "20uW": 2, "200uW": 3, "2mW": 4, "20mW": 5}, "readonly": false, "cmd": "ts heaterrange"},
|
||||||
{"path": "autoheater", "type": "bool", "readonly": false, "cmd": "ts autoheater", "description": "automatic heater range", "kids": 12},
|
{"path": "autoheater", "type": "bool", "readonly": false, "cmd": "ts autoheater", "description": "automatic heater range", "kids": 12},
|
||||||
{"path": "autoheater/wlp0", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp0", "description": "weak link base temperature (used for auto heater)"},
|
{"path": "autoheater/wlp0", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp0", "description": "weak link base temperature (used for auto heater)"},
|
||||||
{"path": "autoheater/wlp1", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp1", "description": "weak link temperature at 1 uW (used for auto heater)"},
|
{"path": "autoheater/wlp1", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp1", "description": "weak link temperature at 1 uW (used for auto heater)"},
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
{"path": "heaterselect", "type": "enum", "enum": {"sample": 0, "mix": 1, "mix(temporarely)": 2}, "readonly": false, "cmd": "ts heaterselect"},
|
{"path": "heaterselect", "type": "enum", "enum": {"sample": 0, "mix": 1, "mix(temporarely)": 2}, "readonly": false, "cmd": "ts heaterselect"},
|
||||||
{"path": "control", "type": "enum", "enum": {"off": 0, "sample": 6, "mix": 5, "samplehtr": 8}, "readonly": false, "cmd": "ts control", "description": "click off to reload list"},
|
{"path": "control", "type": "enum", "enum": {"off": 0, "sample": 6, "mix": 5, "samplehtr": 8}, "readonly": false, "cmd": "ts control", "description": "click off to reload list"},
|
||||||
{"path": "heatermode", "type": "enum", "enum": {"disabled": -1, "off": 0, "on": 1}, "readonly": false, "cmd": "ts heatermode"},
|
{"path": "heatermode", "type": "enum", "enum": {"disabled": -1, "off": 0, "on": 1}, "readonly": false, "cmd": "ts heatermode"},
|
||||||
{"path": "heaterrange", "type": "enum", "enum": {"off": 0, "2uW": 1, "20uW": 2, "200uW": 3, "2mW": 4, "20mW": 5}, "readonly": false, "cmd": "ts heaterrange"},
|
{"path": "heaterrange", "type": "enum", "enum": {"2uW": 1, "20uW": 2, "200uW": 3, "2mW": 4, "20mW": 5}, "readonly": false, "cmd": "ts heaterrange"},
|
||||||
{"path": "autoheater", "type": "bool", "readonly": false, "cmd": "ts autoheater", "description": "automatic heater range", "kids": 12},
|
{"path": "autoheater", "type": "bool", "readonly": false, "cmd": "ts autoheater", "description": "automatic heater range", "kids": 12},
|
||||||
{"path": "autoheater/wlp0", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp0", "description": "weak link base temperature (used for auto heater)"},
|
{"path": "autoheater/wlp0", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp0", "description": "weak link base temperature (used for auto heater)"},
|
||||||
{"path": "autoheater/wlp1", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp1", "description": "weak link temperature at 1 uW (used for auto heater)"},
|
{"path": "autoheater/wlp1", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp1", "description": "weak link temperature at 1 uW (used for auto heater)"},
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
{"path": "heaterselect", "type": "enum", "enum": {"sample": 0, "mix": 1, "mix(temporarely)": 2}, "readonly": false, "cmd": "ts heaterselect"},
|
{"path": "heaterselect", "type": "enum", "enum": {"sample": 0, "mix": 1, "mix(temporarely)": 2}, "readonly": false, "cmd": "ts heaterselect"},
|
||||||
{"path": "control", "type": "enum", "enum": {"off": 0, "sample": 6, "mix": 5, "samplehtr": 8}, "readonly": false, "cmd": "ts control", "description": "click off to reload list"},
|
{"path": "control", "type": "enum", "enum": {"off": 0, "sample": 6, "mix": 5, "samplehtr": 8}, "readonly": false, "cmd": "ts control", "description": "click off to reload list"},
|
||||||
{"path": "heatermode", "type": "enum", "enum": {"disabled": -1, "off": 0, "on": 1}, "readonly": false, "cmd": "ts heatermode"},
|
{"path": "heatermode", "type": "enum", "enum": {"disabled": -1, "off": 0, "on": 1}, "readonly": false, "cmd": "ts heatermode"},
|
||||||
{"path": "heaterrange", "type": "enum", "enum": {"off": 0, "2uW": 1, "20uW": 2, "200uW": 3, "2mW": 4, "20mW": 5}, "readonly": false, "cmd": "ts heaterrange"},
|
{"path": "heaterrange", "type": "enum", "enum": {"2uW": 1, "20uW": 2, "200uW": 3, "2mW": 4, "20mW": 5}, "readonly": false, "cmd": "ts heaterrange"},
|
||||||
{"path": "autoheater", "type": "bool", "readonly": false, "cmd": "ts autoheater", "description": "automatic heater range", "kids": 12},
|
{"path": "autoheater", "type": "bool", "readonly": false, "cmd": "ts autoheater", "description": "automatic heater range", "kids": 12},
|
||||||
{"path": "autoheater/wlp0", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp0", "description": "weak link base temperature (used for auto heater)"},
|
{"path": "autoheater/wlp0", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp0", "description": "weak link base temperature (used for auto heater)"},
|
||||||
{"path": "autoheater/wlp1", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp1", "description": "weak link temperature at 1 uW (used for auto heater)"},
|
{"path": "autoheater/wlp1", "type": "float", "readonly": false, "cmd": "ts autoheater/wlp1", "description": "weak link temperature at 1 uW (used for auto heater)"},
|
||||||
|
|||||||
@@ -1,213 +0,0 @@
|
|||||||
{"tt": {"base": "/tt", "params": [
|
|
||||||
{"path": "", "type": "int", "kids": 18},
|
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tt send", "visibility": 3},
|
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
|
||||||
{"path": "autoscan", "type": "bool", "readonly": false, "cmd": "tt autoscan", "kids": 4},
|
|
||||||
{"path": "autoscan/synchronized", "type": "bool", "readonly": false, "cmd": "tt autoscan/synchronized"},
|
|
||||||
{"path": "autoscan/interval", "type": "text", "readonly": false, "cmd": "tt autoscan/interval"},
|
|
||||||
{"path": "autoscan/pause", "type": "text", "readonly": false, "cmd": "tt autoscan/pause"},
|
|
||||||
{"path": "autoscan/dwell", "type": "text", "readonly": false, "cmd": "tt autoscan/dwell"},
|
|
||||||
{"path": "T3K", "type": "float", "kids": 14},
|
|
||||||
{"path": "T3K/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt T3K/active"},
|
|
||||||
{"path": "T3K/autorange", "type": "bool", "readonly": false, "cmd": "tt T3K/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "T3K/range", "type": "text", "readonly": false, "cmd": "tt T3K/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "T3K/range_num", "type": "int"},
|
|
||||||
{"path": "T3K/excitation", "type": "text", "readonly": false, "cmd": "tt T3K/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "T3K/excitation_num", "type": "int"},
|
|
||||||
{"path": "T3K/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "T3K/pause", "type": "int", "readonly": false, "cmd": "tt T3K/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "T3K/filter", "type": "int", "readonly": false, "cmd": "tt T3K/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "T3K/dwell", "type": "int", "readonly": false, "cmd": "tt T3K/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "T3K/status", "type": "text"},
|
|
||||||
{"path": "T3K/curve", "type": "text", "readonly": false, "cmd": "tt T3K/curve", "kids": 1},
|
|
||||||
{"path": "T3K/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt T3K/curve/points", "visibility": 3},
|
|
||||||
{"path": "T3K/alarm", "type": "float", "readonly": false, "cmd": "tt T3K/alarm"},
|
|
||||||
{"path": "T3K/raw", "type": "float"},
|
|
||||||
{"path": "Tstill", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tstill/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tstill/active"},
|
|
||||||
{"path": "Tstill/autorange", "type": "bool", "readonly": false, "cmd": "tt Tstill/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tstill/range", "type": "text", "readonly": false, "cmd": "tt Tstill/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tstill/range_num", "type": "int"},
|
|
||||||
{"path": "Tstill/excitation", "type": "text", "readonly": false, "cmd": "tt Tstill/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tstill/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tstill/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tstill/pause", "type": "int", "readonly": false, "cmd": "tt Tstill/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tstill/filter", "type": "int", "readonly": false, "cmd": "tt Tstill/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tstill/dwell", "type": "int", "readonly": false, "cmd": "tt Tstill/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tstill/status", "type": "text"},
|
|
||||||
{"path": "Tstill/curve", "type": "text", "readonly": false, "cmd": "tt Tstill/curve", "kids": 1},
|
|
||||||
{"path": "Tstill/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tstill/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tstill/alarm", "type": "float", "readonly": false, "cmd": "tt Tstill/alarm"},
|
|
||||||
{"path": "Tstill/raw", "type": "float"},
|
|
||||||
{"path": "T50mK", "type": "float", "kids": 14},
|
|
||||||
{"path": "T50mK/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt T50mK/active"},
|
|
||||||
{"path": "T50mK/autorange", "type": "bool", "readonly": false, "cmd": "tt T50mK/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "T50mK/range", "type": "text", "readonly": false, "cmd": "tt T50mK/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "T50mK/range_num", "type": "int"},
|
|
||||||
{"path": "T50mK/excitation", "type": "text", "readonly": false, "cmd": "tt T50mK/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "T50mK/excitation_num", "type": "int"},
|
|
||||||
{"path": "T50mK/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "T50mK/pause", "type": "int", "readonly": false, "cmd": "tt T50mK/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "T50mK/filter", "type": "int", "readonly": false, "cmd": "tt T50mK/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "T50mK/dwell", "type": "int", "readonly": false, "cmd": "tt T50mK/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "T50mK/status", "type": "text"},
|
|
||||||
{"path": "T50mK/curve", "type": "text", "readonly": false, "cmd": "tt T50mK/curve", "kids": 1},
|
|
||||||
{"path": "T50mK/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt T50mK/curve/points", "visibility": 3},
|
|
||||||
{"path": "T50mK/alarm", "type": "float", "readonly": false, "cmd": "tt T50mK/alarm"},
|
|
||||||
{"path": "T50mK/raw", "type": "float"},
|
|
||||||
{"path": "Tmxlow", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tmxlow/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tmxlow/active"},
|
|
||||||
{"path": "Tmxlow/autorange", "type": "bool", "readonly": false, "cmd": "tt Tmxlow/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tmxlow/range", "type": "text", "readonly": false, "cmd": "tt Tmxlow/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tmxlow/range_num", "type": "int"},
|
|
||||||
{"path": "Tmxlow/excitation", "type": "text", "readonly": false, "cmd": "tt Tmxlow/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tmxlow/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tmxlow/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tmxlow/pause", "type": "int", "readonly": false, "cmd": "tt Tmxlow/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tmxlow/filter", "type": "int", "readonly": false, "cmd": "tt Tmxlow/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tmxlow/dwell", "type": "int", "readonly": false, "cmd": "tt Tmxlow/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tmxlow/status", "type": "text"},
|
|
||||||
{"path": "Tmxlow/curve", "type": "text", "readonly": false, "cmd": "tt Tmxlow/curve", "kids": 1},
|
|
||||||
{"path": "Tmxlow/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tmxlow/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tmxlow/alarm", "type": "float", "readonly": false, "cmd": "tt Tmxlow/alarm"},
|
|
||||||
{"path": "Tmxlow/raw", "type": "float"},
|
|
||||||
{"path": "Tmxhigh", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tmxhigh/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tmxhigh/active"},
|
|
||||||
{"path": "Tmxhigh/autorange", "type": "bool", "readonly": false, "cmd": "tt Tmxhigh/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tmxhigh/range", "type": "text", "readonly": false, "cmd": "tt Tmxhigh/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tmxhigh/range_num", "type": "int"},
|
|
||||||
{"path": "Tmxhigh/excitation", "type": "text", "readonly": false, "cmd": "tt Tmxhigh/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tmxhigh/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tmxhigh/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tmxhigh/pause", "type": "int", "readonly": false, "cmd": "tt Tmxhigh/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tmxhigh/filter", "type": "int", "readonly": false, "cmd": "tt Tmxhigh/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tmxhigh/dwell", "type": "int", "readonly": false, "cmd": "tt Tmxhigh/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tmxhigh/status", "type": "text"},
|
|
||||||
{"path": "Tmxhigh/curve", "type": "text", "readonly": false, "cmd": "tt Tmxhigh/curve", "kids": 1},
|
|
||||||
{"path": "Tmxhigh/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tmxhigh/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tmxhigh/alarm", "type": "float", "readonly": false, "cmd": "tt Tmxhigh/alarm"},
|
|
||||||
{"path": "Tmxhigh/raw", "type": "float"},
|
|
||||||
{"path": "Tmxcx", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tmxcx/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tmxcx/active"},
|
|
||||||
{"path": "Tmxcx/autorange", "type": "bool", "readonly": false, "cmd": "tt Tmxcx/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tmxcx/range", "type": "text", "readonly": false, "cmd": "tt Tmxcx/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tmxcx/range_num", "type": "int"},
|
|
||||||
{"path": "Tmxcx/excitation", "type": "text", "readonly": false, "cmd": "tt Tmxcx/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tmxcx/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tmxcx/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tmxcx/pause", "type": "int", "readonly": false, "cmd": "tt Tmxcx/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tmxcx/filter", "type": "int", "readonly": false, "cmd": "tt Tmxcx/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tmxcx/dwell", "type": "int", "readonly": false, "cmd": "tt Tmxcx/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tmxcx/status", "type": "text"},
|
|
||||||
{"path": "Tmxcx/curve", "type": "text", "readonly": false, "cmd": "tt Tmxcx/curve", "kids": 1},
|
|
||||||
{"path": "Tmxcx/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tmxcx/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tmxcx/alarm", "type": "float", "readonly": false, "cmd": "tt Tmxcx/alarm"},
|
|
||||||
{"path": "Tmxcx/raw", "type": "float"},
|
|
||||||
{"path": "Tblueo", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tblueo/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tblueo/active"},
|
|
||||||
{"path": "Tblueo/autorange", "type": "bool", "readonly": false, "cmd": "tt Tblueo/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tblueo/range", "type": "text", "readonly": false, "cmd": "tt Tblueo/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tblueo/range_num", "type": "int"},
|
|
||||||
{"path": "Tblueo/excitation", "type": "text", "readonly": false, "cmd": "tt Tblueo/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tblueo/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tblueo/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tblueo/pause", "type": "int", "readonly": false, "cmd": "tt Tblueo/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tblueo/filter", "type": "int", "readonly": false, "cmd": "tt Tblueo/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tblueo/dwell", "type": "int", "readonly": false, "cmd": "tt Tblueo/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tblueo/status", "type": "text"},
|
|
||||||
{"path": "Tblueo/curve", "type": "text", "readonly": false, "cmd": "tt Tblueo/curve", "kids": 1},
|
|
||||||
{"path": "Tblueo/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tblueo/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tblueo/alarm", "type": "float", "readonly": false, "cmd": "tt Tblueo/alarm"},
|
|
||||||
{"path": "Tblueo/raw", "type": "float"},
|
|
||||||
{"path": "Tpt50", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tpt50/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tpt50/active"},
|
|
||||||
{"path": "Tpt50/autorange", "type": "bool", "readonly": false, "cmd": "tt Tpt50/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tpt50/range", "type": "text", "readonly": false, "cmd": "tt Tpt50/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tpt50/range_num", "type": "int"},
|
|
||||||
{"path": "Tpt50/excitation", "type": "text", "readonly": false, "cmd": "tt Tpt50/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tpt50/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tpt50/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tpt50/pause", "type": "int", "readonly": false, "cmd": "tt Tpt50/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tpt50/filter", "type": "int", "readonly": false, "cmd": "tt Tpt50/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tpt50/dwell", "type": "int", "readonly": false, "cmd": "tt Tpt50/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tpt50/status", "type": "text"},
|
|
||||||
{"path": "Tpt50/curve", "type": "text", "readonly": false, "cmd": "tt Tpt50/curve", "kids": 1},
|
|
||||||
{"path": "Tpt50/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tpt50/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tpt50/alarm", "type": "float", "readonly": false, "cmd": "tt Tpt50/alarm"},
|
|
||||||
{"path": "Tpt50/raw", "type": "float"},
|
|
||||||
{"path": "Tpt3high", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tpt3high/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tpt3high/active"},
|
|
||||||
{"path": "Tpt3high/autorange", "type": "bool", "readonly": false, "cmd": "tt Tpt3high/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tpt3high/range", "type": "text", "readonly": false, "cmd": "tt Tpt3high/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tpt3high/range_num", "type": "int"},
|
|
||||||
{"path": "Tpt3high/excitation", "type": "text", "readonly": false, "cmd": "tt Tpt3high/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tpt3high/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tpt3high/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tpt3high/pause", "type": "int", "readonly": false, "cmd": "tt Tpt3high/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tpt3high/filter", "type": "int", "readonly": false, "cmd": "tt Tpt3high/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tpt3high/dwell", "type": "int", "readonly": false, "cmd": "tt Tpt3high/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tpt3high/status", "type": "text"},
|
|
||||||
{"path": "Tpt3high/curve", "type": "text", "readonly": false, "cmd": "tt Tpt3high/curve", "kids": 1},
|
|
||||||
{"path": "Tpt3high/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tpt3high/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tpt3high/alarm", "type": "float", "readonly": false, "cmd": "tt Tpt3high/alarm"},
|
|
||||||
{"path": "Tpt3high/raw", "type": "float"},
|
|
||||||
{"path": "Tpt3low", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tpt3low/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tpt3low/active"},
|
|
||||||
{"path": "Tpt3low/autorange", "type": "bool", "readonly": false, "cmd": "tt Tpt3low/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tpt3low/range", "type": "text", "readonly": false, "cmd": "tt Tpt3low/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tpt3low/range_num", "type": "int"},
|
|
||||||
{"path": "Tpt3low/excitation", "type": "text", "readonly": false, "cmd": "tt Tpt3low/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tpt3low/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tpt3low/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tpt3low/pause", "type": "int", "readonly": false, "cmd": "tt Tpt3low/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tpt3low/filter", "type": "int", "readonly": false, "cmd": "tt Tpt3low/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tpt3low/dwell", "type": "int", "readonly": false, "cmd": "tt Tpt3low/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tpt3low/status", "type": "text"},
|
|
||||||
{"path": "Tpt3low/curve", "type": "text", "readonly": false, "cmd": "tt Tpt3low/curve", "kids": 1},
|
|
||||||
{"path": "Tpt3low/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tpt3low/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tpt3low/alarm", "type": "float", "readonly": false, "cmd": "tt Tpt3low/alarm"},
|
|
||||||
{"path": "Tpt3low/raw", "type": "float"},
|
|
||||||
{"path": "Twhite", "type": "float", "kids": 14},
|
|
||||||
{"path": "Twhite/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Twhite/active"},
|
|
||||||
{"path": "Twhite/autorange", "type": "bool", "readonly": false, "cmd": "tt Twhite/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Twhite/range", "type": "text", "readonly": false, "cmd": "tt Twhite/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Twhite/range_num", "type": "int"},
|
|
||||||
{"path": "Twhite/excitation", "type": "text", "readonly": false, "cmd": "tt Twhite/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Twhite/excitation_num", "type": "int"},
|
|
||||||
{"path": "Twhite/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Twhite/pause", "type": "int", "readonly": false, "cmd": "tt Twhite/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Twhite/filter", "type": "int", "readonly": false, "cmd": "tt Twhite/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Twhite/dwell", "type": "int", "readonly": false, "cmd": "tt Twhite/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Twhite/status", "type": "text"},
|
|
||||||
{"path": "Twhite/curve", "type": "text", "readonly": false, "cmd": "tt Twhite/curve", "kids": 1},
|
|
||||||
{"path": "Twhite/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Twhite/curve/points", "visibility": 3},
|
|
||||||
{"path": "Twhite/alarm", "type": "float", "readonly": false, "cmd": "tt Twhite/alarm"},
|
|
||||||
{"path": "Twhite/raw", "type": "float"},
|
|
||||||
{"path": "Tgreen", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tgreen/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tgreen/active"},
|
|
||||||
{"path": "Tgreen/autorange", "type": "bool", "readonly": false, "cmd": "tt Tgreen/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tgreen/range", "type": "text", "readonly": false, "cmd": "tt Tgreen/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tgreen/range_num", "type": "int"},
|
|
||||||
{"path": "Tgreen/excitation", "type": "text", "readonly": false, "cmd": "tt Tgreen/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tgreen/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tgreen/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tgreen/pause", "type": "int", "readonly": false, "cmd": "tt Tgreen/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tgreen/filter", "type": "int", "readonly": false, "cmd": "tt Tgreen/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tgreen/dwell", "type": "int", "readonly": false, "cmd": "tt Tgreen/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tgreen/status", "type": "text"},
|
|
||||||
{"path": "Tgreen/curve", "type": "text", "readonly": false, "cmd": "tt Tgreen/curve", "kids": 1},
|
|
||||||
{"path": "Tgreen/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tgreen/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tgreen/alarm", "type": "float", "readonly": false, "cmd": "tt Tgreen/alarm"},
|
|
||||||
{"path": "Tgreen/raw", "type": "float"},
|
|
||||||
{"path": "analog2", "type": "float", "readonly": false, "cmd": "tt analog2"},
|
|
||||||
{"path": "remote", "type": "bool"},
|
|
||||||
{"path": "display", "type": "text", "readonly": false, "cmd": "tt display"}]},
|
|
||||||
|
|
||||||
"cmn": {"base": "/cmn", "params": [
|
|
||||||
{"path": "", "type": "none", "kids": 6},
|
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cmn send", "visibility": 3},
|
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
|
||||||
{"path": "u1", "type": "float"},
|
|
||||||
{"path": "temp", "type": "float"},
|
|
||||||
{"path": "u2", "type": "float"},
|
|
||||||
{"path": "chan", "type": "enum", "enum": {"auto": 0, "chan1": 1, "chan2": 2}, "readonly": false, "cmd": "cmn chan"}]}}
|
|
||||||
@@ -1,213 +0,0 @@
|
|||||||
{"tt": {"base": "/tt", "params": [
|
|
||||||
{"path": "", "type": "int", "kids": 18},
|
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tt send", "visibility": 3},
|
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
|
||||||
{"path": "autoscan", "type": "bool", "readonly": false, "cmd": "tt autoscan", "kids": 4},
|
|
||||||
{"path": "autoscan/synchronized", "type": "bool", "readonly": false, "cmd": "tt autoscan/synchronized"},
|
|
||||||
{"path": "autoscan/interval", "type": "text", "readonly": false, "cmd": "tt autoscan/interval"},
|
|
||||||
{"path": "autoscan/pause", "type": "text", "readonly": false, "cmd": "tt autoscan/pause"},
|
|
||||||
{"path": "autoscan/dwell", "type": "text", "readonly": false, "cmd": "tt autoscan/dwell"},
|
|
||||||
{"path": "T3K", "type": "float", "kids": 14},
|
|
||||||
{"path": "T3K/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt T3K/active"},
|
|
||||||
{"path": "T3K/autorange", "type": "bool", "readonly": false, "cmd": "tt T3K/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "T3K/range", "type": "text", "readonly": false, "cmd": "tt T3K/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "T3K/range_num", "type": "int"},
|
|
||||||
{"path": "T3K/excitation", "type": "text", "readonly": false, "cmd": "tt T3K/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "T3K/excitation_num", "type": "int"},
|
|
||||||
{"path": "T3K/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "T3K/pause", "type": "int", "readonly": false, "cmd": "tt T3K/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "T3K/filter", "type": "int", "readonly": false, "cmd": "tt T3K/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "T3K/dwell", "type": "int", "readonly": false, "cmd": "tt T3K/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "T3K/status", "type": "text"},
|
|
||||||
{"path": "T3K/curve", "type": "text", "readonly": false, "cmd": "tt T3K/curve", "kids": 1},
|
|
||||||
{"path": "T3K/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt T3K/curve/points", "visibility": 3},
|
|
||||||
{"path": "T3K/alarm", "type": "float", "readonly": false, "cmd": "tt T3K/alarm"},
|
|
||||||
{"path": "T3K/raw", "type": "float"},
|
|
||||||
{"path": "Tstill", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tstill/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tstill/active"},
|
|
||||||
{"path": "Tstill/autorange", "type": "bool", "readonly": false, "cmd": "tt Tstill/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tstill/range", "type": "text", "readonly": false, "cmd": "tt Tstill/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tstill/range_num", "type": "int"},
|
|
||||||
{"path": "Tstill/excitation", "type": "text", "readonly": false, "cmd": "tt Tstill/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tstill/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tstill/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tstill/pause", "type": "int", "readonly": false, "cmd": "tt Tstill/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tstill/filter", "type": "int", "readonly": false, "cmd": "tt Tstill/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tstill/dwell", "type": "int", "readonly": false, "cmd": "tt Tstill/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tstill/status", "type": "text"},
|
|
||||||
{"path": "Tstill/curve", "type": "text", "readonly": false, "cmd": "tt Tstill/curve", "kids": 1},
|
|
||||||
{"path": "Tstill/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tstill/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tstill/alarm", "type": "float", "readonly": false, "cmd": "tt Tstill/alarm"},
|
|
||||||
{"path": "Tstill/raw", "type": "float"},
|
|
||||||
{"path": "T50mK", "type": "float", "kids": 14},
|
|
||||||
{"path": "T50mK/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt T50mK/active"},
|
|
||||||
{"path": "T50mK/autorange", "type": "bool", "readonly": false, "cmd": "tt T50mK/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "T50mK/range", "type": "text", "readonly": false, "cmd": "tt T50mK/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "T50mK/range_num", "type": "int"},
|
|
||||||
{"path": "T50mK/excitation", "type": "text", "readonly": false, "cmd": "tt T50mK/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "T50mK/excitation_num", "type": "int"},
|
|
||||||
{"path": "T50mK/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "T50mK/pause", "type": "int", "readonly": false, "cmd": "tt T50mK/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "T50mK/filter", "type": "int", "readonly": false, "cmd": "tt T50mK/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "T50mK/dwell", "type": "int", "readonly": false, "cmd": "tt T50mK/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "T50mK/status", "type": "text"},
|
|
||||||
{"path": "T50mK/curve", "type": "text", "readonly": false, "cmd": "tt T50mK/curve", "kids": 1},
|
|
||||||
{"path": "T50mK/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt T50mK/curve/points", "visibility": 3},
|
|
||||||
{"path": "T50mK/alarm", "type": "float", "readonly": false, "cmd": "tt T50mK/alarm"},
|
|
||||||
{"path": "T50mK/raw", "type": "float"},
|
|
||||||
{"path": "Tmxlow", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tmxlow/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tmxlow/active"},
|
|
||||||
{"path": "Tmxlow/autorange", "type": "bool", "readonly": false, "cmd": "tt Tmxlow/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tmxlow/range", "type": "text", "readonly": false, "cmd": "tt Tmxlow/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tmxlow/range_num", "type": "int"},
|
|
||||||
{"path": "Tmxlow/excitation", "type": "text", "readonly": false, "cmd": "tt Tmxlow/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tmxlow/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tmxlow/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tmxlow/pause", "type": "int", "readonly": false, "cmd": "tt Tmxlow/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tmxlow/filter", "type": "int", "readonly": false, "cmd": "tt Tmxlow/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tmxlow/dwell", "type": "int", "readonly": false, "cmd": "tt Tmxlow/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tmxlow/status", "type": "text"},
|
|
||||||
{"path": "Tmxlow/curve", "type": "text", "readonly": false, "cmd": "tt Tmxlow/curve", "kids": 1},
|
|
||||||
{"path": "Tmxlow/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tmxlow/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tmxlow/alarm", "type": "float", "readonly": false, "cmd": "tt Tmxlow/alarm"},
|
|
||||||
{"path": "Tmxlow/raw", "type": "float"},
|
|
||||||
{"path": "Tmxhigh", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tmxhigh/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tmxhigh/active"},
|
|
||||||
{"path": "Tmxhigh/autorange", "type": "bool", "readonly": false, "cmd": "tt Tmxhigh/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tmxhigh/range", "type": "text", "readonly": false, "cmd": "tt Tmxhigh/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tmxhigh/range_num", "type": "int"},
|
|
||||||
{"path": "Tmxhigh/excitation", "type": "text", "readonly": false, "cmd": "tt Tmxhigh/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tmxhigh/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tmxhigh/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tmxhigh/pause", "type": "int", "readonly": false, "cmd": "tt Tmxhigh/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tmxhigh/filter", "type": "int", "readonly": false, "cmd": "tt Tmxhigh/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tmxhigh/dwell", "type": "int", "readonly": false, "cmd": "tt Tmxhigh/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tmxhigh/status", "type": "text"},
|
|
||||||
{"path": "Tmxhigh/curve", "type": "text", "readonly": false, "cmd": "tt Tmxhigh/curve", "kids": 1},
|
|
||||||
{"path": "Tmxhigh/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tmxhigh/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tmxhigh/alarm", "type": "float", "readonly": false, "cmd": "tt Tmxhigh/alarm"},
|
|
||||||
{"path": "Tmxhigh/raw", "type": "float"},
|
|
||||||
{"path": "Tmxcx", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tmxcx/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tmxcx/active"},
|
|
||||||
{"path": "Tmxcx/autorange", "type": "bool", "readonly": false, "cmd": "tt Tmxcx/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tmxcx/range", "type": "text", "readonly": false, "cmd": "tt Tmxcx/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tmxcx/range_num", "type": "int"},
|
|
||||||
{"path": "Tmxcx/excitation", "type": "text", "readonly": false, "cmd": "tt Tmxcx/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tmxcx/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tmxcx/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tmxcx/pause", "type": "int", "readonly": false, "cmd": "tt Tmxcx/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tmxcx/filter", "type": "int", "readonly": false, "cmd": "tt Tmxcx/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tmxcx/dwell", "type": "int", "readonly": false, "cmd": "tt Tmxcx/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tmxcx/status", "type": "text"},
|
|
||||||
{"path": "Tmxcx/curve", "type": "text", "readonly": false, "cmd": "tt Tmxcx/curve", "kids": 1},
|
|
||||||
{"path": "Tmxcx/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tmxcx/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tmxcx/alarm", "type": "float", "readonly": false, "cmd": "tt Tmxcx/alarm"},
|
|
||||||
{"path": "Tmxcx/raw", "type": "float"},
|
|
||||||
{"path": "Tblueo", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tblueo/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tblueo/active"},
|
|
||||||
{"path": "Tblueo/autorange", "type": "bool", "readonly": false, "cmd": "tt Tblueo/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tblueo/range", "type": "text", "readonly": false, "cmd": "tt Tblueo/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tblueo/range_num", "type": "int"},
|
|
||||||
{"path": "Tblueo/excitation", "type": "text", "readonly": false, "cmd": "tt Tblueo/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tblueo/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tblueo/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tblueo/pause", "type": "int", "readonly": false, "cmd": "tt Tblueo/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tblueo/filter", "type": "int", "readonly": false, "cmd": "tt Tblueo/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tblueo/dwell", "type": "int", "readonly": false, "cmd": "tt Tblueo/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tblueo/status", "type": "text"},
|
|
||||||
{"path": "Tblueo/curve", "type": "text", "readonly": false, "cmd": "tt Tblueo/curve", "kids": 1},
|
|
||||||
{"path": "Tblueo/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tblueo/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tblueo/alarm", "type": "float", "readonly": false, "cmd": "tt Tblueo/alarm"},
|
|
||||||
{"path": "Tblueo/raw", "type": "float"},
|
|
||||||
{"path": "Tpt50", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tpt50/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tpt50/active"},
|
|
||||||
{"path": "Tpt50/autorange", "type": "bool", "readonly": false, "cmd": "tt Tpt50/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tpt50/range", "type": "text", "readonly": false, "cmd": "tt Tpt50/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tpt50/range_num", "type": "int"},
|
|
||||||
{"path": "Tpt50/excitation", "type": "text", "readonly": false, "cmd": "tt Tpt50/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tpt50/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tpt50/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tpt50/pause", "type": "int", "readonly": false, "cmd": "tt Tpt50/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tpt50/filter", "type": "int", "readonly": false, "cmd": "tt Tpt50/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tpt50/dwell", "type": "int", "readonly": false, "cmd": "tt Tpt50/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tpt50/status", "type": "text"},
|
|
||||||
{"path": "Tpt50/curve", "type": "text", "readonly": false, "cmd": "tt Tpt50/curve", "kids": 1},
|
|
||||||
{"path": "Tpt50/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tpt50/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tpt50/alarm", "type": "float", "readonly": false, "cmd": "tt Tpt50/alarm"},
|
|
||||||
{"path": "Tpt50/raw", "type": "float"},
|
|
||||||
{"path": "Tpt3high", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tpt3high/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tpt3high/active"},
|
|
||||||
{"path": "Tpt3high/autorange", "type": "bool", "readonly": false, "cmd": "tt Tpt3high/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tpt3high/range", "type": "text", "readonly": false, "cmd": "tt Tpt3high/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tpt3high/range_num", "type": "int"},
|
|
||||||
{"path": "Tpt3high/excitation", "type": "text", "readonly": false, "cmd": "tt Tpt3high/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tpt3high/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tpt3high/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tpt3high/pause", "type": "int", "readonly": false, "cmd": "tt Tpt3high/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tpt3high/filter", "type": "int", "readonly": false, "cmd": "tt Tpt3high/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tpt3high/dwell", "type": "int", "readonly": false, "cmd": "tt Tpt3high/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tpt3high/status", "type": "text"},
|
|
||||||
{"path": "Tpt3high/curve", "type": "text", "readonly": false, "cmd": "tt Tpt3high/curve", "kids": 1},
|
|
||||||
{"path": "Tpt3high/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tpt3high/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tpt3high/alarm", "type": "float", "readonly": false, "cmd": "tt Tpt3high/alarm"},
|
|
||||||
{"path": "Tpt3high/raw", "type": "float"},
|
|
||||||
{"path": "Tpt3low", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tpt3low/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tpt3low/active"},
|
|
||||||
{"path": "Tpt3low/autorange", "type": "bool", "readonly": false, "cmd": "tt Tpt3low/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tpt3low/range", "type": "text", "readonly": false, "cmd": "tt Tpt3low/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tpt3low/range_num", "type": "int"},
|
|
||||||
{"path": "Tpt3low/excitation", "type": "text", "readonly": false, "cmd": "tt Tpt3low/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tpt3low/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tpt3low/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tpt3low/pause", "type": "int", "readonly": false, "cmd": "tt Tpt3low/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tpt3low/filter", "type": "int", "readonly": false, "cmd": "tt Tpt3low/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tpt3low/dwell", "type": "int", "readonly": false, "cmd": "tt Tpt3low/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tpt3low/status", "type": "text"},
|
|
||||||
{"path": "Tpt3low/curve", "type": "text", "readonly": false, "cmd": "tt Tpt3low/curve", "kids": 1},
|
|
||||||
{"path": "Tpt3low/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tpt3low/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tpt3low/alarm", "type": "float", "readonly": false, "cmd": "tt Tpt3low/alarm"},
|
|
||||||
{"path": "Tpt3low/raw", "type": "float"},
|
|
||||||
{"path": "Twhite", "type": "float", "kids": 14},
|
|
||||||
{"path": "Twhite/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Twhite/active"},
|
|
||||||
{"path": "Twhite/autorange", "type": "bool", "readonly": false, "cmd": "tt Twhite/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Twhite/range", "type": "text", "readonly": false, "cmd": "tt Twhite/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Twhite/range_num", "type": "int"},
|
|
||||||
{"path": "Twhite/excitation", "type": "text", "readonly": false, "cmd": "tt Twhite/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Twhite/excitation_num", "type": "int"},
|
|
||||||
{"path": "Twhite/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Twhite/pause", "type": "int", "readonly": false, "cmd": "tt Twhite/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Twhite/filter", "type": "int", "readonly": false, "cmd": "tt Twhite/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Twhite/dwell", "type": "int", "readonly": false, "cmd": "tt Twhite/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Twhite/status", "type": "text"},
|
|
||||||
{"path": "Twhite/curve", "type": "text", "readonly": false, "cmd": "tt Twhite/curve", "kids": 1},
|
|
||||||
{"path": "Twhite/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Twhite/curve/points", "visibility": 3},
|
|
||||||
{"path": "Twhite/alarm", "type": "float", "readonly": false, "cmd": "tt Twhite/alarm"},
|
|
||||||
{"path": "Twhite/raw", "type": "float"},
|
|
||||||
{"path": "Tgreen", "type": "float", "kids": 14},
|
|
||||||
{"path": "Tgreen/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tgreen/active"},
|
|
||||||
{"path": "Tgreen/autorange", "type": "bool", "readonly": false, "cmd": "tt Tgreen/autorange", "description": "autorange (common for all channels)"},
|
|
||||||
{"path": "Tgreen/range", "type": "text", "readonly": false, "cmd": "tt Tgreen/range", "description": "resistance range in Ohm"},
|
|
||||||
{"path": "Tgreen/range_num", "type": "int"},
|
|
||||||
{"path": "Tgreen/excitation", "type": "text", "readonly": false, "cmd": "tt Tgreen/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
|
|
||||||
{"path": "Tgreen/excitation_num", "type": "int"},
|
|
||||||
{"path": "Tgreen/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
|
|
||||||
{"path": "Tgreen/pause", "type": "int", "readonly": false, "cmd": "tt Tgreen/pause", "description": "pause time [sec] after channel change"},
|
|
||||||
{"path": "Tgreen/filter", "type": "int", "readonly": false, "cmd": "tt Tgreen/filter", "description": "filter average time [sec]"},
|
|
||||||
{"path": "Tgreen/dwell", "type": "int", "readonly": false, "cmd": "tt Tgreen/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
|
|
||||||
{"path": "Tgreen/status", "type": "text"},
|
|
||||||
{"path": "Tgreen/curve", "type": "text", "readonly": false, "cmd": "tt Tgreen/curve", "kids": 1},
|
|
||||||
{"path": "Tgreen/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tgreen/curve/points", "visibility": 3},
|
|
||||||
{"path": "Tgreen/alarm", "type": "float", "readonly": false, "cmd": "tt Tgreen/alarm"},
|
|
||||||
{"path": "Tgreen/raw", "type": "float"},
|
|
||||||
{"path": "analog2", "type": "float", "readonly": false, "cmd": "tt analog2"},
|
|
||||||
{"path": "remote", "type": "bool"},
|
|
||||||
{"path": "display", "type": "text", "readonly": false, "cmd": "tt display"}]},
|
|
||||||
|
|
||||||
"cmn": {"base": "/cmn", "params": [
|
|
||||||
{"path": "", "type": "none", "kids": 6},
|
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "cmn send", "visibility": 3},
|
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
|
||||||
{"path": "u1", "type": "float"},
|
|
||||||
{"path": "temp", "type": "float"},
|
|
||||||
{"path": "u2", "type": "float"},
|
|
||||||
{"path": "chan", "type": "enum", "enum": {"auto": 0, "chan1": 1, "chan2": 2}, "readonly": false, "cmd": "cmn chan"}]}}
|
|
||||||
@@ -284,8 +284,8 @@
|
|||||||
{"path": "eeprom", "type": "enum", "enum": {"ok": 0, "dirty": 1, "save": 2, "load": 3}, "readonly": false, "cmd": "hemot eeprom"},
|
{"path": "eeprom", "type": "enum", "enum": {"ok": 0, "dirty": 1, "save": 2, "load": 3}, "readonly": false, "cmd": "hemot eeprom"},
|
||||||
{"path": "customadr", "type": "text", "readonly": false, "cmd": "hemot customadr"},
|
{"path": "customadr", "type": "text", "readonly": false, "cmd": "hemot customadr"},
|
||||||
{"path": "custompar", "type": "float", "readonly": false, "cmd": "hemot custompar"}]},
|
{"path": "custompar", "type": "float", "readonly": false, "cmd": "hemot custompar"}]},
|
||||||
|
"
|
||||||
"ln2fill": {"base": "/ln2fill", "params": [
|
ln2fill": {"base": "/ln2fill", "params": [
|
||||||
{"path": "", "type": "enum", "enum": {"watching": 0, "fill": 1, "inactive": 2}, "readonly": false, "cmd": "ln2fill", "kids": 14},
|
{"path": "", "type": "enum", "enum": {"watching": 0, "fill": 1, "inactive": 2}, "readonly": false, "cmd": "ln2fill", "kids": 14},
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "ln2fill send", "visibility": 3},
|
{"path": "send", "type": "text", "readonly": false, "cmd": "ln2fill send", "visibility": 3},
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
{"path": "status", "type": "text", "visibility": 3},
|
||||||
|
|||||||
@@ -1,50 +1,50 @@
|
|||||||
{"tt": {"base": "/tt", "params": [
|
{"tt": {"base": "/tt", "params": [
|
||||||
{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 18},
|
{"path": "", "type": "float", "readonly": false, "cmd": "run tt", "description": "tt", "kids": 18},
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "tt send", "visibility": 3},
|
{"path": "send", "type": "text", "readonly": false, "cmd": "tt send", "visibility": 3},
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
{"path": "status", "type": "text", "readonly": false, "cmd": "run tt", "visibility": 3},
|
||||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "tt is_running", "visibility": 3},
|
{"path": "is_running", "type": "int", "readonly": false, "cmd": "tt is_running", "visibility": 3},
|
||||||
{"path": "mainloop", "type": "text", "readonly": false, "cmd": "tt mainloop", "visibility": 3},
|
{"path": "mainloop", "type": "text", "readonly": false, "cmd": "tt mainloop", "visibility": 3},
|
||||||
{"path": "target", "type": "float"},
|
{"path": "target", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "running", "type": "int"},
|
{"path": "running", "type": "int", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "tt tolerance"},
|
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "tt tolerance"},
|
||||||
{"path": "maxwait", "type": "float", "readonly": false, "cmd": "tt maxwait"},
|
{"path": "maxwait", "type": "float", "readonly": false, "cmd": "tt maxwait"},
|
||||||
{"path": "settle", "type": "float", "readonly": false, "cmd": "tt settle"},
|
{"path": "settle", "type": "float", "readonly": false, "cmd": "tt settle"},
|
||||||
{"path": "log", "type": "text", "readonly": false, "cmd": "tt log", "visibility": 3, "kids": 4},
|
{"path": "log", "type": "text", "readonly": false, "cmd": "tt log", "visibility": 3, "kids": 4},
|
||||||
{"path": "log/mean", "type": "float", "visibility": 3},
|
{"path": "log/mean", "type": "float", "readonly": false, "cmd": "run tt", "visibility": 3},
|
||||||
{"path": "log/m2", "type": "float", "visibility": 3},
|
{"path": "log/m2", "type": "float", "readonly": false, "cmd": "run tt", "visibility": 3},
|
||||||
{"path": "log/stddev", "type": "float", "visibility": 3},
|
{"path": "log/stddev", "type": "float", "readonly": false, "cmd": "run tt", "visibility": 3},
|
||||||
{"path": "log/n", "type": "float", "visibility": 3},
|
{"path": "log/n", "type": "float", "readonly": false, "cmd": "run tt", "visibility": 3},
|
||||||
{"path": "dblctrl", "type": "bool", "readonly": false, "cmd": "tt dblctrl", "kids": 9},
|
{"path": "dblctrl", "type": "bool", "readonly": false, "cmd": "tt dblctrl", "kids": 9},
|
||||||
{"path": "dblctrl/tshift", "type": "float", "readonly": false, "cmd": "tt dblctrl/tshift"},
|
{"path": "dblctrl/tshift", "type": "float", "readonly": false, "cmd": "tt dblctrl/tshift"},
|
||||||
{"path": "dblctrl/mode", "type": "enum", "enum": {"disabled": -1, "inactive": 0, "stable": 1, "up": 2, "down": 3}, "readonly": false, "cmd": "tt dblctrl/mode"},
|
{"path": "dblctrl/mode", "type": "enum", "enum": {"disabled": -1, "inactive": 0, "stable": 1, "up": 2, "down": 3}, "readonly": false, "cmd": "tt dblctrl/mode"},
|
||||||
{"path": "dblctrl/shift_up", "type": "float"},
|
{"path": "dblctrl/shift_up", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "dblctrl/shift_lo", "type": "float"},
|
{"path": "dblctrl/shift_lo", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "dblctrl/t_min", "type": "float"},
|
{"path": "dblctrl/t_min", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "dblctrl/t_max", "type": "float"},
|
{"path": "dblctrl/t_max", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "dblctrl/int2", "type": "float", "readonly": false, "cmd": "tt dblctrl/int2"},
|
{"path": "dblctrl/int2", "type": "float", "readonly": false, "cmd": "tt dblctrl/int2"},
|
||||||
{"path": "dblctrl/prop_up", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_up"},
|
{"path": "dblctrl/prop_up", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_up"},
|
||||||
{"path": "dblctrl/prop_lo", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_lo"},
|
{"path": "dblctrl/prop_lo", "type": "float", "readonly": false, "cmd": "tt dblctrl/prop_lo"},
|
||||||
{"path": "tm", "type": "float", "kids": 4},
|
{"path": "tm", "type": "float", "readonly": false, "cmd": "run tt", "kids": 4},
|
||||||
{"path": "tm/curve", "type": "text", "readonly": false, "cmd": "tt tm/curve", "kids": 1},
|
{"path": "tm/curve", "type": "text", "readonly": false, "cmd": "tt tm/curve", "kids": 1},
|
||||||
{"path": "tm/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt tm/curve/points", "visibility": 3},
|
{"path": "tm/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt tm/curve/points", "visibility": 3},
|
||||||
{"path": "tm/alarm", "type": "float", "readonly": false, "cmd": "tt tm/alarm"},
|
{"path": "tm/alarm", "type": "float", "readonly": false, "cmd": "tt tm/alarm"},
|
||||||
{"path": "tm/stddev", "type": "float"},
|
{"path": "tm/stddev", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "tm/raw", "type": "float"},
|
{"path": "tm/raw", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "ts", "type": "float", "kids": 4},
|
{"path": "ts", "type": "float", "readonly": false, "cmd": "run tt", "kids": 4},
|
||||||
{"path": "ts/curve", "type": "text", "readonly": false, "cmd": "tt ts/curve", "kids": 1},
|
{"path": "ts/curve", "type": "text", "readonly": false, "cmd": "tt ts/curve", "kids": 1},
|
||||||
{"path": "ts/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts/curve/points", "visibility": 3},
|
{"path": "ts/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts/curve/points", "visibility": 3},
|
||||||
{"path": "ts/alarm", "type": "float", "readonly": false, "cmd": "tt ts/alarm"},
|
{"path": "ts/alarm", "type": "float", "readonly": false, "cmd": "tt ts/alarm"},
|
||||||
{"path": "ts/stddev", "type": "float"},
|
{"path": "ts/stddev", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "ts/raw", "type": "float"},
|
{"path": "ts/raw", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "ts_2", "type": "float", "visibility": 3, "kids": 4},
|
{"path": "ts_2", "type": "float", "readonly": false, "cmd": "run tt", "kids": 4},
|
||||||
{"path": "ts_2/curve", "type": "text", "readonly": false, "cmd": "tt ts_2/curve", "visibility": 3, "kids": 1},
|
{"path": "ts_2/curve", "type": "text", "readonly": false, "cmd": "tt ts_2/curve", "kids": 1},
|
||||||
{"path": "ts_2/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts_2/curve/points", "visibility": 3},
|
{"path": "ts_2/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt ts_2/curve/points", "visibility": 3},
|
||||||
{"path": "ts_2/alarm", "type": "float", "readonly": false, "cmd": "tt ts_2/alarm", "visibility": 3},
|
{"path": "ts_2/alarm", "type": "float", "readonly": false, "cmd": "tt ts_2/alarm"},
|
||||||
{"path": "ts_2/stddev", "type": "float", "visibility": 3},
|
{"path": "ts_2/stddev", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "ts_2/raw", "type": "float", "visibility": 3},
|
{"path": "ts_2/raw", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "set", "type": "float", "readonly": false, "cmd": "tt set", "kids": 18},
|
{"path": "set", "type": "float", "readonly": false, "cmd": "tt set", "kids": 18},
|
||||||
{"path": "set/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt set/mode"},
|
{"path": "set/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt set/mode"},
|
||||||
{"path": "set/reg", "type": "float"},
|
{"path": "set/reg", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "set/ramp", "type": "float", "readonly": false, "cmd": "tt set/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
{"path": "set/ramp", "type": "float", "readonly": false, "cmd": "tt set/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
||||||
{"path": "set/wramp", "type": "float", "readonly": false, "cmd": "tt set/wramp"},
|
{"path": "set/wramp", "type": "float", "readonly": false, "cmd": "tt set/wramp"},
|
||||||
{"path": "set/smooth", "type": "float", "readonly": false, "cmd": "tt set/smooth", "description": "smooth time (minutes)"},
|
{"path": "set/smooth", "type": "float", "readonly": false, "cmd": "tt set/smooth", "description": "smooth time (minutes)"},
|
||||||
@@ -53,17 +53,17 @@
|
|||||||
{"path": "set/resist", "type": "float", "readonly": false, "cmd": "tt set/resist"},
|
{"path": "set/resist", "type": "float", "readonly": false, "cmd": "tt set/resist"},
|
||||||
{"path": "set/maxheater", "type": "text", "readonly": false, "cmd": "tt set/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
{"path": "set/maxheater", "type": "text", "readonly": false, "cmd": "tt set/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
||||||
{"path": "set/linearpower", "type": "float", "readonly": false, "cmd": "tt set/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
{"path": "set/linearpower", "type": "float", "readonly": false, "cmd": "tt set/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
||||||
{"path": "set/maxpowerlim", "type": "float", "description": "the maximum power limit (before any booster or converter)"},
|
{"path": "set/maxpowerlim", "type": "float", "readonly": false, "cmd": "run tt", "description": "the maximum power limit (before any booster or converter)"},
|
||||||
{"path": "set/maxpower", "type": "float", "readonly": false, "cmd": "tt set/maxpower", "description": "maximum power [W]"},
|
{"path": "set/maxpower", "type": "float", "readonly": false, "cmd": "tt set/maxpower", "description": "maximum power [W]"},
|
||||||
{"path": "set/maxcurrent", "type": "float", "description": "the maximum current before any booster or converter"},
|
{"path": "set/maxcurrent", "type": "float", "readonly": false, "cmd": "run tt", "description": "the maximum current before any booster or converter"},
|
||||||
{"path": "set/manualpower", "type": "float", "readonly": false, "cmd": "tt set/manualpower"},
|
{"path": "set/manualpower", "type": "float", "readonly": false, "cmd": "tt set/manualpower"},
|
||||||
{"path": "set/power", "type": "float"},
|
{"path": "set/power", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "set/prop", "type": "float", "readonly": false, "cmd": "tt set/prop", "description": "bigger means more gain"},
|
{"path": "set/prop", "type": "float", "readonly": false, "cmd": "tt set/prop", "description": "bigger means more gain"},
|
||||||
{"path": "set/integ", "type": "float", "readonly": false, "cmd": "tt set/integ", "description": "bigger means faster"},
|
{"path": "set/integ", "type": "float", "readonly": false, "cmd": "tt set/integ", "description": "bigger means faster"},
|
||||||
{"path": "set/deriv", "type": "float", "readonly": false, "cmd": "tt set/deriv"},
|
{"path": "set/deriv", "type": "float", "readonly": false, "cmd": "tt set/deriv"},
|
||||||
{"path": "setsamp", "type": "float", "readonly": false, "cmd": "tt setsamp", "kids": 18},
|
{"path": "setsamp", "type": "float", "readonly": false, "cmd": "tt setsamp", "kids": 18},
|
||||||
{"path": "setsamp/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt setsamp/mode"},
|
{"path": "setsamp/mode", "type": "enum", "enum": {"disabled": -1, "off": 0, "controlling": 1, "manual": 2}, "readonly": false, "cmd": "tt setsamp/mode"},
|
||||||
{"path": "setsamp/reg", "type": "float"},
|
{"path": "setsamp/reg", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "setsamp/ramp", "type": "float", "readonly": false, "cmd": "tt setsamp/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
{"path": "setsamp/ramp", "type": "float", "readonly": false, "cmd": "tt setsamp/ramp", "description": "maximum ramp in K/min (0: ramp off)"},
|
||||||
{"path": "setsamp/wramp", "type": "float", "readonly": false, "cmd": "tt setsamp/wramp"},
|
{"path": "setsamp/wramp", "type": "float", "readonly": false, "cmd": "tt setsamp/wramp"},
|
||||||
{"path": "setsamp/smooth", "type": "float", "readonly": false, "cmd": "tt setsamp/smooth", "description": "smooth time (minutes)"},
|
{"path": "setsamp/smooth", "type": "float", "readonly": false, "cmd": "tt setsamp/smooth", "description": "smooth time (minutes)"},
|
||||||
@@ -72,16 +72,16 @@
|
|||||||
{"path": "setsamp/resist", "type": "float", "readonly": false, "cmd": "tt setsamp/resist"},
|
{"path": "setsamp/resist", "type": "float", "readonly": false, "cmd": "tt setsamp/resist"},
|
||||||
{"path": "setsamp/maxheater", "type": "text", "readonly": false, "cmd": "tt setsamp/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
{"path": "setsamp/maxheater", "type": "text", "readonly": false, "cmd": "tt setsamp/maxheater", "description": "maximum heater limit, units should be given without space: W, mW, A, mA"},
|
||||||
{"path": "setsamp/linearpower", "type": "float", "readonly": false, "cmd": "tt setsamp/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
{"path": "setsamp/linearpower", "type": "float", "readonly": false, "cmd": "tt setsamp/linearpower", "description": "when not 0, it is the maximum effective power, and the power is linear to the heater output"},
|
||||||
{"path": "setsamp/maxpowerlim", "type": "float", "description": "the maximum power limit (before any booster or converter)"},
|
{"path": "setsamp/maxpowerlim", "type": "float", "readonly": false, "cmd": "run tt", "description": "the maximum power limit (before any booster or converter)"},
|
||||||
{"path": "setsamp/maxpower", "type": "float", "readonly": false, "cmd": "tt setsamp/maxpower", "description": "maximum power [W]"},
|
{"path": "setsamp/maxpower", "type": "float", "readonly": false, "cmd": "tt setsamp/maxpower", "description": "maximum power [W]"},
|
||||||
{"path": "setsamp/maxcurrent", "type": "float", "description": "the maximum current before any booster or converter"},
|
{"path": "setsamp/maxcurrent", "type": "float", "readonly": false, "cmd": "run tt", "description": "the maximum current before any booster or converter"},
|
||||||
{"path": "setsamp/manualpower", "type": "float", "readonly": false, "cmd": "tt setsamp/manualpower"},
|
{"path": "setsamp/manualpower", "type": "float", "readonly": false, "cmd": "tt setsamp/manualpower"},
|
||||||
{"path": "setsamp/power", "type": "float"},
|
{"path": "setsamp/power", "type": "float", "readonly": false, "cmd": "run tt"},
|
||||||
{"path": "setsamp/prop", "type": "float", "readonly": false, "cmd": "tt setsamp/prop", "description": "bigger means more gain"},
|
{"path": "setsamp/prop", "type": "float", "readonly": false, "cmd": "tt setsamp/prop", "description": "bigger means more gain"},
|
||||||
{"path": "setsamp/integ", "type": "float", "readonly": false, "cmd": "tt setsamp/integ", "description": "bigger means faster"},
|
{"path": "setsamp/integ", "type": "float", "readonly": false, "cmd": "tt setsamp/integ", "description": "bigger means faster"},
|
||||||
{"path": "setsamp/deriv", "type": "float", "readonly": false, "cmd": "tt setsamp/deriv"},
|
{"path": "setsamp/deriv", "type": "float", "readonly": false, "cmd": "tt setsamp/deriv"},
|
||||||
{"path": "display", "type": "text", "readonly": false, "cmd": "tt display"},
|
{"path": "display", "type": "text", "readonly": false, "cmd": "tt display"},
|
||||||
{"path": "remote", "type": "bool"}]},
|
{"path": "remote", "type": "bool", "readonly": false, "cmd": "run tt"}]},
|
||||||
|
|
||||||
"cc": {"base": "/cc", "params": [
|
"cc": {"base": "/cc", "params": [
|
||||||
{"path": "", "type": "bool", "kids": 96},
|
{"path": "", "type": "bool", "kids": 96},
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
{"path": "mcr", "type": "float"},
|
{"path": "mcr", "type": "float"},
|
||||||
{"path": "mot", "type": "float"},
|
{"path": "mot", "type": "float"},
|
||||||
{"path": "mw", "type": "float", "readonly": false, "cmd": "cc mw", "description": "correction pulse after automatic open"},
|
{"path": "mw", "type": "float", "readonly": false, "cmd": "cc mw", "description": "correction pulse after automatic open"},
|
||||||
{"path": "hav", "type": "enum", "enum": {"none": 0, "int": 1, "ext": 2}, "readonly": false, "cmd": "cc hav"},
|
{"path": "hav", "type": "enum", "type": "enum", "enum": {"none": 0, "int": 1, "ext": 2}, "readonly": false, "cmd": "cc hav"},
|
||||||
{"path": "h", "type": "float"},
|
{"path": "h", "type": "float"},
|
||||||
{"path": "hr", "type": "float"},
|
{"path": "hr", "type": "float"},
|
||||||
{"path": "hc", "type": "float"},
|
{"path": "hc", "type": "float"},
|
||||||
@@ -132,26 +132,26 @@
|
|||||||
{"path": "hms", "type": "float"},
|
{"path": "hms", "type": "float"},
|
||||||
{"path": "hit", "type": "float", "readonly": false, "cmd": "cc hit"},
|
{"path": "hit", "type": "float", "readonly": false, "cmd": "cc hit"},
|
||||||
{"path": "hft", "type": "int", "readonly": false, "cmd": "cc hft"},
|
{"path": "hft", "type": "int", "readonly": false, "cmd": "cc hft"},
|
||||||
{"path": "hea", "type": "enum", "enum": {"0": 0, "1": 1, "6": 6}, "readonly": false, "cmd": "cc hea"},
|
{"path": "hea", "type": "enum", "enum": {"0": 0, "1": 1, "6": 2}, "readonly": false, "cmd": "cc hea"},
|
||||||
{"path": "hch", "type": "int", "readonly": false, "cmd": "cc hch"},
|
{"path": "hch", "type": "int", "readonly": false, "cmd": "cc hch", "visibility": 3},
|
||||||
{"path": "hwr0", "type": "float", "readonly": false, "cmd": "cc hwr0"},
|
{"path": "hwr0", "type": "float", "readonly": false, "cmd": "cc hwr0", "visibility": 3},
|
||||||
{"path": "hem0", "type": "float", "readonly": false, "cmd": "cc hem0", "description": "sensor length in mm from top to empty pos."},
|
{"path": "hem0", "type": "float", "readonly": false, "cmd": "cc hem0", "description": "sensor length in mm from top to empty pos.", "visibility": 3},
|
||||||
{"path": "hfu0", "type": "float", "readonly": false, "cmd": "cc hfu0", "description": "sensor length in mm from top to full pos."},
|
{"path": "hfu0", "type": "float", "readonly": false, "cmd": "cc hfu0", "description": "sensor length in mm from top to full pos.", "visibility": 3},
|
||||||
{"path": "hd0", "type": "float", "readonly": false, "cmd": "cc hd0", "description": "external sensor drive current (mA)"},
|
{"path": "hd0", "type": "float", "readonly": false, "cmd": "cc hd0", "description": "external sensor drive current (mA)", "visibility": 3},
|
||||||
{"path": "h0", "type": "float"},
|
{"path": "h0", "type": "float", "visibility": 3},
|
||||||
{"path": "hs0", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
{"path": "hs0", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||||
{"path": "h1", "type": "float"},
|
{"path": "h1", "type": "float", "visibility": 3},
|
||||||
{"path": "hs1", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
{"path": "hs1", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||||
{"path": "h2", "type": "float"},
|
{"path": "h2", "type": "float", "visibility": 3},
|
||||||
{"path": "hs2", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
{"path": "hs2", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||||
{"path": "h3", "type": "float"},
|
{"path": "h3", "type": "float", "visibility": 3},
|
||||||
{"path": "hs3", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
{"path": "hs3", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||||
{"path": "h4", "type": "float"},
|
{"path": "h4", "type": "float", "visibility": 3},
|
||||||
{"path": "hs4", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
{"path": "hs4", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||||
{"path": "h5", "type": "float"},
|
{"path": "h5", "type": "float", "visibility": 3},
|
||||||
{"path": "hs5", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}},
|
{"path": "hs5", "type": "enum", "enum": {"sens_ok": 0, "sens_warm": 1, "no_sens": 2, "timeout": 3, "not_yet_read": 4, "disabled": 5}, "visibility": 3},
|
||||||
{"path": "hfb", "type": "float"},
|
{"path": "hfb", "type": "float"},
|
||||||
{"path": "nav", "type": "bool", "readonly": false, "cmd": "cc nav"},
|
{"path": "nav", "type": "enum", "type": "enum", "enum": {"none": 0, "int": 1, "ext": 2}, "readonly": false, "cmd": "cc nav"},
|
||||||
{"path": "nu", "type": "float"},
|
{"path": "nu", "type": "float"},
|
||||||
{"path": "nl", "type": "float"},
|
{"path": "nl", "type": "float"},
|
||||||
{"path": "nth", "type": "float", "readonly": false, "cmd": "cc nth"},
|
{"path": "nth", "type": "float", "readonly": false, "cmd": "cc nth"},
|
||||||
@@ -183,16 +183,15 @@
|
|||||||
{"path": "bdl", "type": "float", "readonly": false, "cmd": "cc bdl"}]},
|
{"path": "bdl", "type": "float", "readonly": false, "cmd": "cc bdl"}]},
|
||||||
|
|
||||||
"nv": {"base": "/nv", "params": [
|
"nv": {"base": "/nv", "params": [
|
||||||
{"path": "", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "close": 3, "open": 4}, "readonly": false, "cmd": "nv", "kids": 12},
|
{"path": "", "type": "enum", "enum": {"fixed": 0, "controlled": 1, "automatic": 2, "close": 3, "open": 4}, "readonly": false, "cmd": "nv", "kids": 11},
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "nv send", "visibility": 3},
|
{"path": "send", "type": "text", "readonly": false, "cmd": "nv send", "visibility": 3},
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
{"path": "status", "type": "text", "visibility": 3},
|
||||||
{"path": "motstat", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
{"path": "motstat", "type": "enum", "enum": {"idle": 0, "opening": 1, "closing": 2, "opened": 3, "closed": 4, "no_motor": 5}},
|
||||||
{"path": "flow", "type": "float"},
|
{"path": "flow", "type": "float"},
|
||||||
{"path": "set", "type": "float", "readonly": false, "cmd": "nv set"},
|
{"path": "set", "type": "float", "readonly": false, "cmd": "nv set"},
|
||||||
{"path": "flowmax", "type": "float", "readonly": false, "cmd": "nv flowmax"},
|
{"path": "flowmax", "type": "float", "readonly": false, "cmd": "nv flowmax"},
|
||||||
{"path": "flowp", "type": "float", "description": "flow calculated from pressure before pump"},
|
{"path": "flowp", "type": "float"},
|
||||||
{"path": "span", "type": "float"},
|
{"path": "span", "type": "float"},
|
||||||
{"path": "use_pressure", "type": "bool", "readonly": false, "cmd": "nv use_pressure", "description": "use pressure instead of flow meter for control"},
|
|
||||||
{"path": "ctrl", "type": "none", "kids": 13},
|
{"path": "ctrl", "type": "none", "kids": 13},
|
||||||
{"path": "ctrl/regtext", "type": "text"},
|
{"path": "ctrl/regtext", "type": "text"},
|
||||||
{"path": "ctrl/prop_o", "type": "float", "readonly": false, "cmd": "nv ctrl/prop_o", "description": "prop [sec/mbar] when opening. above 4 mbar a 10 times lower value is used"},
|
{"path": "ctrl/prop_o", "type": "float", "readonly": false, "cmd": "nv ctrl/prop_o", "description": "prop [sec/mbar] when opening. above 4 mbar a 10 times lower value is used"},
|
||||||
@@ -236,34 +235,15 @@
|
|||||||
{"path": "calib/ln_per_min_per_mbar", "type": "float", "readonly": false, "cmd": "nv calib/ln_per_min_per_mbar"},
|
{"path": "calib/ln_per_min_per_mbar", "type": "float", "readonly": false, "cmd": "nv calib/ln_per_min_per_mbar"},
|
||||||
{"path": "calib/mbar_offset", "type": "float", "readonly": false, "cmd": "nv calib/mbar_offset"}]},
|
{"path": "calib/mbar_offset", "type": "float", "readonly": false, "cmd": "nv calib/mbar_offset"}]},
|
||||||
|
|
||||||
"hefill": {"base": "/hefill", "params": [
|
|
||||||
{"path": "", "type": "enum", "enum": {"watching": 0, "filling": 1, "inactive": 2, "manualfill": 3}, "readonly": false, "cmd": "hefill", "kids": 16},
|
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hefill send", "visibility": 3},
|
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
|
||||||
{"path": "state", "type": "text"},
|
|
||||||
{"path": "readpath", "type": "text", "readonly": false, "cmd": "hefill readpath", "visibility": 3},
|
|
||||||
{"path": "lowlevel", "type": "float", "readonly": false, "cmd": "hefill lowlevel"},
|
|
||||||
{"path": "highlevel", "type": "float", "readonly": false, "cmd": "hefill highlevel"},
|
|
||||||
{"path": "smooth", "type": "float"},
|
|
||||||
{"path": "minfillminutes", "type": "float", "readonly": false, "cmd": "hefill minfillminutes"},
|
|
||||||
{"path": "maxfillminutes", "type": "float", "readonly": false, "cmd": "hefill maxfillminutes"},
|
|
||||||
{"path": "minholdhours", "type": "float", "readonly": false, "cmd": "hefill minholdhours"},
|
|
||||||
{"path": "maxholdhours", "type": "float", "readonly": false, "cmd": "hefill maxholdhours"},
|
|
||||||
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "hefill tolerance"},
|
|
||||||
{"path": "badreadingminutes", "type": "float", "readonly": false, "cmd": "hefill badreadingminutes"},
|
|
||||||
{"path": "tubecoolingminutes", "type": "float", "readonly": false, "cmd": "hefill tubecoolingminutes"},
|
|
||||||
{"path": "vessellimit", "type": "float", "readonly": false, "cmd": "hefill vessellimit"},
|
|
||||||
{"path": "vext", "type": "float"}]},
|
|
||||||
|
|
||||||
"hepump": {"base": "/hepump", "params": [
|
"hepump": {"base": "/hepump", "params": [
|
||||||
{"path": "", "type": "enum", "enum": {"neodry": 8, "xds35_auto": 0, "xds35_manual": 1, "sv65": 2, "other": 3, "no": -1}, "readonly": false, "cmd": "hepump", "description": "xds35: scroll pump, sv65: leybold", "kids": 10},
|
{"path": "", "type": "enum", "enum": {"neodry": 8, "xds35_auto": 0, "xds35_manual": 1, "sv65": 2, "other": 3, "no": -1}, "readonly": false, "cmd": "hepump", "description": "xds35: scroll pump, sv65: leybold", "kids": 10},
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "hepump send", "visibility": 3},
|
{"path": "send", "type": "text", "readonly": false, "cmd": "hepump send", "visibility": 3},
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
{"path": "status", "type": "text", "visibility": 3},
|
||||||
{"path": "running", "type": "bool", "readonly": false, "cmd": "hepump running"},
|
{"path": "running", "type": "bool", "readonly": false, "cmd": "hepump running"},
|
||||||
{"path": "eco", "type": "bool", "readonly": false, "cmd": "hepump eco", "visibility": 3},
|
{"path": "eco", "type": "bool", "readonly": false, "cmd": "hepump eco"},
|
||||||
{"path": "auto", "type": "bool", "readonly": false, "cmd": "hepump auto", "visibility": 3},
|
{"path": "auto", "type": "bool", "readonly": false, "cmd": "hepump auto"},
|
||||||
{"path": "valve", "type": "enum", "enum": {"closed": 0, "closing": 1, "opening": 2, "opened": 3, "undefined": 4}, "readonly": false, "cmd": "hepump valve"},
|
{"path": "valve", "type": "enum", "enum": {"closed": 0, "closing": 1, "opening": 2, "opened": 3, "undefined": 4}, "readonly": false, "cmd": "hepump valve"},
|
||||||
{"path": "eco_t_lim", "type": "float", "readonly": false, "cmd": "hepump eco_t_lim", "description": "switch off eco mode when T_set < eco_t_lim and T < eco_t_lim * 2", "visibility": 3},
|
{"path": "eco_t_lim", "type": "float", "readonly": false, "cmd": "hepump eco_t_lim", "description": "switch off eco mode when T_set < eco_t_lim and T < eco_t_lim * 2"},
|
||||||
{"path": "calib", "type": "float", "readonly": false, "cmd": "hepump calib", "visibility": 3},
|
{"path": "calib", "type": "float", "readonly": false, "cmd": "hepump calib", "visibility": 3},
|
||||||
{"path": "health", "type": "float"}]},
|
{"path": "health", "type": "float"}]},
|
||||||
|
|
||||||
@@ -311,11 +291,11 @@
|
|||||||
{"path": "save", "type": "bool", "readonly": false, "cmd": "nvflow save", "description": "unchecked: current calib is not saved. set checked: save calib"}]},
|
{"path": "save", "type": "bool", "readonly": false, "cmd": "nvflow save", "description": "unchecked: current calib is not saved. set checked: save calib"}]},
|
||||||
|
|
||||||
"ln2fill": {"base": "/ln2fill", "params": [
|
"ln2fill": {"base": "/ln2fill", "params": [
|
||||||
{"path": "", "type": "enum", "enum": {"watching": 0, "filling": 1, "inactive": 2, "manualfill": 3}, "readonly": false, "cmd": "ln2fill", "kids": 14},
|
{"path": "", "type": "enum", "enum": {"watching": 0, "fill": 1, "inactive": 2}, "readonly": false, "cmd": "ln2fill", "kids": 14},
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "ln2fill send", "visibility": 3},
|
{"path": "send", "type": "text", "readonly": false, "cmd": "ln2fill send", "visibility": 3},
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
{"path": "status", "type": "text", "visibility": 3},
|
||||||
{"path": "state", "type": "text"},
|
{"path": "state", "type": "text"},
|
||||||
{"path": "readpath", "type": "text", "readonly": false, "cmd": "ln2fill readpath", "visibility": 3},
|
{"path": "readlevel", "type": "text", "readonly": false, "cmd": "ln2fill readlevel", "visibility": 3},
|
||||||
{"path": "lowlevel", "type": "float", "readonly": false, "cmd": "ln2fill lowlevel"},
|
{"path": "lowlevel", "type": "float", "readonly": false, "cmd": "ln2fill lowlevel"},
|
||||||
{"path": "highlevel", "type": "float", "readonly": false, "cmd": "ln2fill highlevel"},
|
{"path": "highlevel", "type": "float", "readonly": false, "cmd": "ln2fill highlevel"},
|
||||||
{"path": "smooth", "type": "float"},
|
{"path": "smooth", "type": "float"},
|
||||||
@@ -327,33 +307,52 @@
|
|||||||
{"path": "badreadingminutes", "type": "float", "readonly": false, "cmd": "ln2fill badreadingminutes"},
|
{"path": "badreadingminutes", "type": "float", "readonly": false, "cmd": "ln2fill badreadingminutes"},
|
||||||
{"path": "tubecoolingminutes", "type": "float", "readonly": false, "cmd": "ln2fill tubecoolingminutes"}]},
|
{"path": "tubecoolingminutes", "type": "float", "readonly": false, "cmd": "ln2fill tubecoolingminutes"}]},
|
||||||
|
|
||||||
|
"hefill": {"base": "/hefill", "params": [
|
||||||
|
{"path": "", "type": "enum", "enum": {"watching": 0, "fill": 1, "inactive": 2}, "readonly": false, "cmd": "hefill", "kids": 16},
|
||||||
|
{"path": "send", "type": "text", "readonly": false, "cmd": "hefill send", "visibility": 3},
|
||||||
|
{"path": "status", "type": "text", "visibility": 3},
|
||||||
|
{"path": "state", "type": "text"},
|
||||||
|
{"path": "readlevel", "type": "text", "readonly": false, "cmd": "hefill readlevel", "visibility": 3},
|
||||||
|
{"path": "lowlevel", "type": "float", "readonly": false, "cmd": "hefill lowlevel"},
|
||||||
|
{"path": "highlevel", "type": "float", "readonly": false, "cmd": "hefill highlevel"},
|
||||||
|
{"path": "smooth", "type": "float"},
|
||||||
|
{"path": "minfillminutes", "type": "float", "readonly": false, "cmd": "hefill minfillminutes"},
|
||||||
|
{"path": "maxfillminutes", "type": "float", "readonly": false, "cmd": "hefill maxfillminutes"},
|
||||||
|
{"path": "minholdhours", "type": "float", "readonly": false, "cmd": "hefill minholdhours"},
|
||||||
|
{"path": "maxholdhours", "type": "float", "readonly": false, "cmd": "hefill maxholdhours"},
|
||||||
|
{"path": "tolerance", "type": "float", "readonly": false, "cmd": "hefill tolerance"},
|
||||||
|
{"path": "badreadingminutes", "type": "float", "readonly": false, "cmd": "hefill badreadingminutes"},
|
||||||
|
{"path": "tubecoolingminutes", "type": "float", "readonly": false, "cmd": "hefill tubecoolingminutes"},
|
||||||
|
{"path": "vessellimit", "type": "float", "readonly": false, "cmd": "hefill vessellimit"},
|
||||||
|
{"path": "vext", "type": "float"}]},
|
||||||
|
|
||||||
"mf": {"base": "/mf", "params": [
|
"mf": {"base": "/mf", "params": [
|
||||||
{"path": "", "type": "float", "readonly": false, "cmd": "run mf", "kids": 26},
|
{"path": "", "type": "float", "readonly": false, "cmd": "run mf", "kids": 26},
|
||||||
{"path": "persmode", "type": "int", "readonly": false, "cmd": "mf persmode"},
|
{"path": "persmode", "type": "int", "readonly": false, "cmd": "mf persmode"},
|
||||||
{"path": "perswitch", "type": "int"},
|
{"path": "perswitch", "type": "int", "readonly": false, "cmd": "run mf"},
|
||||||
{"path": "nowait", "type": "int", "readonly": false, "cmd": "mf nowait"},
|
{"path": "nowait", "type": "int", "readonly": false, "cmd": "mf nowait"},
|
||||||
{"path": "maxlimit", "type": "float", "visibility": 3},
|
{"path": "maxlimit", "type": "float", "readonly": false, "cmd": "run mf", "visibility": 3},
|
||||||
{"path": "limit", "type": "float", "readonly": false, "cmd": "mf limit"},
|
{"path": "limit", "type": "float", "readonly": false, "cmd": "mf limit"},
|
||||||
{"path": "ramp", "type": "float", "readonly": false, "cmd": "mf ramp"},
|
{"path": "ramp", "type": "float", "readonly": false, "cmd": "mf ramp"},
|
||||||
{"path": "perscurrent", "type": "float", "readonly": false, "cmd": "mf perscurrent"},
|
{"path": "perscurrent", "type": "float", "readonly": false, "cmd": "mf perscurrent"},
|
||||||
{"path": "perslimit", "type": "float", "readonly": false, "cmd": "mf perslimit"},
|
{"path": "perslimit", "type": "float", "readonly": false, "cmd": "mf perslimit"},
|
||||||
{"path": "perswait", "type": "int", "readonly": false, "cmd": "mf perswait"},
|
{"path": "perswait", "type": "int", "readonly": false, "cmd": "mf perswait"},
|
||||||
{"path": "persdelay", "type": "int", "readonly": false, "cmd": "mf persdelay"},
|
{"path": "persdelay", "type": "int", "readonly": false, "cmd": "mf persdelay"},
|
||||||
{"path": "current", "type": "float"},
|
{"path": "current", "type": "float", "readonly": false, "cmd": "run mf"},
|
||||||
{"path": "measured", "type": "float"},
|
{"path": "measured", "type": "float", "readonly": false, "cmd": "run mf"},
|
||||||
{"path": "voltage", "type": "float"},
|
{"path": "voltage", "type": "float", "readonly": false, "cmd": "run mf"},
|
||||||
{"path": "lastfield", "type": "float", "visibility": 3},
|
{"path": "lastfield", "type": "float", "readonly": false, "cmd": "run mf", "visibility": 3},
|
||||||
{"path": "ampRamp", "type": "float", "visibility": 3},
|
{"path": "ampRamp", "type": "float", "readonly": false, "cmd": "run mf", "visibility": 3},
|
||||||
{"path": "inductance", "type": "float", "visibility": 3},
|
{"path": "inductance", "type": "float", "readonly": false, "cmd": "run mf", "visibility": 3},
|
||||||
{"path": "trainedTo", "type": "float", "readonly": false, "cmd": "mf trainedTo"},
|
{"path": "trainedTo", "type": "float", "readonly": false, "cmd": "mf trainedTo"},
|
||||||
{"path": "trainMode", "type": "int"},
|
{"path": "trainMode", "type": "int", "readonly": false, "cmd": "run mf"},
|
||||||
{"path": "external", "type": "int", "readonly": false, "cmd": "mf external"},
|
{"path": "external", "type": "int", "readonly": false, "cmd": "mf external"},
|
||||||
{"path": "startScript", "type": "text", "readonly": false, "cmd": "mf startScript", "visibility": 3},
|
{"path": "startScript", "type": "text", "readonly": false, "cmd": "mf startScript", "visibility": 3},
|
||||||
{"path": "is_running", "type": "int", "readonly": false, "cmd": "mf is_running", "visibility": 3},
|
{"path": "is_running", "type": "int", "readonly": false, "cmd": "run mf", "visibility": 3},
|
||||||
{"path": "verbose", "type": "int", "readonly": false, "cmd": "mf verbose", "visibility": 3},
|
{"path": "verbose", "type": "int", "readonly": false, "cmd": "mf verbose", "visibility": 3},
|
||||||
{"path": "driver", "type": "text", "visibility": 3},
|
{"path": "driver", "type": "text", "readonly": false, "cmd": "run mf", "visibility": 3},
|
||||||
{"path": "creationCmd", "type": "text", "visibility": 3},
|
{"path": "creationCmd", "type": "text", "readonly": false, "cmd": "run mf", "visibility": 3},
|
||||||
{"path": "targetValue", "type": "float"},
|
{"path": "targetValue", "type": "float", "readonly": false, "cmd": "run mf"},
|
||||||
{"path": "status", "type": "text", "readonly": false, "cmd": "mf status", "visibility": 3}]},
|
{"path": "status", "type": "text", "readonly": false, "cmd": "mf status", "visibility": 3}]},
|
||||||
|
|
||||||
"lev": {"base": "/lev", "params": [
|
"lev": {"base": "/lev", "params": [
|
||||||
@@ -363,22 +362,7 @@
|
|||||||
{"path": "mode", "type": "enum", "enum": {"slow": 0, "fast (switches to slow automatically after filling)": 1}, "readonly": false, "cmd": "lev mode"},
|
{"path": "mode", "type": "enum", "enum": {"slow": 0, "fast (switches to slow automatically after filling)": 1}, "readonly": false, "cmd": "lev mode"},
|
||||||
{"path": "n2", "type": "float"}]},
|
{"path": "n2", "type": "float"}]},
|
||||||
|
|
||||||
"table": {"base": "/table", "params": [
|
"prep0": {"base": "/prep0", "params": [
|
||||||
{"path": "", "type": "none", "kids": 17},
|
{"path": "", "type": "text", "readonly": false, "cmd": "prep0", "kids": 2},
|
||||||
{"path": "send", "type": "text", "readonly": false, "cmd": "table send", "visibility": 3},
|
{"path": "send", "type": "text", "readonly": false, "cmd": "prep0 send", "visibility": 3},
|
||||||
{"path": "status", "type": "text", "visibility": 3},
|
{"path": "status", "type": "text", "visibility": 3}]}}
|
||||||
{"path": "fix_tt_set_prop", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_prop"},
|
|
||||||
{"path": "val_tt_set_prop", "type": "float"},
|
|
||||||
{"path": "tbl_tt_set_prop", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_prop", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
|
||||||
{"path": "fix_tt_set_integ", "type": "bool", "readonly": false, "cmd": "table fix_tt_set_integ"},
|
|
||||||
{"path": "val_tt_set_integ", "type": "float"},
|
|
||||||
{"path": "tbl_tt_set_integ", "type": "text", "readonly": false, "cmd": "table tbl_tt_set_integ", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
|
||||||
{"path": "fix_tt_dblctrl_int2", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_int2"},
|
|
||||||
{"path": "val_tt_dblctrl_int2", "type": "float"},
|
|
||||||
{"path": "tbl_tt_dblctrl_int2", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_int2", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
|
||||||
{"path": "fix_tt_dblctrl_prop_up", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_prop_up"},
|
|
||||||
{"path": "val_tt_dblctrl_prop_up", "type": "float"},
|
|
||||||
{"path": "tbl_tt_dblctrl_prop_up", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_prop_up", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."},
|
|
||||||
{"path": "fix_tt_dblctrl_prop_lo", "type": "bool", "readonly": false, "cmd": "table fix_tt_dblctrl_prop_lo"},
|
|
||||||
{"path": "val_tt_dblctrl_prop_lo", "type": "float"},
|
|
||||||
{"path": "tbl_tt_dblctrl_prop_lo", "type": "text", "readonly": false, "cmd": "table tbl_tt_dblctrl_prop_lo", "description": "enter value pair separated with colon T1:par1 T2:par2 ..."}]}}
|
|
||||||
|
|||||||
@@ -1,149 +0,0 @@
|
|||||||
Node('sim_dil_test.test',
|
|
||||||
'simulated dil4 state machine test',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V1',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'condense valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V2',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'circuitshort valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V3',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'circuitshort valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V4',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'still valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V5',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'still valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V7',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'dump valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V8',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'dump valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V9',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'dump valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V10',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'dump valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V11A',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'dump valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V12A',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'dump valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V13A',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'dump valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('pump_He3',
|
|
||||||
'frappy_psi.sim_dil.Valve',
|
|
||||||
'rotary_pump_He3',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V14',
|
|
||||||
'frappy_psi.sim_dil.PulsedValve',
|
|
||||||
'pulsed valve',
|
|
||||||
value='close',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('V6_motor',
|
|
||||||
'frappy_psi.sim_dil.Sensor',
|
|
||||||
'motor valve',
|
|
||||||
value=Param(0.0, unit='%'),
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('G1',
|
|
||||||
'frappy_psi.sim_dil.Sensor',
|
|
||||||
'condensline pressure',
|
|
||||||
value=Param(0, unit='mbar')
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('G3',
|
|
||||||
'frappy_psi.sim_dil.Sensor',
|
|
||||||
'dump pressure',
|
|
||||||
value=Param(0, unit='mbar')
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('P1',
|
|
||||||
'frappy_psi.sim_dil.Sensor',
|
|
||||||
'still pressure',
|
|
||||||
value=Param(0, unit='mbar')
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('T_oneK',
|
|
||||||
'frappy_psi.sim_dil.Sensor',
|
|
||||||
'temp one Kelvin chamber',
|
|
||||||
value=Param(4, unit='K'),
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('T_still',
|
|
||||||
'frappy_psi.sim_dil.Sensor',
|
|
||||||
'temp still chamber',
|
|
||||||
value=Param(4, unit='K'),
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('T_mix',
|
|
||||||
'frappy_psi.sim_dil.Sensor',
|
|
||||||
'temp mix chamber',
|
|
||||||
value=Param(4, unit='K'),
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('dil',
|
|
||||||
'frappy_psi.dilution_new.DIL4',
|
|
||||||
'dilution state machine',
|
|
||||||
condenseline_pressure='G1', # G1
|
|
||||||
condense_valve='V1', # V1
|
|
||||||
dump_valve='V9', # V9
|
|
||||||
forepump='pump_He3', # rotary_pump_He3 (24)
|
|
||||||
condenseline_valve='V1', # V1
|
|
||||||
circuitshort_valve='V3', # V3
|
|
||||||
still_valve='V6_motor', # V6
|
|
||||||
pumpout_valve='V14', # V14
|
|
||||||
still_pressure='P1', # P1
|
|
||||||
dump_pressure='G3', # G3
|
|
||||||
oneK_temp='T_oneK',
|
|
||||||
still_temp='T_still',
|
|
||||||
mix_temp='T_mix',
|
|
||||||
sorb_pump_time=30,
|
|
||||||
)
|
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
# pylint: skip-file
|
# pylint: skip-file
|
||||||
Node('ccr12',
|
Node('ccr12',
|
||||||
'[sim] CCR12 box of MLZ Sample environment group\n'
|
'[sim] CCR12 box of MLZ Sample environment group'
|
||||||
'\n'
|
''
|
||||||
'Contains a Lakeshore 336 and an PLC controlling the compressor\n'
|
'Contains a Lakeshore 336 and an PLC controlling the compressor'
|
||||||
'and some valves.\n'
|
'and some valves.'
|
||||||
'\n'
|
''
|
||||||
'This is an improved version, how we think it should be.\n',
|
'This is an improved version, how we think it should be.',
|
||||||
'tcp://10767',
|
'tcp://10767',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('T_ccr12',
|
Mod('T_ccr12',
|
||||||
'frappy.simulation.SimDrivable',
|
'frappy.simulation.SimDrivable',
|
||||||
'Main temperature control node of CCR12.\n'
|
'Main temperature control node of CCR12.'
|
||||||
'\n'
|
''
|
||||||
'Switches between regulation on stick and regulation on tube depending on temperature requested.\n'
|
'Switches between regulation on stick and regulation on tube depending on temperature requested.'
|
||||||
'May also pump gas for higher temperatures, if configured.\n'
|
'May also pump gas for higher temperatures, if configured.'
|
||||||
'Manual switching of the regulation node is supported via the regulationmode parameter.',
|
'Manual switching of the regulation node is supported via the regulationmode parameter.',
|
||||||
value = Param(default=300,
|
value = Param(default=300,
|
||||||
datatype={"type":"double", "min":0, "max":600, "unit":"K"}),
|
datatype={"type":"double", "min":0, "max":600, "unit":"K"}),
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ Mod('T',
|
|||||||
'frappy_psi.softcal.Sensor',
|
'frappy_psi.softcal.Sensor',
|
||||||
'temperature sensor, soft calibration',
|
'temperature sensor, soft calibration',
|
||||||
rawsensor='res',
|
rawsensor='res',
|
||||||
calcurve='X132254',
|
calib='X132254',
|
||||||
value=Param(
|
value=Param(
|
||||||
unit='K',
|
unit='K',
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -16,5 +16,5 @@ Mod('T2',
|
|||||||
'',
|
'',
|
||||||
value = Param(unit = 'K'),
|
value = Param(unit = 'K'),
|
||||||
rawsensor = 'r2',
|
rawsensor = 'r2',
|
||||||
calcurve = 'X131346',
|
calib = 'X131346',
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -43,5 +43,5 @@ Mod('ts',
|
|||||||
'calibrated value for ts',
|
'calibrated value for ts',
|
||||||
value = Param(unit = 'K'),
|
value = Param(unit = 'K'),
|
||||||
rawsensor = 'tsraw',
|
rawsensor = 'tsraw',
|
||||||
calcurve = 'X133834',
|
calib = 'X133834',
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
Node('fibrestick.psi.ch',
|
|
||||||
'stick with laser fibre',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('sea_stick',
|
|
||||||
'frappy_psi.sea.SeaClient',
|
|
||||||
'SEA stick connection',
|
|
||||||
config='fibre.stick',
|
|
||||||
service='stick',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('ts',
|
|
||||||
'frappy_psi.sea.SeaReadable', '',
|
|
||||||
meaning=['temperature', 30],
|
|
||||||
io='sea_stick',
|
|
||||||
sea_object='tt',
|
|
||||||
json_file='ma11.config.json',
|
|
||||||
rel_paths=['ts'],
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('laser_io',
|
|
||||||
'frappy_psi.pdld.IO',
|
|
||||||
'laser IO',
|
|
||||||
uri='serial:///dev/serial/by-path/pci-0000:00:14.0-usb-0:4.4.4.2:1.0-port0?baudrate=9600',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('laser',
|
|
||||||
'frappy_psi.pdld.Laser',
|
|
||||||
'laser switch',
|
|
||||||
io='laser_io',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('laser_power',
|
|
||||||
'frappy_psi.pdld.LaserPower',
|
|
||||||
'laser power',
|
|
||||||
io='laser_io',
|
|
||||||
)
|
|
||||||
@@ -38,6 +38,6 @@ Mod('T_sample',
|
|||||||
output_module='htr_sample',
|
output_module='htr_sample',
|
||||||
p=1,
|
p=1,
|
||||||
i=0.01,
|
i=0.01,
|
||||||
calcurve='X161269',
|
calib='X161269',
|
||||||
value=Param(unit='K'),
|
value=Param(unit='K'),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,23 +9,10 @@ Mod('sea_stick',
|
|||||||
service='stick',
|
service='stick',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('ts_sea',
|
|
||||||
'frappy_psi.sea.SeaReadable',
|
|
||||||
'readable sample stick T',
|
|
||||||
io='sea_stick',
|
|
||||||
json_file='ma7.config.json',
|
|
||||||
sea_object='tt',
|
|
||||||
rel_paths=['ts', 'setsamp'],
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('ts',
|
Mod('ts',
|
||||||
'frappy_psi.parmod.Converging',
|
'frappy_psi.sea.SeaReadable', '',
|
||||||
'drivable stick T using setsamp',
|
meaning=['temperature', 30],
|
||||||
unit='K',
|
io='sea_stick',
|
||||||
read='ts_sea.value',
|
sea_path='tt/ts',
|
||||||
write='ts_sea.setsamp',
|
json_file='ma7.config.json',
|
||||||
meaning=['temperature', 20],
|
|
||||||
settling_time=20,
|
|
||||||
tolerance=1,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +1,3 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
Node('mb11.stick.sea.psi.ch',
|
Node('mb11.stick.sea.psi.ch',
|
||||||
'MB11 standard sample stick (do not use)',
|
'MB11 standard sample stick (do not use)',
|
||||||
)
|
)
|
||||||
|
|
||||||
frappy_main_port = os.environ.get('FRAPPY_MAIN_PORT', 0)
|
|
||||||
|
|
||||||
Mod('itc1_',
|
|
||||||
'frappy.core.Proxy',
|
|
||||||
'itc1 on main frappy server',
|
|
||||||
remote_class = 'frappy_psi.mercury.IO',
|
|
||||||
uri = f'tcp://localhost:{frappy_main_port}',
|
|
||||||
module='itc1',
|
|
||||||
# export = False,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
Mod('T_sample',
|
|
||||||
'frappy_psi.mercury.TemperatureLoop',
|
|
||||||
'T at sample stick sensor',
|
|
||||||
meaning=['temperature', 30],
|
|
||||||
io='itc1_',
|
|
||||||
slot='MB1.T1',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('htr_sample',
|
|
||||||
'frappy_psi.mercury.HeaterOutput',
|
|
||||||
'sample stick heater power',
|
|
||||||
slot='MB0.H1',
|
|
||||||
io='itc1_',
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
Node('mspare.stick.sea.psi.ch',
|
|
||||||
'MA generic sample stick',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('sea_stick',
|
|
||||||
'frappy_psi.sea.SeaClient',
|
|
||||||
'SEA stick connection',
|
|
||||||
config='mspare.stick',
|
|
||||||
service='stick',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('ts',
|
|
||||||
'frappy_psi.sea.SeaReadable',
|
|
||||||
'sample stick temperature',
|
|
||||||
io='sea_stick',
|
|
||||||
json_file='ma6.config.json',
|
|
||||||
sea_object='tt',
|
|
||||||
rel_paths=['ts', 'setsamp'],
|
|
||||||
meaning=['temperature', 30],
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
Mod('ts',
|
|
||||||
'frappy_psi.parmod.Converging',
|
|
||||||
'drivable stick T using setsamp',
|
|
||||||
meaning=['temperature', 25],
|
|
||||||
unit='K',
|
|
||||||
read='tsam.value',
|
|
||||||
write='tsam.setsamp',
|
|
||||||
settling_time=20,
|
|
||||||
tolerance=1,
|
|
||||||
)
|
|
||||||
"""
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
Node('tcstest.psi.ch',
|
|
||||||
'heater tcs test',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('io',
|
|
||||||
'frappy_psi.tcs.IO',
|
|
||||||
'tcs communication',
|
|
||||||
uri='linse-leiden-ts:3005',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('still_htr',
|
|
||||||
'frappy_psi.tcs.Heater',
|
|
||||||
'still heater',
|
|
||||||
io='io',
|
|
||||||
channel=2,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('mix_htr',
|
|
||||||
'frappy_psi.tcs.Heater',
|
|
||||||
'mixing chamber heater',
|
|
||||||
io='io',
|
|
||||||
channel=3,
|
|
||||||
)
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
Node('softcal.function.test',
|
|
||||||
'test the function class',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('sim_writable',
|
|
||||||
'frappy_demo.test.SimpleWritable',
|
|
||||||
'simulation of a writable for function test',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('function',
|
|
||||||
'frappy_psi.softcal.Function',
|
|
||||||
'function test',
|
|
||||||
rawsensor = 'sim_writable',
|
|
||||||
)
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
Node('test_ips.psi.ch',
|
|
||||||
'ips test',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('io',
|
|
||||||
'frappy_psi.oiclassic.IPS_IO',
|
|
||||||
'',
|
|
||||||
uri='ma11-ts:3002',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('B',
|
|
||||||
'frappy_psi.oiclassic.Field',
|
|
||||||
'magnetic field',
|
|
||||||
io='io',
|
|
||||||
target=Param(max=0.2),
|
|
||||||
)
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
Node('thermofischer.psi.ch',
|
|
||||||
'thermofischer_waterbath',
|
|
||||||
'tcp://5000',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('wio_1',
|
|
||||||
'frappy_psi.thermofisher.ThermFishIO',
|
|
||||||
'connection for water bath',
|
|
||||||
uri='serial:///dev/ttyUSB0?baudrate=19200', # 3001 = Port 1, 3002 = Port 2 ...
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('wio_2',
|
|
||||||
'frappy_psi.thermofisher.ThermFishIO',
|
|
||||||
'connection for water bath',
|
|
||||||
uri='serial:///dev/ttyUSB1?baudrate=19200', # 3001 = Port 1, 3002 = Port 2 ...
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('wio_3',
|
|
||||||
'frappy_psi.thermofisher.ThermFishIO',
|
|
||||||
'connection for water bath',
|
|
||||||
uri='serial:///dev/ttyUSB2?baudrate=19200', # 3001 = Port 1, 3002 = Port 2 ...
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('Tbath_1',
|
|
||||||
'frappy_psi.thermofisher.TemperatureLoopA10',
|
|
||||||
'water_bath_1',
|
|
||||||
io='wio_1',
|
|
||||||
control_active=0,
|
|
||||||
target=25,
|
|
||||||
tolerance=0.1,
|
|
||||||
settling_time=20,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('Tbath_2',
|
|
||||||
'frappy_psi.thermofisher.TemperatureLoopA10',
|
|
||||||
'water_bath_2',
|
|
||||||
io='wio_2',
|
|
||||||
control_active=0,
|
|
||||||
target=25,
|
|
||||||
tolerance=0.1,
|
|
||||||
settling_time=20,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('Tbath_3',
|
|
||||||
'frappy_psi.thermofisher.TemperatureLoopA10',
|
|
||||||
'water_bath_3',
|
|
||||||
io='wio_3',
|
|
||||||
control_active=0,
|
|
||||||
target=25,
|
|
||||||
tolerance=0.1,
|
|
||||||
settling_time=20,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('valve_1',
|
|
||||||
'frappy_psi.ionopimax.DigitalOutput',
|
|
||||||
'valve_for_fast_water_temperature_changing',
|
|
||||||
addr = 'o1',
|
|
||||||
target = 0,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('valve_2',
|
|
||||||
'frappy_psi.ionopimax.DigitalOutput',
|
|
||||||
'valve_for_fast_water_temperature_changing',
|
|
||||||
addr = 'o2',
|
|
||||||
target = 0,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('valve_3',
|
|
||||||
'frappy_psi.ionopimax.DigitalOutput',
|
|
||||||
'valve_for_fast_water_temperature_changing',
|
|
||||||
addr = 'o3',
|
|
||||||
target = 0,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('temp_sensor_1',
|
|
||||||
'frappy_psi.ionopimax.SimpleVoltageInput',
|
|
||||||
'temperatur_sensor_sample',
|
|
||||||
rawrange = (0.0, 10.0),
|
|
||||||
valuerange = (-40.0, 150.0),
|
|
||||||
addr = 'ai1_mv',
|
|
||||||
)
|
|
||||||
@@ -52,7 +52,7 @@ Mod('T',
|
|||||||
'frappy_psi.softcal.Sensor',
|
'frappy_psi.softcal.Sensor',
|
||||||
'sample T',
|
'sample T',
|
||||||
rawsensor='res',
|
rawsensor='res',
|
||||||
calcurve='X132254',
|
calib='X132254',
|
||||||
value=Param(
|
value=Param(
|
||||||
unit='K',
|
unit='K',
|
||||||
),
|
),
|
||||||
|
|||||||
17
debian/changelog
vendored
17
debian/changelog
vendored
@@ -1,20 +1,3 @@
|
|||||||
frappy-core (0.20.7) stable; urgency=medium
|
|
||||||
|
|
||||||
* fix debian install
|
|
||||||
|
|
||||||
-- Georg Brandl <jenkins@frm2.tum.de> Fri, 25 Jul 2025 13:22:54 +0200
|
|
||||||
|
|
||||||
frappy-core (0.20.6) stable; urgency=medium
|
|
||||||
|
|
||||||
[ Markus Zolliker ]
|
|
||||||
* config: add 'include' and 'override'
|
|
||||||
* frappy.client.interactive: no pathlib needed here
|
|
||||||
|
|
||||||
[ Georg Brandl ]
|
|
||||||
* install systemd units to /usr/lib
|
|
||||||
|
|
||||||
-- Markus Zolliker <jenkins@frm2.tum.de> Thu, 24 Jul 2025 22:26:02 +0200
|
|
||||||
|
|
||||||
frappy-core (0.20.5) stable; urgency=medium
|
frappy-core (0.20.5) stable; urgency=medium
|
||||||
|
|
||||||
[ Markus Zolliker ]
|
[ Markus Zolliker ]
|
||||||
|
|||||||
1
debian/control
vendored
1
debian/control
vendored
@@ -9,6 +9,7 @@ Build-Depends: debhelper-compat (= 13),
|
|||||||
python3-setuptools,
|
python3-setuptools,
|
||||||
python3-docutils,
|
python3-docutils,
|
||||||
python3-sphinx,
|
python3-sphinx,
|
||||||
|
python3-sip-dev,
|
||||||
python3-pyqt5,
|
python3-pyqt5,
|
||||||
python3-mlzlog,
|
python3-mlzlog,
|
||||||
python3-numpy,
|
python3-numpy,
|
||||||
|
|||||||
4
debian/frappy-core.install
vendored
4
debian/frappy-core.install
vendored
@@ -10,6 +10,6 @@ usr/lib/python3.*/dist-packages/frappy/protocol
|
|||||||
usr/lib/python3.*/dist-packages/frappy_core-*
|
usr/lib/python3.*/dist-packages/frappy_core-*
|
||||||
usr/lib/python3.*/dist-packages/frappy/RELEASE-VERSION
|
usr/lib/python3.*/dist-packages/frappy/RELEASE-VERSION
|
||||||
usr/lib/python3.*/dist-packages/frappy_demo
|
usr/lib/python3.*/dist-packages/frappy_demo
|
||||||
usr/lib/systemd
|
lib/systemd
|
||||||
var/log/frappy
|
var/log/frappy
|
||||||
etc/generalConfig.cfg etc/frappy
|
etc/frappy/generalConfig.cfg
|
||||||
|
|||||||
16
debian/rules
vendored
16
debian/rules
vendored
@@ -1,13 +1,19 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
# -*- makefile -*-
|
||||||
|
|
||||||
# Uncomment this to turn on verbose mode.
|
# Uncomment this to turn on verbose mode.
|
||||||
#export DH_VERBOSE=1
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
# needed for bookworm compatibility!
|
export PYBUILD_NAME=frappy
|
||||||
override_dh_installsystemd:
|
export PYBUILD_TEST_PYTEST=1
|
||||||
ln -s usr/lib debian/frappy-core/lib
|
|
||||||
dh_installsystemd
|
override_dh_install:
|
||||||
rm debian/frappy-core/lib
|
rmdir debian/tmp
|
||||||
|
mv debian/python3-frappy debian/tmp
|
||||||
|
|
||||||
|
install -m644 -Dt debian/tmp/etc/frappy etc/generalConfig.cfg
|
||||||
|
dh_install -i -O--buildsystem=pybuild
|
||||||
|
dh_missing --fail-missing
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@ --with python3 --buildsystem=pybuild
|
dh $@ --with python3 --buildsystem=pybuild
|
||||||
|
|||||||
@@ -3,14 +3,10 @@ Configuration File
|
|||||||
|
|
||||||
.. _node configuration:
|
.. _node configuration:
|
||||||
|
|
||||||
:Node:
|
:Node(equipment_id, description, interface, \*\*kwds):
|
||||||
|
|
||||||
Specify the SEC-node properties.
|
Specify the SEC-node properties.
|
||||||
|
|
||||||
.. code::
|
|
||||||
|
|
||||||
Node(equipment_id, description, interface, **kwds):
|
|
||||||
|
|
||||||
The arguments are SECoP node properties and additional internal node configurations
|
The arguments are SECoP node properties and additional internal node configurations
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
@@ -22,14 +18,9 @@ Configuration File
|
|||||||
|
|
||||||
.. _mod configuration:
|
.. _mod configuration:
|
||||||
|
|
||||||
:Mod:
|
:Mod(name, cls, description, \*\*kwds):
|
||||||
|
|
||||||
Create a SECoP module.
|
Create a SECoP module.
|
||||||
|
|
||||||
.. code::
|
|
||||||
|
|
||||||
Mod(name, cls, description, **kwds)
|
|
||||||
|
|
||||||
Keyworded argument matching a parameter name are used to configure
|
Keyworded argument matching a parameter name are used to configure
|
||||||
the initial value of a parameter. For configuring the parameter properties
|
the initial value of a parameter. For configuring the parameter properties
|
||||||
the value must be an instance of **Param**, using the keyworded arguments
|
the value must be an instance of **Param**, using the keyworded arguments
|
||||||
@@ -46,60 +37,22 @@ Configuration File
|
|||||||
|
|
||||||
.. _param configuration:
|
.. _param configuration:
|
||||||
|
|
||||||
:Param:
|
:Param(value=<undef>, \*\*kwds):
|
||||||
|
|
||||||
Configure a parameter
|
Configure a parameter
|
||||||
|
|
||||||
.. code::
|
|
||||||
|
|
||||||
Param(value=<undef>, **kwds):
|
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
|
|
||||||
- **value** - if given, the initial value of the parameter
|
- **value** - if given, the initial value of the parameter
|
||||||
- **kwds** - parameter or datatype SECoP properties (see :class:`frappy.param.Parameter`
|
- **kwds** - parameter or datatype SECoP properties (see :class:`frappy.param.Parameter`
|
||||||
and :class:`frappy.datatypes.Datatypes`)
|
and :class:`frappy.datatypes.Datatypes`)
|
||||||
|
|
||||||
.. _io configuration:
|
|
||||||
|
|
||||||
:IO:
|
|
||||||
|
|
||||||
Configure IO modules (communicators)
|
|
||||||
|
|
||||||
.. code::
|
|
||||||
|
|
||||||
IO(<io name>, <uri>, ...)
|
|
||||||
|
|
||||||
|
|
||||||
It is recommended that the class of the needed IO is specified as class
|
|
||||||
attribute ioClass on the modules class. In this case, for the configuration
|
|
||||||
of the IO modules only their name and URI is needed, for example:
|
|
||||||
|
|
||||||
.. code::
|
|
||||||
|
|
||||||
IO('io_T', 'tcp://192.168.1.1:7777', export=False)
|
|
||||||
IO('io_C', 'serial:///dev/tty_USB0&baudrate=9600', export=False)
|
|
||||||
|
|
||||||
Mod('T_sample', 'frappy_psi.lakeshore.TemperatureSensor', 'the sample T',
|
|
||||||
io='io_T', channel='C')
|
|
||||||
Mod('T_main', 'frappy_psi.lakeshore.TemperatureLoop', 'the main T',
|
|
||||||
io='io_T', channel='A')
|
|
||||||
Mod('C_sample', 'frappy_psi.ah2700.Capacitance', 'the sample capacitance',
|
|
||||||
io='io_C')
|
|
||||||
|
|
||||||
The ``export=False`` argument tells Frappy to hide both communicators.
|
|
||||||
|
|
||||||
|
|
||||||
.. _command configuration:
|
.. _command configuration:
|
||||||
|
|
||||||
:Command:
|
:Command(\*\*kwds):
|
||||||
|
|
||||||
Configure a command
|
Configure a command
|
||||||
|
|
||||||
.. code::
|
|
||||||
|
|
||||||
Command(**kwds)
|
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
|
|
||||||
- **kwds** - command SECoP properties (see :class:`frappy.param.Commands`)
|
- **kwds** - command SECoP properties (see :class:`frappy.param.Commands`)
|
||||||
@@ -140,4 +140,4 @@ Exception classes
|
|||||||
.. automodule:: frappy.errors
|
.. automodule:: frappy.errors
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. include:: configuration.inc
|
.. include:: configuration.rst
|
||||||
@@ -99,11 +99,16 @@ We choose the name *example_cryo* and create therefore a configuration file
|
|||||||
Node('example_cryo.psi.ch', # a globally unique identification
|
Node('example_cryo.psi.ch', # a globally unique identification
|
||||||
'this is an example cryostat for the Frappy tutorial', # describes the node
|
'this is an example cryostat for the Frappy tutorial', # describes the node
|
||||||
interface='tcp://10767') # you might choose any port number > 1024
|
interface='tcp://10767') # you might choose any port number > 1024
|
||||||
IO('io', 'serial://COM6:?baudrate=57600+parity=odd+bytesize=7')
|
Mod('io', # the name of the module
|
||||||
|
'frappy_psi.lakeshore.LakeshoreIO', # the class used for communication
|
||||||
|
'communication to main controller', # a description
|
||||||
|
# the serial connection, including serial settings (see frappy.io.IOBase):
|
||||||
|
uri='serial://COM6:?baudrate=57600+parity=odd+bytesize=7',
|
||||||
|
)
|
||||||
Mod('T',
|
Mod('T',
|
||||||
'frappy_psi.lakeshore.TemperatureSensor',
|
'frappy_psi.lakeshore.TemperatureSensor',
|
||||||
'Sample Temperature',
|
'Sample Temperature',
|
||||||
io='io', # refers to above defined io module called 'io'
|
io='io', # refers to above defined module 'io'
|
||||||
channel='A', # the channel on the LakeShore for this module
|
channel='A', # the channel on the LakeShore for this module
|
||||||
value=Param(max=470), # alter the maximum expected T
|
value=Param(max=470), # alter the maximum expected T
|
||||||
)
|
)
|
||||||
@@ -115,8 +120,8 @@ Usually the only important value in the server address is the TCP port under whi
|
|||||||
server will be accessible. Currently only the tcp scheme is supported.
|
server will be accessible. Currently only the tcp scheme is supported.
|
||||||
|
|
||||||
Then for each module a :ref:`Mod <mod configuration>` section follows.
|
Then for each module a :ref:`Mod <mod configuration>` section follows.
|
||||||
But first we have to create the ``io`` module for communication.
|
We have to create the ``io`` module for communication first, with
|
||||||
For this we use an :ref:`IO <io configuration>` section.
|
the ``uri`` as its most important argument.
|
||||||
In case of a serial connection the prefix is ``serial://``. On a Windows machine, the full
|
In case of a serial connection the prefix is ``serial://``. On a Windows machine, the full
|
||||||
uri is something like ``serial://COM6:?baudrate=9600`` on a linux system it might be
|
uri is something like ``serial://COM6:?baudrate=9600`` on a linux system it might be
|
||||||
``serial:///dev/ttyUSB0?baudrate=9600``. In case of a LAN connection, the uri should
|
``serial:///dev/ttyUSB0?baudrate=9600``. In case of a LAN connection, the uri should
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ def main():
|
|||||||
generalConfig.init()
|
generalConfig.init()
|
||||||
config_dir = generalConfig['confdir']
|
config_dir = generalConfig['confdir']
|
||||||
|
|
||||||
frappy_unit = '/usr/lib/systemd/system/frappy@.service'
|
frappy_unit = '/lib/systemd/system/frappy@.service'
|
||||||
wants_dir = normal_dir + '/frappy.target.wants'
|
wants_dir = normal_dir + '/frappy.target.wants'
|
||||||
|
|
||||||
all_servers = [base[:-4] if base.endswith('_cfg') else base for (base, ext) in
|
all_servers = [base[:-4] if base.endswith('_cfg') else base for (base, ext) in
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
# *****************************************************************************
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify it under
|
|
||||||
# the terms of the GNU General Public License as published by the Free Software
|
|
||||||
# Foundation; either version 2 of the License, or (at your option) any later
|
|
||||||
# version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
# details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along with
|
|
||||||
# this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
# Module authors:
|
|
||||||
# Markus Zolliker <markus.zolliker@psi.ch>
|
|
||||||
#
|
|
||||||
# *****************************************************************************
|
|
||||||
|
|
||||||
from frappy.core import Parameter, Property
|
|
||||||
from frappy.datatypes import ValueType
|
|
||||||
|
|
||||||
|
|
||||||
class AddrParam(Parameter):
|
|
||||||
"""parameter with an address field
|
|
||||||
|
|
||||||
instead of implementing read_<param> and write_<param>, just implement
|
|
||||||
addressed_read and addressed_write.
|
|
||||||
"""
|
|
||||||
addr = Property('address', ValueType())
|
|
||||||
|
|
||||||
|
|
||||||
class AddrMixin:
|
|
||||||
"""mixin for addressed parameters
|
|
||||||
|
|
||||||
in case a read_<param> and/or write_<param> are not implemented,
|
|
||||||
they are created with a call to addressed_read and/or addressed_write
|
|
||||||
"""
|
|
||||||
def __init_subclass__(cls):
|
|
||||||
for aname, aobj in list(cls.__dict__.items()):
|
|
||||||
if isinstance(aobj, AddrParam):
|
|
||||||
methodname = f'read_{aname}'
|
|
||||||
|
|
||||||
if not hasattr(cls, methodname):
|
|
||||||
def rfunc(self, pname=aname):
|
|
||||||
return self.addressed_read(self.accessibles[pname])
|
|
||||||
|
|
||||||
setattr(cls, methodname, rfunc)
|
|
||||||
|
|
||||||
if not aobj.readonly:
|
|
||||||
methodname = f'write_{aname}'
|
|
||||||
if not hasattr(cls, methodname):
|
|
||||||
def wfunc(self, value, pname=aname):
|
|
||||||
return self.addressed_write(self.accessibles[pname], value)
|
|
||||||
|
|
||||||
setattr(cls, methodname, wfunc)
|
|
||||||
super().__init_subclass__()
|
|
||||||
|
|
||||||
def addressed_read(self, pobj):
|
|
||||||
"""addressed read
|
|
||||||
|
|
||||||
:param pobj: the AddrParam
|
|
||||||
:return: the value read
|
|
||||||
"""
|
|
||||||
return getattr(self, pobj.name)
|
|
||||||
|
|
||||||
def addressed_write(self, pobj, value):
|
|
||||||
"""addressed write
|
|
||||||
|
|
||||||
:param pobj: the AddrParam
|
|
||||||
:param value: the value to be written
|
|
||||||
:return: the value written or None
|
|
||||||
"""
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
# *****************************************************************************
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify it under
|
|
||||||
# the terms of the GNU General Public License as published by the Free Software
|
|
||||||
# Foundation; either version 2 of the License, or (at your option) any later
|
|
||||||
# version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
# details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along with
|
|
||||||
# this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
# Module authors:
|
|
||||||
# Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
|
|
||||||
# Markus Zolliker <markus.zolliker@psi.ch>
|
|
||||||
# Alexander Zaft <a.zaft@fz-juelich.de>
|
|
||||||
#
|
|
||||||
# *****************************************************************************
|
|
||||||
|
|
||||||
from frappy.errors import ConfigError
|
|
||||||
from frappy.modulebase import Module
|
|
||||||
from frappy.datatypes import StringType, ValueType
|
|
||||||
from frappy.properties import Property
|
|
||||||
|
|
||||||
|
|
||||||
class Attached(Property):
|
|
||||||
"""a special property, defining an attached module
|
|
||||||
|
|
||||||
assign a module name to this property in the cfg file,
|
|
||||||
and the server will create an attribute with this module
|
|
||||||
|
|
||||||
When mandatory is set to False, and there is no value or an empty string
|
|
||||||
given in the config file, the value of the attribute will be None.
|
|
||||||
"""
|
|
||||||
def __init__(self, basecls=Module, description='attached module', mandatory=True):
|
|
||||||
self.basecls = basecls
|
|
||||||
super().__init__(description, StringType(), mandatory=mandatory)
|
|
||||||
|
|
||||||
def __get__(self, obj, owner):
|
|
||||||
if obj is None:
|
|
||||||
return self
|
|
||||||
modobj = obj.attachedModules.get(self.name)
|
|
||||||
if not modobj:
|
|
||||||
modulename = super().__get__(obj, owner)
|
|
||||||
if not modulename:
|
|
||||||
return None # happens when mandatory=False and modulename is not given
|
|
||||||
modobj = obj.secNode.get_module(modulename)
|
|
||||||
if not modobj:
|
|
||||||
raise ConfigError(f'attached module {self.name}={modulename!r} '
|
|
||||||
f'does not exist')
|
|
||||||
if not isinstance(modobj, self.basecls):
|
|
||||||
raise ConfigError(f'attached module {self.name}={modobj.name!r} '
|
|
||||||
f'must inherit from {self.basecls.__qualname__!r}')
|
|
||||||
obj.attachedModules[self.name] = modobj
|
|
||||||
return modobj
|
|
||||||
|
|
||||||
def copy(self):
|
|
||||||
return Attached(self.basecls, self.description, self.mandatory)
|
|
||||||
|
|
||||||
|
|
||||||
class DictWithFlag(dict):
|
|
||||||
flag = False
|
|
||||||
|
|
||||||
|
|
||||||
class AttachDictType(ValueType):
|
|
||||||
"""a custom datatype for a dict <key> of names or modules"""
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__(DictWithFlag)
|
|
||||||
|
|
||||||
def copy(self):
|
|
||||||
return AttachDictType()
|
|
||||||
|
|
||||||
def export_value(self, value):
|
|
||||||
"""export either names or the name attribute
|
|
||||||
|
|
||||||
to treat bare names and modules the same
|
|
||||||
"""
|
|
||||||
return {k: getattr(v, 'name', v) for k, v in value.items()}
|
|
||||||
|
|
||||||
|
|
||||||
class AttachedDict(Property):
|
|
||||||
def __init__(self, description='attached modules', elements=None, optional=None, basecls=None,
|
|
||||||
**kwds):
|
|
||||||
"""a mapping of attached modules
|
|
||||||
|
|
||||||
:param elements: None or a dict <key> of <basecls> for mandatory elements
|
|
||||||
:param optional: None or a dict <key> of <basecls> for optional elements
|
|
||||||
:param basecls: None or a base class for arbitrary keys
|
|
||||||
if not given, only keys given in parameters 'elements' and 'optional' are allowed
|
|
||||||
:param description: the property description
|
|
||||||
|
|
||||||
<key> might also be a number or any other immutable
|
|
||||||
"""
|
|
||||||
self.elements = elements or {}
|
|
||||||
self.basecls = basecls
|
|
||||||
self.baseclasses = {**self.elements, **(optional or {})}
|
|
||||||
super().__init__(description, AttachDictType(), default={}, **kwds)
|
|
||||||
|
|
||||||
def __get__(self, obj, owner):
|
|
||||||
if obj is None:
|
|
||||||
return self
|
|
||||||
attach_dict = super().__get__(obj, owner) or DictWithFlag({})
|
|
||||||
if attach_dict.flag:
|
|
||||||
return attach_dict
|
|
||||||
|
|
||||||
for key, modulename in attach_dict.items():
|
|
||||||
basecls = self.baseclasses.get(key, self.basecls)
|
|
||||||
if basecls is None:
|
|
||||||
raise ConfigError(f'unknown key {key!r} for attached modules {self.name}')
|
|
||||||
modobj = obj.secNode.get_module(modulename)
|
|
||||||
if modobj is None:
|
|
||||||
raise ConfigError(f'attached modules {self.name}: '
|
|
||||||
f'{key}={modulename!r} does not exist')
|
|
||||||
if not isinstance(modobj, basecls):
|
|
||||||
raise ConfigError(f'attached modules {self.name}: '
|
|
||||||
f'module {key}={modulename!r} must inherit '
|
|
||||||
f'from {basecls.__qualname__!r}')
|
|
||||||
obj.attachedModules[self.name, key] = attach_dict[key] = modobj
|
|
||||||
missing_keys = set(self.elements) - set(attach_dict)
|
|
||||||
if missing_keys:
|
|
||||||
raise ConfigError(f'attached modules {self.name}: '
|
|
||||||
f"missing {', '.join(missing_keys)} ")
|
|
||||||
attach_dict.flag = True
|
|
||||||
return attach_dict
|
|
||||||
|
|
||||||
def copy(self):
|
|
||||||
return AttachedDict(self.elements, self.baseclasses, self.basecls, self.description)
|
|
||||||
@@ -29,7 +29,7 @@ import os
|
|||||||
import traceback
|
import traceback
|
||||||
import threading
|
import threading
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from os.path import expanduser
|
||||||
from frappy.lib import delayed_import
|
from frappy.lib import delayed_import
|
||||||
from frappy.client import SecopClient, UnregisterCallback
|
from frappy.client import SecopClient, UnregisterCallback
|
||||||
from frappy.errors import SECoPError
|
from frappy.errors import SECoPError
|
||||||
@@ -64,8 +64,6 @@ LOG_LEVELS = {
|
|||||||
'off': logging.ERROR+1}
|
'off': logging.ERROR+1}
|
||||||
CLR = '\r\x1b[K' # code to move to the left and clear current line
|
CLR = '\r\x1b[K' # code to move to the left and clear current line
|
||||||
|
|
||||||
UNDEF = object()
|
|
||||||
|
|
||||||
|
|
||||||
class Handler(logging.StreamHandler):
|
class Handler(logging.StreamHandler):
|
||||||
def emit(self, record):
|
def emit(self, record):
|
||||||
@@ -215,8 +213,8 @@ class Module:
|
|||||||
clientenv.raise_with_short_traceback(error)
|
clientenv.raise_with_short_traceback(error)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def __call__(self, target=UNDEF):
|
def __call__(self, target=None):
|
||||||
if target is UNDEF:
|
if target is None:
|
||||||
return self.read()
|
return self.read()
|
||||||
watch_params = ['value', 'status']
|
watch_params = ['value', 'status']
|
||||||
for pname in watch_params:
|
for pname in watch_params:
|
||||||
@@ -224,14 +222,6 @@ class Module:
|
|||||||
updateEvent=self._watch_parameter,
|
updateEvent=self._watch_parameter,
|
||||||
callimmediately=False)
|
callimmediately=False)
|
||||||
|
|
||||||
if 'go' in self._commands:
|
|
||||||
if 'goal' in self._parameters and target is not None:
|
|
||||||
self.goal_enable = True
|
|
||||||
self.goal = target
|
|
||||||
if 'target' in self._parameters:
|
|
||||||
self.target = target
|
|
||||||
self.go()
|
|
||||||
elif 'target' in self._parameters:
|
|
||||||
self.target = target # this sets self._is_driving
|
self.target = target # this sets self._is_driving
|
||||||
|
|
||||||
def loop():
|
def loop():
|
||||||
@@ -240,12 +230,9 @@ class Module:
|
|||||||
self._driving_event.clear()
|
self._driving_event.clear()
|
||||||
try:
|
try:
|
||||||
loop()
|
loop()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt as e:
|
||||||
self._secnode.log.info('-- interrupted --')
|
self._secnode.log.info('-- interrupted --')
|
||||||
try:
|
|
||||||
self.stop()
|
self.stop()
|
||||||
except Exception as e:
|
|
||||||
print(f'while stopping: {e!r}')
|
|
||||||
try:
|
try:
|
||||||
loop() # wait for stopping to be finished
|
loop() # wait for stopping to be finished
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
@@ -255,8 +242,8 @@ class Module:
|
|||||||
finally:
|
finally:
|
||||||
self._secnode.readParameter(self._name, 'value')
|
self._secnode.readParameter(self._name, 'value')
|
||||||
for pname in watch_params:
|
for pname in watch_params:
|
||||||
self._secnode.unregister_callback(
|
self._secnode.unregister_callback((self._name, pname),
|
||||||
(self._name, pname), updateEvent=self._watch_parameter)
|
updateEvent=self._watch_parameter)
|
||||||
return self.value
|
return self.value
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
@@ -310,8 +297,6 @@ class Param:
|
|||||||
|
|
||||||
|
|
||||||
class Command:
|
class Command:
|
||||||
_obj = None
|
|
||||||
|
|
||||||
def __init__(self, name, modname, secnode):
|
def __init__(self, name, modname, secnode):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.modname = modname
|
self.modname = modname
|
||||||
@@ -326,14 +311,11 @@ class Command:
|
|||||||
result, _ = self.exec(self.modname, self.name, *args)
|
result, _ = self.exec(self.modname, self.name, *args)
|
||||||
else:
|
else:
|
||||||
result, _ = self.exec(self.modname, self.name, args or None)
|
result, _ = self.exec(self.modname, self.name, args or None)
|
||||||
if self.name == 'go' and self._obj:
|
|
||||||
self._obj._is_driving = self._obj._isBusy()
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def __get__(self, obj, owner=None):
|
def __get__(self, obj, owner=None):
|
||||||
if obj is None:
|
if obj is None:
|
||||||
return self
|
return self
|
||||||
self._obj = obj
|
|
||||||
return self.call
|
return self.call
|
||||||
|
|
||||||
|
|
||||||
@@ -515,7 +497,7 @@ class Console(code.InteractiveConsole):
|
|||||||
history = None
|
history = None
|
||||||
if readline:
|
if readline:
|
||||||
try:
|
try:
|
||||||
history = Path(f'~/.local/state/frappy-{name}-history').expanduser()
|
history = expanduser(f'~/.config/frappy/{name}-history')
|
||||||
readline.read_history_file(history)
|
readline.read_history_file(history)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
@@ -523,7 +505,6 @@ class Console(code.InteractiveConsole):
|
|||||||
self.interact('', '')
|
self.interact('', '')
|
||||||
finally:
|
finally:
|
||||||
if history:
|
if history:
|
||||||
history.parent.mkdir(mode=0o700, parents=True, exist_ok=True)
|
|
||||||
readline.write_history_file(history)
|
readline.write_history_file(history)
|
||||||
|
|
||||||
def raw_input(self, prompt=""):
|
def raw_input(self, prompt=""):
|
||||||
|
|||||||
@@ -114,18 +114,14 @@ class Collector:
|
|||||||
self.modules = {}
|
self.modules = {}
|
||||||
self.warnings = []
|
self.warnings = []
|
||||||
|
|
||||||
def add(self, name, cls, description, **kwds):
|
def add(self, *args, **kwds):
|
||||||
mod = Mod(name, cls, description, **kwds)
|
mod = Mod(*args, **kwds)
|
||||||
name = mod.pop('name')
|
name = mod.pop('name')
|
||||||
if name in self.modules:
|
if name in self.modules:
|
||||||
self.warnings.append(f'duplicate module {name} overrides previous')
|
self.warnings.append(f'duplicate module {name} overrides previous')
|
||||||
self.modules[name] = mod
|
self.modules[name] = mod
|
||||||
return mod
|
return mod
|
||||||
|
|
||||||
def add_io(self, name, uri, **kwds):
|
|
||||||
mod = Mod(name, cls='<auto>', description='', uri=uri, **kwds)
|
|
||||||
self.modules[mod.pop('name')] = mod
|
|
||||||
|
|
||||||
def override(self, name, **kwds):
|
def override(self, name, **kwds):
|
||||||
"""override properties/parameters of previously configured modules
|
"""override properties/parameters of previously configured modules
|
||||||
|
|
||||||
@@ -184,37 +180,12 @@ class Include:
|
|||||||
exec(compile(filename.read_bytes(), filename, 'exec'), self.namespace)
|
exec(compile(filename.read_bytes(), filename, 'exec'), self.namespace)
|
||||||
|
|
||||||
|
|
||||||
def fix_io_modules(cfgdict, log):
|
def process_file(filename, log):
|
||||||
node = cfgdict.pop('node')
|
|
||||||
io_modules = {k: [] for k, v in cfgdict.items() if v.get('cls') == '<auto>'}
|
|
||||||
for modname, modcfg in cfgdict.items():
|
|
||||||
ioname = modcfg.get('io', {}).get('value')
|
|
||||||
if ioname:
|
|
||||||
iocfg = cfgdict.get(ioname)
|
|
||||||
if iocfg:
|
|
||||||
referring_modules = io_modules.get(ioname)
|
|
||||||
if referring_modules is not None:
|
|
||||||
iocfg['cls'] = f"{modcfg['cls']}.ioClass"
|
|
||||||
referring_modules.append(modname)
|
|
||||||
|
|
||||||
# fix description:
|
|
||||||
for ioname, referring_modules in io_modules.items():
|
|
||||||
if referring_modules:
|
|
||||||
if not cfgdict[ioname]['description']:
|
|
||||||
cfgdict[ioname]['description'] = f"communicator for {', '.join(k for k in referring_modules)}"
|
|
||||||
else:
|
|
||||||
log.warning('remove unused io module %r', ioname)
|
|
||||||
cfgdict.pop(ioname)
|
|
||||||
cfgdict['node'] = node
|
|
||||||
|
|
||||||
|
|
||||||
def process_file(filename, log, config_text=None):
|
|
||||||
if config_text is None:
|
|
||||||
config_text = filename.read_bytes()
|
config_text = filename.read_bytes()
|
||||||
node = NodeCollector()
|
node = NodeCollector()
|
||||||
mods = Collector()
|
mods = Collector()
|
||||||
ns = {'Node': node.add, 'Mod': mods.add, 'Param': Param, 'Command': Param, 'Group': Group,
|
ns = {'Node': node.add, 'Mod': mods.add, 'Param': Param, 'Command': Param, 'Group': Group,
|
||||||
'override': mods.override, 'overrideNode': node.override, 'IO': mods.add_io}
|
'override': mods.override, 'overrideNode': node.override}
|
||||||
ns['include'] = Include(ns, log)
|
ns['include'] = Include(ns, log)
|
||||||
# pylint: disable=exec-used
|
# pylint: disable=exec-used
|
||||||
exec(compile(config_text, filename, 'exec'), ns)
|
exec(compile(config_text, filename, 'exec'), ns)
|
||||||
@@ -265,7 +236,6 @@ def load_config(cfgfiles, log):
|
|||||||
filename = to_config_path(str(cfgfile), log)
|
filename = to_config_path(str(cfgfile), log)
|
||||||
log.debug('Parsing config file %s...', filename)
|
log.debug('Parsing config file %s...', filename)
|
||||||
cfg = process_file(filename, log)
|
cfg = process_file(filename, log)
|
||||||
fix_io_modules(cfg, log)
|
|
||||||
if config:
|
if config:
|
||||||
config.merge_modules(cfg)
|
config.merge_modules(cfg)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ from frappy.datatypes import ArrayOf, BLOBType, BoolType, EnumType, \
|
|||||||
FloatRange, IntRange, ScaledInteger, StringType, StructOf, TupleOf, StatusType
|
FloatRange, IntRange, ScaledInteger, StringType, StructOf, TupleOf, StatusType
|
||||||
from frappy.lib.enum import Enum
|
from frappy.lib.enum import Enum
|
||||||
from frappy.modulebase import Done, Module, Feature
|
from frappy.modulebase import Done, Module, Feature
|
||||||
from frappy.modules import Communicator, Drivable, Readable, Writable
|
from frappy.modules import Attached, Communicator, \
|
||||||
from frappy.attached import Attached, AttachedDict
|
Drivable, Readable, Writable
|
||||||
from frappy.params import Command, Parameter, Limit
|
from frappy.params import Command, Parameter, Limit
|
||||||
from frappy.properties import Property
|
from frappy.properties import Property
|
||||||
from frappy.proxy import Proxy, SecNode, proxy_class
|
from frappy.proxy import Proxy, SecNode, proxy_class
|
||||||
|
|||||||
214
frappy/ctrlby.py
214
frappy/ctrlby.py
@@ -1,214 +0,0 @@
|
|||||||
# *****************************************************************************
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify it under
|
|
||||||
# the terms of the GNU General Public License as published by the Free Software
|
|
||||||
# Foundation; either version 2 of the License, or (at your option) any later
|
|
||||||
# version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
# details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along with
|
|
||||||
# this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
# Module authors:
|
|
||||||
# Markus Zolliker <markus.zolliker@psi.ch>
|
|
||||||
#
|
|
||||||
# *****************************************************************************
|
|
||||||
|
|
||||||
from frappy.datatypes import BoolType, EnumType, Enum
|
|
||||||
from frappy.core import Parameter, Attached
|
|
||||||
|
|
||||||
|
|
||||||
class WrapControlledBy:
|
|
||||||
"""mixin to add controlled_by to writable modules
|
|
||||||
|
|
||||||
Create a wrapper class inheriting from this mixin
|
|
||||||
to add controlled_by to a Writable module
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
|
|
||||||
class Enhanced(WrapControlledBy, BaseWritable):
|
|
||||||
pass
|
|
||||||
|
|
||||||
# typically nothing else has to be implemented
|
|
||||||
|
|
||||||
from a module with output (inheriting from HasOutput), the
|
|
||||||
method update_target must be called for internal updates
|
|
||||||
"""
|
|
||||||
|
|
||||||
controlled_by = Parameter('source of target value', EnumType(members={'self': 0}), default=0)
|
|
||||||
target = Parameter() # make sure target is a parameter
|
|
||||||
inputCallbacks = ()
|
|
||||||
|
|
||||||
def register_input(self, name, deactivate_control):
|
|
||||||
"""register input
|
|
||||||
|
|
||||||
:param name: the name of the module (for controlled_by enum)
|
|
||||||
:param deactivate_control: a method on the input module to switch off control
|
|
||||||
|
|
||||||
called by <controller module>.initModule
|
|
||||||
"""
|
|
||||||
if not self.inputCallbacks:
|
|
||||||
self.inputCallbacks = {}
|
|
||||||
self.inputCallbacks[name] = deactivate_control
|
|
||||||
prev_enum = self.parameters['controlled_by'].datatype.export_datatype()['members']
|
|
||||||
# add enum member, using autoincrement feature of Enum
|
|
||||||
self.parameters['controlled_by'].datatype = EnumType(Enum(prev_enum, **{name: None}))
|
|
||||||
self.log.info('enumtype %r', self.parameters['controlled_by'].datatype)
|
|
||||||
|
|
||||||
def write_controlled_by(self, modulename):
|
|
||||||
result = modulename
|
|
||||||
if modulename in ('self', self.name):
|
|
||||||
# inform the deactivate_control methods, that we have already switched
|
|
||||||
self.controlled_by = result = 'self'
|
|
||||||
for name, deactivate_control in self.inputCallbacks.items():
|
|
||||||
if name != modulename:
|
|
||||||
deactivate_control(modulename)
|
|
||||||
return result
|
|
||||||
|
|
||||||
def self_controlled(self):
|
|
||||||
"""method to change controlled_by to self
|
|
||||||
|
|
||||||
to be called from the write_target method
|
|
||||||
"""
|
|
||||||
if self.controlled_by != 0:
|
|
||||||
self.write_controlled_by('self')
|
|
||||||
|
|
||||||
def set_off(self):
|
|
||||||
"""to be overridden if the off state should be different from the default
|
|
||||||
|
|
||||||
on a FloatRange() the default value is 0
|
|
||||||
"""
|
|
||||||
zero = self.parameters['target'].datatype.default
|
|
||||||
try:
|
|
||||||
self.internal_set_target(zero)
|
|
||||||
except Exception as e:
|
|
||||||
self.target = zero
|
|
||||||
|
|
||||||
def update_target(self, module, value):
|
|
||||||
"""update internal target value
|
|
||||||
|
|
||||||
as write_target would switch to manual mode, the controlling module
|
|
||||||
has to use this method to update the value
|
|
||||||
|
|
||||||
override and super call, if other actions are needed
|
|
||||||
"""
|
|
||||||
if self.controlled_by != module:
|
|
||||||
deactivate_control = self.inputCallbacks.get(self.controlled_by)
|
|
||||||
if deactivate_control:
|
|
||||||
deactivate_control(module)
|
|
||||||
self.controlled_by = module
|
|
||||||
target = self.internal_set_target(value)
|
|
||||||
self.target = value if target is None else target
|
|
||||||
|
|
||||||
def write_target(self, target):
|
|
||||||
self.self_controlled()
|
|
||||||
return self.internal_set_target(target)
|
|
||||||
|
|
||||||
def internal_set_target(self, target):
|
|
||||||
# we need this additional indirection:
|
|
||||||
# super().write_target must refer to an inherited base class
|
|
||||||
# which is after WrapControlledBy in the method resolution order
|
|
||||||
return super().write_target(target)
|
|
||||||
|
|
||||||
|
|
||||||
class HasControlledBy(WrapControlledBy):
|
|
||||||
"""mixin for controlled_by functionality
|
|
||||||
|
|
||||||
Create a wrapper class inheriting from this mixin
|
|
||||||
to add controlled_by to a Writable module
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
|
|
||||||
class Enhanced(HasControlledBy, BaseWritable):
|
|
||||||
def set_target(self, value):
|
|
||||||
# implement here hardware access for setting target
|
|
||||||
|
|
||||||
# do not override write_target!
|
|
||||||
|
|
||||||
from a module with output (inheriting from HasOutput), the
|
|
||||||
method update_target must be called for internal updates
|
|
||||||
"""
|
|
||||||
|
|
||||||
def set_target(self, value):
|
|
||||||
"""to be overridden for setting target of HW"""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def internal_set_target(self, value):
|
|
||||||
# we need this additional indirection:
|
|
||||||
# self.write_target must refer to a base class which
|
|
||||||
# is before HasControlledBy in the method resolution order
|
|
||||||
return self.set_target(value)
|
|
||||||
|
|
||||||
def set_off(self):
|
|
||||||
"""typically needs to be overridden"""
|
|
||||||
|
|
||||||
|
|
||||||
class HasOutputModule:
|
|
||||||
"""mixin for modules having an output module
|
|
||||||
|
|
||||||
this module will call the update_target method of an output module
|
|
||||||
"""
|
|
||||||
# mandatory=False: it should be possible to configure a module with fixed control
|
|
||||||
output_module = Attached(WrapControlledBy, mandatory=False)
|
|
||||||
control_active = Parameter('control mode', BoolType(), default=False)
|
|
||||||
target = Parameter() # make sure target is a parameter
|
|
||||||
|
|
||||||
def initModule(self):
|
|
||||||
super().initModule()
|
|
||||||
if self.output_module:
|
|
||||||
self.output_module.register_input(self.name, self.deactivate_control)
|
|
||||||
|
|
||||||
def write_control_active(self, value):
|
|
||||||
"""override with supercall if needed
|
|
||||||
|
|
||||||
control_active is readonly by default, as specified in the SECoP standard.
|
|
||||||
This method is meant to be called internally.
|
|
||||||
|
|
||||||
However, it is possible to override control_active with readonly=False
|
|
||||||
and this is quite useful IMHO in some situations
|
|
||||||
"""
|
|
||||||
out = self.output_module
|
|
||||||
if out:
|
|
||||||
if value:
|
|
||||||
if out.controlled_by != self.name:
|
|
||||||
# deactivate control an all modules controlling our output_module
|
|
||||||
out.write_controlled_by(self.name)
|
|
||||||
else:
|
|
||||||
if out.controlled_by == self.name:
|
|
||||||
out.set_off() # this sets out.controlled_by to 0 (=self)
|
|
||||||
|
|
||||||
def set_control_active(self, active):
|
|
||||||
"""to be overridden for switching hw control
|
|
||||||
|
|
||||||
TODO: remove this legacy method (replaced by write_control_active)
|
|
||||||
"""
|
|
||||||
self.control_active = active
|
|
||||||
|
|
||||||
def activate_control(self):
|
|
||||||
"""method to switch control_active on
|
|
||||||
|
|
||||||
TODO: remove this legacy method (replaced by write_control_active)
|
|
||||||
"""
|
|
||||||
self.write_control_active(True)
|
|
||||||
|
|
||||||
def deactivate_control(self, source=None):
|
|
||||||
"""called when another module takes over control
|
|
||||||
|
|
||||||
registered to be called from the controlled module(s)
|
|
||||||
"""
|
|
||||||
if self.control_active:
|
|
||||||
self.write_control_active(False)
|
|
||||||
self.log.warning(f'switched to manual mode by {source or self.name}')
|
|
||||||
|
|
||||||
def write_target(self, target):
|
|
||||||
self.write_control_active(True)
|
|
||||||
return self.set_target(target)
|
|
||||||
|
|
||||||
def set_target(self, target):
|
|
||||||
"""to be overridden"""
|
|
||||||
raise NotImplementedError
|
|
||||||
@@ -53,9 +53,13 @@ def shortrepr(value):
|
|||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
class SimpleDataType(HasProperties):
|
# base class for all DataTypes
|
||||||
"""base class for simple datatypes, used in properties only"""
|
class DataType(HasProperties):
|
||||||
|
"""base class for all data types"""
|
||||||
|
IS_COMMAND = False
|
||||||
|
unit = ''
|
||||||
default = None
|
default = None
|
||||||
|
client = False # used on the client side
|
||||||
|
|
||||||
def __call__(self, value):
|
def __call__(self, value):
|
||||||
"""convert given value to our datatype and validate
|
"""convert given value to our datatype and validate
|
||||||
@@ -99,12 +103,40 @@ class SimpleDataType(HasProperties):
|
|||||||
- StringType: the bare string is returned
|
- StringType: the bare string is returned
|
||||||
- EnumType: the name of the enum is returned
|
- EnumType: the name of the enum is returned
|
||||||
"""
|
"""
|
||||||
return value if isinstance(value, str) else repr(value)
|
return self.format_value(value, False)
|
||||||
|
|
||||||
|
def export_datatype(self):
|
||||||
|
"""return a python object which after jsonifying identifies this datatype"""
|
||||||
|
raise ProgrammingError(
|
||||||
|
f"{type(self).__name__} is not able to be exported to SECoP. "
|
||||||
|
f"It is intended for internal use only."
|
||||||
|
)
|
||||||
|
|
||||||
def export_value(self, value):
|
def export_value(self, value):
|
||||||
"""if needed, reformat value for transport"""
|
"""if needed, reformat value for transport"""
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
def import_value(self, value):
|
||||||
|
"""opposite of export_value, reformat from transport to internal repr
|
||||||
|
|
||||||
|
note: for importing from gui/configfile/commandline use :meth:`from_string`
|
||||||
|
instead.
|
||||||
|
"""
|
||||||
|
return self(value)
|
||||||
|
|
||||||
|
def format_value(self, value, unit=True):
|
||||||
|
"""format a value of this type into a string
|
||||||
|
|
||||||
|
This is intended for 'nice' formatting for humans and is NOT
|
||||||
|
the opposite of :meth:`from_string`
|
||||||
|
|
||||||
|
possible values of unit:
|
||||||
|
- True: use the string of the datatype
|
||||||
|
- False: return a value interpretable by ast.literal_eval (internal use only)
|
||||||
|
- any other string: use as unit (internal use only)
|
||||||
|
"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
def set_properties(self, **kwds):
|
def set_properties(self, **kwds):
|
||||||
"""init datatype properties"""
|
"""init datatype properties"""
|
||||||
try:
|
try:
|
||||||
@@ -129,34 +161,6 @@ class SimpleDataType(HasProperties):
|
|||||||
# looks like the simplest way to make a deep copy
|
# looks like the simplest way to make a deep copy
|
||||||
return get_datatype(self.export_datatype())
|
return get_datatype(self.export_datatype())
|
||||||
|
|
||||||
|
|
||||||
class DataType(SimpleDataType):
|
|
||||||
"""base class for data types used in parameters and commands"""
|
|
||||||
IS_COMMAND = False
|
|
||||||
unit = ''
|
|
||||||
client = False # used on the client side
|
|
||||||
|
|
||||||
def import_value(self, value):
|
|
||||||
"""opposite of export_value, reformat from transport to internal repr
|
|
||||||
|
|
||||||
note: for importing from gui/configfile/commandline use :meth:`from_string`
|
|
||||||
instead.
|
|
||||||
"""
|
|
||||||
return self(value)
|
|
||||||
|
|
||||||
def format_value(self, value, unit=True):
|
|
||||||
"""format a value of this type into a string
|
|
||||||
|
|
||||||
This is intended for 'nice' formatting for humans and is NOT
|
|
||||||
the opposite of :meth:`from_string`
|
|
||||||
|
|
||||||
possible values of unit:
|
|
||||||
- True: use the string of the datatype
|
|
||||||
- False: return a value interpretable by ast.literal_eval (internal use only)
|
|
||||||
- any other string: use as unit (internal use only)
|
|
||||||
"""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def compatible(self, other):
|
def compatible(self, other):
|
||||||
"""check other for compatibility
|
"""check other for compatibility
|
||||||
|
|
||||||
@@ -165,10 +169,6 @@ class DataType(SimpleDataType):
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def export_datatype(self):
|
|
||||||
"""return a python object which after jsonifying identifies this datatype"""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def set_main_unit(self, unit):
|
def set_main_unit(self, unit):
|
||||||
"""replace $ in unit by argument"""
|
"""replace $ in unit by argument"""
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@ class FloatRange(HasUnit, DataType):
|
|||||||
self.default = 0 if self.min <= 0 <= self.max else self.min
|
self.default = 0 if self.min <= 0 <= self.max else self.min
|
||||||
super().checkProperties()
|
super().checkProperties()
|
||||||
if '%' not in self.fmtstr:
|
if '%' not in self.fmtstr:
|
||||||
raise ConfigError('Invalid fmtstr')
|
raise ConfigError('Invalid fmtstr!')
|
||||||
|
|
||||||
def export_datatype(self):
|
def export_datatype(self):
|
||||||
return self.get_info(type='double')
|
return self.get_info(type='double')
|
||||||
@@ -411,7 +411,7 @@ class ScaledInteger(HasUnit, DataType):
|
|||||||
|
|
||||||
# check values
|
# check values
|
||||||
if '%' not in self.fmtstr:
|
if '%' not in self.fmtstr:
|
||||||
raise ConfigError('Invalid fmtstr')
|
raise ConfigError('Invalid fmtstr!')
|
||||||
# Remark: Datatype.copy() will round min, max to a multiple of self.scale
|
# Remark: Datatype.copy() will round min, max to a multiple of self.scale
|
||||||
# this should be o.k.
|
# this should be o.k.
|
||||||
|
|
||||||
@@ -557,9 +557,9 @@ class BLOBType(DataType):
|
|||||||
internally treated as bytes
|
internally treated as bytes
|
||||||
"""
|
"""
|
||||||
|
|
||||||
minbytes = Property('minimum number of bytes', IntRange(0, UNLIMITED), extname='minbytes',
|
minbytes = Property('minimum number of bytes', IntRange(0), extname='minbytes',
|
||||||
default=0)
|
default=0)
|
||||||
maxbytes = Property('maximum number of bytes', IntRange(0, UNLIMITED), extname='maxbytes',
|
maxbytes = Property('maximum number of bytes', IntRange(0), extname='maxbytes',
|
||||||
mandatory=True)
|
mandatory=True)
|
||||||
|
|
||||||
def __init__(self, minbytes=0, maxbytes=None):
|
def __init__(self, minbytes=0, maxbytes=None):
|
||||||
@@ -587,10 +587,10 @@ class BLOBType(DataType):
|
|||||||
size = len(value)
|
size = len(value)
|
||||||
if size < self.minbytes:
|
if size < self.minbytes:
|
||||||
raise RangeError(
|
raise RangeError(
|
||||||
f'blob {shortrepr(value)!r} must be at least {self.minbytes} bytes long (got {size})')
|
f'{value!r} must be at least {self.minbytes} bytes long!')
|
||||||
if size > self.maxbytes:
|
if size > self.maxbytes:
|
||||||
raise RangeError(
|
raise RangeError(
|
||||||
f'blob {shortrepr(value)!r} must be at most {self.maxbytes} bytes long (got {size})')
|
f'{value!r} must be at most {self.maxbytes} bytes long!')
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def export_value(self, value):
|
def export_value(self, value):
|
||||||
@@ -646,22 +646,22 @@ class StringType(DataType):
|
|||||||
def __call__(self, value):
|
def __call__(self, value):
|
||||||
"""accepts strings only"""
|
"""accepts strings only"""
|
||||||
if not isinstance(value, str):
|
if not isinstance(value, str):
|
||||||
raise WrongTypeError(f'{shortrepr(value)} has the wrong type')
|
raise WrongTypeError(f'{shortrepr(value)} has the wrong type!')
|
||||||
if not self.isUTF8:
|
if not self.isUTF8:
|
||||||
try:
|
try:
|
||||||
value.encode('ascii')
|
value.encode('ascii')
|
||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
raise RangeError(f'{shortrepr(value)} contains non-ascii character') from None
|
raise RangeError(f'{shortrepr(value)} contains non-ascii character!') from None
|
||||||
size = len(value)
|
size = len(value)
|
||||||
if size < self.minchars:
|
if size < self.minchars:
|
||||||
raise RangeError(
|
raise RangeError(
|
||||||
f'string {shortrepr(value)} must be at least {self.minchars} chars long (got {size})')
|
f'{shortrepr(value)} must be at least {self.minchars} chars long!')
|
||||||
if size > self.maxchars:
|
if size > self.maxchars:
|
||||||
raise RangeError(
|
raise RangeError(
|
||||||
f'string {shortrepr(value)} must be at most {self.maxchars} chars long (got {size})')
|
f'{shortrepr(value)} must be at most {self.maxchars} chars long!')
|
||||||
if '\0' in value:
|
if '\0' in value:
|
||||||
raise RangeError(
|
raise RangeError(
|
||||||
'strings are not allowed to embed a null byte, Use a Blob instead')
|
'Strings are not allowed to embed a \\0! Use a Blob instead!')
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def export_value(self, value):
|
def export_value(self, value):
|
||||||
@@ -724,12 +724,12 @@ class BoolType(DataType):
|
|||||||
return False
|
return False
|
||||||
if value in ['1', 'True', 'true', 'yes', 'on']:
|
if value in ['1', 'True', 'true', 'yes', 'on']:
|
||||||
return True
|
return True
|
||||||
raise WrongTypeError(f'{shortrepr(value)} is not a boolean value')
|
raise WrongTypeError(f'{shortrepr(value)} is not a boolean value!')
|
||||||
|
|
||||||
def __call__(self, value):
|
def __call__(self, value):
|
||||||
if value in (0, 1):
|
if value in (0, 1):
|
||||||
return bool(value)
|
return bool(value)
|
||||||
raise WrongTypeError(f'{shortrepr(value)} is not a boolean value')
|
raise WrongTypeError(f'{shortrepr(value)} is not a boolean value!')
|
||||||
|
|
||||||
def export_value(self, value):
|
def export_value(self, value):
|
||||||
"""returns a python object fit for serialisation"""
|
"""returns a python object fit for serialisation"""
|
||||||
@@ -755,16 +755,16 @@ class ArrayOf(DataType):
|
|||||||
|
|
||||||
:param members: the datatype of the elements
|
:param members: the datatype of the elements
|
||||||
"""
|
"""
|
||||||
minlen = Property('minimum number of elements', IntRange(0, UNLIMITED), extname='minlen',
|
minlen = Property('minimum number of elements', IntRange(0), extname='minlen',
|
||||||
default=0)
|
default=0)
|
||||||
maxlen = Property('maximum number of elements', IntRange(0, UNLIMITED), extname='maxlen',
|
maxlen = Property('maximum number of elements', IntRange(0), extname='maxlen',
|
||||||
mandatory=True)
|
mandatory=True)
|
||||||
|
|
||||||
def __init__(self, members, minlen=0, maxlen=None):
|
def __init__(self, members, minlen=0, maxlen=None):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
if not isinstance(members, DataType):
|
if not isinstance(members, DataType):
|
||||||
raise ProgrammingError(
|
raise ProgrammingError(
|
||||||
'ArrayOf only works with a DataType as first argument')
|
'ArrayOf only works with a DataType as first argument!')
|
||||||
# one argument -> exactly that size
|
# one argument -> exactly that size
|
||||||
# argument default to 100
|
# argument default to 100
|
||||||
if maxlen is None:
|
if maxlen is None:
|
||||||
@@ -807,16 +807,15 @@ class ArrayOf(DataType):
|
|||||||
|
|
||||||
def check_type(self, value):
|
def check_type(self, value):
|
||||||
try:
|
try:
|
||||||
size = len(value)
|
|
||||||
# check number of elements
|
# check number of elements
|
||||||
if self.minlen is not None and size < self.minlen:
|
if self.minlen is not None and len(value) < self.minlen:
|
||||||
raise RangeError(
|
raise RangeError(
|
||||||
f'array must have at least {self.minlen} elements (has {size})')
|
f'array too small, needs at least {self.minlen} elements!')
|
||||||
if self.maxlen is not None and size > self.maxlen:
|
if self.maxlen is not None and len(value) > self.maxlen:
|
||||||
raise RangeError(
|
raise RangeError(
|
||||||
f'array must have at most {self.maxlen} elements (has {size})')
|
f'array too big, holds at most {self.maxlen} elements!')
|
||||||
except TypeError:
|
except TypeError:
|
||||||
raise WrongTypeError(f'{type(value).__name__} can not be converted to ArrayOf DataType') from None
|
raise WrongTypeError(f'{type(value).__name__} can not be converted to ArrayOf DataType!') from None
|
||||||
|
|
||||||
def __call__(self, value):
|
def __call__(self, value):
|
||||||
"""accepts any sequence, converts to tuple (immutable!)"""
|
"""accepts any sequence, converts to tuple (immutable!)"""
|
||||||
@@ -882,11 +881,11 @@ class TupleOf(DataType):
|
|||||||
def __init__(self, *members):
|
def __init__(self, *members):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
if not members:
|
if not members:
|
||||||
raise ProgrammingError('Empty tuples are not allowed')
|
raise ProgrammingError('Empty tuples are not allowed!')
|
||||||
for subtype in members:
|
for subtype in members:
|
||||||
if not isinstance(subtype, DataType):
|
if not isinstance(subtype, DataType):
|
||||||
raise ProgrammingError(
|
raise ProgrammingError(
|
||||||
'TupleOf only works with DataType objs as arguments')
|
'TupleOf only works with DataType objs as arguments!')
|
||||||
self.members = members
|
self.members = members
|
||||||
self.default = tuple(el.default for el in members)
|
self.default = tuple(el.default for el in members)
|
||||||
|
|
||||||
@@ -905,7 +904,7 @@ class TupleOf(DataType):
|
|||||||
if len(value) == len(self.members):
|
if len(value) == len(self.members):
|
||||||
return
|
return
|
||||||
except TypeError:
|
except TypeError:
|
||||||
raise WrongTypeError(f'{type(value).__name__} can not be converted to TupleOf DataType') from None
|
raise WrongTypeError(f'{type(value).__name__} can not be converted to TupleOf DataType!') from None
|
||||||
raise WrongTypeError(f'tuple needs {len(self.members)} elements')
|
raise WrongTypeError(f'tuple needs {len(self.members)} elements')
|
||||||
|
|
||||||
def __call__(self, value):
|
def __call__(self, value):
|
||||||
@@ -970,16 +969,16 @@ class StructOf(DataType):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self.members = members
|
self.members = members
|
||||||
if not members:
|
if not members:
|
||||||
raise ProgrammingError('Empty structs are not allowed')
|
raise ProgrammingError('Empty structs are not allowed!')
|
||||||
self.optional = list(members if optional is None else optional)
|
self.optional = list(members if optional is None else optional)
|
||||||
for name, subtype in list(members.items()):
|
for name, subtype in list(members.items()):
|
||||||
if not isinstance(subtype, DataType):
|
if not isinstance(subtype, DataType):
|
||||||
raise ProgrammingError(
|
raise ProgrammingError(
|
||||||
'StructOf only works with named DataType objs as keyworded arguments')
|
'StructOf only works with named DataType objs as keyworded arguments!')
|
||||||
for name in self.optional:
|
for name in self.optional:
|
||||||
if name not in members:
|
if name not in members:
|
||||||
raise ProgrammingError(
|
raise ProgrammingError(
|
||||||
'Only members of StructOf may be declared as optional')
|
'Only members of StructOf may be declared as optional!')
|
||||||
self.default = dict((k, el.default) for k, el in members.items())
|
self.default = dict((k, el.default) for k, el in members.items())
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
@@ -1083,10 +1082,10 @@ class CommandType(DataType):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
if argument is not None:
|
if argument is not None:
|
||||||
if not isinstance(argument, DataType):
|
if not isinstance(argument, DataType):
|
||||||
raise ProgrammingError('CommandType: Argument type must be a DataType')
|
raise ProgrammingError('CommandType: Argument type must be a DataType!')
|
||||||
if result is not None:
|
if result is not None:
|
||||||
if not isinstance(result, DataType):
|
if not isinstance(result, DataType):
|
||||||
raise ProgrammingError('CommandType: Result type must be a DataType')
|
raise ProgrammingError('CommandType: Result type must be a DataType!')
|
||||||
self.argument = argument
|
self.argument = argument
|
||||||
self.result = result
|
self.result = result
|
||||||
|
|
||||||
@@ -1108,10 +1107,10 @@ class CommandType(DataType):
|
|||||||
raise ProgrammingError('commands can not be converted to a value')
|
raise ProgrammingError('commands can not be converted to a value')
|
||||||
|
|
||||||
def export_value(self, value):
|
def export_value(self, value):
|
||||||
raise ProgrammingError('values of type command can not be transported')
|
raise ProgrammingError('values of type command can not be transported!')
|
||||||
|
|
||||||
def import_value(self, value):
|
def import_value(self, value):
|
||||||
raise ProgrammingError('values of type command can not be transported')
|
raise ProgrammingError('values of type command can not be transported!')
|
||||||
|
|
||||||
def from_string(self, text):
|
def from_string(self, text):
|
||||||
raise ProgrammingError('a string can not be converted to a command')
|
raise ProgrammingError('a string can not be converted to a command')
|
||||||
@@ -1132,23 +1131,10 @@ class CommandType(DataType):
|
|||||||
|
|
||||||
# internally used datatypes (i.e. only for programming the SEC-node)
|
# internally used datatypes (i.e. only for programming the SEC-node)
|
||||||
|
|
||||||
class DefaultType(SimpleDataType):
|
class DataTypeType(DataType):
|
||||||
"""datatype used as default for parameters
|
|
||||||
|
|
||||||
needs some minimal interface to avoid errors when
|
|
||||||
the datatype of a parameter is not yet defined
|
|
||||||
"""
|
|
||||||
def __call__(self, value):
|
|
||||||
return value
|
|
||||||
|
|
||||||
def setProperty(self, key, value):
|
|
||||||
"""silently ignored"""
|
|
||||||
|
|
||||||
|
|
||||||
class DataTypeType(SimpleDataType):
|
|
||||||
def __call__(self, value):
|
def __call__(self, value):
|
||||||
"""accepts a datatype"""
|
"""accepts a datatype"""
|
||||||
if isinstance(value, SimpleDataType):
|
if isinstance(value, DataType):
|
||||||
return value
|
return value
|
||||||
#TODO: not needed anymore?
|
#TODO: not needed anymore?
|
||||||
try:
|
try:
|
||||||
@@ -1169,7 +1155,7 @@ class DataTypeType(SimpleDataType):
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
class ValueType(SimpleDataType):
|
class ValueType(DataType):
|
||||||
"""Can take any python value.
|
"""Can take any python value.
|
||||||
|
|
||||||
The optional (callable) validator can be used to restrict values to a
|
The optional (callable) validator can be used to restrict values to a
|
||||||
@@ -1192,7 +1178,7 @@ class ValueType(SimpleDataType):
|
|||||||
try:
|
try:
|
||||||
return self.validator(value)
|
return self.validator(value)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ConfigError(f'Validator {self.validator} raised {e!r} for value {shortrepr(value)}') from e
|
raise ConfigError(f'Validator {self.validator} raised {e!r} for value {value}') from e
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
@@ -1202,8 +1188,23 @@ class ValueType(SimpleDataType):
|
|||||||
"""if needed, reformat value for transport"""
|
"""if needed, reformat value for transport"""
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
def import_value(self, value):
|
||||||
|
"""opposite of export_value, reformat from transport to internal repr
|
||||||
|
|
||||||
class NoneOr(SimpleDataType):
|
note: for importing from gui/configfile/commandline use :meth:`from_string`
|
||||||
|
instead.
|
||||||
|
"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def setProperty(self, key, value):
|
||||||
|
"""silently ignored
|
||||||
|
|
||||||
|
as ValueType is used for the datatype default, this makes code
|
||||||
|
shorter for cases, where the datatype may not yet be defined
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class NoneOr(DataType):
|
||||||
"""validates a None or smth. else"""
|
"""validates a None or smth. else"""
|
||||||
default = None
|
default = None
|
||||||
|
|
||||||
@@ -1221,7 +1222,7 @@ class NoneOr(SimpleDataType):
|
|||||||
return self.other.export_value(value)
|
return self.other.export_value(value)
|
||||||
|
|
||||||
|
|
||||||
class OrType(SimpleDataType):
|
class OrType(DataType):
|
||||||
def __init__(self, *types):
|
def __init__(self, *types):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.types = types
|
self.types = types
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class SECoPError(RuntimeError):
|
|||||||
clsname2class = {} # needed to convert error reports back to classes
|
clsname2class = {} # needed to convert error reports back to classes
|
||||||
name = 'InternalError'
|
name = 'InternalError'
|
||||||
name2class = {}
|
name2class = {}
|
||||||
|
report_error = True
|
||||||
raising_methods = None
|
raising_methods = None
|
||||||
|
|
||||||
def __init_subclass__(cls):
|
def __init_subclass__(cls):
|
||||||
@@ -75,7 +76,7 @@ class SECoPError(RuntimeError):
|
|||||||
if mlist and stripped:
|
if mlist and stripped:
|
||||||
mlist = mlist[:-1] # do not pop, as this would change self.raising_methods
|
mlist = mlist[:-1] # do not pop, as this would change self.raising_methods
|
||||||
prefix = '' if self.name2class.get(self.name) == type(self) else type(self).__name__
|
prefix = '' if self.name2class.get(self.name) == type(self) else type(self).__name__
|
||||||
prefix = (prefix + ''.join(' in ' + m for m in mlist)).strip()
|
prefix += ''.join(' in ' + m for m in mlist).strip()
|
||||||
if prefix:
|
if prefix:
|
||||||
return f'{prefix}: {super().__str__()}'
|
return f'{prefix}: {super().__str__()}'
|
||||||
return super().__str__()
|
return super().__str__()
|
||||||
|
|||||||
101
frappy/io.py
101
frappy/io.py
@@ -30,7 +30,7 @@ import time
|
|||||||
from frappy.datatypes import ArrayOf, BLOBType, BoolType, FloatRange, \
|
from frappy.datatypes import ArrayOf, BLOBType, BoolType, FloatRange, \
|
||||||
IntRange, StringType, StructOf, TupleOf, ValueType
|
IntRange, StringType, StructOf, TupleOf, ValueType
|
||||||
from frappy.errors import CommunicationFailedError, ConfigError, \
|
from frappy.errors import CommunicationFailedError, ConfigError, \
|
||||||
ProgrammingError, SECoPError, SilentCommunicationFailedError as SilentError
|
ProgrammingError, SilentCommunicationFailedError as SilentError
|
||||||
from frappy.lib import generalConfig
|
from frappy.lib import generalConfig
|
||||||
from frappy.lib.asynconn import AsynConn, ConnectionClosed
|
from frappy.lib.asynconn import AsynConn, ConnectionClosed
|
||||||
from frappy.modules import Attached, Command, Communicator, Module, \
|
from frappy.modules import Attached, Command, Communicator, Module, \
|
||||||
@@ -125,7 +125,7 @@ class IOBase(Communicator):
|
|||||||
|
|
||||||
_reconnectCallbacks = None
|
_reconnectCallbacks = None
|
||||||
_conn = None
|
_conn = None
|
||||||
_last_error = None # this is None only until the first connection success
|
_last_error = None
|
||||||
_lock = None
|
_lock = None
|
||||||
_last_connect_attempt = 0
|
_last_connect_attempt = 0
|
||||||
|
|
||||||
@@ -167,17 +167,14 @@ class IOBase(Communicator):
|
|||||||
try:
|
try:
|
||||||
self.connectStart()
|
self.connectStart()
|
||||||
if self._last_error:
|
if self._last_error:
|
||||||
# we do not get here before the first connect success
|
|
||||||
self.log.info('connected')
|
self.log.info('connected')
|
||||||
self.callCallbacks()
|
|
||||||
self._last_error = 'connected'
|
self._last_error = 'connected'
|
||||||
|
self.callCallbacks()
|
||||||
|
return self.is_connected
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if repr(e) != self._last_error:
|
if repr(e) != self._last_error:
|
||||||
self._last_error = repr(e)
|
self._last_error = repr(e)
|
||||||
self.log.error(self._last_error)
|
self.log.error(self._last_error)
|
||||||
if not isinstance(e, CommunicationFailedError):
|
|
||||||
# when this happens on startup, assume it is not worth to continue
|
|
||||||
self.secNode.error_count += 1
|
|
||||||
raise SilentError(repr(e)) from e
|
raise SilentError(repr(e)) from e
|
||||||
return self.is_connected
|
return self.is_connected
|
||||||
|
|
||||||
@@ -196,7 +193,7 @@ class IOBase(Communicator):
|
|||||||
now = time.time()
|
now = time.time()
|
||||||
if now >= self._last_connect_attempt + self.pollinterval:
|
if now >= self._last_connect_attempt + self.pollinterval:
|
||||||
# we do not try to reconnect more often than pollinterval
|
# we do not try to reconnect more often than pollinterval
|
||||||
self._last_connect_attempt = now
|
_last_connect_attempt = now
|
||||||
if self.read_is_connected():
|
if self.read_is_connected():
|
||||||
return
|
return
|
||||||
raise SilentError('disconnected') from None
|
raise SilentError('disconnected') from None
|
||||||
@@ -221,23 +218,13 @@ class IOBase(Communicator):
|
|||||||
def communicate(self, command):
|
def communicate(self, command):
|
||||||
return NotImplementedError
|
return NotImplementedError
|
||||||
|
|
||||||
@Command
|
|
||||||
def reconnect(self):
|
|
||||||
"""close and open connection
|
|
||||||
|
|
||||||
sometimes a reconnect helps to heal a broken connection
|
|
||||||
"""
|
|
||||||
self.closeConnection()
|
|
||||||
self.read_is_connected() # this always tries to reconnect
|
|
||||||
|
|
||||||
|
|
||||||
class StringIO(IOBase):
|
class StringIO(IOBase):
|
||||||
"""line oriented communicator
|
"""line oriented communicator
|
||||||
|
|
||||||
self-healing is assured by polling the parameter 'is_connected'
|
self healing is assured by polling the parameter 'is_connected'
|
||||||
"""
|
"""
|
||||||
end_of_line = Property('end_of_line character or tuple(eol_read, eol_write)',
|
end_of_line = Property('end_of_line character', datatype=ValueType(),
|
||||||
datatype=ValueType(),
|
|
||||||
default='\n', settable=True)
|
default='\n', settable=True)
|
||||||
encoding = Property('used encoding', datatype=StringType(),
|
encoding = Property('used encoding', datatype=StringType(),
|
||||||
default='ascii', settable=True)
|
default='ascii', settable=True)
|
||||||
@@ -310,7 +297,6 @@ class StringIO(IOBase):
|
|||||||
"""
|
"""
|
||||||
command = command.encode(self.encoding)
|
command = command.encode(self.encoding)
|
||||||
self.check_connection()
|
self.check_connection()
|
||||||
new_error = 'no error' # in case of success (must not be None)
|
|
||||||
try:
|
try:
|
||||||
with self._lock:
|
with self._lock:
|
||||||
# read garbage and wait before send
|
# read garbage and wait before send
|
||||||
@@ -318,14 +304,12 @@ class StringIO(IOBase):
|
|||||||
cmds = command.split(self._eol_write)
|
cmds = command.split(self._eol_write)
|
||||||
else:
|
else:
|
||||||
cmds = [command]
|
cmds = [command]
|
||||||
# do not skip garbage when no reply is expected
|
garbage = None
|
||||||
skip_garbage = not noreply
|
|
||||||
try:
|
try:
|
||||||
for cmd in cmds:
|
for cmd in cmds:
|
||||||
if self.wait_before:
|
if self.wait_before:
|
||||||
time.sleep(self.wait_before)
|
time.sleep(self.wait_before)
|
||||||
if skip_garbage:
|
if garbage is None: # read garbage only once
|
||||||
skip_garbage = False # read garbage only once
|
|
||||||
garbage = self._conn.flush_recv()
|
garbage = self._conn.flush_recv()
|
||||||
if garbage:
|
if garbage:
|
||||||
self.comLog('garbage: %r', garbage)
|
self.comLog('garbage: %r', garbage)
|
||||||
@@ -341,19 +325,12 @@ class StringIO(IOBase):
|
|||||||
self.comLog('< %s', reply)
|
self.comLog('< %s', reply)
|
||||||
return reply
|
return reply
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
new_error = 'disconnected' if self._conn is None else repr(e)
|
if self._conn is None:
|
||||||
if new_error != self._last_error:
|
raise SilentError('disconnected') from None
|
||||||
# suppress subsequent equal error messages
|
if repr(e) != self._last_error:
|
||||||
# this is in addition to the mechanism in Module.callPollFunc
|
self._last_error = repr(e)
|
||||||
# as the same error would appear potentially in a lot of
|
self.log.error(self._last_error)
|
||||||
# methods
|
raise SilentError(repr(e)) from e
|
||||||
if isinstance(e, SECoPError):
|
|
||||||
self.log.error(new_error)
|
|
||||||
else:
|
|
||||||
self.log.exception(new_error)
|
|
||||||
raise SilentError(new_error) from e
|
|
||||||
finally:
|
|
||||||
self._last_error = new_error
|
|
||||||
|
|
||||||
@Command(StringType())
|
@Command(StringType())
|
||||||
def writeline(self, command):
|
def writeline(self, command):
|
||||||
@@ -420,34 +397,6 @@ class StringIO(IOBase):
|
|||||||
time.sleep(delay)
|
time.sleep(delay)
|
||||||
return replies
|
return replies
|
||||||
|
|
||||||
@Command(result=StringType())
|
|
||||||
def readline(self):
|
|
||||||
"""read a line, if available within self.timeout
|
|
||||||
|
|
||||||
remark: the call might return earlier, when an other
|
|
||||||
thread consumed the data in parallel
|
|
||||||
"""
|
|
||||||
self.check_connection()
|
|
||||||
try:
|
|
||||||
if self._conn.read_ready(self.timeout):
|
|
||||||
with self._lock: # important: lock only after waiting
|
|
||||||
reply = self._conn.readline(0)
|
|
||||||
if reply:
|
|
||||||
reply = reply.decode(self.encoding)
|
|
||||||
self.comLog('< %s', reply)
|
|
||||||
return reply
|
|
||||||
return ''
|
|
||||||
except ConnectionClosed:
|
|
||||||
self.closeConnection()
|
|
||||||
raise CommunicationFailedError('disconnected') from None
|
|
||||||
except Exception as e:
|
|
||||||
if self._conn is None:
|
|
||||||
raise SilentError('disconnected') from None
|
|
||||||
if repr(e) != self._last_error:
|
|
||||||
self._last_error = repr(e)
|
|
||||||
self.log.error(self._last_error)
|
|
||||||
raise SilentError(repr(e)) from e
|
|
||||||
|
|
||||||
|
|
||||||
def make_regexp(string):
|
def make_regexp(string):
|
||||||
"""create a bytes regexp pattern from a string describing a bytes pattern
|
"""create a bytes regexp pattern from a string describing a bytes pattern
|
||||||
@@ -511,7 +460,6 @@ class BytesIO(IOBase):
|
|||||||
def communicate(self, request, replylen): # pylint: disable=arguments-differ
|
def communicate(self, request, replylen): # pylint: disable=arguments-differ
|
||||||
"""send a request and receive (at least) <replylen> bytes as reply"""
|
"""send a request and receive (at least) <replylen> bytes as reply"""
|
||||||
self.check_connection()
|
self.check_connection()
|
||||||
new_error = 'no error' # in case of success (must not be None)
|
|
||||||
try:
|
try:
|
||||||
with self._lock:
|
with self._lock:
|
||||||
# read garbage and wait before send
|
# read garbage and wait before send
|
||||||
@@ -530,19 +478,12 @@ class BytesIO(IOBase):
|
|||||||
self.comLog('< %s', hexify(reply))
|
self.comLog('< %s', hexify(reply))
|
||||||
return self.getFullReply(request, reply)
|
return self.getFullReply(request, reply)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
new_error = 'disconnected' if self._conn is None else repr(e)
|
if self._conn is None:
|
||||||
if new_error != self._last_error:
|
raise SilentError('disconnected') from None
|
||||||
# suppress subsequent equal error messages
|
if repr(e) != self._last_error:
|
||||||
# this is in addition to the mechanism in Module.callPollFunc
|
self._last_error = str(e)
|
||||||
# as the same error would appear potentially in a lot of
|
self.log.error(self._last_error)
|
||||||
# methods
|
raise SilentError(repr(e)) from e
|
||||||
if isinstance(e, SECoPError):
|
|
||||||
self.log.error(new_error)
|
|
||||||
else:
|
|
||||||
self.log.exception(new_error)
|
|
||||||
raise SilentError(new_error) from e
|
|
||||||
finally:
|
|
||||||
self._last_error = new_error
|
|
||||||
|
|
||||||
@Command(StructOf(requests=ArrayOf(TupleOf(BLOBType(), IntRange(0), FloatRange(0, unit='s')))),
|
@Command(StructOf(requests=ArrayOf(TupleOf(BLOBType(), IntRange(0), FloatRange(0, unit='s')))),
|
||||||
result=ArrayOf(BLOBType()))
|
result=ArrayOf(BLOBType()))
|
||||||
|
|||||||
@@ -234,37 +234,22 @@ def clamp(_min, value, _max):
|
|||||||
i.e. value if min <= value <= max, else min or max depending on which side
|
i.e. value if min <= value <= max, else min or max depending on which side
|
||||||
value lies outside the [min..max] interval. This works even when min > max!
|
value lies outside the [min..max] interval. This works even when min > max!
|
||||||
"""
|
"""
|
||||||
# return median, i.e. clamp the value between min and max
|
# return median, i.e. clamp the the value between min and max
|
||||||
return sorted([_min, value, _max])[1]
|
return sorted([_min, value, _max])[1]
|
||||||
|
|
||||||
|
|
||||||
def get_class(spec):
|
def get_class(spec):
|
||||||
"""loads an object given by string in dotted notation (as python would do)
|
"""loads a class given by string in dotted notation (as python would do)"""
|
||||||
|
modname, classname = spec.rsplit('.', 1)
|
||||||
import the specified module and get the specified item from it
|
if modname.startswith('frappy'):
|
||||||
examples: 'frappy_demo.lakeshore.TemperatureSensor', 'frappy.modules.Readable.Status'
|
module = importlib.import_module(modname)
|
||||||
|
else:
|
||||||
:param spec: a dot-separated list of module names followed by the name of
|
# rarely needed by now....
|
||||||
a class (or any object) and optionally names of attributes
|
module = importlib.import_module('frappy.' + modname)
|
||||||
:return: the object
|
|
||||||
"""
|
|
||||||
for maxsplit in range(1, len(spec)):
|
|
||||||
# len(spec) is high enough for all cases
|
|
||||||
module, *attrs = spec.rsplit('.', maxsplit)
|
|
||||||
try:
|
try:
|
||||||
obj = importlib.import_module(module)
|
return getattr(module, classname)
|
||||||
break
|
|
||||||
except ImportError:
|
|
||||||
if '.' in module:
|
|
||||||
continue
|
|
||||||
raise
|
|
||||||
for na, attr in enumerate(attrs):
|
|
||||||
try:
|
|
||||||
obj = getattr(obj, attr)
|
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
print(na, attrs)
|
raise AttributeError('no such class') from None
|
||||||
raise AttributeError(f'{".".join(attrs[:na+1])!r} not found in {module!r}') from None
|
|
||||||
return obj
|
|
||||||
|
|
||||||
|
|
||||||
def mkthread(func, *args, **kwds):
|
def mkthread(func, *args, **kwds):
|
||||||
@@ -492,15 +477,3 @@ def delayed_import(modname):
|
|||||||
except Exception:
|
except Exception:
|
||||||
return _Raiser(modname)
|
return _Raiser(modname)
|
||||||
return module
|
return module
|
||||||
|
|
||||||
|
|
||||||
class LazyImport:
|
|
||||||
module = None
|
|
||||||
|
|
||||||
def __init__(self, modulename):
|
|
||||||
self.modulename = modulename
|
|
||||||
|
|
||||||
def __getattr__(self, name):
|
|
||||||
if self.module is None:
|
|
||||||
self.module = __import__(self.modulename)
|
|
||||||
return getattr(self.module, name)
|
|
||||||
@@ -28,10 +28,10 @@ synchronous IO (see frappy.io)
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import ast
|
import ast
|
||||||
|
import select
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
import re
|
import re
|
||||||
from select import select
|
|
||||||
|
|
||||||
from frappy.errors import CommunicationFailedError, ConfigError
|
from frappy.errors import CommunicationFailedError, ConfigError
|
||||||
from frappy.lib import closeSocket, parse_host_port, SECoP_DEFAULT_PORT
|
from frappy.lib import closeSocket, parse_host_port, SECoP_DEFAULT_PORT
|
||||||
@@ -50,7 +50,8 @@ class AsynConn:
|
|||||||
timeout = 1 # inter byte timeout
|
timeout = 1 # inter byte timeout
|
||||||
scheme = None
|
scheme = None
|
||||||
SCHEME_MAP = {}
|
SCHEME_MAP = {}
|
||||||
_connection = None # None means disconnected
|
connection = None # is not None, if connected
|
||||||
|
HOSTNAMEPAT = re.compile(r'[a-z0-9_.-]+$', re.IGNORECASE) # roughly checking if it is a valid hostname
|
||||||
|
|
||||||
def __new__(cls, uri, end_of_line=b'\n', default_settings=None):
|
def __new__(cls, uri, end_of_line=b'\n', default_settings=None):
|
||||||
scheme = uri.split('://')[0]
|
scheme = uri.split('://')[0]
|
||||||
@@ -84,12 +85,6 @@ class AsynConn:
|
|||||||
if cls.scheme:
|
if cls.scheme:
|
||||||
cls.SCHEME_MAP[cls.scheme] = cls
|
cls.SCHEME_MAP[cls.scheme] = cls
|
||||||
|
|
||||||
@property
|
|
||||||
def connection(self):
|
|
||||||
if self._connection is None:
|
|
||||||
raise ConnectionClosed()
|
|
||||||
return self._connection
|
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
"""prepare connection for disconnect, can be empty"""
|
"""prepare connection for disconnect, can be empty"""
|
||||||
|
|
||||||
@@ -111,34 +106,25 @@ class AsynConn:
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def recv_nowait(self):
|
|
||||||
"""return bytes in buffer without waiting"""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def flush_recv(self):
|
def flush_recv(self):
|
||||||
"""flush all available bytes (return them)"""
|
"""flush all available bytes (return them)"""
|
||||||
result = self._rxbuffer + self.recv_nowait()
|
raise NotImplementedError
|
||||||
self._rxbuffer = b''
|
|
||||||
return result
|
|
||||||
|
|
||||||
def readline(self, timeout=None):
|
def readline(self, timeout=None):
|
||||||
"""read one line
|
"""read one line
|
||||||
|
|
||||||
Return either a complete line or None if not enough is available
|
return either a complete line or None if no data available within 1 sec (self.timeout)
|
||||||
within 1 sec (self.timeout).
|
if a non-zero timeout is given, a timeout error is raised instead of returning None
|
||||||
With timeout=0 no waiting happens at all.
|
the timeout effectively used will not be lower than self.timeout (1 sec)
|
||||||
If a non-zero timeout is given, a timeout error is raised instead
|
|
||||||
of returning None.
|
|
||||||
The timeout resolution is self.timeout (1 sec by default)
|
|
||||||
"""
|
"""
|
||||||
end = time.time() + timeout if timeout else 0
|
if timeout:
|
||||||
recv = self.recv_nowait if timeout == 0 else self.recv
|
end = time.time() + timeout
|
||||||
while True:
|
while True:
|
||||||
splitted = self._rxbuffer.split(self.end_of_line, 1)
|
splitted = self._rxbuffer.split(self.end_of_line, 1)
|
||||||
if len(splitted) == 2:
|
if len(splitted) == 2:
|
||||||
line, self._rxbuffer = splitted
|
line, self._rxbuffer = splitted
|
||||||
return line
|
return line
|
||||||
data = recv()
|
data = self.recv()
|
||||||
if not data:
|
if not data:
|
||||||
if timeout:
|
if timeout:
|
||||||
if time.time() < end:
|
if time.time() < end:
|
||||||
@@ -150,17 +136,14 @@ class AsynConn:
|
|||||||
def readbytes(self, nbytes, timeout=None):
|
def readbytes(self, nbytes, timeout=None):
|
||||||
"""read a fixed number of bytes
|
"""read a fixed number of bytes
|
||||||
|
|
||||||
Return either <nbytes> bytes or None if not enough data is available
|
return either <nbytes> bytes or None if not enough data available within 1 sec (self.timeout)
|
||||||
within 1 sec (self.timeout).
|
if a non-zero timeout is given, a timeout error is raised instead of returning None
|
||||||
With timeout=0 no waiting happens at all.
|
the timeout effectively used will not be lower than self.timeout (1 sec)
|
||||||
If a non-zero timeout is given, a timeout error is raised instead
|
|
||||||
of returning None
|
|
||||||
The timeout resolution is self.timeout (1 sec by default)
|
|
||||||
"""
|
"""
|
||||||
end = time.time() + timeout if timeout else 0
|
if timeout:
|
||||||
recv = self.recv_nowait if timeout == 0 else self.recv
|
end = time.time() + timeout
|
||||||
while len(self._rxbuffer) < nbytes:
|
while len(self._rxbuffer) < nbytes:
|
||||||
data = recv()
|
data = self.recv()
|
||||||
if not data:
|
if not data:
|
||||||
if timeout:
|
if timeout:
|
||||||
if time.time() < end:
|
if time.time() < end:
|
||||||
@@ -175,9 +158,6 @@ class AsynConn:
|
|||||||
def writeline(self, line):
|
def writeline(self, line):
|
||||||
self.send(line + self.end_of_line)
|
self.send(line + self.end_of_line)
|
||||||
|
|
||||||
def read_ready(self, timeout=1):
|
|
||||||
return bool(select([self.connection], [], [], timeout)[0])
|
|
||||||
|
|
||||||
|
|
||||||
class AsynTcp(AsynConn):
|
class AsynTcp(AsynConn):
|
||||||
"""a tcp/ip connection
|
"""a tcp/ip connection
|
||||||
@@ -194,38 +174,45 @@ class AsynTcp(AsynConn):
|
|||||||
if uri.startswith('tcp://'):
|
if uri.startswith('tcp://'):
|
||||||
uri = uri[6:]
|
uri = uri[6:]
|
||||||
try:
|
try:
|
||||||
host, port = parse_host_port(
|
|
||||||
uri, self.default_settings.get('port', SECoP_DEFAULT_PORT))
|
host, port = parse_host_port(uri, self.default_settings.get('port', SECoP_DEFAULT_PORT))
|
||||||
self._connection = socket.create_connection(
|
self.connection = socket.create_connection((host, port), timeout=self.timeout)
|
||||||
(host, port), timeout=self.timeout)
|
|
||||||
except (ConnectionRefusedError, socket.gaierror, socket.timeout) as e:
|
except (ConnectionRefusedError, socket.gaierror, socket.timeout) as e:
|
||||||
# indicate that retrying might make sense
|
# indicate that retrying might make sense
|
||||||
raise CommunicationFailedError(f'can not connect to {host}:{port}, {e}') from None
|
raise CommunicationFailedError(f'can not connect to {host}:{port}, {e}') from None
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
if self._connection:
|
if self.connection:
|
||||||
try:
|
try:
|
||||||
self.connection.shutdown(socket.SHUT_RDWR)
|
self.connection.shutdown(socket.SHUT_RDWR)
|
||||||
except OSError:
|
except OSError:
|
||||||
pass # in case socket is already disconnected
|
pass # in case socket is already disconnected
|
||||||
|
|
||||||
def disconnect(self):
|
def disconnect(self):
|
||||||
if self._connection:
|
if self.connection:
|
||||||
closeSocket(self.connection)
|
closeSocket(self.connection)
|
||||||
self._connection = None
|
self.connection = None
|
||||||
|
|
||||||
def send(self, data):
|
def send(self, data):
|
||||||
"""send data (bytes!)"""
|
"""send data (bytes!)"""
|
||||||
# remark: will raise socket.timeout when output buffer is full and blocked for self.timeout
|
# remark: will raise socket.timeout when output buffer is full and blocked for 1 sec
|
||||||
self.connection.sendall(data)
|
self.connection.sendall(data)
|
||||||
|
|
||||||
|
def flush_recv(self):
|
||||||
|
"""flush recv buffer"""
|
||||||
|
data = [self._rxbuffer]
|
||||||
|
while select.select([self.connection], [], [], 0)[0]:
|
||||||
|
data.append(self.recv())
|
||||||
|
self._rxbuffer = b''
|
||||||
|
return b''.join(data)
|
||||||
|
|
||||||
def recv(self):
|
def recv(self):
|
||||||
"""return bytes in the recv buffer
|
"""return bytes in the recv buffer
|
||||||
|
|
||||||
or bytes received within self.timeout
|
or bytes received within 1 sec
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
data = self.connection.recv(1024*1024)
|
data = self.connection.recv(8192)
|
||||||
if data:
|
if data:
|
||||||
return data
|
return data
|
||||||
except (socket.timeout, TimeoutError):
|
except (socket.timeout, TimeoutError):
|
||||||
@@ -238,12 +225,6 @@ class AsynTcp(AsynConn):
|
|||||||
# help in this case.
|
# help in this case.
|
||||||
raise ConnectionClosed() # marks end of connection
|
raise ConnectionClosed() # marks end of connection
|
||||||
|
|
||||||
def recv_nowait(self):
|
|
||||||
"""return bytes in the recv buffer"""
|
|
||||||
if select([self.connection], [], [], 0)[0]:
|
|
||||||
return self.recv()
|
|
||||||
return b''
|
|
||||||
|
|
||||||
|
|
||||||
class AsynSerial(AsynConn):
|
class AsynSerial(AsynConn):
|
||||||
"""a serial connection using pyserial
|
"""a serial connection using pyserial
|
||||||
@@ -298,41 +279,31 @@ class AsynSerial(AsynConn):
|
|||||||
if 'timeout' not in options:
|
if 'timeout' not in options:
|
||||||
options['timeout'] = self.timeout
|
options['timeout'] = self.timeout
|
||||||
try:
|
try:
|
||||||
self._connection = Serial(dev, **options)
|
self.connection = Serial(dev, **options)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
raise ConfigError(e) from None
|
raise ConfigError(e) from None
|
||||||
# TODO: turn exceptions into ConnectionFailedError, where a retry makes sense
|
# TODO: turn exceptions into ConnectionFailedError, where a retry makes sense
|
||||||
|
|
||||||
def disconnect(self):
|
def disconnect(self):
|
||||||
if self._connection:
|
if self.connection:
|
||||||
self.connection.close()
|
self.connection.close()
|
||||||
self._connection = None
|
self.connection = None
|
||||||
|
|
||||||
def send(self, data):
|
def send(self, data):
|
||||||
"""send data (bytes!)"""
|
"""send data (bytes!)"""
|
||||||
self.connection.write(data)
|
self.connection.write(data)
|
||||||
|
|
||||||
|
def flush_recv(self):
|
||||||
|
result = self._rxbuffer + self.connection.read(self.connection.in_waiting)
|
||||||
|
self._rxbuffer = b''
|
||||||
|
return result
|
||||||
|
|
||||||
def recv(self):
|
def recv(self):
|
||||||
"""return bytes received within self.timeout"""
|
"""return bytes received within 1 sec"""
|
||||||
|
if not self.connection: # disconnect() might have been called in between
|
||||||
|
raise ConnectionClosed()
|
||||||
n = self.connection.in_waiting
|
n = self.connection.in_waiting
|
||||||
if n:
|
if n:
|
||||||
return self.connection.read(n)
|
return self.connection.read(n)
|
||||||
data = self.connection.read(1)
|
data = self.connection.read(1)
|
||||||
return data + self.connection.read(self.connection.in_waiting)
|
return data + self.connection.read(self.connection.in_waiting)
|
||||||
|
|
||||||
def recv_nowait(self):
|
|
||||||
n = self.connection.in_waiting
|
|
||||||
return self.connection.read(n) if n else b''
|
|
||||||
|
|
||||||
if not hasattr(Serial, 'fileno'):
|
|
||||||
# select is not supported for serial objects (Windows)
|
|
||||||
# create a less efficient workaround
|
|
||||||
def read_ready(self, timeout=1):
|
|
||||||
if self.connection.in_waiting:
|
|
||||||
return True
|
|
||||||
deadline = time.time() + timeout
|
|
||||||
while time.time() < deadline:
|
|
||||||
if self.connection.in_waiting:
|
|
||||||
return True
|
|
||||||
time.sleep(0.05)
|
|
||||||
return False
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user