qmi.instruments.tektronix.fca3000
Instrument driver for the Tektronix FCA3000 and compatible frequency counters.
Classes
|
Instrument driver for the Tektronix FCA3000 frequency counter. |
- class qmi.instruments.tektronix.fca3000.Tektronix_FCA3000(context: QMI_Context, name: str, transport: str)
Instrument driver for the Tektronix FCA3000 frequency counter.
This driver is also compatible with the Pendulum CNT-91.
- open() None
Connect to the instrument hardware.
When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.
Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call
super().open()as a last statement.
- close() None
Close the connection to the instrument hardware and release associated resources.
When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.
Subclasses can extend this method if they have specific resources to close. If they do, they should call
super().close()as a last statement.
- reset() None
Reset the instrument, returning (most) settings to their defaults.
- get_idn() QMI_InstrumentIdentification
Read instrument type and version and return QMI_InstrumentIdentification instance.
- get_errors() List[str]
Read pending error messages from the instrument.
- measure_frequency(channel: int = 1) float
Start a single frequency measurement and return frequency [Hz].
No configuration of the instrument is needed prior to this command. Each invocation of this command reconfigures the instrument.
This command is easy to use but quite slow. It will typically take 0.1 to 0.2 seconds to complete.
Note: Attempting to read a frequency when there is no valid signal on the input of the frequency counter, may crash the USB connection to the instrument. When errors occur, the instrument must be power-cycled to recover.
- Parameters:
channel – Input channel to use (1 = channel A, 2 = channel B).
- configure_frequency(channel: int = 1, aperture: float | None = None, trigger_level: float | None = None, timestamp: bool = False) None
Configure the instrument for frequency measurements.
After this function returns, you can perform a series of measurements by calling read_value() or read_timestamped_value() in a loop.
- Parameters:
channel – Input channel for frequency measurements (1 = channel A, 2 = channel B).
aperture – Acquisition time per measurement in seconds (default 0.01).
trigger_level – Optional fixed trigger level. By default, the trigger level is set automatically at the beginning of each measurement. Setting a fixed trigger level makes the measurement faster.
timestamp – True to enable timestamping of measurement values.
- read_value() float
Read the next value in an ongoing measurement.
Before calling this function, the instrument must be configured by calling configure_frequency().
- read_timestamped_value() Tuple[float, float]
Read a timestamped value in an ongoing measurement.
Before calling this function, the instrument must be configured by calling configure_frequency() and timestamping must be enabled.
- Returns:
Tuple (timestamp, value) where “timestamp” is a relative timestamp in seconds.
- set_talk_only(enable: bool) None
Enable or disable Talk Only mode.
When the instrument is in talk only mode, the application must call get_value_talk_only() at short intervals to read each subsequent value from the instrument. No other commands to the instrument are allowed, except set_talk_only() to disable talk only mode.
Usage example:
instr.configure_frequency(channel=1, aperture=0.002, trigger_level=0) instr.set_talk_only(True) for i in range(n): (ts, freq) = instr.get_value_talk_only() instr.set_talk_only(False)
This mode works only when the device is connected via GPIB, not USB.
- get_value_talk_only() Tuple[float, float]
Read the next value in an ongoing measurement.
Before calling this function, the instrument must be configured by calling configure_frequency() and then switched to talk only mode by calling set_talk_only(True).
- Returns:
Tuple (timestamp, value) where “timestamp” is a relative timestamp in seconds. If timestamping is not enabled in the instrument, a NaN value will be returned as timestamp.
- get_trigger_level(channel: int) float
Read current trigger level used by the instrument.
- Parameters:
channel – Input channel (1 = channel A, 2 = channel B).
- Returns:
Trigger level in Volt.
- set_display_enabled(enable: bool) None
Enable or disable the display on the instrument operating panel.
Measurements can be (slightly) faster when the display is disabled.
- Parameters:
enable – True to enable the display, False to disable it.
- set_initiate_continuous(enable: bool) None
Enable or disable continuous measurements.
Enable continuous measurements to let the instrument spontaneously measure new values as fast as possible. This is useful to continuously refresh the value on the display of the operating panel while the instrument is not in use by software.
Continuous measurements are automatically disabled when the instrument is configured to measure via software.
- Parameters:
enable – True to enable continous measurements.
- force_unlock() None
Forcefully unlock the remote object.
This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.
Use this with care.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- classmethod get_category() str | None
Return the optional name of the category this object belongs to.
A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.
- get_name() str
Return the name of this object.
- Returns:
name attribute.
- get_signals() list[SignalDescription]
Return a list of signals that can be published by this object.
- Returns:
List consisting of qmi_signals attributes.
- is_locked() bool
Query if the remote object is locked.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- is_open() bool
Return True if the instrument is open (ready for interaction).
- lock(timeout: float = 0.0, lock_token: str | None = None) bool
Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.
If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- release_rpc_object() None
Give a warning if the instrument is removed while still open.
- unlock(lock_token: str | None = None) bool
Unlock the remote object.
Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.