mp5103_commands

The MP5103 commands module.

THIS FILE IS AUTO-GENERATED, IT SHOULD NOT BE MANUALLY MODIFIED.

Please report an issue if one is found.

MP5103CommandConstants

The MP5103 command argument constants.

This provides access to all the string constants which can be used as arguments for MP5103 commands.

MP5103Commands

The MP5103 commands.

This provides access to all the commands for the MP5103 device. See the documentation of each property for more usage information.

Properties and methods
  • .bit: The bit command tree.
  • .buffer_var: The bufferVar command tree.
  • .dataqueue: The dataqueue command tree.
  • .delay(): The delay() function.
  • .digio: The digio command tree.
  • .eventlog: The eventlog command tree.
  • .exit(): The exit() function.
  • .firmware: The firmware command tree.
  • .format: The format command tree.
  • .fs: The fs command tree.
  • .gettimezone(): The gettimezone() function.
  • .io: The io command tree.
  • .lan: The lan command tree.
  • .localnode: The localnode command tree.
  • .login(): The login() function.
  • .logout(): The logout() function.
  • .makegetter(): The makegetter() function.
  • .makesetter(): The makesetter() function.
  • .node: The node[N] command tree.
  • .opc(): The opc() function.
  • .os: The os command tree.
  • .print(): The print() function.
  • .printbuffer(): The printbuffer() function.
  • .printnumber(): The printnumber() function.
  • .reset(): The reset() function.
  • .script_var: The scriptVar command tree.
  • .script: The script command tree.
  • .settime(): The settime() function.
  • .settimezone(): The settimezone() function.
  • .slot: The slot[Z] command tree.
  • .status: The status command tree.
  • .timer: The timer command tree.
  • .trigger: The trigger command tree.
  • .tsplink: The tsplink command tree.
  • .tspnet: The tspnet command tree.
  • .usbtmc: The usbtmc command tree.
  • .user: The user command tree.
  • .userstring: The userstring command tree.
  • .waitcomplete(): The waitcomplete() function.

bit property

bit: Bit

Return the bit command tree.

Sub-properties and sub-methods
  • .bitand(): The bit.bitand() function.
  • .bitor(): The bit.bitor() function.
  • .bitxor(): The bit.bitxor() function.
  • .clear(): The bit.clear() function.
  • .get(): The bit.get() function.
  • .getfield(): The bit.getfield() function.
  • .set(): The bit.set() function.
  • .setfield(): The bit.setfield() function.
  • .test(): The bit.test() function.
  • .toggle(): The bit.toggle() function.

buffer_var property

buffer_var: dict[str, Buffervar]

Return the bufferVar command tree.

Info
  • bufferVar, the reading buffer; can be a dynamically allocated user-defined buffer or a dedicated reading buffer.
Sub-properties and sub-methods
  • .appendmode: The bufferVar.appendmode attribute.
  • .cachemode: The bufferVar.cachemode attribute.
  • .capacity: The bufferVar.capacity attribute.
  • .clear(): The bufferVar.clear() function.
  • .clearcache(): The bufferVar.clearcache() function.
  • .columnname: The bufferVar.columnname command tree.
  • .fillcount: The bufferVar.fillcount attribute.
  • .fillmode: The bufferVar.fillmode attribute.
  • .fractionalseconds: The bufferVar.fractionalseconds[N] attribute.
  • .measurefunctions: The bufferVar.measurefunctions[N] attribute.
  • .measureranges: The bufferVar.measureranges[N] attribute.
  • .n: The bufferVar.n attribute.
  • .readings: The bufferVar.readings[N] attribute.
  • .seconds: The bufferVar.seconds[N] attribute.
  • .sourcefunctions: The bufferVar.sourcefunctions[N] attribute.
  • .sourceoutputstates: The bufferVar.sourceoutputstates[N] attribute.
  • .sourceranges: The bufferVar.sourceranges[N] attribute.
  • .sourcevalues: The bufferVar.sourcevalues[N] attribute.
  • .statuses: The bufferVar.statuses[N] attribute.
  • .timestampresolution: The bufferVar.timestampresolution attribute.
  • .timestamps: The bufferVar.timestamps[N] attribute.

