load module
- class load.Load
Bases:
objectThis module can control DC Electronic Loads.
It supports USB interface to use SCPI.
It will scan available instruments on your DSO, then require a serial number to specify and connect to it.
Usage:
import load inst = load.Load() inst.connect('<Instrument Serial Number>') print(inst.idn()) inst.close()
- get_current_CCS(level: str = 'A', value: str | None = None) float
Get the current of the CC static mode.
- get_nseq_data_edit() str
Get the editing data of normal sequence.
- Returns:
‘Step:, Value:, Time:, LOAD:, TRIG OUT:, RAMP:, PAUSE:’
- Return type:
data (str)
- get_nseq_edit_point() str
Get the editing step number of the normal sequence.
- Returns:
The edit step number of the normal sequence, 1~1000.
- Return type:
point (str)
- get_nseq_para() str
Get parameters of the Normal Sequence function.
- Returns:
Start:, Seq No:, Memo:, Mode:, Range:, Loop:, Last Load:, Last:, Chain:
- Return type:
parameters (str)
- get_voltage_CV(level: str = 'A', value: str | None = None) float
Get the CV mode voltage or the +CV voltage value.
- max_current
MAX Current for this instrument. You will get it after connection.
- max_voltage
MAX Voltage for this instrument. You will get it after connection.
- meas_power() float
Query of power measurement.
- Returns:
the power measurement, unit is the watt.
- Return type:
- min_current
MIN Current for this instrument. You will get it after connection.
- min_voltage
MIN Voltage for this instrument. You will get it after connection.
- nseq_state() str
Get the state of the Normal Sequence function.
- Returns:
“ON, {STOP | RUN | PAUSE}”, OFF
- Return type:
state (str)
- readline() str
Read a line from the instrument’s communication port and return it as a string.
- Returns:
The string read from the instrument.
- Return type:
- scpi_delay
SCPI delay.
- set_mode(mode: int) None
Set the operating function of the load.
- Parameters:
mode (int) – 0:’LOAD’, 1:’PROG’, 2:’NSEQ’, 3:’FSEQ’,
- set_nseq_data_edit(step: int = 1, total_step: int = 1, load_value: float = 0.0000, hours: int = 0, minutes: int = 0, seconds: int = 0, milliseconds: int = 0, load_state: str = 'OFF', RAMP: str = 'OFF', trig_out: str = 'OFF', pause: str = 'OFF') None
Set the editing data of normal sequence.
- Parameters:
step (int) – The edit step number.
total_step (int) – The total number of steps.
load_value (float) – Set a load value of operation mode.
hours (int) – Set hours.
minutes (int) – Set minutes.
seconds (int) – Set seconds.
milliseconds (int) – Set milliseconds.
load_state (str) – ‘ON’, ‘OFF’
RAMP (str) – ‘ON’, ‘OFF’
trig_out (str) – ‘ON’, ‘OFF’
pause (str) – ‘ON’, ‘OFF’
- set_nseq_edit_point(point: int = 1) None
Set the editing step number of the normal sequence.
- Parameters:
point (int) – The edit step number of the normal sequence, 1~1000.
- set_nseq_para(start: int = 1, seq_no: int = 1, memo: str = '', mode: str = 'CC', range: str = 'ILVL', loop: str = 'Infinity', last_load: str = 'OFF', last_value: float = 0.0000, chain: str = 'Off') None
Set parameters of the Normal Sequence function.
- Parameters:
start (int) – start sequence number.(1~10)
seq_no (int) – sequence number.(1~10)
memo (str) – note of up to 12 characters. Enclose the string in double quotation marks.
mode (str) – ‘CC’, ‘CR’, ‘CV’, ‘CP’
range (str) – ‘IHVH’, ‘IMVH’, ‘ILVH’, ‘IHVL’, ‘IMVL’, ‘ILVL’
last_load (str) – ‘ON’, ‘OFF’
last_value (float) – Last Value after the end.
chain (int, str) – next sequence number (1~10), ‘OFF’ for No chain.
- set_nseq_state(state: str) None
Set the state of the Normal Sequence function.
- Parameters:
state (str) – OFF, ON, PAUSe, CONTinue, EXT
- set_ocp_level(current: float = 15.75) None
Set the OCP (over-current protection) value in amps.
- Parameters:
current (float) – current value.
- set_ocp_trip(trip: str = 'LIM') None
Set the OCP (over-current protection) trip setting.
- Parameters:
trip (str) – LOFF, LIM, or OFF.
- set_off() None
Set to OFF in the input configuration of the Load. Sets stop of program, sequence, and OCP test.
- set_on() None
Set to ON in the input configuration of the Load. Sets restart of program, sequence, and OCP test.