Exceptions
- class ZahnerError(error_code: Union[int, str], error_message: Optional[str] = None)
Base class for inheritance for Zahner errors.
This class is used to identify Zahner errors all other Zahner errors are derived from this class.
- class ZahnerConnectionError(error_code: Union[int, str])
Exception which is thrown when an connection error occurs.
This exception is thrown if, for example, the connection to the device is interrupted or an attempt is made to connect to a device that does not exist.
- class ZahnerDataProtocolError(error_code: Union[int, str])
Exception which is thrown when an error occurs in the data protocol.
If this exception is thrown, the device and python must be restarted because a fatal error has occurred.
- class ZahnerSCPIError(error_code: int)
Exception which can be thrown if the device responds to a command with an error.
See static attribute _message_strings for possible specializations.
- _message_strings: ClassVar[dict[int, str]] = {27: 'command does not exist', 42: 'undefinded error', 100: 'value is out of range', 1000: 'this command has not been implemented yet. But is foreseen.', 1003: 'setup global limit reached', 1004: 'value is out of limited range', 1005: 'measurement was aborted. The status has to be cleared with \\*CLS.', 1006: 'command is not executed because of an previous error or manual abort. (1003, 1005)', 1007: 'an error occurred during calibration. The device may be faulty.'}
associates an error number with a human-readable error code