dataqueue property

dataqueue: Dataqueue

Return the dataqueue command tree.

Constants
  • .CAPACITY: The maximum number of entries that you can store in the data queue.
Sub-properties and sub-methods
  • .add(): The dataqueue.add() function.
  • .clear(): The dataqueue.clear() function.
  • .count: The dataqueue.count attribute.
  • .next(): The dataqueue.next() function.

digio property

digio: Digio

Return the digio command tree.

Sub-properties and sub-methods
  • .readbit(): The digio.readbit() function.
  • .readport(): The digio.readport() function.
  • .trigger: The digio.trigger[N] command tree.
  • .writebit(): The digio.writebit() function.
  • .writeport(): The digio.writeport() function.
  • .writeprotect: The digio.writeprotect attribute.

eventlog property

eventlog: Eventlog

Return the eventlog command tree.

Sub-properties and sub-methods
  • .clear(): The eventlog.clear() function.
  • .count: The eventlog.count attribute.
  • .next(): The eventlog.next() function.

firmware property

firmware: Firmware

Return the firmware command tree.

Sub-properties and sub-methods
  • .load(): The firmware.load() function.
  • .update(): The firmware.update() function.

format property

format: Format

Return the format command tree.

Sub-properties and sub-methods
  • .asciiprecision: The format.asciiprecision attribute.
  • .byteorder: The format.byteorder attribute.
  • .data: The format.data attribute.

fs property

fs: Fs

Return the fs command tree.

Sub-properties and sub-methods
  • .cwd(): The fs.cwd() function.
  • .is_dir(): The fs.is_dir() function.
  • .is_file(): The fs.is_file() function.
  • .mkdir(): The fs.mkdir() function.
  • .readdir(): The fs.readdir() function.
  • .rmdir(): The fs.rmdir() function.

io property

io: Io

Return the io command tree.

Sub-properties and sub-methods
  • .close(): The io.close() function.
  • .flush(): The io.flush() function.
  • .input(): The io.input() function.
  • .open(): The io.open() function.
  • .output(): The io.output() function.
  • .read(): The io.read() function.
  • .type(): The io.type() function.
  • .write(): The io.write() function.

lan property

lan: Lan

Return the lan command tree.

Sub-properties and sub-methods
  • .applysettings(): The lan.applysettings() function.
  • .autoconnect: The lan.autoconnect attribute.
  • .config: The lan.config command tree.
  • .enable: The lan.enable attribute.
  • .hislip: The lan.hislip command tree.
  • .identify: The lan.identify attribute.
  • .ipconfig(): The lan.ipconfig() function.
  • .linktimeout: The lan.linktimeout attribute.
  • .nagle: The lan.nagle attribute.
  • .rawsocket: The lan.rawsocket command tree.
  • .reset(): The lan.reset() function.
  • .restoredefaults(): The lan.restoredefaults() function.
  • .status: The lan.status command tree.
  • .telnet: The lan.telnet command tree.

localnode property

localnode: Localnode

Return the localnode command tree.

Sub-properties and sub-methods
  • .license: The localnode.license attribute.
  • .linefreq: The localnode.linefreq attribute.
  • .manufacturer: The localnode.manufacturer attribute.
  • .model: The localnode.model attribute.
  • .prompts: The localnode.prompts attribute.
  • .prompts4882: The localnode.prompts4882 attribute.
  • .serialno: The localnode.serialno attribute.
  • .showerrors: The localnode.showerrors attribute.
  • .version: The localnode.version attribute.

node property

node: dict[int, NodeItem]

Return the node[N] command tree.

Info
  • N, the node number of the specified instrument.
