The buffer commands module.
These commands are used in the following models:
SMU2450
THIS FILE IS AUTO-GENERATED, IT SHOULD NOT BE MANUALLY MODIFIED.
Please report an issue if one is found.
Attributes and Functions
- buffer.clearstats()
- buffer.delete()
- buffer.getstats()
- buffer.make()
- buffer.save()
- buffer.saveappend()
- buffer.write.format()
- buffer.write.reading()
Buffer
Bases: BaseTSPCmd
The buffer command tree.
Constants
.DIGITS_3_5: The number of digits to use for the first measurement.
.DIGITS_4_5: The number of digits to use for the first measurement.
.DIGITS_5_5: The number of digits to use for the first measurement.
.DIGITS_6_5: The number of digits to use for the first measurement.
.DIGITS_7_5: The number of digits to use for the first measurement.
.DIGITS_8_5: The number of digits to use for the first measurement.
.EXPR_ADD: Add the present and previous measurements.
.EXPR_AVERAGE: Average the present and previous measurements.
.EXPR_DIVIDE: Divide the present reading by the previous reading.
.EXPR_EXPONENT: Exponent (10^present reading).
.EXPR_LOG10: Log10 (log10(present reading)).
.EXPR_MULTIPLY: Multiply the present and previous measurements.
.EXPR_NONE: Remove the math expression.
.EXPR_POLY: Polynomial where r is present reading and c is constant.
.EXPR_POWER: Present reading raised to power of defined constant.
.EXPR_RATE: Rate of change (present reading - previous reading)/(timestamp of present
reading - timestamp of previous reading).
.EXPR_RECIPROCAL: Reciprocal (1/present reading).
.EXPR_SQROOT: Square root of the present reading.
.EXPR_SUBTRACT: Present reading - previous reading.
.FILL_CONTINUOUS: Fill the buffer continuously.
.FILL_ONCE: Fill the buffer, then stop.
.OFF: Do not log information events.
.ON: Log information events.
.SAVE_FORMAT_TIME: Include dates, times, and fractional seconds in the buffer.
.SAVE_RAW_TIME: Include seconds and fractional seconds in the buffer.
.SAVE_RELATIVE_TIME: Include relative timestamps in the buffer.
.SAVE_TIMESTAMP_TIME: Include timestamps in the buffer.
.STAT_LIMIT: Source function level was limited.
.STAT_LIMIT1_HIGH: Reading is above high limit 1.
.STAT_LIMIT1_LOW: Reading is below low limit 1.
.STAT_LIMIT2_HIGH: Reading is above high limit 2.
.STAT_LIMIT2_LOW: Reading is below low limit 2.
.STAT_ORIGIN: A/D converter from which reading originated; for most instruments, this
will always be 0 (main). For digitizing instruments, can be 2 (digitize).
.STAT_OUTPUT: Output was on.
.STAT_OVER_TEMP: Overtemperature condition was active.
.STAT_PROTECTION: Overvoltage protection was active.
.STAT_QUESTIONABLE: Measure status questionable.
.STAT_READBACK: Measured source value was read.
.STAT_REL: Relative offset.
.STAT_SCAN: Scan.
.STAT_SENSE: Four-wire sense was used.
.STAT_START_GROUP: First reading in a group.
.STAT_TERMINAL: Measure terminal, front is 1, rear is 0.
.STYLE_COMPACT: Store readings with reduced accuracy (6.5 digits) with no formatting
information, 1 μs accurate timestamp.
.STYLE_FULL: Store the same information with full accuracy with formatting, plus
additional information.
.STYLE_STANDARD: Store readings with full accuracy with formatting.
.STYLE_WRITABLE: Store external reading buffer data.
.STYLE_WRITABLE_FULL: Store external reading buffer data with two reading values.
.UNIT_AMP: Set units of measure to dc current.
.UNIT_AMP_AC: Set units of measure to ac current.
.UNIT_CELSIUS: Set units of measure to Celsius.
.UNIT_CUSTOM1: Custom unit 1 (defined by buffer.unit()).
.UNIT_CUSTOM2: Custom unit 2 (defined by buffer.unit()).
.UNIT_CUSTOM3: Custom unit 3 (defined by buffer.unit()).
.UNIT_DAC: Set units of measure to DAC (voltage).
.UNIT_DBM: Set units of measure to decibel-milliwatts.
.UNIT_DECIBEL: Set units of measure to decibels.
.UNIT_DIO: Set units of measure to digital I/O.
.UNIT_FAHRENHEIT: Set units of measure to Fahrenheit.
.UNIT_FARAD: Set units of measure to capacitance.
.UNIT_HERTZ: Set units of measure to frequency.
.UNIT_KELVIN: Set units of measure to Kelvin.
.UNIT_NONE: Set units of measure to no units.
.UNIT_OHM: Set units of measure to ohms.
.UNIT_PERCENT: Set units of measure to percent.
.UNIT_RATIO: Set units of measure to dc voltage ratio.
.UNIT_RECIPROCAL: Set units of measure to reciprocal.
.UNIT_SECOND: Set units of measure to period.
.UNIT_TOT: Set units of measure to totalizer.
.UNIT_VOLT: Set units of measure to dc voltage.
.UNIT_VOLT_AC: Set units of measure to ac voltage.
.UNIT_WATT: Set units of measure to watts.
.UNIT_X: Set units of measure to buffer.UNIT_X.
Properties and methods
.clearstats(): The buffer.clearstats() function.
.delete(): The buffer.delete() function.
.getstats(): The buffer.getstats() function.
.make(): The buffer.make() function.
.save(): The buffer.save() function.
.saveappend(): The buffer.saveappend() function.
.write: The buffer.write command tree.
DIGITS_3_5
class-attribute
instance-attribute
DIGITS_3_5 = 'buffer.DIGITS_3_5'
DIGITS_4_5
class-attribute
instance-attribute
DIGITS_4_5 = 'buffer.DIGITS_4_5'
DIGITS_5_5
class-attribute
instance-attribute
DIGITS_5_5 = 'buffer.DIGITS_5_5'
DIGITS_6_5
class-attribute
instance-attribute
DIGITS_6_5 = 'buffer.DIGITS_6_5'
DIGITS_7_5
class-attribute
instance-attribute
DIGITS_7_5 = 'buffer.DIGITS_7_5'
DIGITS_8_5
class-attribute
instance-attribute
DIGITS_8_5 = 'buffer.DIGITS_8_5'
EXPR_ADD
class-attribute
instance-attribute
EXPR_ADD = 'buffer.EXPR_ADD'
EXPR_AVERAGE
class-attribute
instance-attribute
EXPR_AVERAGE = 'buffer.EXPR_AVERAGE'
EXPR_DIVIDE
class-attribute
instance-attribute
EXPR_DIVIDE = 'buffer.EXPR_DIVIDE'
EXPR_EXPONENT
class-attribute
instance-attribute
EXPR_EXPONENT = 'buffer.EXPR_EXPONENT'
EXPR_LOG10
class-attribute
instance-attribute
EXPR_LOG10 = 'buffer.EXPR_LOG10'
EXPR_MULTIPLY
class-attribute
instance-attribute
EXPR_MULTIPLY = 'buffer.EXPR_MULTIPLY'
EXPR_NONE
class-attribute
instance-attribute
EXPR_NONE = 'buffer.EXPR_NONE'
EXPR_POLY
class-attribute
instance-attribute
EXPR_POLY = 'buffer.EXPR_POLY'
EXPR_POWER
class-attribute
instance-attribute
EXPR_POWER = 'buffer.EXPR_POWER'
EXPR_RATE
class-attribute
instance-attribute
EXPR_RATE = 'buffer.EXPR_RATE'
EXPR_RECIPROCAL
class-attribute
instance-attribute
EXPR_RECIPROCAL = 'buffer.EXPR_RECIPROCAL'
EXPR_SQROOT
class-attribute
instance-attribute
EXPR_SQROOT = 'buffer.EXPR_SQROOT'
EXPR_SUBTRACT
class-attribute
instance-attribute
EXPR_SUBTRACT = 'buffer.EXPR_SUBTRACT'
FILL_CONTINUOUS
class-attribute
instance-attribute
FILL_CONTINUOUS = 'buffer.FILL_CONTINUOUS'
FILL_ONCE
class-attribute
instance-attribute
FILL_ONCE = 'buffer.FILL_ONCE'
OFF
class-attribute
instance-attribute
ON
class-attribute
instance-attribute
SAVE_FORMAT_TIME = 'buffer.SAVE_FORMAT_TIME'
SAVE_RAW_TIME
class-attribute
instance-attribute
SAVE_RAW_TIME = 'buffer.SAVE_RAW_TIME'
SAVE_RELATIVE_TIME
class-attribute
instance-attribute
SAVE_RELATIVE_TIME = 'buffer.SAVE_RELATIVE_TIME'
SAVE_TIMESTAMP_TIME
class-attribute
instance-attribute
SAVE_TIMESTAMP_TIME = 'buffer.SAVE_TIMESTAMP_TIME'
STAT_LIMIT
class-attribute
instance-attribute
STAT_LIMIT = 'buffer.STAT_LIMIT'
STAT_LIMIT1_HIGH
class-attribute
instance-attribute
STAT_LIMIT1_HIGH = 'buffer.STAT_LIMIT1_HIGH'
STAT_LIMIT1_LOW
class-attribute
instance-attribute
STAT_LIMIT1_LOW = 'buffer.STAT_LIMIT1_LOW'
STAT_LIMIT2_HIGH
class-attribute
instance-attribute
STAT_LIMIT2_HIGH = 'buffer.STAT_LIMIT2_HIGH'
STAT_LIMIT2_LOW
class-attribute
instance-attribute
STAT_LIMIT2_LOW = 'buffer.STAT_LIMIT2_LOW'
STAT_ORIGIN
class-attribute
instance-attribute
STAT_ORIGIN = 'buffer.STAT_ORIGIN'
STAT_OUTPUT
class-attribute
instance-attribute
STAT_OUTPUT = 'buffer.STAT_OUTPUT'
STAT_OVER_TEMP
class-attribute
instance-attribute
STAT_OVER_TEMP = 'buffer.STAT_OVER_TEMP'
STAT_PROTECTION
class-attribute
instance-attribute
STAT_PROTECTION = 'buffer.STAT_PROTECTION'
STAT_QUESTIONABLE
class-attribute
instance-attribute
STAT_QUESTIONABLE = 'buffer.STAT_QUESTIONABLE'
STAT_READBACK
class-attribute
instance-attribute
STAT_READBACK = 'buffer.STAT_READBACK'
STAT_REL
class-attribute
instance-attribute
STAT_REL = 'buffer.STAT_REL'
STAT_SCAN
class-attribute
instance-attribute
STAT_SCAN = 'buffer.STAT_SCAN'
STAT_SENSE
class-attribute
instance-attribute
STAT_SENSE = 'buffer.STAT_SENSE'
STAT_START_GROUP
class-attribute
instance-attribute
STAT_START_GROUP = 'buffer.STAT_START_GROUP'
STAT_TERMINAL
class-attribute
instance-attribute
STAT_TERMINAL = 'buffer.STAT_TERMINAL'
STYLE_COMPACT
class-attribute
instance-attribute
STYLE_COMPACT = 'buffer.STYLE_COMPACT'
STYLE_FULL
class-attribute
instance-attribute
STYLE_FULL = 'buffer.STYLE_FULL'
STYLE_STANDARD
class-attribute
instance-attribute
STYLE_STANDARD = 'buffer.STYLE_STANDARD'
STYLE_WRITABLE
class-attribute
instance-attribute
STYLE_WRITABLE = 'buffer.STYLE_WRITABLE'
STYLE_WRITABLE_FULL
class-attribute
instance-attribute
STYLE_WRITABLE_FULL = 'buffer.STYLE_WRITABLE_FULL'
UNIT_AMP
class-attribute
instance-attribute
UNIT_AMP = 'buffer.UNIT_AMP'
UNIT_AMP_AC
class-attribute
instance-attribute
UNIT_AMP_AC = 'buffer.UNIT_AMP_AC'
UNIT_CELSIUS
class-attribute
instance-attribute
UNIT_CELSIUS = 'buffer.UNIT_CELSIUS'
UNIT_CUSTOM1
class-attribute
instance-attribute
UNIT_CUSTOM1 = 'buffer.UNIT_CUSTOM1'
UNIT_CUSTOM2
class-attribute
instance-attribute
UNIT_CUSTOM2 = 'buffer.UNIT_CUSTOM2'
UNIT_CUSTOM3
class-attribute
instance-attribute
UNIT_CUSTOM3 = 'buffer.UNIT_CUSTOM3'
UNIT_DAC
class-attribute
instance-attribute
UNIT_DAC = 'buffer.UNIT_DAC'
UNIT_DBM
class-attribute
instance-attribute
UNIT_DBM = 'buffer.UNIT_DBM'
UNIT_DECIBEL
class-attribute
instance-attribute
UNIT_DECIBEL = 'buffer.UNIT_DECIBEL'
UNIT_DIO
class-attribute
instance-attribute
UNIT_DIO = 'buffer.UNIT_DIO'
UNIT_FAHRENHEIT
class-attribute
instance-attribute
UNIT_FAHRENHEIT = 'buffer.UNIT_FAHRENHEIT'
UNIT_FARAD
class-attribute
instance-attribute
UNIT_FARAD = 'buffer.UNIT_FARAD'
UNIT_HERTZ
class-attribute
instance-attribute
UNIT_HERTZ = 'buffer.UNIT_HERTZ'
UNIT_KELVIN
class-attribute
instance-attribute
UNIT_KELVIN = 'buffer.UNIT_KELVIN'
UNIT_NONE
class-attribute
instance-attribute
UNIT_NONE = 'buffer.UNIT_NONE'
UNIT_OHM
class-attribute
instance-attribute
UNIT_OHM = 'buffer.UNIT_OHM'
UNIT_PERCENT
class-attribute
instance-attribute
UNIT_PERCENT = 'buffer.UNIT_PERCENT'
UNIT_RATIO
class-attribute
instance-attribute
UNIT_RATIO = 'buffer.UNIT_RATIO'
UNIT_RECIPROCAL
class-attribute
instance-attribute
UNIT_RECIPROCAL = 'buffer.UNIT_RECIPROCAL'
UNIT_SECOND
class-attribute
instance-attribute
UNIT_SECOND = 'buffer.UNIT_SECOND'
UNIT_TOT
class-attribute
instance-attribute
UNIT_TOT = 'buffer.UNIT_TOT'
UNIT_VOLT
class-attribute
instance-attribute
UNIT_VOLT = 'buffer.UNIT_VOLT'
UNIT_VOLT_AC
class-attribute
instance-attribute
UNIT_VOLT_AC = 'buffer.UNIT_VOLT_AC'
UNIT_WATT
class-attribute
instance-attribute
UNIT_WATT = 'buffer.UNIT_WATT'
UNIT_X
class-attribute
instance-attribute
write
property
Return the buffer.write command tree.
Sub-properties and sub-methods
.format(): The buffer.write.format() function.
.reading(): The buffer.write.reading() function.
clearstats
clearstats(buffer_var: str | None = None) -> None
Run the buffer.clearstats() function.
Description
- This function clears the statistical information associated with the specified buffer.
TSP Syntax
| Parameters: |
-
buffer_var
(optional, default:
None
)
–
The name of the reading buffer, which may be a default buffer
(defbuffer1 or defbuffer2) or a user-defined buffer; defaults to defbuffer1 if not
specified.
|
delete
delete(buffer_name: str) -> None
Run the buffer.delete() function.
Description
- This function deletes a user-defined reading buffer.
TSP Syntax
| Parameters: |
-
buffer_name
(str)
–
The name of a user-defined reading buffer.
|
getstats
getstats(
buffer_var: str | None = None,
rel_start_time: str | None = None,
rel_end_time: str | None = None,
) -> dict[Any, Any]
Run the buffer.getstats() function.
Description
- This function returns statistics from a specified reading buffer.
TSP Syntax
| Parameters: |
-
buffer_var
(optional, default:
None
)
–
The name of the reading buffer, which may be a default buffer
(defbuffer1 or defbuffer2) or a user-defined buffer; if no buffer is specified, this
parameter defaults to defbuffer1.
-
rel_start_time
(optional, default:
None
)
–
The start time in seconds relative to the start time of the
data in the buffer.
-
rel_end_time
(optional, default:
None
)
–
The end time in seconds relative to the start time of the data
in the buffer.
|
make
make(buffer_size: int, style: str | None = None, *, buffer_name: str | None = None) -> Buffervar
Run the buffer.make() function.
Description
- This function creates a user-defined reading buffer.
TSP Syntax
| Parameters: |
-
buffer_size
(int)
–
The maximum number of readings that can be stored in bufferVar; minimum is
10; 0 to maximize buffer size (see Details).
-
style
(optional, default:
None
)
–
The type of reading buffer to create.
-
buffer_name
(optional, default:
None
)
–
The name of the buffer variable to create. If not provided, an
auto-generated variable will be used.
|
save
save(
buffer_var: str,
file_name: str,
time_format: str | None = None,
start: str | None = None,
end: str | None = None,
) -> None
Run the buffer.save() function.
Description
- This function saves data from the specified reading buffer to a USB flash drive.
TSP Syntax
| Parameters: |
-
buffer_var
(str)
–
The name of the reading buffer, which may be a default buffer (defbuffer1 or
defbuffer2) or a user-defined buffer.
-
file_name
(str)
–
A string that indicates the name of the file on the USB flash drive in which
to save the reading buffer.
-
time_format
(optional, default:
None
)
–
Defines how date and time information from the buffer is saved
in the file on the USB flash drive; the options are.
-
start
(optional, default:
None
)
–
Defines the starting point in the buffer to start saving data.
-
end
(optional, default:
None
)
–
Defines the ending point in the buffer to stop saving data.
|
saveappend
saveappend(
buffer_var: str,
file_name: str,
time_format: str | None = None,
start: str | None = None,
end: str | None = None,
) -> None
Run the buffer.saveappend() function.
Description
- This function appends data from the reading buffer to a file on the USB flash drive.
TSP Syntax
| Parameters: |
-
buffer_var
(str)
–
Indicates the reading buffer to use; the default buffers (defbuffer1 or
defbuffer2) or the name of a user-defined buffer; if no buffer is specified,
defbuffer1 is used.
-
file_name
(str)
–
A string that indicates the name of the file on the USB flash drive in which
to save the reading buffer.
-
time_format
(optional, default:
None
)
–
Indicates how date and time information from the buffer is saved
in the file on the USB flash drive; the options are.
-
start
(optional, default:
None
)
–
Defines the starting point in the buffer to start saving data.
-
end
(optional, default:
None
)
–
Defines the ending point in the buffer to stop saving data.
|
BufferWrite
Bases: BaseTSPCmd
The buffer.write command tree.
Properties and methods
.format(): The buffer.write.format() function.
.reading(): The buffer.write.reading() function.
format(
buffer_var: str,
units: str,
display_digits: int,
extra_units: str | None = None,
extra_digits: int | None = None,
) -> None
Run the buffer.write.format() function.
Description
- This function sets the units and number of digits of the readings that are written
into the reading buffer.
TSP Syntax
| Parameters: |
-
buffer_var
(str)
–
-
units
(str)
–
The units for the first measurement in the buffer index.
-
display_digits
(int)
–
The number of digits to use for the first measurement.
-
extra_units
(optional, default:
None
)
–
The units for the second measurement in the buffer index; the
selections are the same as units (only valid for buffer style WRITABLE_FULL); if not
specified, uses the value for units.
-
extra_digits
(optional, default:
None
)
–
The number of digits to use for the second measurement; the
selections are the same as displayDigits (only valid for buffer style
WRITABLE_FULL); if not specified, uses the value for displayDigits.
|
reading
reading(
buffer_var: str,
reading_value: str,
extra_value: str | None = None,
seconds: str | None = None,
fractional_seconds: str | None = None,
status: str | None = None,
) -> None
Run the buffer.write.reading() function.
Description
- This function allows you to write readings into the reading buffer.
TSP Syntax
| Parameters: |
-
buffer_var
(str)
–
-
reading_value
(str)
–
The first value that is recorded in the buffer index.
-
extra_value
(optional, default:
None
)
–
A second value that is recorded in the buffer index (only valid
for buffer style WRITABLE_FULL).
-
seconds
(optional, default:
None
)
–
An integer that represents the seconds.
-
fractional_seconds
(optional, default:
None
)
–
The portion of the time that represents the fractional
seconds.
-
status
(optional, default:
None
)
–
Additional information about the reading; see Details.
|