sigin_autorange#

sigin_autorange(daq: ziDAQServer, device: str, in_channel: int) float[source]#

Perform an automatic adjustment of the signal input range.

Based on the measured input signal. This utility function starts the functionality implemented in the device’s firmware and waits until it has completed. The range is set by the firmware based on the measured input signal’s amplitude measured over approximately 100 ms.

Requirements:

A devtype that supports autorange functionality on the firmware level, e.g., UHFLI, MFLI, MFIA.

Parameters:
  • daq (ziDAQServer) – A ziPython API session.

  • device (str) – The device ID on which to perform the signal input autorange.

  • in_channel (int) – The index of the signal input channel to autorange.

Returns:

Signal input range.

Raises:
  • AssertionError – If the functionality is not supported by the device or an invalid in_channel was specified.

  • RuntimeError – If autorange functionality does not complete within the timeout.

Return type:

float

Example

>>> import zhinst.utils
>>> device_serial = 'dev2006'
>>> (daq, _, _) = zhinst.utils.create_api_session(device_serial, 5)
>>> input_channel = 0
>>> zhinst.utils.sigin_autorange(daq, device_serial, input_channel)