Instrument API
- class RsRtx(resource_name: str, id_query: bool = True, reset: bool = False, options: str = None, direct_session: object = None)[source]
- Commands in total: 4915Subgroups: 58Direct child commands: 1
Initializes new RsRtx session. n Parameter options tokens examples:
Simulate=True- starts the session in simulation mode. Default:FalseSelectVisa=socket- uses no VISA implementation for socket connections - you do not need any VISA-C installationSelectVisa=rs- prefers usage of RohdeSchwarz VISASelectVisa=ivi- prefers usage of National Instruments VISASelectVisa=pyvisa-py- prefers usage of python VISA backend pyvisa-pyQueryInstrumentStatus = False- same asdriver.utilities.instrument_status_checking = False. Default:TrueWriteDelay = 20, ReadDelay = 5- Introduces delay of 20ms before each write and 5ms before each read. Default:0msfor bothOpcWaitMode = OpcQuery- mode for all the opc-synchronized write/reads. Other modes: StbPolling, StbPollingSlow, StbPollingSuperSlow. Default:StbPollingAddTermCharToWriteBinBLock = True- Adds one additional LF to the end of the binary data (some instruments require that). Default:FalseAssureWriteWithTermChar = True- Makes sure each command/query is terminated with termination character. Default: Interface dependentTerminationCharacter = "\r"- Sets the termination character for reading. Default:\n(LineFeed or LF)DataChunkSize = 10E3- Maximum size of one write/read segment. If transferred data is bigger, it is split to more segments. Default:1E6bytesOpcTimeout = 10000- same as driver.utilities.opc_timeout = 10000. Default:30000msVisaTimeout = 5000- same as driver.utilities.visa_timeout = 5000. Default:10000msViClearExeMode = Disabled- viClear() execution mode. Default:execute_on_allOpcQueryAfterWrite = True- same as driver.utilities.opc_query_after_write = True. Default:FalseStbInErrorCheck = False- if true, the driver checks errors with *STB? If false, it uses SYST:ERR?. Default:TrueScpiQuotes = double'. - for SCPI commands, you can define how strings are quoted. With single or double quotes. Possible values: single | double | {char}. Default: ``singleLoggingMode = On- Sets the logging status right from the start. Default:OffLoggingName = 'MyDevice'- Sets the name to represent the session in the log entries. Default:'resource_name'LogToGlobalTarget = True- Sets the logging target to the class-property previously set with RsRtx.set_global_logging_target() Default:FalseLoggingToConsole = True- Immediately starts logging to the console. Default: FalseLoggingToUdp = True- Immediately starts logging to the UDP port. Default: FalseLoggingUdpPort = 49200- UDP port to log to. Default: 49200
- Parameters:
resource_name – VISA resource name, e.g. ‘TCPIP::192.168.2.1::INSTR’
id_query – If True, the instrument’s model name is verified against the models supported by the driver and eventually throws an exception.
reset – Resets the instrument (sends *RST command) and clears its status sybsystem.
options – String tokens alternating the driver settings. More tokens are separated by comma.
direct_session – Another driver object or pyVisa object to reuse the session instead of opening a new session.
- static assert_minimum_version(min_version: str) None[source]
Asserts that the driver version fulfills the minimum required version you have entered. This way you make sure your installed driver is of the entered version or newer.
- classmethod clear_global_logging_relative_timestamp() None[source]
Clears the global relative timestamp. After this, all the instances using the global relative timestamp continue logging with the absolute timestamps.
- close() None[source]
Closes the active RsRtx session.
- classmethod from_existing_session(session: object, options: str = None) RsRtx[source]
Creates a new RsRtx object with the entered ‘session’ reused.
- Parameters:
session – Can be another driver or a direct pyvisa session.
options – String tokens alternating the driver settings. More tokens are separated by comma.
- classmethod get_global_logging_relative_timestamp() datetime | None[source]
Returns global common relative timestamp for log entries.
- classmethod get_global_logging_target()[source]
Returns global common target stream.
- get_session_handle() object[source]
Returns the underlying session handle.
- get_total_execution_time() timedelta[source]
Returns total time spent by the library on communicating with the instrument. This time is always shorter than get_total_time(), since it does not include gaps between the communication. You can reset this counter with reset_time_statistics().
- get_total_time() timedelta[source]
Returns total time spent by the library on communicating with the instrument. This time is always shorter than get_total_time(), since it does not include gaps between the communication. You can reset this counter with reset_time_statistics().
- static list_resources(expression: str = '?*::INSTR', visa_select: str = None) List[str][source]
Finds all the resources defined by the expression - ‘?*’ - matches all the available instruments - ‘USB::?*’ - matches all the USB instruments - ‘TCPIP::192?*’ - matches all the LAN instruments with the IP address starting with 192
- reset_time_statistics() None[source]
Resets all execution and total time counters. Affects the results of get_total_time() and get_total_execution_time()
- restore_all_repcaps_to_default() None[source]
Sets all the Group and Global repcaps to their initial values.
- classmethod set_global_logging_relative_timestamp(timestamp: datetime) None[source]
Sets global common relative timestamp for log entries. To use it, call the following: io.utilities.logger.set_relative_timestamp_global()
- classmethod set_global_logging_relative_timestamp_now() None[source]
Sets global common relative timestamp for log entries to this moment. To use it, call the following: io.utilities.logger.set_relative_timestamp_global().
- classmethod set_global_logging_target(target) None[source]
Sets global common target stream that each instance can use. To use it, call the following: io.utilities.logger.set_logging_target_global(). If an instance uses global logging target, it automatically uses the global relative timestamp (if set). You can set the target to None to invalidate it.
- stop(opc_timeout_ms: int = -1) None[source]
# STOP driver.stop()
Stops the running acquistion.
- Parameters:
opc_timeout_ms – Maximum time to wait in milliseconds, valid only for this call.
Subgroups
- Acquire
- AdvJitter<AdvJitter>
- AutoScale
- Bus<Bus>
- Arinc
- Can
- CanXl
- Cdr
- Cmsb
- Ctle
- Cxpi
- Ddr
- Dphy
- Ebtb
- Ethernet
- ExpResult
- Fautoset
- FlxRay
- FormatPy
- Hbto
- I2C
- I2S
- I3C
- Lin
- Mdio
- Milstd
- Mphy
- Newlist
- Parallel
- Pcie
- Result
- Rffe
- Sent
- SetRefLevels
- Spi
- State
- Swire
- Symbols
- Tbto
- Threshold
- Tnos
- TypePy
- Uart
- Usb
- UsbPd
- UsbThree
- Zcoupling
- Calculate
- Calibration
- Cdr
- Channel<Channel>
- Aafpermanent
- Bandwidth
- Coupling
- CouplingToOther
- DigFilter
- EatScale
- Eattenuation
- Efrontend
- ExportState
- FilDesign
- Gnd
- Impedance
- Invert
- Iq
- Offset
- Overload
- Position
- Range
- Scale
- Skew
- State
- Waveform<Waveform>
- Cursor<Cursor>
- Deembedding<Deembedding>
- Diagnostic
- Differential<Differential>
- Digital<DigitalNull>
- Display
- Efrontend
- Executable
- Export
- Eye<Eye>
- FormatPy
- Generator
- GenType<GenType>
- Gpib
- HardCopy
- Hdefinition
- Iq
- Lane<Lane>
- Layout
- MassMemory
- Measurement<Measurement>
- Additional
- AmpTime
- Aoff
- Aon
- Ares
- ArNames
- Category
- DetThreshold
- Display
- Emc
- Enable
- EnvSelect
- EyeJitter
- Fsrc
- Gate
- Histogram
- Jitter
- Lcheck
- LtMeas
- Main
- MnoMeas
- Multiple
- OnViolation
- Optical
- Pamplitude
- PamResults
- Peye
- Protocol
- RefLevel
- Result
- Source
- Spectrum
- Ssrc
- Statistics
- Track
- Vertical
- Mtest
- Pgenerator
- Power
- Probe<Probe>
- Psrc
- Qaction
- Raster
- RefCurve<RefCurve>
- RefLevel<RefLevel>
- Report
- Run
- RunContinous
- Saveset
- Search
- Gate
- Online
- ResDiagram
- Result
- Source
- Trigger
- Arinc
- Can
- CanXl
- Cmsb
- Conditions
- Cxpi
- Ddr
- Dphy
- Ebtb
- Edge
- Ethernet
- FlxRay
- Glitch
- Hbto
- I2C
- I3C
- Interval
- Level
- Lin
- Mdio
- Milstd
- Mphy
- Pattern
- Pcie
- Rffe
- Runt
- Sent
- SetHold
- Slewrate
- Spi
- State
- Swire
- Tbto
- Timeout
- Tnos
- Usb
- Acondition
- Amax
- Amin
- BitstError
- Crc16Error
- Crc5Error
- Data
- Dcondition
- Dpoperator
- Dposition
- Econdition
- Emax
- Emin
- Fcondition
- Fmax
- Fmin
- GlitchError
- Hand
- Patt
- Pcondition
- PidError
- Pmax
- Pmin
- Scondition
- Sdata
- Serror
- ShandShake
- Smax
- Smin
- Spec
- Ssop
- Sspe
- Stco
- Stoken
- Tcondition
- Tmax
- Tmin
- Token
- Wadd
- Wend
- WetCheck
- Wfrn
- Wpay
- Wpid
- Wpor
- Wseu
- Wstc
- UsbPd
- UsbThree
- Width
- Window
- Sense
- SignalConfig
- Status
- SwTrigger
- System
- Tdrt
- Timebase
- Trigger<Trigger>
- AnEdge
- Arinc
- Can
- CanXl
- Cdr
- Cmsb
- Coupling
- Cxpi
- Dphy
- Ebtb
- Ecoupling
- Edge
- Ethernet
- Event
- Extern
- FindLevel
- FlxRay
- Force
- Glitch
- Hbto
- Holdoff
- I2C
- I2S
- I3C
- Interval
- Level<TriggerLevel>
- Lin
- Mdio
- Milstd
- Mode
- Mphy
- Nfc
- Offset
- Out
- Parallel
- Pattern
- Pcie
- Powerline
- Qualify<TriggerQualify>
- Rffe
- RfReject
- RfsReject
- Runt
- Scoupling
- Sent
- Sequence
- SerPattern
- SetHold
- Slew
- Source
- Spattern
- Spi
- Swire
- Tbto
- Timeout
- Tnos
- Tv
- TypePy
- Uart
- Usb
- UsbPd
- UsbThree
- Width
- Window
- Zone
- TriggerInvoke
- TrProbe
- UsrDefined
- Vautoscale
- Waveform<Waveform>
- Wgenerator<Wgenerator>
- Zvc