pylab_ml.smu.tti.base_tti.TTI
- class TTI(**kwargs)[source]
Bases:
create_attributes,MeasureBaseclass Interface to the TTI Power Supply Instruments.
The TTI baseclass can connect to TTI Power Supply instruments
- ask=inst.query('
READ?’)
- Write and read the answer
- __init__(**kwargs)[source]
Connect and initialize TTI instrument.
- Parameters:
addr – Interface address
- Example: Initialization
>>> instrument = TTI(addr=24) # GPIB or USB address >>> instrument.init() # connect and initialize instrument
Methods
__init__(**kwargs)Connect and initialize TTI instrument.
clear()Clear error status.
close([force])Close connection to instrument.
createattributes(dictionary[, parent, ...])Create attributes or methods from a dictionary.
errmsg()Read Execution Error Register.
find_names() returns list of identifiers strings, lhs of = assignments
help()Print the docstring of the instrument class.
identify([showInstName])Identify message.
init([identify])Connect to TTI instrument and initialize.
local()Switch back to local instrument control.
message([message])Device has no display, message display to logger.info.
mfilter(input)mqtt_add(client, instrument[, liste, qos])Add the instrument to mqtt.
Remove the instrument from mqtt.
publish(topic, value)Publish topic as type='cmd' with payload=value.
publish_get(function_name, value)Publish function_name as type='get' with paylad=value.
publish_set(function_name, value)Publish function_name as type='set' with paylad=value.
read()Read the instruent directly.
reset()Reset and switch beep off.
Start setup instrument settings, called from class instruments.
write(cmd)Write direct to instrument.
Attributes
Set/get channel number if the instrument have more than one channel.
commandMeasure DC current of actual Channel.
Set the current clamping (A) of actual Channel.
Query IDN.
Return with instname or instname[ch] if it has channels.
Abstract for static class variable interchoices, to list interfaces statically.
Set/get the number of measurement to be carried out in a loop.
mqtt_enablemqtt_listGetter for the mqtt_status.
Get/Set over current protection trip point at x Amps.
Get/Set the Output-State of actual Channel.
Get/Set over voltage protection trip point at x Volts.
Get/Set sense.
Get/Set Standard Event Status Enable Register.
Get/Set voltage.
if something wrong with your called methode, than set the result to self.ATTR_ERROR
last set/get attribute name.
last set attribute value.
- ATTR_ERROR
if something wrong with your called methode, than set the result to self.ATTR_ERROR
- class Sense(value)[source]
Bases:
EnumEnum for Sense control.
- local = 0
value for sense mode = local
- remote = 1
value for sense mode = remote
- attrLast
last set/get attribute name.
- attrLastvalue
last set attribute value.
- property channel
Set/get channel number if the instrument have more than one channel.
- One can also use:
>>> vdd[0].voltage = 5 # set voltage from channel 0 >>> vdd[1].current = 0.1 # set current from channel 1 >>> v = vdd[1].voltage # measure voltage from channel 1
- close(force=False)
Close connection to instrument.
- createattributes(dictionary, parent=None, child=None, childname='')
Create attributes or methods from a dictionary.
Syntax from the dictionary see example in the class documentation.
- Parameters:
dictionary (dict) – The dictionary with the syntax: {attribute/methode name : (Device command for read/write) , range, call functions}.
parent (create_attributes, optional) – If you want to create a child, than you have to set the parent, otherwise None, by default None.
child (str, optional) – The name of the child, by default None.
childname (str, optional) – The name of the child, by default ‘’.
- Return type:
None.
- property current
Measure DC current of actual Channel.
- find_names()
find_names() returns list of identifiers strings, lhs of = assignments
- Returns:
obj_names – List of identifier strings
- Return type:
list of str
- help()
Print the docstring of the instrument class.
- property i_clamp
Set the current clamping (A) of actual Channel.
- property id
Query IDN.
- identify(showInstName=False)
Identify message.
- init(identify=False)[source]
Connect to TTI instrument and initialize.
- Parameters:
identify (bool, optional) – Whether to identify the instrument. The default is False.
- property instName
Return with instname or instname[ch] if it has channels.
- abstract property interchoices
Abstract for static class variable interchoices, to list interfaces statically.
- json = <module 'json' from '/home/runner/miniconda3/envs/test/lib/python3.9/json/__init__.py'>
- property measurecnt
Set/get the number of measurement to be carried out in a loop.
TODO: this function is not running yet, it is only a dummy
if the result == None than this function not implemented. The return value for the measurement is calculated togetheer with the mfilter setting.
- mqtt_add(client, instrument, liste='#', qos=0)
Add the instrument to mqtt. Calling from base_instrument, after the instrument (device) has been create. Normally you have not to use this function, only base_instrument use it.
- Parameters:
client (mqtt_init) – The MQTT client instance to which the instrument should be added.
instrument (object) – The instrument to be added to the MQTT client.
liste (list or str) – A list of attributes for which MQTT messages should be sent. If set to “#”, all attributes will be included (default: “#”).
qos (int) – The Quality of Service level for MQTT messages (default: 0).
- Return type:
None
- mqtt_disconnect()
Remove the instrument from mqtt. Calling from base_instrument, if the instrument are closing. Normally you have not to use this function, only base_instrument use it.
- property mqtt_status
Getter for the mqtt_status.
- property ocp
Get/Set over current protection trip point at x Amps.
- property onoff
Get/Set the Output-State of actual Channel.
0 = Output off1 = Output on
- property ovp
Get/Set over voltage protection trip point at x Volts.
- publish(topic, value)
Publish topic as type=’cmd’ with payload=value.
- Parameters:
topic (str) – The name of the topic to publish.
value (any) – The value to be published.
- Return type:
None
- publish_get(function_name, value)
Publish function_name as type=’get’ with paylad=value.
- Parameters:
function_name (str) – The name of the function to be published as a ‘get’ command.
value (any) – The value to be published as the payload of the ‘get’ command.
- Return type:
None
- publish_set(function_name, value)
Publish function_name as type=’set’ with paylad=value.
- Parameters:
function_name (str) – The name of the function to be published as a ‘set’ command.
value (any) – The value to be published as the payload of the ‘set’ command.
- Return type:
None
- property sense
Get/Set sense.
‘local’ = Local sensing (2-Wire)‘remote’ = Remote sensing (4-Wire)
- property state
Get/Set Standard Event Status Enable Register.
See QL355T Instruction Manual for more details
- property voltage
Get/Set voltage.