check_zsync_connection#

PQSC.check_zsync_connection(inputs: Union[List[int], int, List[BaseInstrument], BaseInstrument], *, timeout: float = 10.0, sleep_time: float = 0.1) Union[List[bool], bool][source]#

Check if a ZSync connection is established.

Checks the current status of the instrument connected to the given ports. If a instrument(s) is given instead of a port number, first finds the correct port number(s).

Parameters:
  • inputs (Union[List[int], int, List[BaseInstrument], BaseInstrument]) – The port numbers to check the ZSync connection for. It can either be a single port number given as integer, a list of several port numbers an instrument or a list of instruments.

  • timeout (float) – Maximum time in seconds the program waits (default: 10.0).

  • sleep_time (float) – Time in seconds to wait between requesting the reference clock status (default: 0.1)

  • versionchanged: (..) – 0.6.1: Reduce default timeout and sleep_time.

  • versionchanged: – 0.6.1: Raise an error if the port is in a faulty state, instead of return False.

Raises:

TimeoutError – If the process of establishing a ZSync connection on one of the specified ports exceeds the specified timeout.

Return type:

Union[List[bool], bool]