1307 Commits

Author SHA1 Message Date
7a870aa56c rework datatypes (setter should not check limits)
- use Datatype.validate for converting and checking limits
  (used also in properties)
- Datatype.__call__ converts and validates, but without checking
  limits (used in setter)
- Datatype.validate may be used to add missing optional struct elements
  from previous value (used in Dispatcher._setParameterValue)
- remove problematic range check
+ use shorter formula for converting float to int in ScaledInteger
  (leftover from python2 compatibility)
+ improve error messages (strip very long repr(value))

Change-Id: Ib85736fe558ec3370ebce4e1c43f957e3bb0497c
2023-01-16 10:18:15 +01:00
Alexander Zaft
09d48ea913 Merge "GUI: add logging infra, switch to argparse" 2023-01-12 13:12:09 +01:00
Alexander Zaft
8850edbc2d Merge "Change config to Python" 2023-01-12 13:10:37 +01:00
59cc981566 client: detect original frappy error class
The text part of the error report contains the original error
class - convert it to the frappy error class, if possible.
This makes the error messages on the client nicer, as the
error class would be duplicated in the error message on the
client side.

Change-Id: If2e0c3eb15ac2dd1b80a851ff42e4076557a325d
2022-12-22 13:44:08 +01:00
3cc9a75174 improve He level tutorial
values return from read_* methods should be converted
from string to float on float parameters

+ fix some wording

Change-Id: Ic80010c6fbe3eef23483ff69c8a43e25afb8bb6a
2022-12-22 13:39:47 +01:00
l_samenv
589b857039 add driver for LakeShore 372
- including channelswitcher
2022-12-21 11:05:15 +01:00
l_samenv
ad4a6d2e09 improved cyoltd (flame magnet)
- use a statemachine
- do more control in frappy, switching from persistent to driven
  internally
- a lot of fixes
2022-12-21 11:00:19 +01:00
l_samenv
766f15beee improvements in magfield
- use HasTargetLimits instead of HasLimits
- move ramp_tmo parameter to SompleMagfield
- add last_target method
- fix progress check in SimpleMagfield.ramp_to_target
- better mechanism for setting to persistent mode after restart
- fix switching mode
- fix on_error
- fix condition for shortcut start_field_change -> check_switch_off
- remove direct status updates
- move check for manual switch heater operations to ips_mercury
2022-12-21 10:57:41 +01:00
l_samenv
79b8cd7b2d fix inheritance of status codes attached to state functions 2022-12-21 10:38:11 +01:00
Alexander Zaft
52b77ba9e6 Change config to Python
- Change Configuration format to be python-based.
- move config logic to frappy/config.py
- Add first py-config: cryo_cfg.py
- Adapt test to new expected config format

Change-Id: Iaec484e0e1e21ebbb1e5c74b53be6231329ddf71
2022-12-20 09:48:14 +01:00
l_samenv
bd0f3a0b07 fixe in triton and mercury 2022-12-19 16:13:06 +01:00
l_samenv
c4f9f2ef4b rename action to dil_action 2022-12-19 16:12:06 +01:00
l_samenv
0820d537c3 Merge branch 'wip' of gitlab.psi.ch:samenv/frappy into wip 2022-12-19 16:09:40 +01:00
1a6aa893e4 move persistent_field parameter from magnet.py to ips_magnet.py
'persistent_field' is in principle the same as 'value'.
however, on IPS it might be different, at least it is a seperate
HW parameter
2022-12-19 16:03:44 +01:00
b10c722ff6 Merge branch 'wip' of gitlab.psi.ch-samenv:samenv/frappy into wip 2022-12-19 15:13:20 +01:00
b7a1f17e5e fix new statemachine with ips magfield
+ add on_error, on_restart etc. to states.py
+ add n_retry argument to mercury change/multichange
2022-12-19 15:12:00 +01:00
Bjoern Pedersen
db3b190c26 Improve jenkinsfile
Change-Id: I68efdd1a20135a0374fb9692e369a315824786ea
2022-12-19 14:34:48 +01:00
Alexander Zaft
c522c41654 GUI: add logging infra, switch to argparse
First part for #4662

Change-Id: I75877337e8ea35d4c4555471ee4518c942dac88a
2022-12-08 16:38:00 +01:00
Enrico Faulhaber
929e41ffff Merge "Fix identification response" 2022-12-06 18:00:10 +01:00
Alexander Zaft
8d99a8c536 Fix identification response
- fix header, but accept both responses
- warn when counterpart uses old behaviour