Sub-properties and sub-methods
  • .execute(): The node[N].execute() function.
  • .getglobal(): The node[N].getglobal() function.
  • .setglobal(): The node[N].setglobal() function.

os property

os: Os

Return the os command tree.

Sub-properties and sub-methods
  • .clock(): The os.clock() function.
  • .remove(): The os.remove() function.
  • .rename(): The os.rename() function.
  • .time(): The os.time() function.

script property

script: Script

Return the script command tree.

Sub-properties and sub-methods
  • .delete(): The script.delete() function.
  • .load(): The script.load() function.
  • .new(): The script.new() function.
  • .newautorun(): The script.newautorun() function.
  • .restore(): The script.restore() function.

script_var property

script_var: dict[str, Scriptvar]

Return the scriptVar command tree.

Info
  • scriptVar, the name of the variable that references the script.
Sub-properties and sub-methods
  • .autorun: The scriptVar.autorun attribute.
  • .list(): The scriptVar.list() function.
  • .name: The scriptVar.name attribute.
  • .run(): The scriptVar.run() function.
  • .save(): The scriptVar.save() function.
  • .source: The scriptVar.source attribute.

slot property

slot: dict[int, SlotItem]

Return the slot[Z] command tree.

Info
  • Z, the module slot number.
Sub-properties and sub-methods
  • .firmware: The slot[Z].firmware command tree.
  • .license: The slot[Z].license attribute.
  • .manufacturer: The slot[Z].manufacturer attribute.
  • .model: The slot[Z].model attribute.
  • .psu: The slot[Z].psu[X] command tree.
  • .serialno: The slot[Z].serialno attribute.
  • .smu: The slot[Z].smu[X] command tree.
  • .status: The slot[Z].status command tree.
  • .trigger: The slot[Z].trigger command tree.
  • .version: The slot[Z].version attribute.

status property

status: Status

Return the status command tree.

Sub-properties and sub-methods
  • .condition: The status.condition attribute.
  • .node_enable: The status.node_enable attribute.
  • .node_event: The status.node_event attribute.
  • .operation: The status.operation command tree.
  • .request_enable: The status.request_enable attribute.
  • .request_event: The status.request_event attribute.
  • .reset(): The status.reset() function.
  • .standard: The status.standard command tree.
  • .system: The status.system command tree.
  • .system2: The status.system2 command tree.
  • .system3: The status.system3 command tree.
  • .system4: The status.system4 command tree.
  • .system5: The status.system5 command tree.

timer property

timer: Timer

Return the timer command tree.

Sub-properties and sub-methods
  • .cleartime(): The timer.cleartime() function.
  • .measure: The timer.measure command tree.
  • .readtime(): The timer.readtime() function.

trigger property

trigger: Trigger

Return the trigger command tree.

Constants
  • .EVENT_ID: The command interface trigger event number.
  • .EVENT_NONE: This trigger event ID is never generated. It is used to disconnect stimulus inputs.
Sub-properties and sub-methods
  • .clear(): The trigger.clear() function.
  • .detector: The trigger.detector[N] command tree.
  • .generator: The trigger.generator[N] command tree.
  • .timer: The trigger.timer[N] command tree.
  • .wait(): The trigger.wait() function.
tsplink: Tsplink

Return the tsplink command tree.

Sub-properties and sub-methods
  • .group: The tsplink.group attribute.
  • .master: The tsplink.master attribute.
  • .node: The tsplink.node attribute.
  • .readbit(): The tsplink.readbit() function.
  • .readport(): The tsplink.readport() function.
  • .reset(): The tsplink.reset() function.
  • .state: The tsplink.state attribute.
  • .trigger: The tsplink.trigger[N] command tree.
  • .writebit(): The tsplink.writebit() function.
  • .writeport(): The tsplink.writeport() function.
  • .writeprotect: The tsplink.writeprotect attribute.

