312 Commits

Author SHA1 Message Date
57082e276f uniax, version 7.10.2021
- driving with a generator
- 3 phases
  1) find active range (low current, far movement until force over hysteresis)
  2) release force until well below target
  3) adjusting using pid_p. (this is in fact an integral factor)
2021-10-08 08:53:22 +02:00
70b9c88f82 revert signature of Accessibles.copy() method
no more kwds arguments, method 'merge' should be used

Change-Id: I7028d9df8b69c018dcdc0c55d3ae0f71e24ee15b
2021-10-06 13:31:21 +02:00
21dfcbd290 allow interval in SimDrivable to be customized
Change-Id: Id59d263e5f54fda9388dcdaa34a3ce83b6d4a339
2021-10-06 08:46:04 +02:00
cbb005d942 show traceback of first error instead of last one
Change-Id: Iee418dcfb1d81a16112eed57b03c86242c2128b4
2021-10-06 08:34:56 +02:00
929f55055e fix property inheritance
Change-Id: If01b98fc38c730e73799b43c78838afee6cf6058
2021-10-06 08:33:52 +02:00
e38cd11bfe fix parameter inheritance using MRO
+ no update on unhchanged values within 1 sec

Change-Id: I3e3d50bb5541e8d4da2badc3133d243dd0a3b892
2021-10-06 08:32:47 +02:00
8bbf65f6e8 Merge branch 'uniax' into wip
Conflicts:
	cfg/uniax.cfg
	secop/core.py
	secop_psi/trinamic.py
2021-09-21 16:52:15 +02:00
e98f81a7c9 reduce communication traffic
- expermental change: no updates of unchanged values within 1 sec
- reduce fast_pollfactor in trinamic
- improve stop behaviour of dpm.DPM
2021-09-21 16:40:54 +02:00
584a293643 fix secop.io imports
Change-Id: I8abe4836312cdd2d17847ca0a117dceebaaac235
2021-07-27 09:19:28 +02:00
4f6cb8755e additional fixes in secop.io
Change-Id: Ifdda637183de2b878317c477215f5874d088a668
2021-07-27 08:14:01 +02:00
a037accbb8 backport fixes from MLZ repo
- unification of secop.stringio/bytesio to secop.io
- persistent parameters

Change-Id: I76307cccc5191ac8cbb5cfec6fb7450fcf6945f1
2021-07-27 08:11:51 +02:00
2ff3a17427 fix simulation
Change-Id: Iaa05d3a7a78b6000ab3c372074bf4053dd74aadb
2021-07-06 16:25:35 +02:00
495709b670 allow partial describe
in addition to the SECoP standard

Change-Id: If756e8d9d6a67d3194abc0fe2436cf7124713536
2021-07-06 16:24:44 +02:00
d9cc85c1df fix issues raising pylint warnings
+ small bug fixes

Change-Id: Ib63bf13ad06446d3ec3b8cd0b16f9426cef9e3f4
2021-07-06 16:23:06 +02:00
b30bd308a9 fixes for uniax device 2021-06-11 16:45:45 +02:00
039ece9549 allow to remove accessibles
removing an inherited command or parameter can now be indicated
with an attribute set to None

Change-Id: I9645c58e2589c878b62dcebe7a80f479a2b65339
2021-06-08 16:17:23 +02:00
6c4bb78f97 minor fixes
Change-Id: I41aa50b1742fb0e24ff5a34d6d9ba98a6b4c4905
2021-06-08 15:32:12 +02:00
b226f2c7c0 trinamic and persistent
- remove methods from Modules existing in secop.persistent
- do reset on start when encoder matched and motor was power cycled
2021-06-08 15:32:12 +02:00
25b8780b11 persistent module fixed 2021-06-08 14:59:20 +02:00
246ab99e12 experimental persistent mixin
- still contains changes in mouduls/params ...
2021-06-08 14:59:20 +02:00
49ad153605 trinamic driver and bytesio module
Change-Id: Id634e7514fecab6fd6bc3edf81e25ad41c2bb12f
2021-06-08 14:58:19 +02:00
21c49df1a2 fixes on secop gui
- do not display a dialog when a command returns None
- apply fmtstr, if available

