tsplink

The tsplink commands module.

These commands are used in the following models: MP5103

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

Please report an issue if one is found.

Attributes and Functions
- tsplink.group
- tsplink.master
- tsplink.node
- tsplink.readbit()
- tsplink.readport()
- tsplink.reset()
- tsplink.state
- tsplink.trigger[N].assert()
- tsplink.trigger[N].clear()
- tsplink.trigger[N].mode
- tsplink.trigger[N].overrun
- tsplink.trigger[N].pulsewidth
- tsplink.trigger[N].release()
- tsplink.trigger[N].reset()
- tsplink.trigger[N].wait()
- tsplink.writebit()
- tsplink.writeport()
- tsplink.writeprotect

Bases: BaseTSPCmd

The tsplink command tree.

Properties and 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.

group property writable

group: str

Access the tsplink.group attribute.

Description
  • This attribute contains the group number of a TSP-Link node.
Usage
  • Accessing this property will send the print(tsplink.group) query.
  • Setting this property to a value will send the tsplink.group = value command.
TSP Syntax
- tsplink.group = value
- print(tsplink.group)
Raises:

master property

master: str

Access the tsplink.master attribute.

Description
  • This attribute reads the node number assigned to the master node.
Usage
  • Accessing this property will send the print(tsplink.master) query.
TSP Syntax
- print(tsplink.master)
Raises:

node property writable

node: str

Access the tsplink.node attribute.

Description
  • This attribute defines the node number.
Usage
  • Accessing this property will send the print(tsplink.node) query.
  • Setting this property to a value will send the tsplink.node = value command.
TSP Syntax
- tsplink.node = value
- print(tsplink.node)
Raises:

state property writable

state: str

Access the tsplink.state attribute.

Description
  • This attribute describes the TSP-Link online state.
Usage
  • Accessing this property will send the print(tsplink.state) query.
  • Setting this property to a value will send the tsplink.state = value command.
TSP Syntax
- tsplink.state = value
- print(tsplink.state)
Raises:

trigger property

Return the tsplink.trigger[N] command tree.

Info
  • N, the trigger line: 1 to 3.
Constants
  • .EVENT_ID: The number that is used for the trigger event.
Sub-properties and sub-methods
  • .assert(): The tsplink.trigger[N].assert() function.
  • .clear(): The tsplink.trigger[N].clear() function.
  • .mode: The tsplink.trigger[N].mode attribute.
  • .overrun: The tsplink.trigger[N].overrun attribute.
  • .pulsewidth: The tsplink.trigger[N].pulsewidth attribute.
  • .release(): The tsplink.trigger[N].release() function.
  • .reset(): The tsplink.trigger[N].reset() function.
  • .wait(): The tsplink.trigger[N].wait() function.

writeprotect property writable

writeprotect: str

Access the tsplink.writeprotect attribute.

Description
  • This attribute contains the write-protect mask that protects bits from changes by the tsplink.writebit() and tsplink.writeport() functions.
Usage
  • Accessing this property will send the print(tsplink.writeprotect) query.
  • Setting this property to a value will send the tsplink.writeprotect = value command.
TSP Syntax
- tsplink.writeprotect = value
- print(tsplink.writeprotect)
Raises:

readbit

readbit(n: str) -> str

Run the tsplink.readbit() function.

Description
  • This function reads the state of a TSP-Link synchronization line.
TSP Syntax
- tsplink.readbit()
Parameters:
  • n (str) –

    The trigger line.

Returns:
  • str

    The result of the function call.

Raises:

readport

readport() -> str

Run the tsplink.readport() function.

Description
  • This function reads the TSP-Link trigger lines as a digital I/O port.
TSP Syntax
- tsplink.readport()
Returns:
  • str

    The result of the function call.

Raises:

reset

reset(expected_nodes: int | None = None) -> str

Run the tsplink.reset() function.

Description
  • This function initializes (resets) all nodes (instruments) in the TSP-Link system.
TSP Syntax
- tsplink.reset()
Parameters:
  • expected_nodes (optional, default: None ) –

    The number of nodes expected on the system.

Returns:
  • str

    The result of the function call.

Raises:

writebit

writebit(n: str, data: int) -> None

Run the tsplink.writebit() function.

Description
  • This function sets a TSP-Link trigger line high or low.