tspnet property

tspnet: Tspnet

Return the tspnet command tree.

Sub-properties and sub-methods
  • .clear(): The tspnet.clear() function.
  • .connect(): The tspnet.connect() function.
  • .disconnect(): The tspnet.disconnect() function.
  • .execute(): The tspnet.execute() function.
  • .idn(): The tspnet.idn() function.
  • .read(): The tspnet.read() function.
  • .readavailable(): The tspnet.readavailable() function.
  • .reset(): The tspnet.reset() function.
  • .termination(): The tspnet.termination() function.
  • .timeout: The tspnet.timeout attribute.
  • .tsp: The tspnet.tsp command tree.
  • .write(): The tspnet.write() function.

usbtmc property

usbtmc: Usbtmc

Return the usbtmc command tree.

Sub-properties and sub-methods
  • .access: The usbtmc.access attribute.

user property

user: User

Return the user command tree.

Sub-properties and sub-methods
  • .password: The user.password command tree.

userstring property

userstring: Userstring

Return the userstring command tree.

Sub-properties and sub-methods
  • .add(): The userstring.add() function.
  • .delete(): The userstring.delete() function.
  • .get(): The userstring.get() function.

delay

delay(seconds: int) -> None

Run the delay() function.

Description
  • This function delays the execution of the commands that follow it.
TSP Syntax
- delay()
Parameters:
  • seconds (int) –

    The number of seconds to delay.

Raises:

exit

exit() -> None

Run the exit() function.

Description
  • This function stops a script that is presently running
TSP Syntax
- exit()
Raises:

gettimezone

gettimezone() -> str

Run the gettimezone() function.

Description
  • This function retrieves the local time zone.
TSP Syntax
- gettimezone()
Returns:
  • str

    The result of the function call.

Raises:

login

login(password: str) -> None

Run the login() function.

Description
  • This command logs a user in to the mainframe and allows remote access.
TSP Syntax
- login()
Parameters:
  • password (str) –

    A string that represents the login password. The default value is no password.

Raises:

logout

logout() -> None

Run the logout() function.

Description
  • This function logs a user out of the mainframe.
TSP Syntax
- logout()
Raises:

makegetter

makegetter(table: str, attribute_name: str) -> str

Run the makegetter() function.

Description
  • This function creates a function to get the value of an attribute.
TSP Syntax
- makegetter()
Parameters:
  • table (str) –

    Read-only table where the attribute is located.

  • attribute_name (str) –

    A string representing the name of the attribute.

Returns:
  • str

    The result of the function call.

Raises:

makesetter

makesetter(table: str, attribute_name: str) -> str

Run the makesetter() function.

Description
  • This function creates a function that, when called, sets the value of an attribute.
TSP Syntax
- makesetter()
Parameters:
  • table (str) –

    Read-only table where the attribute is located.

  • attribute_name (str) –

    The string name of the attribute.

Returns:
  • str

    The result of the function call.

Raises:

opc

opc() -> None

Run the opc() function.

Description
  • This function sets the operation complete status bit when all overlapped commands are completed.
TSP Syntax
- opc()
Raises:

print

print(value: str) -> None

Run the print() function.

Description
  • This function generates a response message.
TSP Syntax
- print()
Parameters:
  • value (str) –

    The first argument to output.

Raises:

printbuffer

printbuffer(start_index: int, end_index: int, buffer_var: str) -> str

Run the printbuffer() function.

Description
  • This function prints data from tables or reading buffer subtables.
TSP Syntax
- printbuffer()
Parameters:
  • start_index (int) –

    Beginning index of the buffer to print; this must be more than one and less than endIndex.

  • end_index (int) –

    Ending index of the buffer to print; this must be more than startIndex and less than the index of the last entry in the tables.

  • buffer_var (str) –

    First table or reading buffer subtable to print.

Returns:
  • str

    The result of the function call.

Raises:

printnumber