Change-Id: I74da3e86e4eae9000608581e0a0f6e8c72cef715
2021-06-04 12:26:34 +02:00
e589ed1063 treat raised error message in modules.py correctly when arg is not a list
Change-Id: I4082a65849c71b3f212f2c8c345a6881f972d107
2021-04-28 12:01:34 +02:00
l_samenv
c89c982c42 improve comments (poller.py) 2021-04-27 17:15:28 +02:00
4bda112bb7 pollOneParam has no return value (avoid pylint complaint)
Change-Id: Iab75c970e106617ffd4e612d358da491312ca54b
2021-04-27 16:51:37 +02:00
57e9367e40 improve more errors during startup
errors from a module a combined with a header and intended
details

Change-Id: I4be7bc2f8455fb0e3c9346f3bb23ac88e7589604
2021-04-27 16:04:24 +02:00
de7a91d727 fix poller issue with dynamic interval
calculating next due must also be done when current poll was not due

Change-Id: I18d9cbc61aa6ca66f3fc2dc4cdfa1fce29a87705
2021-04-27 16:04:15 +02:00
l_samenv
d3fc01689f improve more handling of errors when starting server
+ add shutdown method to server (and dispatcher)
2021-04-08 10:21:44 +02:00
l_samenv
dec286460d starting TcpServer in case of Address already in use
try several times, in case this is a restart. It seems that
allow_reuse_address = True is not always enough
2021-04-08 10:19:03 +02:00
l_samenv
d768d84ea1 check if configured item is available before setting
if neither a property nor a parameter exists for a given
configured item, just an attribute was created
2021-04-08 10:16:24 +02:00
l_samenv
4d8390c1fe better error message when validating int 2021-04-08 10:15:42 +02:00
l_samenv
10dad6da47 client: change online state before callback
the client in NICOS is referring to the online state within the
callback.

+ better error handling
2021-04-08 10:11:04 +02:00
48230334af fix inheritance problem with mixin
- a mixin should not inherit from module then it has Parameters
- Parameters in mixins must be complete, not just overrides
- check precedence of read_<param> or handler

Change-Id: I72d9355a1982770d1a99d9552a20330103c97edb
2021-03-18 13:32:54 +01:00
fb01f81cb6 fix user friendly reporting of config errors
Change-Id: I42ec1ad2e18a0363fb7317c86743ff2f6665f049
2021-03-11 15:33:21 +01:00
3b03e578bb user friendly reporting of config errors
Config errors are collected first, and raised after processing
all modules. This is more user friendly.

+ remove redundant check for predefined accessibles in modules.py
+ fixed error handling for exporting parameters in params.py
+ fixed handling of bare attributes overwriting properties

Change-Id: I894bda291ab85ccec3d771c4903393c808af0a2a
2021-03-08 10:47:22 +01:00
804581546d user friendly reporting of config errors
Config errors are collected first, and raised after processing
all modules. This is more user friendly.

+ remove redundant check for predefined accessibles in modules.py
+ fixed error handling for exporting parameters in params.py
+ fixed handling of bare attributes overwriting properties

Change-Id: I894bda291ab85ccec3d771c4903393c808af0a2a
2021-03-08 10:33:20 +01:00
l_samenv
adc9a6da71 fixed bugs from syntax migration
- a new wrapper for a read function is not only to be created when
  the a new read method is in the class dict, but also when
  it is inherited, but not yet wrapped
- a handler must not be ignored, when a write method is inherited
- a proxy class must not call checkProperties

+ remove trailing spaces in tutorial_helevel.rst

Change-Id: I16024c14232ea200db91a1bc07ec23326219ab68
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25093
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2021-03-08 10:22:58 +01:00
l_samenv
1760881f56 fixed bugs from syntax migration
- a new wrapper for a read function is not only to be created when
  the a new read function is in the class dict, but also when
  it inherited, but not yet wrapped