Fixes: #4659
Change-Id: Ib8869755898bf20edcbc7ae93157c943f816ebc1
2022-12-06 14:43:45 +01:00
a14c282993 redesign of the state machine
With the current implementation, we run into a deadlock with the lock
from the state machine interfering with the accessLock on the module.
We can not wait for the state machine to finish while having the
accessLock locked by write_target. As a consequence, when restarting
the state machine we should not wait, but remember the state function
to call and postpone the restart after the cleanup has finished.
For this, we want to know the status before calling the state function.

- create HasState mixin, using doPoll for driving the machine
- StatusCode decorator for assigning a status to a state function
- remove the state machines 'threaded' option
- 'Retry' is now a unique value instead of a class. The retry period
  is determined by the (fast) poll interval.
- return 'Finish' instead of None for finishing the machine. returning
  None for state function is now an error, as this might happen
  easily inadvertently.

Change-Id: Icb31367442f10e98be69af3e05a84f12ce5cc966
2022-12-06 10:18:50 +01:00
l_samenv
a0d14c30be attocube: more robust moving
- try up to 10 times when end of travel or no more progress
- issue WARN instead of ERROR when moving did not work
2022-12-02 10:37:45 +01:00
l_samenv
e668b6a439 attocube: add offset and change to HasTargetLimits 2022-12-02 09:12:51 +01:00
l_samenv
3483c3374d allow pollinterval = 0 2022-12-02 09:10:07 +01:00
l_samenv
d71a512454 new features HasTargetLimits and HasSimpleOffset
according to standard
2022-12-02 09:07:20 +01:00
l_samenv
b1608c4d7f Merge branch 'wip' of gitlab.psi.ch:samenv/frappy into wip 2022-12-02 09:00:12 +01:00
l_samenv
e4c1f35e4a add attocube 2022-12-02 08:54:26 +01:00
l_samenv
3ab7eb99ab add flamemag / flamedil config 2022-11-30 14:14:47 +01:00
l_samenv
ef9d89993c new specs of HasOffset and target_limits 2022-11-30 14:14:06 +01:00
l_samenv
9887ba0721 improve Attached
- allow a default value
- make copy method work properly
2022-11-30 14:11:05 +01:00
Alexander Zaft
d09634a55d Fix error Message for too large arrays
Change-Id: I69b6789ef9f463565918a395120b8f5ad3494b20
2022-11-28 09:28:37 +01:00
397ca350f8 add FLAMP furnace 2022-11-24 07:56:09 +01:00
99220400f1 add FS furnace 2022-11-24 07:55:36 +01:00
dmc
4e8636a620 heliox: make temperatures seperate modules 2022-11-24 07:50:24 +01:00
dmc
f14bd553a8 disable closed loop on MA10 rotator 2022-11-24 07:49:36 +01:00
2845a82236 Merge branch 'wip' of gitlab.psi.ch-samenv:samenv/frappy into wip 2022-11-23 22:41:49 +01:00
4f5cc3059e add FT furnace 2022-11-23 22:41:23 +01:00
l_samenv
d845fedc03 Merge branch 'wip' of gitlab.psi.ch:samenv/frappy into wip 2022-11-21 14:38:40 +01:00
l_samenv
1b2e364f70 magfield adapted to new state machine 2022-11-21 14:37:53 +01:00
l_samenv
4405b2b02c new state machine, HasStates mixin 2022-11-21 14:13:52 +01:00
l_samenv
49b9bfa11d improvements for triton
- set cooldown channel befor setting action
- improve max heater setting
2022-11-15 16:57:52 +01:00
l_samenv
df428f4c0c check readback and try up to 3 times when it does not match 2022-11-15 16:57:00 +01:00
b17030afa2 Merge "interactive client: fix detection of overriding modules" 2022-11-10 17:01:34 +01:00
37c9efb27b interactive client: fix detection of overriding modules
+ add docstring to PrettyFloat

Change-Id: Idc92e169e94d0c2bd3f9b8958870393295c87b18
2022-11-10 15:58:28 +01:00
Enrico Faulhaber
4167ce7b00 fix sorce package name
Change-Id: I91cd5d5e6d2da00eedc3e2ff0ee2a1d3e9ed4b04
2022-11-10 15:00:27 +01:00
Jenkins system
2b7b2267d2 [deb] Release v0.15.0 2022-11-10 14:46:02 +01:00
Enrico Faulhaber
8071c21819 Merge "Fix typo in .description" 2022-11-10 14:43:32 +01:00
Enrico Faulhaber
e16ef3ae87 Merge "rename debian files" 2022-11-10 14:42:54 +01:00
Björn Pedersen
51147d8e09 Fix doc warnings/errors
Change-Id: Idd6feeb66d58bc562853d3a82831645ef2d5ccf6
2022-11-10 11:12:32 +02:00
Alexander Zaft
6909eb8541 rename debian files
Change-Id: Ib990ecb8ef5ad856eb32110e5448064acf9a5a12
2022-11-10 09:46:46 +01:00