printnumber(value: str) -> str

Run the printnumber() function.

Description
  • This function prints numbers using the configured format.
TSP Syntax
- printnumber()
Parameters:
  • value (str) –

    First value to print in the configured format.

Returns:
  • str

    The result of the function call.

Raises:

reset

reset(system: str | None = None) -> None

Run the reset() function.

Description
  • This function resets commands on all slots and channels to their default settings.
TSP Syntax
- reset()
Parameters:
  • system (optional, default: None ) –

    What to reset.

Raises:

settime

settime(seconds: str, fractional: int | None = None) -> None

Run the settime() function.

Description
  • This function sets the present time and the real time clock.
TSP Syntax
- settime()
Parameters:
  • seconds (str) –

    The time in seconds since January 1, 1970, UTC.

  • fractional (optional, default: None ) –

    The number of fractional seconds.

Raises:

settimezone

settimezone(
    offset: str,
    dst_offset: str | None = None,
    dst_start: str | None = None,
    dst_end: str | None = None,
) -> None

Run the settimezone() function.

Description
  • This function sets the local time zone.
TSP Syntax
- settimezone()
Parameters:
  • offset (str) –

    String representing offset from UTC.

  • dst_offset (optional, default: None ) –

    String representing the daylight savings offset from UTC.

  • dst_start (optional, default: None ) –

    String representing when daylight savings time starts.

  • dst_end (optional, default: None ) –

    String representing when daylight savings time ends.

Raises:

waitcomplete

waitcomplete(group: str | None = None) -> None

Run the waitcomplete() function.

Description
  • This function waits for all previously started overlapped commands to complete.
TSP Syntax
- waitcomplete()
Parameters:
  • group (optional, default: None ) –

    Specifies which TSP-Link group on which to wait.

Raises:

MP5103Mixin

A mixin that provides access to the MP5103 commands and constants.

Properties
  • .command_argument_constants: The MP5103 command argument constants.
  • .commands: The MP5103 commands.

command_argument_constants cached property

command_argument_constants: MP5103CommandConstants

Return the MP5103 command argument constants.

This provides access to all the string constants which can be used as arguments for MP5103 commands.

commands cached property

commands: MP5103Commands

Return the MP5103 commands.

This provides access to all the commands for the MP5103 device. See the documentation of each sub-property for more usage information.

Sub-properties and sub-methods
  • .bit: The bit command tree.
  • .buffer_var: The bufferVar command tree.
  • .dataqueue: The dataqueue command tree.
  • .delay(): The delay() function.
  • .digio: The digio command tree.
  • .eventlog: The eventlog command tree.
  • .exit(): The exit() function.
  • .firmware: The firmware command tree.
  • .format: The format command tree.
  • .fs: The fs command tree.
  • .gettimezone(): The gettimezone() function.
  • .io: The io command tree.
  • .lan: The lan command tree.
  • .localnode: The localnode command tree.
  • .login(): The login() function.
  • .logout(): The logout() function.
  • .makegetter(): The makegetter() function.
  • .makesetter(): The makesetter() function.
  • .node: The node[N] command tree.
  • .opc(): The opc() function.
  • .os: The os command tree.
  • .print(): The print() function.
  • .printbuffer(): The printbuffer() function.
  • .printnumber(): The printnumber() function.
  • .reset(): The reset() function.
  • .script_var: The scriptVar command tree.
  • .script: The script command tree.
  • .settime(): The settime() function.
  • .settimezone(): The settimezone() function.
  • .slot: The slot[Z] command tree.
  • .status: The status command tree.
  • .timer: The timer command tree.
  • .trigger: The trigger command tree.
  • .tsplink: The tsplink command tree.
  • .tspnet: The tspnet command tree.
  • .usbtmc: The usbtmc command tree.
  • .user: The user command tree.
  • .userstring: The userstring command tree.
  • .waitcomplete(): The waitcomplete() function.