- a proxy class must not call checkProperties
2021-03-03 14:40:36 +01:00
ffafd7344c removed obsolete files from merge
Change-Id: I98c6d06a680ef6885f38d4b3e6b3f51aa7ebd022
2021-03-03 10:19:59 +01:00
b4bb172ada Merge branch 'wip'
Change-Id: I3ba389775ce9b02269ca9c20a42ec1bddf6c5d21
2021-03-03 09:46:20 +01:00
4fd9c17bcb move historywriter to secop_psi
as historywriter currently could be used at psi only
secop_psi is a better place for it

+ add comment about a general config file

Change-Id: I9b0e74d3da83ac485bd4bcc13475695c3140822c
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25077
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2021-03-03 09:06:14 +01:00
12b0549cc0 merged master with work
Change-Id: Iedfb2bf7f28bfe45201adacec0645cc13abffe59
2021-03-03 09:00:45 +01:00
fee7c4904b added hook for optional history writer
- activated with envrionment variable FRAPPY_HISTORY
- using the (currently) private package 'frappyhistory'

Change-Id: I8f747b29d8311af677ed77268a4c38c8d71b08c2
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25064
Tested-by: Markus Zolliker <markus.zolliker@psi.ch>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2021-02-26 17:27:13 +01:00
3141e22894 lookup cfg files in a list of directories
environment variable SECOP_CONFDIR may be a ':' separated
list of directories to lookup for cfg files

Change-Id: I058be6a270d3a3f6cd8ca45fdd4ab68c80fa5c23
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25063
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2021-02-26 17:27:13 +01:00
fbccd0f9b7 remove obsolete code
- basic_validators is not needed any more since the implementation
  of datatypes.Stub
- client/baseclient.y is replaced by client/__init__.py both for
  the gui client and NICOS SECoP client
- lib/parsing.py used by baseclient only

Change-Id: I15b6ac880017000e155b8f6b7e2456e1bbf56dab
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25058
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2021-02-26 17:27:13 +01:00
9071a5bcf7 fix inheritance order
+ hide pollperiod on PPMS Modules

Change-Id: I77ad5502884360bf6babfd226de0675ee06a6196
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25054
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2021-02-26 17:27:13 +01:00
1588703f99 try to follow PEP8
- fixed most important code after checking with flake8
- ignored code which has to be reworked or removed
+ mark unused code with 'TODO: remove ...'

Change-Id: Ic45e541049e391e2853d29cd64bb0963bd9a2125
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25053
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
2021-02-26 17:27:13 +01:00
fe041bac0a after running isort
Change-Id: I6d7dbb8dee9480fc9242529089a1b40f17f068e7
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25052
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2021-02-26 17:27:13 +01:00
07b758c3dd removed old style syntax
- removed secop/metaclass.py
- moved code from ModuleMeta to modules.HasAccessibles.__init_subclass__
- reworked properties:
  assignment obj.property = value now always allowed
- reworked Parameters and Command to be true descriptors
- Command must now be solely used as decorator
- renamed 'usercommand' to 'Command'
- command methods no longer start with 'do_'
- reworked mechanism to determine accessible order:
  the attribute paramOrder, if given, determines order of accessibles
+ fixed some issues makeing the IDE more happy
+ simplified code for StatusType and added a test for it

Change-Id: I8045cf38ee6f4d4862428272df0b12a7c8abaca7
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25049
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2021-02-26 17:27:13 +01:00
f9a2152883 enhance documentation
- flatten hierarchy (some links do not work when using folders)
- add a tutorial for programming a simple driver
- clean description using inspect.cleandoc
+ fix a bug with 'unit' pseudo property in a Parameter used as override

Change-Id: I31ddba5d516d1ee5e785e28fbd79fca44ed23f5e
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25000
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
2021-02-26 17:27:13 +01:00