Debian Codegraph @

pymeasure/instruments/lakeshore/lakeshore224.py

raw
1 #
2 # This file is part of the PyMeasure package.
3 #
4 # Copyright (c) 2013-2024 PyMeasure Developers
5 #
6 # Permission is hereby granted, free of charge, to any person obtaining a copy
7 # of this software and associated documentation files (the "Software"), to deal
8 # in the Software without restriction, including without limitation the rights
9 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 # copies of the Software, and to permit persons to whom the Software is
11 # furnished to do so, subject to the following conditions:
12 #
13 # The above copyright notice and this permission notice shall be included in
14 # all copies or substantial portions of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 # THE SOFTWARE.
23 #
24
25 import logging
26 from pymeasure.instruments import Instrument, SCPIUnknownMixin
27 from pymeasure.instruments.lakeshore.lakeshore_base import LakeShoreTemperatureChannel
28
29 log = logging.getLogger(__name__)
30 log.addHandler(logging.NullHandler())
31
32
33 class LakeShore224(SCPIUnknownMixin, Instrument):
34 """ Represents the Lakeshore 224 Temperature monitor and provides a high-level interface
35 for interacting with the instrument. Note that the 224 provides 12 temperature input channels
36 (A, B, C1-5, D1-5). This driver makes use of the :ref:`LakeShoreChannels`
37
38 .. code-block:: python
39
40 monitor = LakeShore224('GPIB::1')
41
42 print(monitor.input_A.kelvin) # Print the temperature in kelvin on sensor A
43 monitor.input_A.wait_for_temperature() # Wait for the temperature on sensor A to stabilize.
44 """
45
46 input_0 = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 0)
47
48 input_A = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'A')
49
50 input_B = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'B')
51
52 input_C1 = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'C1')
53
54 input_C2 = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'C2')
55
56 input_C3 = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'C3')
57
58 input_C4 = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'C4')
59
60 input_C5 = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'C5')
61
62 input_D1 = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'D1')
63
64 input_D2 = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'D2')
65
66 input_D3 = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'D3')
67
68 input_D4 = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'D4')
69
70 input_D5 = Instrument.ChannelCreator(LakeShoreTemperatureChannel, 'D5')
71
72 def __init__(self, adapter, name="Lakeshore Model 224 Temperature Controller", **kwargs):
73 kwargs.setdefault('read_termination', "\r\n")
74 super().__init__(
75 adapter,
76 name,
77 **kwargs
78 )