tomato.drivers.biologic.kbio package
Submodules
Bio-Logic OEM package python API.
This module provides helper functions to the ctypes module, and can be imported as a whole when low level C interfacing is required.
- tomato.drivers.biologic.kbio.c_utils.c_dump(cobj)
Print both byte version of object and hex dump.
- class tomato.drivers.biologic.kbio.c_utils.c_buffer(size, encoding='UTF8')
Bases:
object
- property parm
mimic ctypes style of embedding the parameter, which is a couple.
- property value
Extract the contents of the buffer using the actual length and turn it to a string.
- class tomato.drivers.biologic.kbio.c_utils.POD
Bases:
Structure
ctypes Structure with helper methods.
- property keys
Reproduce a dict behaviour.
- subset(*fields)
Create a dict from a selection of Structure fields.
Bio-Logic OEM package python API.
This module provides a pure Python interface to the EcLib DLL used to control Bio-Logic potentiostats.
As the methods of this API closely follow the DLL parameters, no docstring is provided, as one can refer to the Development Package PDF for documentation.
The aim of this API is to shield this module’s clients from the ctypes intricacies, leaving the user to use either plain types or types coming from this module, or the kbio_types module.
- The only consistent conventions in this API are :
id_
is the connection identifier returned by a Connect call,ch
is a 1 based channel identifier (vs a 0 based value in the DLL)strings on the client side are encoded in this API, as the DLL uses bytes.
Most of the functions raise an exception on error (a BL_Error exception type), which encapsulates the error code.
This behaviour can be overriden in the BL_xxx functions with an abort flag set to False.
- class tomato.drivers.biologic.kbio.kbio_api.KBIO_api(eclib_file=None, blfind_file=None)
Bases:
object
- GetLibVersion()
- Connect(server, timeout=5)
- USB_DeviceInfo(index)
- TestConnection(id_)
- TestComSpeed(id_, ch)
- Disconnect(id_)
- PluggedChannels(id_)
- static channel_map(channel_set)
Build a boolean array of channel presence in the channel_set (an iterable).
- GetChannelInfo(id_, ch)
- LoadFirmware(id_, channels, firmware, fpga, force=True)
- GetHardwareConf(id_, ch)
- SetHardwareConf(id_, ch, cnx, mode)
- OptionError(id_, ch)
- GetMessage(id_, ch)
- GetErrorMsg(code)
- DefineParameter(label, value, index, parm)
- DefineBoolParameter(label, value, index, parm)
- DefineSglParameter(label, value, index, parm)
- DefineIntParameter(label, value, index, parm)
- UpdateParameters(id_, ch, index, parms, file)
- GetTechniqueInfos(id_, ch, ix, info)
- GetParamInfos(id_, ch, ix, info)
- LoadTechnique(id_, ch, file, parms, first=True, last=True, display=False)
- StartChannel(id_, ch)
- StopChannel(id_, ch)
- StartChannels(id_, channels)
- StopChannels(id_, channels)
- GetCurrentValues(id_, ch)
- GetData(id_, ch)
- ConvertNumericIntoSingle(vi)
Convert the vi word (32b) into a float.
- FindEChemDev()
- FindEChemEthDev()
- FindEChemUsbDev()
- SetEthernetConfig(target_ip, new_ip=None, netmask=None, gateway=None)
- class DeviceInfo
Bases:
DeviceInfo
DeviceInfo adds a few helper methods over the KBIO plain old data equivalent
- property model
- class ChannelInfo
Bases:
ChannelInfo
ChannelInfo adds a few helper methods over the KBIO plain old data equivalent
- property firmware
- property has_no_firmware
- property is_kernel_loaded
- property board
- property state
- property amplifier
- property min_IRange
- property max_IRange
- class HardwareConf
Bases:
HardwareConf
HardwareConf adds a few helper methods over the KBIO plain old data equivalent
- property mode
- property connection
- exception BL_Error(context)
Bases:
RuntimeError
BL_Error is an Exception used to capture an EClib API error.
- is_error(error)
Check whether the error code is the same as our error code.
- class Error(code)
Bases:
object
Class to encapsulate an EClib error code.
- property translate
Turn error code into tuple (code, enum-name, clear text).
- is_error(error)
Return whether error code is same as numeric value
- check(context=None, abort=True, show=True)
Raise an error or print an error in case an error happened.
context gives local info in case of error, otherwise keep default one abort decide between raising an exception versus just printing (if show is set to True)
- list_by_tag = {ERROR.COMM_ALLOCMEMFAILED: 'Cannot allocate memory in the instrument', ERROR.COMM_COMMFAILED: 'Communication failed with the instrument', ERROR.COMM_CONNECTIONFAILED: 'Cannot establish connection with the instrument', ERROR.COMM_INCOMPATIBLESERVER: 'Communication firmware not compatible', ERROR.COMM_INVALIDIPADDRESS: 'Invalid IP address', ERROR.COMM_LOADFIRMWAREFAILED: 'Cannot load firmware into selected channel(s)', ERROR.COMM_MAXCONNREACHED: 'Maximum number of allowed connections reached', ERROR.COMM_WAITINGACK: 'Waiting for the instrument response', ERROR.FIRM_FIRMFILEACCESSFAILED: 'Cannot read kernel.bin file', ERROR.FIRM_FIRMFILENOTEXISTS: 'Cannot find kernel.bin file', ERROR.FIRM_FIRMINVALIDFILE: 'Invalid kernel.bin file', ERROR.FIRM_FIRMLOADINGFAILED: 'Cannot load kernel.bin on the selected channel(s)', ERROR.FIRM_FIRMWAREINCOMPATIBLE: 'Loaded firmware not compatible with the library', ERROR.FIRM_FIRMWARENOTLOADED: 'No firmware loaded on the selected channel(s)', ERROR.FIRM_XILFILEACCESSFAILED: 'Cannot read FPGA file', ERROR.FIRM_XILFILENOTEXISTS: 'Cannot find FPGA file', ERROR.FIRM_XILINVALIDFILE: 'Invalid FPGA file', ERROR.FIRM_XILLOADINGFAILED: 'Cannot load FPGA file on the selected channel(s)', ERROR.GEN_CHANNELNOTPLUGGED: 'Selected channel(s) unplugged', ERROR.GEN_CHANNEL_RUNNING: 'Selected channel(s) already used', ERROR.GEN_CONNECTIONINPROGRESS: 'Connection in progress', ERROR.GEN_DEVICE_NOTALLOWED: 'Device not allowed', ERROR.GEN_ECLAB_LOADED: 'EC-Lab firmware loaded on the instrument', ERROR.GEN_FILENOTEXISTS: 'Selected file does not exist', ERROR.GEN_FUNCTIONFAILED: 'Function failed', ERROR.GEN_FUNCTIONINPROGRESS: 'Function already in progress', ERROR.GEN_INVALIDCONF: 'Invalid instrument configuration', ERROR.GEN_INVALIDPARAMETERS: 'Invalid function parameters', ERROR.GEN_LIBNOTCORRECTLYLOADED: 'Library not correctly loaded in memory', ERROR.GEN_NOCHANNELSELECTED: 'No channel selected', ERROR.GEN_NOTCONNECTED: 'No instrument connected', ERROR.GEN_UPDATEPARAMETERS: 'Invalid update function parameters', ERROR.GEN_USBLIBRARYERROR: 'USB library not correctly loaded in memory', ERROR.INSTR_MSGSIZEERROR: 'Invalid message size', ERROR.INSTR_RESPERROR: 'Instrument response error', ERROR.INSTR_RESPNOTPOSSIBLE: 'Selected channel(s) unplugged (device error)', ERROR.INSTR_TOOMANYDATA: 'Too many data to transfer from the instrument (device error)', ERROR.INSTR_VMEERROR: 'Internal instrument communication failed', ERROR.NOERROR: 'No error', ERROR.OPT_10A5V_BADPOWER: '10A 5V amplifier bad power', ERROR.OPT_10A5V_ERROR: '10A 5V amplifier error', ERROR.OPT_10A5V_OVERTEMP: '10A 5V amplifier overheat', ERROR.OPT_10A5V_POWERFAIL: '10A 5V amplifier power fail', ERROR.OPT_1A48VP_BADPOWER: '1A48VP amplifier bad power', ERROR.OPT_1A48VP_ERROR: '1A48VP amplifier error', ERROR.OPT_1A48VP_OVERTEMP: '1A48VP amplifier overheat', ERROR.OPT_1A48VP_POWERFAIL: '1A48VP amplifier power fail', ERROR.OPT_48V_BADPOWER: '48V amplifier bad power', ERROR.OPT_48V_ERROR: '48V amplifier unknown error', ERROR.OPT_48V_OVERTEMP: '48V amplifier temperature overflow', ERROR.OPT_48V_POWERFAIL: '48V amplifier power fail', ERROR.OPT_4A_BADPOWER: '4A amplifier bad power', ERROR.OPT_4A_ERROR: '4A amplifier unknown error', ERROR.OPT_4A_OVERTEMP: '4A amplifier temperature overflow', ERROR.OPT_4A_POWERFAIL: '4A amplifier power fail', ERROR.OPT_CHANGE: 'Number of options changed', ERROR.TECH_DATACORRUPTED: 'Data returned by the instrument are corrupted', ERROR.TECH_ECCFILECORRUPTED: 'ECC file corrupted', ERROR.TECH_ECCFILENOTEXISTS: 'Cannot find the selected ECC file', ERROR.TECH_INCOMPATIBLEECC: 'ECC file not compatible with the channel firmware', ERROR.TECH_LOADTECHNIQUEFAILED: 'Cannot load the ECC file', ERROR.TECH_MEMFULL: 'Cannot load techniques: full memory'}
- exception FindError(context)
Bases:
BL_Error
- list_by_tag = {FIND_ERROR.ACK_TIMEOUT: 'instrument response timeout', FIND_ERROR.CFG_MODIFY_FAILED: 'set TCP/IP parameters failed', FIND_ERROR.CMD_FAILED: 'instrument do not execute command', FIND_ERROR.EMPTY_PARAM: 'not any TCP/IP parameters in serialization', FIND_ERROR.EXP_RUNNING: 'experiment is running on instrument', FIND_ERROR.FIND_FAILED: 'find failed', FIND_ERROR.GW_FORMAT: 'invalid format of gateway address', FIND_ERROR.INVALID_PARAMETER: 'invalid function parameters', FIND_ERROR.IP_ALREADYEXIST: 'new IP address in TCP/IP parameters', FIND_ERROR.IP_FORMAT: 'invalid format of IP address', FIND_ERROR.IP_NOT_FOUND: 'instrument to modify not found', FIND_ERROR.NM_FORMAT: 'invalid format of netmask address', FIND_ERROR.NO_ERROR: 'no error', FIND_ERROR.READ_PARAM_FAILED: 'deserialization of TCP/IP parameters failed', FIND_ERROR.SOCKET_READ: 'cannot read descriptions of Ethernet instrument', FIND_ERROR.SOCKET_WRITE: 'cannot write the request of the descriptions of Ethernet instruments', FIND_ERROR.UNKNOWN_ERROR: 'unknown error'}
- ecl_api = [('BL_GetLibVersion', [<class 'ctypes.c_char_p'>, <class 'ctypes.wintypes.LP_c_ulong'>]), ('BL_Connect', [<class 'ctypes.c_char_p'>, <class 'ctypes.c_ubyte'>, <class 'ctypes.wintypes.LP_c_long'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_DeviceInfo'>]), ('BL_GetUSBdeviceinfos', [<class 'ctypes.c_ulong'>, <class 'ctypes.c_char_p'>, <class 'ctypes.wintypes.LP_c_ulong'>, <class 'ctypes.c_char_p'>, <class 'ctypes.wintypes.LP_c_ulong'>, <class 'ctypes.c_char_p'>, <class 'ctypes.wintypes.LP_c_ulong'>], <class 'ctypes.c_bool'>), ('BL_Disconnect', [<class 'ctypes.c_long'>]), ('BL_TestConnection', [<class 'ctypes.c_long'>]), ('BL_TestCommSpeed', [<class 'ctypes.c_long'>, <class 'ctypes.c_ubyte'>, <class 'ctypes.wintypes.LP_c_long'>, <class 'ctypes.wintypes.LP_c_long'>]), ('BL_GetChannelsPlugged', [<class 'ctypes.c_long'>, <class 'tomato.drivers.biologic.kbio.kbio_types.c_bool_Array_16'>, <class 'ctypes.c_ubyte'>]), ('BL_LoadFirmware', [<class 'ctypes.c_long'>, <class 'tomato.drivers.biologic.kbio.kbio_types.c_bool_Array_16'>, <class 'tomato.drivers.biologic.kbio.kbio_types.c_long_Array_16'>, <class 'ctypes.c_ubyte'>, <class 'ctypes.c_bool'>, <class 'ctypes.c_bool'>, <class 'ctypes.c_char_p'>, <class 'ctypes.c_char_p'>]), ('BL_GetChannelInfos', [<class 'ctypes.c_long'>, <class 'ctypes.c_ubyte'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_ChannelInfo'>]), ('BL_GetHardConf', [<class 'ctypes.c_long'>, <class 'ctypes.c_ubyte'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_HardwareConf'>]), ('BL_SetHardConf', [<class 'ctypes.c_long'>, <class 'ctypes.c_ubyte'>, <class 'tomato.drivers.biologic.kbio.kbio_types.HardwareConf'>]), ('BL_GetErrorMsg', [<class 'ctypes.c_long'>, <class 'ctypes.c_char_p'>, <class 'ctypes.wintypes.LP_c_ulong'>], <class 'int'>), ('BL_GetOptErr', [<class 'ctypes.c_long'>, <class 'ctypes.c_byte'>, <class 'ctypes.wintypes.LP_c_long'>, <class 'ctypes.wintypes.LP_c_long'>]), ('BL_GetMessage', [<class 'ctypes.c_long'>, <class 'ctypes.c_ubyte'>, <class 'ctypes.c_char_p'>, <class 'ctypes.wintypes.LP_c_ulong'>]), ('BL_LoadTechnique', [<class 'ctypes.c_long'>, <class 'ctypes.c_ubyte'>, <class 'ctypes.c_char_p'>, <class 'tomato.drivers.biologic.kbio.kbio_types.EccParams'>, <class 'ctypes.c_bool'>, <class 'ctypes.c_bool'>, <class 'ctypes.c_bool'>]), ('BL_DefineBoolParameter', [<class 'ctypes.c_char_p'>, <class 'ctypes.c_bool'>, <class 'ctypes.c_long'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_EccParam'>]), ('BL_DefineSglParameter', [<class 'ctypes.c_char_p'>, <class 'ctypes.c_float'>, <class 'ctypes.c_long'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_EccParam'>]), ('BL_DefineIntParameter', [<class 'ctypes.c_char_p'>, <class 'ctypes.c_long'>, <class 'ctypes.c_long'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_EccParam'>]), ('BL_UpdateParameters', [<class 'ctypes.c_long'>, <class 'ctypes.c_byte'>, <class 'ctypes.c_long'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_EccParams'>, <class 'ctypes.c_char_p'>]), ('BL_GetParamInfos', [<class 'ctypes.c_long'>, <class 'ctypes.c_byte'>, <class 'ctypes.c_long'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_TechniqueInfos'>]), ('BL_GetTechniqueInfos', [<class 'ctypes.c_long'>, <class 'ctypes.c_byte'>, <class 'ctypes.c_long'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_TechniqueInfos'>]), ('BL_StartChannel', [<class 'ctypes.c_long'>, <class 'ctypes.c_byte'>]), ('BL_StartChannels', [<class 'ctypes.c_long'>, <class 'tomato.drivers.biologic.kbio.kbio_types.c_bool_Array_16'>, <class 'tomato.drivers.biologic.kbio.kbio_types.c_long_Array_16'>, <class 'ctypes.c_ubyte'>]), ('BL_StopChannel', [<class 'ctypes.c_long'>, <class 'ctypes.c_byte'>]), ('BL_StopChannels', [<class 'ctypes.c_long'>, <class 'tomato.drivers.biologic.kbio.kbio_types.c_bool_Array_16'>, <class 'tomato.drivers.biologic.kbio.kbio_types.c_long_Array_16'>, <class 'ctypes.c_ubyte'>]), ('BL_GetCurrentValues', [<class 'ctypes.c_long'>, <class 'ctypes.c_byte'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_CurrentValues'>]), ('BL_GetData', [<class 'ctypes.c_long'>, <class 'ctypes.c_byte'>, <class 'tomato.drivers.biologic.kbio.kbio_types.c_ulong_Array_1000'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_DataInfo'>, <class 'tomato.drivers.biologic.kbio.kbio_types.LP_CurrentValues'>]), ('BL_ConvertNumericIntoSingle', [<class 'ctypes.c_ulong'>, <class 'ctypes.wintypes.LP_c_float'>])]
List of the blfind entry points, and their parameter types.
- blfind_api = [('BL_FindEChemDev', [<class 'ctypes.c_char_p'>, <class 'ctypes.wintypes.LP_c_ulong'>, <class 'ctypes.wintypes.LP_c_ulong'>]), ('BL_FindEChemEthDev', [<class 'ctypes.c_char_p'>, <class 'ctypes.wintypes.LP_c_ulong'>, <class 'ctypes.wintypes.LP_c_ulong'>]), ('BL_FindEChemUsbDev', [<class 'ctypes.c_char_p'>, <class 'ctypes.wintypes.LP_c_ulong'>, <class 'ctypes.wintypes.LP_c_ulong'>]), ('BL_SetConfig', [<class 'ctypes.c_char_p'>, <class 'ctypes.c_char_p'>])]
- bind_function(dll, name, argtypes, restype=None)
Rebind api with wrapped ctype function, registering attribute types and error handling.
Bio-Logic OEM package python API.
This module contains support functions when building technique parameters, and decoding experiment records.
- class tomato.drivers.biologic.kbio.kbio_tech.ECC_parm(label, type_)
Bases:
object
ECC param template
- label: str
- type_: type
- tomato.drivers.biologic.kbio.kbio_tech.make_ecc_parm(api, ecc_parm, value=0, index=0)
Given an ECC_parm template, create and return an EccParam, with its value and optional index.
- tomato.drivers.biologic.kbio.kbio_tech.make_ecc_parms(api, *ecc_parm_list)
Create an EccParam array from an EccParam list, and return an EccParams refering to it.
- tomato.drivers.biologic.kbio.kbio_tech.print_experiment_data(api, data)
Unpack the experiment data, decode it according to the technique, display it, then return the experiment status
Bio-Logic OEM package data types.
This module provides a transcription of the EcLib DLL data types and constants.
As the names and values can be found in the Development Package documentation, one should refer to the PDF for further explanations.
The main datatypes the module relies on are ctypes Structure, Enum and dataclass.
Note that the DLL has alignement requirements that can be achieved with the _pack_ attribute in the Structures.
- tomato.drivers.biologic.kbio.kbio_types.ChannelsArray
alias of
c_bool_Array_16
- tomato.drivers.biologic.kbio.kbio_types.ResultsArray
alias of
c_long_Array_16
- tomato.drivers.biologic.kbio.kbio_types.DataBuffer
alias of
c_ulong_Array_1000
- class tomato.drivers.biologic.kbio.kbio_types.USB_device(index, instrument, serial)
Bases:
object
- index: int
- instrument: str
- serial: str
- property address
- class tomato.drivers.biologic.kbio.kbio_types.Ethernet_device(config, instrument, serial, identifier, name)
Bases:
object
- config: tuple
- instrument: str
- serial: str
- identifier: str
- name: str
- class tomato.drivers.biologic.kbio.kbio_types.DEVICE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- VMP = 0
- VMP2 = 1
- MPG = 2
- BISTAT = 3
- MCS_200 = 4
- VMP3 = 5
- VSP = 6
- HCP803 = 7
- EPP400 = 8
- EPP4000 = 9
- BISTAT2 = 10
- FCT150S = 11
- VMP300 = 12
- SP50 = 13
- SP150 = 14
- FCT50S = 15
- SP300 = 16
- CLB500 = 17
- HCP1005 = 18
- CLB2000 = 19
- VSP300 = 20
- SP200 = 21
- MPG2 = 22
- SP100 = 23
- MOSLED = 24
- KINEXXX = 25
- BCS815 = 26
- SP240 = 27
- MPG205 = 28
- MPG210 = 29
- MPG220 = 30
- MPG240 = 31
- BP300 = 32
- VMP3E = 33
- VSP3E = 34
- SP50E = 35
- SP150E = 36
- UNKNOWN = 255
- class tomato.drivers.biologic.kbio.kbio_types.DeviceInfo
Bases:
POD
- CPU
Structure/Union member
- DeviceCode
Structure/Union member
- FirmwareDate_dd
Structure/Union member
- FirmwareDate_mm
Structure/Union member
- FirmwareDate_yyyy
Structure/Union member
- FirmwareVersion
Structure/Union member
- HTdisplayOn
Structure/Union member
- NbOfConnectedPC
Structure/Union member
- NumberOfChannels
Structure/Union member
- NumberOfSlots
Structure/Union member
- RAMSize
Structure/Union member
- tomato.drivers.biologic.kbio.kbio_types.DEVICE_INFO
alias of
LP_DeviceInfo
- class tomato.drivers.biologic.kbio.kbio_types.CHANNEL_BOARD(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- C340_IF0 = 0
- C340_IF2_Z = 1
- C340_OTHERS = 2
- C340_IF2_NONZ = 3
- C340_IF3_Z = 4
- C340_IF3_NONZ = 5
- C340_IF3_ZZ = 6
- C340_IF3_NZZ = 7
- C340_SP50 = 8
- C340_SP150Z = 9
- C340_SP150NZ = 10
- C437_Z = 11
- C437_NZ = 12
- C437_SP150Z = 13
- C437_SP150NZ = 14
- C437_MPG2 = 15
- C437_MPG2Z = 16
- C437_MPGX = 17
- C437_MPGXZ = 18
- C437_VMP3EZ = 19
- C437_VMP3ENZ = 20
- class tomato.drivers.biologic.kbio.kbio_types.ChannelInfo
Bases:
POD
- AmpCode
Structure/Union member
- BoardSerialNumber
Structure/Union member
- BoardVersion
Structure/Union member
- Channel
Structure/Union member
- FirmwareCode
Structure/Union member
- FirmwareVersion
Structure/Union member
- GPRAboard
Structure/Union member
- Lcboard
Structure/Union member
- MUXboard
Structure/Union member
- MaxBandwidth
Structure/Union member
- MaxIRange
Structure/Union member
- MemFilled
Structure/Union member
- MemSize
Structure/Union member
- MinIRange
Structure/Union member
- NbAmps
Structure/Union member
- NbOfTechniques
Structure/Union member
- State
Structure/Union member
- XilinxVersion
Structure/Union member
- Zboard
Structure/Union member
- tomato.drivers.biologic.kbio.kbio_types.CH_INFO
alias of
LP_ChannelInfo
- class tomato.drivers.biologic.kbio.kbio_types.HardwareConf
Bases:
POD
- Connection
Structure/Union member
- Mode
Structure/Union member
- tomato.drivers.biologic.kbio.kbio_types.HW_CONF
alias of
LP_HardwareConf
- class tomato.drivers.biologic.kbio.kbio_types.HW_CNX(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- STANDARD = 0
- CE_TO_GND = 1
- WE_TO_GND = 2
- HIGH_VOLTAGE = 3
- class tomato.drivers.biologic.kbio.kbio_types.HW_MODE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- GROUNDED = 0
- FLOATING = 1
- class tomato.drivers.biologic.kbio.kbio_types.OPTION_ERROR(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- NO_ERROR = 0
- OPT_CHANGE = 1
- OPEN_IN = 2
- IRCMP_OVR = 3
- OPT_4A = 100
- OPT_4A_OVRTEMP = 101
- OPT_4A_BADPOW = 102
- OPT_4A_POWFAIL = 103
- OPT_48V = 200
- OPT_48V_OVRTEMP = 201
- OPT_48V_BADPOW = 202
- OPT_48V_POWFAIL = 203
- OPT_10A5V_ERR = 300
- OPT_10A5V_OVRTEMP = 301
- OPT_10A5V_BADPOW = 302
- OPT_10A5V_POWFAIL = 303
- class tomato.drivers.biologic.kbio.kbio_types.FIRMWARE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- NONE = 0
- INTERPR = 1
- UNKNOWN = 4
- KERNEL = 5
- INVALID = 8
- ECAL = 10
- ECAL4 = 11
- class tomato.drivers.biologic.kbio.kbio_types.CurrentValues
Bases:
POD
- Ece
Structure/Union member
- EceRangeMax
Structure/Union member
- EceRangeMin
Structure/Union member
- ElapsedTime
Structure/Union member
- Eoverflow
Structure/Union member
- Ewe
Structure/Union member
- EweRangeMax
Structure/Union member
- EweRangeMin
Structure/Union member
- Freq
Structure/Union member
- I
Structure/Union member
- IRange
Structure/Union member
- Ioverflow
Structure/Union member
- MemFilled
Structure/Union member
- OptErr
Structure/Union member
- OptPos
Structure/Union member
- Rcomp
Structure/Union member
- Saturation
Structure/Union member
- State
Structure/Union member
- TimeBase
Structure/Union member
- tomato.drivers.biologic.kbio.kbio_types.CURRENT_VALUES
alias of
LP_CurrentValues
- class tomato.drivers.biologic.kbio.kbio_types.DataInfo
Bases:
POD
- IRQskipped
Structure/Union member
- MuxPad
Structure/Union member
- NbCols
Structure/Union member
- NbRows
Structure/Union member
- ProcessIndex
Structure/Union member
- StartTime
Structure/Union member
- TechniqueID
Structure/Union member
- TechniqueIndex
Structure/Union member
- loop
Structure/Union member
- tomato.drivers.biologic.kbio.kbio_types.DATA_INFO
alias of
LP_DataInfo
- class tomato.drivers.biologic.kbio.kbio_types.PARAM_TYPE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- PARAM_INT = 0
- PARAM_BOOLEAN = 1
- PARAM_SINGLE = 2
- class tomato.drivers.biologic.kbio.kbio_types.EccParam
Bases:
POD
- ParamIndex
Structure/Union member
- ParamStr
Structure/Union member
- ParamType
Structure/Union member
- ParamVal
Structure/Union member
- tomato.drivers.biologic.kbio.kbio_types.ECC_PARM
alias of
LP_EccParam
- class tomato.drivers.biologic.kbio.kbio_types.EccParams
Bases:
POD
- len
Structure/Union member
- pParams
Structure/Union member
- tomato.drivers.biologic.kbio.kbio_types.ECC_PARMS
alias of
LP_EccParams
- tomato.drivers.biologic.kbio.kbio_types.ECC_PARM_ARRAY(nb)
- class tomato.drivers.biologic.kbio.kbio_types.TechniqueInfos
Bases:
POD
- HardSettings
Structure/Union member
- Id
Structure/Union member
- Params
Structure/Union member
- indx
Structure/Union member
- nbParams
Structure/Union member
- nbSettings
Structure/Union member
- tomato.drivers.biologic.kbio.kbio_types.TECHNIQUE_INFOS
alias of
LP_TechniqueInfos
- class tomato.drivers.biologic.kbio.kbio_types.PROG_STATE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- STOP = 0
- RUN = 1
- PAUSE = 2
- SYNC = 3
- class tomato.drivers.biologic.kbio.kbio_types.I_RANGE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- I_RANGE_KEEP = -1
- I_RANGE_100pA = 0
- I_RANGE_1nA = 1
- I_RANGE_10nA = 2
- I_RANGE_100nA = 3
- I_RANGE_1uA = 4
- I_RANGE_10uA = 5
- I_RANGE_100uA = 6
- I_RANGE_1mA = 7
- I_RANGE_10mA = 8
- I_RANGE_100mA = 9
- I_RANGE_1A = 10
- I_RANGE_BOOSTER = 11
- I_RANGE_AUTO = 12
- class tomato.drivers.biologic.kbio.kbio_types.E_RANGE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- E_RANGE_2_5V = 0
- E_RANGE_5V = 1
- E_RANGE_10V = 2
- E_RANGE_AUTO = 3
- class tomato.drivers.biologic.kbio.kbio_types.BANDWIDTH(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- BW_1 = 1
- BW_2 = 2
- BW_3 = 3
- BW_4 = 4
- BW_5 = 5
- BW_6 = 6
- BW_7 = 7
- BW_8 = 8
- BW_9 = 9
- class tomato.drivers.biologic.kbio.kbio_types.GAIN(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- GAIN_1 = 0
- GAIN_10 = 1
- GAIN_100 = 2
- GAIN_1000 = 3
- class tomato.drivers.biologic.kbio.kbio_types.FILTER(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- FILTER_NONE = 0
- FILTER_50KHZ = 1
- FILTER_1KHZ = 2
- FILTER_5HZ = 3
- class tomato.drivers.biologic.kbio.kbio_types.AMPLIFIER(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- AMPL_NONE = 0
- AMPL_2A = 1
- AMPL_1A = 2
- AMPL_5A = 3
- AMPL_10A = 4
- AMPL_20A = 5
- AMPL_HEUS = 6
- AMPL_LC = 7
- AMPL_80A = 8
- AMPL_4AI = 9
- AMPL_PAC = 10
- AMPL_4AI_VSP = 11
- AMPL_LC_VSP = 12
- AMPL_UNDEF = 13
- AMPL_MUIC = 14
- AMPL_ERROR = 15
- AMPL_8AI = 16
- AMPL_LB500 = 17
- AMPL_100A5V = 18
- AMPL_LB2000 = 19
- AMPL_1A48V = 20
- AMPL_4A14V = 21
- AMPL_5A_MPG2B = 22
- AMPL_10A_MPG2B = 23
- AMPL_20A_MPG2B = 24
- AMPL_40A_MPG2B = 25
- AMPL_COIN_CELL_HOLDER = 26
- AMPL4_10A5V = 27
- AMPL4_2A30V = 28
- AMPL4_30A50V = 77
- AMPL3_50A60V = 93
- AMPL3_200A12V = 97
- AMPL3_50A60VII = 101
- AMPL4_1A48VPII = 105
- AMPL4_1A48VPIII = 129
- class tomato.drivers.biologic.kbio.kbio_types.ERROR(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- NOERROR = 0
- GEN_NOTCONNECTED = -1
- GEN_CONNECTIONINPROGRESS = -2
- GEN_CHANNELNOTPLUGGED = -3
- GEN_INVALIDPARAMETERS = -4
- GEN_FILENOTEXISTS = -5
- GEN_FUNCTIONFAILED = -6
- GEN_NOCHANNELSELECTED = -7
- GEN_INVALIDCONF = -8
- GEN_ECLAB_LOADED = -9
- GEN_LIBNOTCORRECTLYLOADED = -10
- GEN_USBLIBRARYERROR = -11
- GEN_FUNCTIONINPROGRESS = -12
- GEN_CHANNEL_RUNNING = -13
- GEN_DEVICE_NOTALLOWED = -14
- GEN_UPDATEPARAMETERS = -15
- INSTR_VMEERROR = -101
- INSTR_TOOMANYDATA = -102
- INSTR_RESPNOTPOSSIBLE = -103
- INSTR_RESPERROR = -104
- INSTR_MSGSIZEERROR = -105
- COMM_COMMFAILED = -200
- COMM_CONNECTIONFAILED = -201
- COMM_WAITINGACK = -202
- COMM_INVALIDIPADDRESS = -203
- COMM_ALLOCMEMFAILED = -204
- COMM_LOADFIRMWAREFAILED = -205
- COMM_INCOMPATIBLESERVER = -206
- COMM_MAXCONNREACHED = -207
- FIRM_FIRMFILENOTEXISTS = -300
- FIRM_FIRMFILEACCESSFAILED = -301
- FIRM_FIRMINVALIDFILE = -302
- FIRM_FIRMLOADINGFAILED = -303
- FIRM_XILFILENOTEXISTS = -304
- FIRM_XILFILEACCESSFAILED = -305
- FIRM_XILINVALIDFILE = -306
- FIRM_XILLOADINGFAILED = -307
- FIRM_FIRMWARENOTLOADED = -308
- FIRM_FIRMWAREINCOMPATIBLE = -309
- TECH_ECCFILENOTEXISTS = -400
- TECH_INCOMPATIBLEECC = -401
- TECH_ECCFILECORRUPTED = -402
- TECH_LOADTECHNIQUEFAILED = -403
- TECH_DATACORRUPTED = -404
- TECH_MEMFULL = -405
- OPT_CHANGE = 1
- OPT_OPEN_IN = 2
- OPT_4A_ERROR = 100
- OPT_4A_OVERTEMP = 101
- OPT_4A_BADPOWER = 102
- OPT_4A_POWERFAIL = 103
- OPT_48V_ERROR = 200
- OPT_48V_OVERTEMP = 201
- OPT_48V_BADPOWER = 202
- OPT_48V_POWERFAIL = 203
- OPT_10A5V_ERROR = 300
- OPT_10A5V_OVERTEMP = 301
- OPT_10A5V_BADPOWER = 302
- OPT_10A5V_POWERFAIL = 303
- OPT_1A48VP_ERROR = 600
- OPT_1A48VP_OVERTEMP = 601
- OPT_1A48VP_BADPOWER = 602
- OPT_1A48VP_POWERFAIL = 603
- class tomato.drivers.biologic.kbio.kbio_types.FIND_ERROR(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- NO_ERROR = 0
- UNKNOWN_ERROR = -1
- INVALID_PARAMETER = -2
- ACK_TIMEOUT = -10
- EXP_RUNNING = -11
- CMD_FAILED = -12
- FIND_FAILED = -20
- SOCKET_WRITE = -21
- SOCKET_READ = -22
- CFG_MODIFY_FAILED = -30
- READ_PARAM_FAILED = -31
- EMPTY_PARAM = -32
- IP_FORMAT = -33
- NM_FORMAT = -34
- GW_FORMAT = -35
- IP_NOT_FOUND = -38
- IP_ALREADYEXIST = -39
Bio-Logic OEM package technique constants.
This module provides an enumeration of technique identifiers which DLL calls return.
- class tomato.drivers.biologic.kbio.tech_types.TECH_ID(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- NONE = 0
- OCV = 100
- CA = 101
- CP = 102
- CV = 103
- PEIS = 104
- POTPULSE = 105
- GALPULSE = 106
- GEIS = 107
- STACKPEIS_SLAVE = 108
- STACKPEIS = 109
- CPOWER = 110
- CLOAD = 111
- FCT = 112
- SPEIS = 113
- SGEIS = 114
- STACKPDYN = 115
- STACKPDYN_SLAVE = 116
- STACKGDYN = 117
- STACKGEIS_SLAVE = 118
- STACKGEIS = 119
- STACKGDYN_SLAVE = 120
- CPO = 121
- CGA = 122
- COKINE = 123
- PDYN = 124
- GDYN = 125
- CVA = 126
- DPV = 127
- SWV = 128
- NPV = 129
- RNPV = 130
- DNPV = 131
- DPA = 132
- EVT = 133
- LP = 134
- GC = 135
- CPP = 136
- PDP = 137
- PSP = 138
- ZRA = 139
- MIR = 140
- PZIR = 141
- GZIR = 142
- LOOP = 150
- TO = 151
- TI = 152
- TOS = 153
- CPLIMIT = 155
- GDYNLIMIT = 156
- CALIMIT = 157
- PDYNLIMIT = 158
- LASV = 159
- MP = 167
- CASG = 169
- CASP = 170
Bio-Logic OEM package python API.
This module provides simple functions that are general purpose, and prone to be used in several modules.
- tomato.drivers.biologic.kbio.utils.class_name(obj)
Return the class name of an object.
- tomato.drivers.biologic.kbio.utils.exception_brief(e, extended=False)
Return either a simple version of an exception, or a more verbose one.
- tomato.drivers.biologic.kbio.utils.warn_diff(msg, cmp)
Check a predicate (assert) or a mismatch, and on error print a message.
- tomato.drivers.biologic.kbio.utils.error_diff(msg, cmp)
Check a predicate (assert) or a mismatch, and on error raise an exception.
- tomato.drivers.biologic.kbio.utils.prepend_path(path, filename)
Prepend a path to filename in case one is not already provided.
- tomato.drivers.biologic.kbio.utils.file_complete(filename, an_ext)
Append an extension to a filename unless the file already exists or if it already has one.
- tomato.drivers.biologic.kbio.utils.pp_plural(nb, label, num=True, nothing='')
Return a user friendly version of an ordinal and a label.
num is used to force a number version, nothing is what to say if there is nothing