pylab_ml.common.projectsetup.ProjectSetup

class ProjectSetup(logger=None, filename=None)[source]

Bases: object

Class for the Setup from your project.

read the tb_projectsetup.json file in the directory …./projec/version/workarea/…./harness

and create instance slicing with init.’yourpath’ you have access to the initialisation setup, which is defined in the tb_projectsetup.json

Example

“instruments”: {
“smu”[

{“voltage”: 0}, {“i_clamp”: 0.2} ]

}

==> create dictionary self.init.instruments.smu = [{‘voltage’: 0}, {‘i_clamp’: 0.2}]

TODO: possibility to overwrite the values in tb_projectsetup.json with the file in tb_ate/src/’Hardware’/’Base’/tb_projectsetup.json

__init__(logger=None, filename=None)[source]

Initialise and save setup configuration to the setup-dictionary.

read the setup-file tb_projectsetup.json

and create all values in self.init…….

Args: None

Examples:
  • Initialization
    >>> setup = ProjectSetup()
    
  • Append some setup information:
    >>> tcc.setup.append('instruments.matrix', 'port', 'pxie6')
    >>> tcc.setup.append('instruments.smu', 'voltage', 5)
    >>> tcc.setup.append('instruments.smu', 'limit', 0.1)
    

Methods

__init__([logger, filename])

Initialise and save setup configuration to the setup-dictionary.

apply_configuration(data)

call(mycmd[, value, senderror])

close()

Write EEPROM/NVRAM with the rescue values and close all instruments.

create_dotdic(dic[, root])

Make from a dictionary a dot-dictionary with diclist.

do_fetch(idnr)

init_instrument(parent, instrument, items)

initialization([parent])

Set the instruments with the specified instname to its setup values in self.init.instruments.

jsondump(file, dictionary[, ident])

dump the dictionary to json-format

regDump([liste, invert, output, bwidth])

Read values from Register and return with a list of their values.

regDumpSave2DUT([mode, compare])

Write the register with values to the device.

runmacro(cmdlist, **kwargs)

Execute commands in the cmdlist.

set_configuration_values(data)

Only empty dummy function.

write(path[, name, value])

Write path to the dictionary in my class ProjectSetup.

close()[source]

Write EEPROM/NVRAM with the rescue values and close all instruments.

Close all instruments and write the dictionary to the log-file.

Return type:

None.

create_dotdic(dic, root=None)[source]

Make from a dictionary a dot-dictionary with diclist.

initialization(parent=None)[source]

Set the instruments with the specified instname to its setup values in self.init.instruments.

and save information (if instname exist!) from the instruments to result.instruments:
  • used class, version, id

jsondump(file, dictionary, ident=4)[source]

dump the dictionary to json-format

you can also use json.dump but I think this generated output-format is better for easy reading

regDump(liste='default', invert=False, output=None, bwidth=16)[source]

Read values from Register and return with a list of their values.

Parameters:
  • liste

    • ‘default’if define setup.reg.nodump -> read register without the registers which are defined in setup.reg.nodump

      if define setup.reg.dump -> read register which are defined in setup.reg.dump

    • ’all’ : read all register

    • type(liste) == list : use liste as a list

  • invert

    • True : use reg that are not in the list

    • False : use reg that are in the list

  • output – = None : return with a list of all registers (or adresses) and their values = ‘wr2setup’ : write return with a list of all registers and their values to setup.result.regs.regDump

regDumpSave2DUT(mode='default', compare='cache')[source]

Write the register with values to the device.

Parameters:
  • mode

    • ‘default’ use the values from parent.setup.result.regs.dump

    • type(mode) == list : use mode as a list (not yet implemented)

  • compare

    • ‘cache’ : compare with the Register cache value and write if orginal different from last cache value (faster as to read the register value)

    • True : write only if value different from actual values

    • False : write always

runmacro(cmdlist, **kwargs)[source]

Execute commands in the cmdlist.

kwargs: ‘wr2setup’ : write result to the setup.result json file.

set_configuration_values(data)[source]

Only empty dummy function.

write(path, name=None, value=None)[source]

Write path to the dictionary in my class ProjectSetup.

Path must be a string like ‘instruments.smu’ normaly append this path to result if path start with setup than write to setup.path

e.q. write(‘instruments.smu’, ‘port’, ‘pxie5’)

write(‘setup.HostName’, os.environ.get(‘COMPUTERNAME’))