scope_set_tdiv
Set the time per division on a LeCroy oscilloscope to control the horizontal scale, enabling precise waveform viewing and measurement.
Instructions
Set the time base (time per division).
Args: seconds_per_div: Time/div in seconds. Examples: 1e-9 (1 ns), 1e-6 (1 µs), 1e-3 (1 ms), 1.0 (1 s)
Transport: SCPI
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seconds_per_div | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- server.py:640-650 (handler)MCP tool handler function 'scope_set_tdiv' — sets the time base (time per division) on the oscilloscope. Calls _scope.set_tdiv(seconds_per_div) under the VISA lock.
@mcp.tool() def scope_set_tdiv(seconds_per_div: float) -> str: """Set the time base (time per division). Args: seconds_per_div: Time/div in seconds. Examples: 1e-9 (1 ns), 1e-6 (1 µs), 1e-3 (1 ms), 1.0 (1 s) Transport: SCPI """ return _run(lambda: _scope.set_tdiv(seconds_per_div)) - oscilloscope.py:523-524 (helper)Low-level SCPI helper 'set_tdiv' — sends 'TDIV <seconds_per_div>' command to the oscilloscope.
def set_tdiv(self, seconds_per_div: float) -> None: self.write(f"TDIV {seconds_per_div:.6E}") - server.py:641-649 (schema)Input schema — takes a single float parameter 'seconds_per_div' representing time/div in seconds. Docstring describes valid examples (1e-9 for 1 ns, 1e-3 for 1 ms, etc.).
def scope_set_tdiv(seconds_per_div: float) -> str: """Set the time base (time per division). Args: seconds_per_div: Time/div in seconds. Examples: 1e-9 (1 ns), 1e-6 (1 µs), 1e-3 (1 ms), 1.0 (1 s) Transport: SCPI """