TSP Syntax
- tsplink.writebit()
Parameters:
  • n (str) –

    The trigger line.

  • data (int) –

    The value to write to the bit.

Raises:

writeport

writeport(data: str) -> None

Run the tsplink.writeport() function.

Description
  • This function writes to all TSP-Link synchronization lines as a digital I/O port.
TSP Syntax
- tsplink.writeport()
Parameters:
  • data (str) –

    Value to write to the port.

Raises:

TsplinkTriggerItem

Bases: ValidatedDynamicNumberCmd, BaseTSPCmd

The tsplink.trigger[N] command tree.

Info
  • N, the trigger line: 1 to 3.
Constants
  • .EVENT_ID: The number that is used for the trigger event.
Properties and methods
  • .assert(): The tsplink.trigger[N].assert() function.
  • .clear(): The tsplink.trigger[N].clear() function.
  • .mode: The tsplink.trigger[N].mode attribute.
  • .overrun: The tsplink.trigger[N].overrun attribute.
  • .pulsewidth: The tsplink.trigger[N].pulsewidth attribute.
  • .release(): The tsplink.trigger[N].release() function.
  • .reset(): The tsplink.trigger[N].reset() function.
  • .wait(): The tsplink.trigger[N].wait() function.

EVENT_ID class-attribute instance-attribute

EVENT_ID = replace('[N]', f'[{split(']', maxsplit=1)[0]}]')

mode property writable

mode: str

Access the tsplink.trigger[N].mode attribute.

Description
  • This attribute defines the trigger operation and detection mode.
Usage
  • Accessing this property will send the print(tsplink.trigger[N].mode) query.
  • Setting this property to a value will send the tsplink.trigger[N].mode = value command.
TSP Syntax
- tsplink.trigger[N].mode = value
- print(tsplink.trigger[N].mode)
Info
  • N, the trigger line: 1 to 3.
Raises:

overrun property writable

overrun: str

Access the tsplink.trigger[N].overrun attribute.

Description
  • This attribute indicates if the event detector ignored an event while in the detected state.
Usage
  • Accessing this property will send the print(tsplink.trigger[N].overrun) query.
  • Setting this property to a value will send the tsplink.trigger[N].overrun = value command.
TSP Syntax
- tsplink.trigger[N].overrun = value
- print(tsplink.trigger[N].overrun)
Info
  • N, the trigger line: 1 to 3.
Raises:

pulsewidth property writable

pulsewidth: str

Access the tsplink.trigger[N].pulsewidth attribute.

Description
  • This attribute sets the length of time that the trigger line is asserted for output triggers.
Usage
  • Accessing this property will send the print(tsplink.trigger[N].pulsewidth) query.
  • Setting this property to a value will send the tsplink.trigger[N].pulsewidth = value command.
TSP Syntax
- tsplink.trigger[N].pulsewidth = value
- print(tsplink.trigger[N].pulsewidth)
Info
  • width, the pulse width, up to 400 s.
  • N, the trigger line: 1 to 3.
Raises:

assert_

assert_() -> None

Run the tsplink.trigger[N].assert() function.

Description
  • This function simulates the occurrence of the trigger and generates the corresponding event ID.
TSP Syntax
- tsplink.trigger[N].assert()
Info
  • N, the trigger line: 1 to 3.
Raises:

clear

clear() -> None

Run the tsplink.trigger[N].clear() function.

Description
  • This function clears the event detector for a LAN trigger.
TSP Syntax
- tsplink.trigger[N].clear()
Info
  • N, the trigger line: 1 to 3.
Raises:

release

release() -> None

Run the tsplink.trigger[N].release() function.

Description
  • This function releases a latched trigger on the given TSP-Link trigger line.
TSP Syntax
- tsplink.trigger[N].release()
Info
  • N, the trigger line: 1 to 3.
Raises:

reset

reset() -> None

Run the tsplink.trigger[N].reset() function.

Description
  • This function resets some of the TSP-Link trigger attributes to their factory defaults.
TSP Syntax
- tsplink.trigger[N].reset()
Info
  • N, the trigger line: 1 to 3.
Raises:

wait

wait(timeout: float) -> str

Run the tsplink.trigger[N].wait() function.

Description
  • This function waits for a trigger.
TSP Syntax
- tsplink.trigger[N].wait()
Parameters:
  • timeout (float) –

    The timeout value in seconds.

Returns:
  • str

    The result of the function call.

Raises: