mmcb-rs232-avt 1.0.19__tar.gz → 1.1.37__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mmcb_rs232_avt-1.1.37/PKG-INFO +210 -0
- mmcb_rs232_avt-1.1.37/README.md +161 -0
- {mmcb_rs232_avt-1.0.19 → mmcb_rs232_avt-1.1.37}/setup.py +14 -11
- mmcb_rs232_avt-1.1.37/src/mmcb_rs232_avt.egg-info/PKG-INFO +210 -0
- mmcb_rs232_avt-1.1.37/src/mmcb_rs232_avt.egg-info/SOURCES.txt +29 -0
- mmcb_rs232_avt-1.1.37/src/mmcb_rs232_avt.egg-info/entry_points.txt +12 -0
- mmcb_rs232_avt-1.1.37/src/mmcb_rs232_avt.egg-info/top_level.txt +1 -0
- mmcb_rs232_avt-1.1.37/src/mmcbrs232/MDP.py +35 -0
- mmcb_rs232_avt-1.1.37/src/mmcbrs232/broker_and_workers.py +582 -0
- {mmcb_rs232_avt-1.0.19/src/mmcb_rs232 → mmcb_rs232_avt-1.1.37/src/mmcbrs232}/common.py +57 -35
- {mmcb_rs232_avt-1.0.19/src/mmcb_rs232 → mmcb_rs232_avt-1.1.37/src/mmcbrs232}/detect.py +459 -137
- mmcb_rs232_avt-1.1.37/src/mmcbrs232/dmm.py +220 -0
- {mmcb_rs232_avt-1.0.19/src/mmcb_rs232 → mmcb_rs232_avt-1.1.37/src/mmcbrs232}/dmm_interface.py +25 -4
- {mmcb_rs232_avt-1.0.19/src/mmcb_rs232 → mmcb_rs232_avt-1.1.37/src/mmcbrs232}/iv.py +36 -10
- {mmcb_rs232_avt-1.0.19/src/mmcb_rs232 → mmcb_rs232_avt-1.1.37/src/mmcbrs232}/lexicon.py +12 -0
- mmcb_rs232_avt-1.1.37/src/mmcbrs232/liveplot.py +335 -0
- mmcb_rs232_avt-1.1.37/src/mmcbrs232/mdbroker.py +311 -0
- mmcb_rs232_avt-1.1.37/src/mmcbrs232/mdcliapi.py +110 -0
- mmcb_rs232_avt-1.1.37/src/mmcbrs232/mdclientlib.py +266 -0
- mmcb_rs232_avt-1.1.37/src/mmcbrs232/mdwrkapi.py +183 -0
- {mmcb_rs232_avt-1.0.19/src/mmcb_rs232 → mmcb_rs232_avt-1.1.37/src/mmcbrs232}/psuset.py +96 -64
- {mmcb_rs232_avt-1.0.19/src/mmcb_rs232 → mmcb_rs232_avt-1.1.37/src/mmcbrs232}/psustat.py +197 -16
- {mmcb_rs232_avt-1.0.19/src/mmcb_rs232 → mmcb_rs232_avt-1.1.37/src/mmcbrs232}/psuwatch.py +13 -8
- {mmcb_rs232_avt-1.0.19/src/mmcb_rs232 → mmcb_rs232_avt-1.1.37/src/mmcbrs232}/sequence.py +2 -3
- {mmcb_rs232_avt-1.0.19/src/mmcb_rs232 → mmcb_rs232_avt-1.1.37/src/mmcbrs232}/ult80.py +123 -79
- mmcb_rs232_avt-1.1.37/src/mmcbrs232/zhelpers.py +58 -0
- mmcb_rs232_avt-1.1.37/src/mmcbrs232/zpsustat.py +72 -0
- mmcb_rs232_avt-1.0.19/PKG-INFO +0 -62
- mmcb_rs232_avt-1.0.19/README.md +0 -13
- mmcb_rs232_avt-1.0.19/src/mmcb_rs232/dmm.py +0 -126
- mmcb_rs232_avt-1.0.19/src/mmcb_rs232_avt.egg-info/PKG-INFO +0 -62
- mmcb_rs232_avt-1.0.19/src/mmcb_rs232_avt.egg-info/SOURCES.txt +0 -20
- mmcb_rs232_avt-1.0.19/src/mmcb_rs232_avt.egg-info/entry_points.txt +0 -10
- mmcb_rs232_avt-1.0.19/src/mmcb_rs232_avt.egg-info/top_level.txt +0 -1
- {mmcb_rs232_avt-1.0.19 → mmcb_rs232_avt-1.1.37}/setup.cfg +0 -0
- {mmcb_rs232_avt-1.0.19 → mmcb_rs232_avt-1.1.37}/src/mmcb_rs232_avt.egg-info/dependency_links.txt +0 -0
- {mmcb_rs232_avt-1.0.19 → mmcb_rs232_avt-1.1.37}/src/mmcb_rs232_avt.egg-info/requires.txt +0 -0
- {mmcb_rs232_avt-1.0.19/src/mmcb_rs232 → mmcb_rs232_avt-1.1.37/src/mmcbrs232}/__init__.py +0 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mmcb-rs232-avt
|
|
3
|
+
Version: 1.1.37
|
|
4
|
+
Summary: ATLAS ITK Pixels Multi-Module Cycling Box environmental monitoring/control (RS232)
|
|
5
|
+
Home-page: https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb-rs232
|
|
6
|
+
Author: Alan Taylor
|
|
7
|
+
Author-email: avt@hep.ph.liv.ac.uk
|
|
8
|
+
Maintainer: Alan Taylor
|
|
9
|
+
Maintainer-email: avt@hep.ph.liv.ac.uk
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Environment :: X11 Applications
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
27
|
+
Classifier: Natural Language :: English
|
|
28
|
+
Classifier: License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)
|
|
29
|
+
Requires-Python: >=3.6
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
Requires-Dist: numpy
|
|
32
|
+
Requires-Dist: pandas
|
|
33
|
+
Requires-Dist: matplotlib
|
|
34
|
+
Requires-Dist: zmq
|
|
35
|
+
Requires-Dist: pyserial==3.4.*
|
|
36
|
+
Requires-Dist: tables
|
|
37
|
+
Requires-Dist: yoctopuce
|
|
38
|
+
Dynamic: author
|
|
39
|
+
Dynamic: author-email
|
|
40
|
+
Dynamic: classifier
|
|
41
|
+
Dynamic: description
|
|
42
|
+
Dynamic: description-content-type
|
|
43
|
+
Dynamic: home-page
|
|
44
|
+
Dynamic: maintainer
|
|
45
|
+
Dynamic: maintainer-email
|
|
46
|
+
Dynamic: requires-dist
|
|
47
|
+
Dynamic: requires-python
|
|
48
|
+
Dynamic: summary
|
|
49
|
+
|
|
50
|
+
# Serial port handling for the ATLAS ITK pixels multi-module cycling box
|
|
51
|
+
|
|
52
|
+
[](https://badge.fury.io/py/mmcb-rs232-avt)
|
|
53
|
+
|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
*Particle Physics, University of Liverpool, UK*
|
|
57
|
+
|
|
58
|
+
## Features
|
|
59
|
+
|
|
60
|
+
This repository provides command line tools to monitor and control equipment in the *ATLAS ITK pixels multi-module cycling box* test setup. It is used in the test setups for a number of other projects. Interactions with these instruments are performed via FTDI USB to RS232 adaptors.
|
|
61
|
+
|
|
62
|
+
### Main commands
|
|
63
|
+
|
|
64
|
+
|Command|Function|
|
|
65
|
+
|:---:|:---:|
|
|
66
|
+
|[dmm](packaging/src/mmcbrs232/dmm.py)|Reads voltage/current values from the Keithley DMM6500 6.5 digit multimeter.|
|
|
67
|
+
|[iv](packaging/src/mmcbrs232/iv.py)|Configurable script to measure IV/IT curves using the Keithley 2410/2614b (RS232). It can operate multiple PSUs concurrently, embed environmental data into log files, and can be easily used in shell scripts to automate tasks such as HV-cycling.|
|
|
68
|
+
|[psuset](packaging/src/mmcbrs232/psuset.py)|Sets current/voltage parameters for power supplies (RS232: Keithley 2410/2614b, Hameg HMP4040). Works in both constant voltage and constant current modes.|
|
|
69
|
+
|[ult80](packaging/src/mmcbrs232/ult80.py)|Queries and/or sets parameters for the ULT80 chiller (RS232).|
|
|
70
|
+
|
|
71
|
+
### Support commands
|
|
72
|
+
|
|
73
|
+
|Command|Function|
|
|
74
|
+
|:---:|:---:|
|
|
75
|
+
|[detect](packaging/src/mmcbrs232/detect.py)|Detects equipment attached by RS232, writes a cache file containing identified equipment to `~/.cache.json`. Run *once* after the RS232 configuration has changed.|
|
|
76
|
+
|[liveplot](packaging/src/mmcbrs232/liveplot.py)|Companion to `iv`. Displays IV plot in real-time in a graphical window.|
|
|
77
|
+
|[psustat](packaging/src/mmcbrs232/psustat.py)|Provides a single-shot view of the status of all power supply channels (RS232: Keithley 2410/2614b, Hameg HMP4040).|
|
|
78
|
+
|[rs232_zmq_server](packaging/src/mmcbrs232/broker_and_workers.py)|Provides shared, parallel access to RS232 instruments. Concurrent requests to the same serial port are serialised by order of arrival since interactions with a given serial port is managed by a single thread specific to that serial port.|
|
|
79
|
+
|[zpsustat](packaging/src/mmcbrs232/zpsustat.py)|Version of `psustat` above that uses the ZeroMQ server rather than querying the device directly. Supports requests for information on specified, individual PSU channels only.|
|
|
80
|
+
|
|
81
|
+
## History
|
|
82
|
+
|
|
83
|
+
The files in this repository were originally part of the [atlas-mmcb-avt](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/) repository, which used to handle monitoring and control of equipment attached via I2C, GPIO and serial port. To support the serial port interaction being run on a conventional Intel DAQ computer, these functions were split into two packages. All RS232 serial port interaction code is now contained in this package.
|
|
84
|
+
|
|
85
|
+
The Raspberry Pi specific aspects (I2C environmenal monitoring and Peltier device polarity switching via GPIO) remain in the [atlas-mmcb-avt](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/) repository, which no longer contains any serial port capability.
|
|
86
|
+
|
|
87
|
+
## Documentation
|
|
88
|
+
|
|
89
|
+
For project documentation, see the [wiki](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/-/wikis/home), or each command's in-built help, e.g. `psustat --help`.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## Installation
|
|
93
|
+
|
|
94
|
+
This software is publically available and may be obtained from [The Python Package Index](https://pypi.org/project/mmcb-avt/).
|
|
95
|
+
|
|
96
|
+
This repository provides also a wheel (`.whl`) file that is installable with [pip](https://packaging.python.org/en/latest/key_projects/#pip). See the [packaging](packaging) directory for installation instructions.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
## Support
|
|
100
|
+
|
|
101
|
+
Support requests to [avt@hep.ph.liv.ac.uk](mailto:avt@hep.ph.liv.ac.uk) or via the [Issue Tracker](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/-/issues).
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## Installation notes
|
|
105
|
+
|
|
106
|
+
### Yoctopuce sensors
|
|
107
|
+
|
|
108
|
+
In addition to the dependencies installed with pip, testing ATLAS sensors on the old probestation (for convenience) will also require the [Yoctopuce Command line API](https://www.yoctopuce.com/EN/libraries.php). Please install the correct version for your architecture - this will provide commands such as `YTemperature` and `YHumidity` to monitor the probestation interior state from the command line.
|
|
109
|
+
|
|
110
|
+
Install the archive (e.g. `Cmdlines.linux_arm.70284.zip`) into `~/dev` and then set the path to include `~/dev/Cmdlines/Binaries/linux/aarch64`, e.g. `PATH=$PATH:~/dev/Cmdlines/Binaries/linux/aarch64`.
|
|
111
|
+
|
|
112
|
+
## ZeroMQ serial port server
|
|
113
|
+
|
|
114
|
+
This is based on the ZeroMQ Majordomo pattern, and has a separate thread managing each serial port.
|
|
115
|
+
|
|
116
|
+
```console
|
|
117
|
+
(base) [pixeldaq@atldaq1 ~]$ rs232_zmq_server -h
|
|
118
|
+
usage: rs232_zmq_server [-h] [-v] [-n]
|
|
119
|
+
|
|
120
|
+
ZeroMQ server (broker and workers) for the ATLAS Pixels multi-module cycling box serial port devices. This server manages
|
|
121
|
+
concurrent access to serial port resources for all attached clients. Commands line scripts emulated are psuset, psustat
|
|
122
|
+
and ult80. WARNING: ANY attached client has the authority to change ANY power supply or chiller parameter at ANY time.
|
|
123
|
+
Clients (PID control loops) running concurrently must ensure that they only modify their own resources, and not those of
|
|
124
|
+
other clients.
|
|
125
|
+
|
|
126
|
+
options:
|
|
127
|
+
-h, --help show this help message and exit
|
|
128
|
+
-v, --verbose Enable logging.
|
|
129
|
+
-n, --nolock Disable the use of the global rs232 lock. For safety this script will use the global rs232 lock by
|
|
130
|
+
default. This lock is a coarse measure that should prevent concurrent serial port access, even to
|
|
131
|
+
different ports, by this server and other command line scripts that may access serial port resources.
|
|
132
|
+
When running multiple concurrent asynchronous PID control scripts, using -n allows optimal sharing of
|
|
133
|
+
serial port resources between those scripts.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
If you want the best performance from PID scripts, start the server with `-n`. If you need to use command line utilities (`psuset`, `psustat`, etc.) in parallel with PID scripts, then omit the `-n`.
|
|
137
|
+
|
|
138
|
+
### Start
|
|
139
|
+
|
|
140
|
+
```console
|
|
141
|
+
(base) [pixeldaq@atldaq1 ~]$ nohup rs232_zmq_server </dev/null >/dev/null 2>&1 &
|
|
142
|
+
(base) [pixeldaq@atldaq1 ~]$ disown
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Stop
|
|
146
|
+
|
|
147
|
+
```console
|
|
148
|
+
(base) [pixeldaq@atldaq1 ~]$ ps -ef | grep rs232_zmq_server
|
|
149
|
+
pixeldaq 18079 17527 0 12:00 pts/16 00:00:12 /usr/local/bin/python3 /home/pixeldaq/.local/bin/rs232_zmq_server
|
|
150
|
+
pixeldaq 26239 17527 0 12:51 pts/16 00:00:00 grep --color=auto rs232_zmq_server
|
|
151
|
+
(base) [pixeldaq@atldaq1 ~]$ kill 18079
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Test
|
|
155
|
+
|
|
156
|
+
```console
|
|
157
|
+
(base) [pixeldaq@atldaq1 ~]$ pip show mmcb-rs232-avt
|
|
158
|
+
WARNING: Ignoring invalid distribution ~ip (/home/pixeldaq/miniconda3/lib/python3.13/site-packages)
|
|
159
|
+
Name: mmcb-rs232-avt
|
|
160
|
+
Version: 1.1.28
|
|
161
|
+
Summary: ATLAS ITK Pixels Multi-Module Cycling Box environmental monitoring/control (RS232)
|
|
162
|
+
Home-page: https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb-rs232
|
|
163
|
+
Author: Alan Taylor
|
|
164
|
+
Author-email: avt@hep.ph.liv.ac.uk
|
|
165
|
+
License:
|
|
166
|
+
Location: /home/pixeldaq/miniconda3/lib/python3.13/site-packages
|
|
167
|
+
Requires: matplotlib, numpy, pandas, pyserial, tables, yoctopuce, zmq
|
|
168
|
+
Required-by:
|
|
169
|
+
|
|
170
|
+
(base) [pixeldaq@atldaq1 ~]$ python
|
|
171
|
+
Python 3.13.2 | packaged by Anaconda, Inc. | (main, Feb 6 2025, 18:56:02) [GCC 11.2.0] on linux
|
|
172
|
+
Type "help", "copyright", "credits" or "license" for more information.
|
|
173
|
+
>>> from mmcbrs232 import mdclientlib
|
|
174
|
+
>>> mdclientlib.__version__
|
|
175
|
+
'1.1.28'
|
|
176
|
+
>>> mdc = mdclientlib.Rs232()
|
|
177
|
+
>>> mdc.
|
|
178
|
+
mdc.channels mdc.get_pt_i( mdc.get_ult80_temps() mdc.psu_set( mdc.psus
|
|
179
|
+
mdc.client mdc.get_pt_v( mdc.ports mdc.psu_unset( mdc.settings
|
|
180
|
+
>>> mdc.get_ult80_temps()
|
|
181
|
+
(23.0, 23.0)
|
|
182
|
+
>>> mdc.get_pt_v(103877, 2)
|
|
183
|
+
0.3
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Latency for common operations
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
(base) [pixeldaq@atldaq1 ~]$ ipython
|
|
190
|
+
Python 3.13.2 | packaged by Anaconda, Inc. | (main, Feb 6 2025, 18:56:02) [GCC 11.2.0]
|
|
191
|
+
Type 'copyright', 'credits' or 'license' for more information
|
|
192
|
+
IPython 9.6.0 -- An enhanced Interactive Python. Type '?' for help.
|
|
193
|
+
Tip: You can use LaTeX or Unicode completion, `\alpha<tab>` will insert the α symbol.
|
|
194
|
+
|
|
195
|
+
In [1]: from mmcbrs232 import mdclientlib
|
|
196
|
+
|
|
197
|
+
In [2]: mdc = mdclientlib.Rs232()
|
|
198
|
+
|
|
199
|
+
In [3]: %timeit mdc.get_ult80_temps()
|
|
200
|
+
63.9 ms ± 26.4 μs per loop (mean ± std. dev. of 7 runs, 10 loops each)
|
|
201
|
+
|
|
202
|
+
In [4]: %timeit mdc.get_pt_v(103877, 2)
|
|
203
|
+
204 ms ± 8.58 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
204
|
+
|
|
205
|
+
In [5]: %timeit mdc.psu_set(103877, 2, 0.3, 4.95)
|
|
206
|
+
1.12 s ± 4.58 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
207
|
+
|
|
208
|
+
In [6]: %timeit mdc.psu_unset(103877, 2, 0.3, 4.95)
|
|
209
|
+
1.12 s ± 7.78 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
210
|
+
```
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Serial port handling for the ATLAS ITK pixels multi-module cycling box
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/py/mmcb-rs232-avt)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
*Particle Physics, University of Liverpool, UK*
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
This repository provides command line tools to monitor and control equipment in the *ATLAS ITK pixels multi-module cycling box* test setup. It is used in the test setups for a number of other projects. Interactions with these instruments are performed via FTDI USB to RS232 adaptors.
|
|
12
|
+
|
|
13
|
+
### Main commands
|
|
14
|
+
|
|
15
|
+
|Command|Function|
|
|
16
|
+
|:---:|:---:|
|
|
17
|
+
|[dmm](packaging/src/mmcbrs232/dmm.py)|Reads voltage/current values from the Keithley DMM6500 6.5 digit multimeter.|
|
|
18
|
+
|[iv](packaging/src/mmcbrs232/iv.py)|Configurable script to measure IV/IT curves using the Keithley 2410/2614b (RS232). It can operate multiple PSUs concurrently, embed environmental data into log files, and can be easily used in shell scripts to automate tasks such as HV-cycling.|
|
|
19
|
+
|[psuset](packaging/src/mmcbrs232/psuset.py)|Sets current/voltage parameters for power supplies (RS232: Keithley 2410/2614b, Hameg HMP4040). Works in both constant voltage and constant current modes.|
|
|
20
|
+
|[ult80](packaging/src/mmcbrs232/ult80.py)|Queries and/or sets parameters for the ULT80 chiller (RS232).|
|
|
21
|
+
|
|
22
|
+
### Support commands
|
|
23
|
+
|
|
24
|
+
|Command|Function|
|
|
25
|
+
|:---:|:---:|
|
|
26
|
+
|[detect](packaging/src/mmcbrs232/detect.py)|Detects equipment attached by RS232, writes a cache file containing identified equipment to `~/.cache.json`. Run *once* after the RS232 configuration has changed.|
|
|
27
|
+
|[liveplot](packaging/src/mmcbrs232/liveplot.py)|Companion to `iv`. Displays IV plot in real-time in a graphical window.|
|
|
28
|
+
|[psustat](packaging/src/mmcbrs232/psustat.py)|Provides a single-shot view of the status of all power supply channels (RS232: Keithley 2410/2614b, Hameg HMP4040).|
|
|
29
|
+
|[rs232_zmq_server](packaging/src/mmcbrs232/broker_and_workers.py)|Provides shared, parallel access to RS232 instruments. Concurrent requests to the same serial port are serialised by order of arrival since interactions with a given serial port is managed by a single thread specific to that serial port.|
|
|
30
|
+
|[zpsustat](packaging/src/mmcbrs232/zpsustat.py)|Version of `psustat` above that uses the ZeroMQ server rather than querying the device directly. Supports requests for information on specified, individual PSU channels only.|
|
|
31
|
+
|
|
32
|
+
## History
|
|
33
|
+
|
|
34
|
+
The files in this repository were originally part of the [atlas-mmcb-avt](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/) repository, which used to handle monitoring and control of equipment attached via I2C, GPIO and serial port. To support the serial port interaction being run on a conventional Intel DAQ computer, these functions were split into two packages. All RS232 serial port interaction code is now contained in this package.
|
|
35
|
+
|
|
36
|
+
The Raspberry Pi specific aspects (I2C environmenal monitoring and Peltier device polarity switching via GPIO) remain in the [atlas-mmcb-avt](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/) repository, which no longer contains any serial port capability.
|
|
37
|
+
|
|
38
|
+
## Documentation
|
|
39
|
+
|
|
40
|
+
For project documentation, see the [wiki](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/-/wikis/home), or each command's in-built help, e.g. `psustat --help`.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
This software is publically available and may be obtained from [The Python Package Index](https://pypi.org/project/mmcb-avt/).
|
|
46
|
+
|
|
47
|
+
This repository provides also a wheel (`.whl`) file that is installable with [pip](https://packaging.python.org/en/latest/key_projects/#pip). See the [packaging](packaging) directory for installation instructions.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## Support
|
|
51
|
+
|
|
52
|
+
Support requests to [avt@hep.ph.liv.ac.uk](mailto:avt@hep.ph.liv.ac.uk) or via the [Issue Tracker](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/-/issues).
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## Installation notes
|
|
56
|
+
|
|
57
|
+
### Yoctopuce sensors
|
|
58
|
+
|
|
59
|
+
In addition to the dependencies installed with pip, testing ATLAS sensors on the old probestation (for convenience) will also require the [Yoctopuce Command line API](https://www.yoctopuce.com/EN/libraries.php). Please install the correct version for your architecture - this will provide commands such as `YTemperature` and `YHumidity` to monitor the probestation interior state from the command line.
|
|
60
|
+
|
|
61
|
+
Install the archive (e.g. `Cmdlines.linux_arm.70284.zip`) into `~/dev` and then set the path to include `~/dev/Cmdlines/Binaries/linux/aarch64`, e.g. `PATH=$PATH:~/dev/Cmdlines/Binaries/linux/aarch64`.
|
|
62
|
+
|
|
63
|
+
## ZeroMQ serial port server
|
|
64
|
+
|
|
65
|
+
This is based on the ZeroMQ Majordomo pattern, and has a separate thread managing each serial port.
|
|
66
|
+
|
|
67
|
+
```console
|
|
68
|
+
(base) [pixeldaq@atldaq1 ~]$ rs232_zmq_server -h
|
|
69
|
+
usage: rs232_zmq_server [-h] [-v] [-n]
|
|
70
|
+
|
|
71
|
+
ZeroMQ server (broker and workers) for the ATLAS Pixels multi-module cycling box serial port devices. This server manages
|
|
72
|
+
concurrent access to serial port resources for all attached clients. Commands line scripts emulated are psuset, psustat
|
|
73
|
+
and ult80. WARNING: ANY attached client has the authority to change ANY power supply or chiller parameter at ANY time.
|
|
74
|
+
Clients (PID control loops) running concurrently must ensure that they only modify their own resources, and not those of
|
|
75
|
+
other clients.
|
|
76
|
+
|
|
77
|
+
options:
|
|
78
|
+
-h, --help show this help message and exit
|
|
79
|
+
-v, --verbose Enable logging.
|
|
80
|
+
-n, --nolock Disable the use of the global rs232 lock. For safety this script will use the global rs232 lock by
|
|
81
|
+
default. This lock is a coarse measure that should prevent concurrent serial port access, even to
|
|
82
|
+
different ports, by this server and other command line scripts that may access serial port resources.
|
|
83
|
+
When running multiple concurrent asynchronous PID control scripts, using -n allows optimal sharing of
|
|
84
|
+
serial port resources between those scripts.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If you want the best performance from PID scripts, start the server with `-n`. If you need to use command line utilities (`psuset`, `psustat`, etc.) in parallel with PID scripts, then omit the `-n`.
|
|
88
|
+
|
|
89
|
+
### Start
|
|
90
|
+
|
|
91
|
+
```console
|
|
92
|
+
(base) [pixeldaq@atldaq1 ~]$ nohup rs232_zmq_server </dev/null >/dev/null 2>&1 &
|
|
93
|
+
(base) [pixeldaq@atldaq1 ~]$ disown
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Stop
|
|
97
|
+
|
|
98
|
+
```console
|
|
99
|
+
(base) [pixeldaq@atldaq1 ~]$ ps -ef | grep rs232_zmq_server
|
|
100
|
+
pixeldaq 18079 17527 0 12:00 pts/16 00:00:12 /usr/local/bin/python3 /home/pixeldaq/.local/bin/rs232_zmq_server
|
|
101
|
+
pixeldaq 26239 17527 0 12:51 pts/16 00:00:00 grep --color=auto rs232_zmq_server
|
|
102
|
+
(base) [pixeldaq@atldaq1 ~]$ kill 18079
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Test
|
|
106
|
+
|
|
107
|
+
```console
|
|
108
|
+
(base) [pixeldaq@atldaq1 ~]$ pip show mmcb-rs232-avt
|
|
109
|
+
WARNING: Ignoring invalid distribution ~ip (/home/pixeldaq/miniconda3/lib/python3.13/site-packages)
|
|
110
|
+
Name: mmcb-rs232-avt
|
|
111
|
+
Version: 1.1.28
|
|
112
|
+
Summary: ATLAS ITK Pixels Multi-Module Cycling Box environmental monitoring/control (RS232)
|
|
113
|
+
Home-page: https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb-rs232
|
|
114
|
+
Author: Alan Taylor
|
|
115
|
+
Author-email: avt@hep.ph.liv.ac.uk
|
|
116
|
+
License:
|
|
117
|
+
Location: /home/pixeldaq/miniconda3/lib/python3.13/site-packages
|
|
118
|
+
Requires: matplotlib, numpy, pandas, pyserial, tables, yoctopuce, zmq
|
|
119
|
+
Required-by:
|
|
120
|
+
|
|
121
|
+
(base) [pixeldaq@atldaq1 ~]$ python
|
|
122
|
+
Python 3.13.2 | packaged by Anaconda, Inc. | (main, Feb 6 2025, 18:56:02) [GCC 11.2.0] on linux
|
|
123
|
+
Type "help", "copyright", "credits" or "license" for more information.
|
|
124
|
+
>>> from mmcbrs232 import mdclientlib
|
|
125
|
+
>>> mdclientlib.__version__
|
|
126
|
+
'1.1.28'
|
|
127
|
+
>>> mdc = mdclientlib.Rs232()
|
|
128
|
+
>>> mdc.
|
|
129
|
+
mdc.channels mdc.get_pt_i( mdc.get_ult80_temps() mdc.psu_set( mdc.psus
|
|
130
|
+
mdc.client mdc.get_pt_v( mdc.ports mdc.psu_unset( mdc.settings
|
|
131
|
+
>>> mdc.get_ult80_temps()
|
|
132
|
+
(23.0, 23.0)
|
|
133
|
+
>>> mdc.get_pt_v(103877, 2)
|
|
134
|
+
0.3
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Latency for common operations
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
(base) [pixeldaq@atldaq1 ~]$ ipython
|
|
141
|
+
Python 3.13.2 | packaged by Anaconda, Inc. | (main, Feb 6 2025, 18:56:02) [GCC 11.2.0]
|
|
142
|
+
Type 'copyright', 'credits' or 'license' for more information
|
|
143
|
+
IPython 9.6.0 -- An enhanced Interactive Python. Type '?' for help.
|
|
144
|
+
Tip: You can use LaTeX or Unicode completion, `\alpha<tab>` will insert the α symbol.
|
|
145
|
+
|
|
146
|
+
In [1]: from mmcbrs232 import mdclientlib
|
|
147
|
+
|
|
148
|
+
In [2]: mdc = mdclientlib.Rs232()
|
|
149
|
+
|
|
150
|
+
In [3]: %timeit mdc.get_ult80_temps()
|
|
151
|
+
63.9 ms ± 26.4 μs per loop (mean ± std. dev. of 7 runs, 10 loops each)
|
|
152
|
+
|
|
153
|
+
In [4]: %timeit mdc.get_pt_v(103877, 2)
|
|
154
|
+
204 ms ± 8.58 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
155
|
+
|
|
156
|
+
In [5]: %timeit mdc.psu_set(103877, 2, 0.3, 4.95)
|
|
157
|
+
1.12 s ± 4.58 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
158
|
+
|
|
159
|
+
In [6]: %timeit mdc.psu_unset(103877, 2, 0.3, 4.95)
|
|
160
|
+
1.12 s ± 7.78 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
161
|
+
```
|
|
@@ -7,8 +7,8 @@ here = pathlib.Path(__file__).parent.resolve()
|
|
|
7
7
|
long_description = (here / "README.md").read_text(encoding="utf-8")
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
|
-
name="
|
|
11
|
-
version="1.
|
|
10
|
+
name="mmcb-rs232-avt",
|
|
11
|
+
version="1.1.37",
|
|
12
12
|
author="Alan Taylor",
|
|
13
13
|
author_email="avt@hep.ph.liv.ac.uk",
|
|
14
14
|
maintainer="Alan Taylor",
|
|
@@ -32,15 +32,18 @@ setup(
|
|
|
32
32
|
],
|
|
33
33
|
entry_points={
|
|
34
34
|
"console_scripts": [
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
35
|
+
"rs232_zmq_server = mmcbrs232.broker_and_workers:main",
|
|
36
|
+
"detect = mmcbrs232.detect:main",
|
|
37
|
+
"dmm = mmcbrs232.dmm:main",
|
|
38
|
+
"iv = mmcbrs232.iv:main",
|
|
39
|
+
"liveplot = mmcbrs232.liveplot:main",
|
|
40
|
+
"log2dat = mmcbrs232.log2dat:main",
|
|
41
|
+
"psuset = mmcbrs232.psuset:main",
|
|
42
|
+
"psustat = mmcbrs232.psustat:main",
|
|
43
|
+
"psuwatch = mmcbrs232.psuwatch:main",
|
|
44
|
+
"ult80 = mmcbrs232.ult80:main",
|
|
45
|
+
# versions of above commands that use rs232_zmq_server
|
|
46
|
+
"zpsustat = mmcbrs232.zpsustat:main",
|
|
44
47
|
]
|
|
45
48
|
},
|
|
46
49
|
# https://pypi.org/classifiers/
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mmcb-rs232-avt
|
|
3
|
+
Version: 1.1.37
|
|
4
|
+
Summary: ATLAS ITK Pixels Multi-Module Cycling Box environmental monitoring/control (RS232)
|
|
5
|
+
Home-page: https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb-rs232
|
|
6
|
+
Author: Alan Taylor
|
|
7
|
+
Author-email: avt@hep.ph.liv.ac.uk
|
|
8
|
+
Maintainer: Alan Taylor
|
|
9
|
+
Maintainer-email: avt@hep.ph.liv.ac.uk
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Environment :: X11 Applications
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
27
|
+
Classifier: Natural Language :: English
|
|
28
|
+
Classifier: License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)
|
|
29
|
+
Requires-Python: >=3.6
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
Requires-Dist: numpy
|
|
32
|
+
Requires-Dist: pandas
|
|
33
|
+
Requires-Dist: matplotlib
|
|
34
|
+
Requires-Dist: zmq
|
|
35
|
+
Requires-Dist: pyserial==3.4.*
|
|
36
|
+
Requires-Dist: tables
|
|
37
|
+
Requires-Dist: yoctopuce
|
|
38
|
+
Dynamic: author
|
|
39
|
+
Dynamic: author-email
|
|
40
|
+
Dynamic: classifier
|
|
41
|
+
Dynamic: description
|
|
42
|
+
Dynamic: description-content-type
|
|
43
|
+
Dynamic: home-page
|
|
44
|
+
Dynamic: maintainer
|
|
45
|
+
Dynamic: maintainer-email
|
|
46
|
+
Dynamic: requires-dist
|
|
47
|
+
Dynamic: requires-python
|
|
48
|
+
Dynamic: summary
|
|
49
|
+
|
|
50
|
+
# Serial port handling for the ATLAS ITK pixels multi-module cycling box
|
|
51
|
+
|
|
52
|
+
[](https://badge.fury.io/py/mmcb-rs232-avt)
|
|
53
|
+
|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
*Particle Physics, University of Liverpool, UK*
|
|
57
|
+
|
|
58
|
+
## Features
|
|
59
|
+
|
|
60
|
+
This repository provides command line tools to monitor and control equipment in the *ATLAS ITK pixels multi-module cycling box* test setup. It is used in the test setups for a number of other projects. Interactions with these instruments are performed via FTDI USB to RS232 adaptors.
|
|
61
|
+
|
|
62
|
+
### Main commands
|
|
63
|
+
|
|
64
|
+
|Command|Function|
|
|
65
|
+
|:---:|:---:|
|
|
66
|
+
|[dmm](packaging/src/mmcbrs232/dmm.py)|Reads voltage/current values from the Keithley DMM6500 6.5 digit multimeter.|
|
|
67
|
+
|[iv](packaging/src/mmcbrs232/iv.py)|Configurable script to measure IV/IT curves using the Keithley 2410/2614b (RS232). It can operate multiple PSUs concurrently, embed environmental data into log files, and can be easily used in shell scripts to automate tasks such as HV-cycling.|
|
|
68
|
+
|[psuset](packaging/src/mmcbrs232/psuset.py)|Sets current/voltage parameters for power supplies (RS232: Keithley 2410/2614b, Hameg HMP4040). Works in both constant voltage and constant current modes.|
|
|
69
|
+
|[ult80](packaging/src/mmcbrs232/ult80.py)|Queries and/or sets parameters for the ULT80 chiller (RS232).|
|
|
70
|
+
|
|
71
|
+
### Support commands
|
|
72
|
+
|
|
73
|
+
|Command|Function|
|
|
74
|
+
|:---:|:---:|
|
|
75
|
+
|[detect](packaging/src/mmcbrs232/detect.py)|Detects equipment attached by RS232, writes a cache file containing identified equipment to `~/.cache.json`. Run *once* after the RS232 configuration has changed.|
|
|
76
|
+
|[liveplot](packaging/src/mmcbrs232/liveplot.py)|Companion to `iv`. Displays IV plot in real-time in a graphical window.|
|
|
77
|
+
|[psustat](packaging/src/mmcbrs232/psustat.py)|Provides a single-shot view of the status of all power supply channels (RS232: Keithley 2410/2614b, Hameg HMP4040).|
|
|
78
|
+
|[rs232_zmq_server](packaging/src/mmcbrs232/broker_and_workers.py)|Provides shared, parallel access to RS232 instruments. Concurrent requests to the same serial port are serialised by order of arrival since interactions with a given serial port is managed by a single thread specific to that serial port.|
|
|
79
|
+
|[zpsustat](packaging/src/mmcbrs232/zpsustat.py)|Version of `psustat` above that uses the ZeroMQ server rather than querying the device directly. Supports requests for information on specified, individual PSU channels only.|
|
|
80
|
+
|
|
81
|
+
## History
|
|
82
|
+
|
|
83
|
+
The files in this repository were originally part of the [atlas-mmcb-avt](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/) repository, which used to handle monitoring and control of equipment attached via I2C, GPIO and serial port. To support the serial port interaction being run on a conventional Intel DAQ computer, these functions were split into two packages. All RS232 serial port interaction code is now contained in this package.
|
|
84
|
+
|
|
85
|
+
The Raspberry Pi specific aspects (I2C environmenal monitoring and Peltier device polarity switching via GPIO) remain in the [atlas-mmcb-avt](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/) repository, which no longer contains any serial port capability.
|
|
86
|
+
|
|
87
|
+
## Documentation
|
|
88
|
+
|
|
89
|
+
For project documentation, see the [wiki](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/-/wikis/home), or each command's in-built help, e.g. `psustat --help`.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## Installation
|
|
93
|
+
|
|
94
|
+
This software is publically available and may be obtained from [The Python Package Index](https://pypi.org/project/mmcb-avt/).
|
|
95
|
+
|
|
96
|
+
This repository provides also a wheel (`.whl`) file that is installable with [pip](https://packaging.python.org/en/latest/key_projects/#pip). See the [packaging](packaging) directory for installation instructions.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
## Support
|
|
100
|
+
|
|
101
|
+
Support requests to [avt@hep.ph.liv.ac.uk](mailto:avt@hep.ph.liv.ac.uk) or via the [Issue Tracker](https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb/-/issues).
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## Installation notes
|
|
105
|
+
|
|
106
|
+
### Yoctopuce sensors
|
|
107
|
+
|
|
108
|
+
In addition to the dependencies installed with pip, testing ATLAS sensors on the old probestation (for convenience) will also require the [Yoctopuce Command line API](https://www.yoctopuce.com/EN/libraries.php). Please install the correct version for your architecture - this will provide commands such as `YTemperature` and `YHumidity` to monitor the probestation interior state from the command line.
|
|
109
|
+
|
|
110
|
+
Install the archive (e.g. `Cmdlines.linux_arm.70284.zip`) into `~/dev` and then set the path to include `~/dev/Cmdlines/Binaries/linux/aarch64`, e.g. `PATH=$PATH:~/dev/Cmdlines/Binaries/linux/aarch64`.
|
|
111
|
+
|
|
112
|
+
## ZeroMQ serial port server
|
|
113
|
+
|
|
114
|
+
This is based on the ZeroMQ Majordomo pattern, and has a separate thread managing each serial port.
|
|
115
|
+
|
|
116
|
+
```console
|
|
117
|
+
(base) [pixeldaq@atldaq1 ~]$ rs232_zmq_server -h
|
|
118
|
+
usage: rs232_zmq_server [-h] [-v] [-n]
|
|
119
|
+
|
|
120
|
+
ZeroMQ server (broker and workers) for the ATLAS Pixels multi-module cycling box serial port devices. This server manages
|
|
121
|
+
concurrent access to serial port resources for all attached clients. Commands line scripts emulated are psuset, psustat
|
|
122
|
+
and ult80. WARNING: ANY attached client has the authority to change ANY power supply or chiller parameter at ANY time.
|
|
123
|
+
Clients (PID control loops) running concurrently must ensure that they only modify their own resources, and not those of
|
|
124
|
+
other clients.
|
|
125
|
+
|
|
126
|
+
options:
|
|
127
|
+
-h, --help show this help message and exit
|
|
128
|
+
-v, --verbose Enable logging.
|
|
129
|
+
-n, --nolock Disable the use of the global rs232 lock. For safety this script will use the global rs232 lock by
|
|
130
|
+
default. This lock is a coarse measure that should prevent concurrent serial port access, even to
|
|
131
|
+
different ports, by this server and other command line scripts that may access serial port resources.
|
|
132
|
+
When running multiple concurrent asynchronous PID control scripts, using -n allows optimal sharing of
|
|
133
|
+
serial port resources between those scripts.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
If you want the best performance from PID scripts, start the server with `-n`. If you need to use command line utilities (`psuset`, `psustat`, etc.) in parallel with PID scripts, then omit the `-n`.
|
|
137
|
+
|
|
138
|
+
### Start
|
|
139
|
+
|
|
140
|
+
```console
|
|
141
|
+
(base) [pixeldaq@atldaq1 ~]$ nohup rs232_zmq_server </dev/null >/dev/null 2>&1 &
|
|
142
|
+
(base) [pixeldaq@atldaq1 ~]$ disown
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Stop
|
|
146
|
+
|
|
147
|
+
```console
|
|
148
|
+
(base) [pixeldaq@atldaq1 ~]$ ps -ef | grep rs232_zmq_server
|
|
149
|
+
pixeldaq 18079 17527 0 12:00 pts/16 00:00:12 /usr/local/bin/python3 /home/pixeldaq/.local/bin/rs232_zmq_server
|
|
150
|
+
pixeldaq 26239 17527 0 12:51 pts/16 00:00:00 grep --color=auto rs232_zmq_server
|
|
151
|
+
(base) [pixeldaq@atldaq1 ~]$ kill 18079
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Test
|
|
155
|
+
|
|
156
|
+
```console
|
|
157
|
+
(base) [pixeldaq@atldaq1 ~]$ pip show mmcb-rs232-avt
|
|
158
|
+
WARNING: Ignoring invalid distribution ~ip (/home/pixeldaq/miniconda3/lib/python3.13/site-packages)
|
|
159
|
+
Name: mmcb-rs232-avt
|
|
160
|
+
Version: 1.1.28
|
|
161
|
+
Summary: ATLAS ITK Pixels Multi-Module Cycling Box environmental monitoring/control (RS232)
|
|
162
|
+
Home-page: https://gitlab.ph.liv.ac.uk/avt/atlas-itk-pmmcb-rs232
|
|
163
|
+
Author: Alan Taylor
|
|
164
|
+
Author-email: avt@hep.ph.liv.ac.uk
|
|
165
|
+
License:
|
|
166
|
+
Location: /home/pixeldaq/miniconda3/lib/python3.13/site-packages
|
|
167
|
+
Requires: matplotlib, numpy, pandas, pyserial, tables, yoctopuce, zmq
|
|
168
|
+
Required-by:
|
|
169
|
+
|
|
170
|
+
(base) [pixeldaq@atldaq1 ~]$ python
|
|
171
|
+
Python 3.13.2 | packaged by Anaconda, Inc. | (main, Feb 6 2025, 18:56:02) [GCC 11.2.0] on linux
|
|
172
|
+
Type "help", "copyright", "credits" or "license" for more information.
|
|
173
|
+
>>> from mmcbrs232 import mdclientlib
|
|
174
|
+
>>> mdclientlib.__version__
|
|
175
|
+
'1.1.28'
|
|
176
|
+
>>> mdc = mdclientlib.Rs232()
|
|
177
|
+
>>> mdc.
|
|
178
|
+
mdc.channels mdc.get_pt_i( mdc.get_ult80_temps() mdc.psu_set( mdc.psus
|
|
179
|
+
mdc.client mdc.get_pt_v( mdc.ports mdc.psu_unset( mdc.settings
|
|
180
|
+
>>> mdc.get_ult80_temps()
|
|
181
|
+
(23.0, 23.0)
|
|
182
|
+
>>> mdc.get_pt_v(103877, 2)
|
|
183
|
+
0.3
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Latency for common operations
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
(base) [pixeldaq@atldaq1 ~]$ ipython
|
|
190
|
+
Python 3.13.2 | packaged by Anaconda, Inc. | (main, Feb 6 2025, 18:56:02) [GCC 11.2.0]
|
|
191
|
+
Type 'copyright', 'credits' or 'license' for more information
|
|
192
|
+
IPython 9.6.0 -- An enhanced Interactive Python. Type '?' for help.
|
|
193
|
+
Tip: You can use LaTeX or Unicode completion, `\alpha<tab>` will insert the α symbol.
|
|
194
|
+
|
|
195
|
+
In [1]: from mmcbrs232 import mdclientlib
|
|
196
|
+
|
|
197
|
+
In [2]: mdc = mdclientlib.Rs232()
|
|
198
|
+
|
|
199
|
+
In [3]: %timeit mdc.get_ult80_temps()
|
|
200
|
+
63.9 ms ± 26.4 μs per loop (mean ± std. dev. of 7 runs, 10 loops each)
|
|
201
|
+
|
|
202
|
+
In [4]: %timeit mdc.get_pt_v(103877, 2)
|
|
203
|
+
204 ms ± 8.58 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
204
|
+
|
|
205
|
+
In [5]: %timeit mdc.psu_set(103877, 2, 0.3, 4.95)
|
|
206
|
+
1.12 s ± 4.58 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
207
|
+
|
|
208
|
+
In [6]: %timeit mdc.psu_unset(103877, 2, 0.3, 4.95)
|
|
209
|
+
1.12 s ± 7.78 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
210
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
setup.py
|
|
3
|
+
src/mmcb_rs232_avt.egg-info/PKG-INFO
|
|
4
|
+
src/mmcb_rs232_avt.egg-info/SOURCES.txt
|
|
5
|
+
src/mmcb_rs232_avt.egg-info/dependency_links.txt
|
|
6
|
+
src/mmcb_rs232_avt.egg-info/entry_points.txt
|
|
7
|
+
src/mmcb_rs232_avt.egg-info/requires.txt
|
|
8
|
+
src/mmcb_rs232_avt.egg-info/top_level.txt
|
|
9
|
+
src/mmcbrs232/MDP.py
|
|
10
|
+
src/mmcbrs232/__init__.py
|
|
11
|
+
src/mmcbrs232/broker_and_workers.py
|
|
12
|
+
src/mmcbrs232/common.py
|
|
13
|
+
src/mmcbrs232/detect.py
|
|
14
|
+
src/mmcbrs232/dmm.py
|
|
15
|
+
src/mmcbrs232/dmm_interface.py
|
|
16
|
+
src/mmcbrs232/iv.py
|
|
17
|
+
src/mmcbrs232/lexicon.py
|
|
18
|
+
src/mmcbrs232/liveplot.py
|
|
19
|
+
src/mmcbrs232/mdbroker.py
|
|
20
|
+
src/mmcbrs232/mdcliapi.py
|
|
21
|
+
src/mmcbrs232/mdclientlib.py
|
|
22
|
+
src/mmcbrs232/mdwrkapi.py
|
|
23
|
+
src/mmcbrs232/psuset.py
|
|
24
|
+
src/mmcbrs232/psustat.py
|
|
25
|
+
src/mmcbrs232/psuwatch.py
|
|
26
|
+
src/mmcbrs232/sequence.py
|
|
27
|
+
src/mmcbrs232/ult80.py
|
|
28
|
+
src/mmcbrs232/zhelpers.py
|
|
29
|
+
src/mmcbrs232/zpsustat.py
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[console_scripts]
|
|
2
|
+
detect = mmcbrs232.detect:main
|
|
3
|
+
dmm = mmcbrs232.dmm:main
|
|
4
|
+
iv = mmcbrs232.iv:main
|
|
5
|
+
liveplot = mmcbrs232.liveplot:main
|
|
6
|
+
log2dat = mmcbrs232.log2dat:main
|
|
7
|
+
psuset = mmcbrs232.psuset:main
|
|
8
|
+
psustat = mmcbrs232.psustat:main
|
|
9
|
+
psuwatch = mmcbrs232.psuwatch:main
|
|
10
|
+
rs232_zmq_server = mmcbrs232.broker_and_workers:main
|
|
11
|
+
ult80 = mmcbrs232.ult80:main
|
|
12
|
+
zpsustat = mmcbrs232.zpsustat:main
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
mmcbrs232
|