hubercc508
Classes
|
HuberCC508
- class icicle.hubercc508.HuberCC508(*args, **kwargs)
Bases:
Instrument
- __init__(resource='/dev/ttyACM0', mode='serial', timeout=2.5, baud=9600, sim=False)
- Parameters:
resource – Resource address. See VISA docs for more info.
- BAUD_RATE = 9600
- MEASURE_TYPES = {'SPEED': 'Pump Speed (RPM)', 'TEMPERATURE': 'Bath Temperature (degC)'}
Measurement types for this instrument.
- MODE = 'serial'
- class MeasureChannel(instrument, channel, measure_type, unit='')
Bases:
MeasureChannel
MeasureChannel implementation for Huber CC508.
- property status
- Returns:
Status Byte value.
- property value
Performs measurement and returns value.
- Returns:
measured value.
- Return type:
float
- OUTPUTS = 1
- SETTINGS = {'SPEED': {'QUERY': 38}, 'SPEED_SETPOINT': {'QUERY': 72, 'SET': 72, 'verifier': <function is_numeric.<locals>._is_numeric>}, 'STATE': {'QUERY': 20, 'SET': 20, 'verifier': <function truthy.<locals>._truthy>}, 'TEMPERATURE': {'QUERY': 1, 'parser': <function HuberCC508.<lambda>>, 'unit': 'C'}, 'TEMPERATURE_SETPOINT': {'QUERY': 0, 'SET': 0, 'parser': <function HuberCC508.<lambda>>, 'unit': 'C', 'verifier': <function is_numeric.<locals>._is_numeric>}}
- SET_REQUIRES_READBACK = False
- SMALL_DELAY = 0.05
Small delay between subsequent commands (s).
- TIMEOUT = 2.5
- class TemperatureChannel(instrument, channel, measure_temperature, measure_speed)
Bases:
TemperatureChannel
TemperatureChannel implementation for Huber CC508.
- property speed
- Returns:
currently set speed current.
- Return type:
float
- property state
- Returns:
whether this power channel is on or off (True/False).
- Return type:
bool
- property status
- Returns:
Measurement Status Register value.
- property temperature
- Returns:
currently set channel temperature.
- Return type:
float
- query(setting)
Query setting on instrument.
- Parameters:
setting – key in class dictionary SETTINGS.
no_lock – override acquire_lock (e.g. if lock already taken by function that query-call is nested within).
attempts – how many retries to give query command.
- Returns:
Data returned by device for given query.
- set(setting, value, check_readback_only=False)
Set setting on instrument to value, and read-back using equivalent query().
- Parameters:
setting – key in class dictionary SETTINGS.
value – target value for setting.
check_readback_only – how to only check readback value if SET_REQUIRES_READBACK is set, and not perform back-query. If ‘same’, checks that readback gives same command as was sent.
no_lock – override acquire_lock (e.g. if lock already taken by function that set-call is nested within).
attempts – how many retries to give set command.
- Returns:
Read-back value if query() available, else whether number of bytes written during set() meets expectation
- validate_channel(channel, raise_exception=True)
Check if a power channel exists on this device. Only successful if channel == 1.
- Parameters:
channel – Channel number to validate as an input