Racal-Dana 1992 Universal Counter

class pymeasure.instruments.racal.Racal1992(adapter, name='Racal-Dana 1992', **kwargs)

Bases: Instrument

Represents the Racal-Dana 1992 Universal counter

from pymeasure.instruments.racal import Racal1992
counter = Racal1992("GPIB0::10")

This class should also work for Racal-Dana 1991, it has the same product manual, as long as you don’t use functionality that requires channel B.

channel_settings(channel_name, **settings)

Set channel configuration paramters.

  • channel_name – ‘A’ or ‘B’

  • settings

    one or multiple of the following:

    ’coupling’ : ‘AC’ or ‘DC’ ‘attenuation’ : ‘X1’ or ‘X10’ ‘trigger’ : ‘auto’ or ‘manual’ ‘impedance’ : ‘50’ or ‘1M’ ‘slope’ : ‘pos’ or ‘neg’ ‘filtering’ : True or False (only allowed for channel A) ‘input_select’ : ‘separate’ or ‘common’ (only allowed for channel B) ‘trigger_level’ : <floating point number>

static decode(v, allowed_types=None)

Decode received message.

All values returned follow the same format: 2 letters to indicate the type of the value returned, followed by a floating point number (which could be an integer, of course.) This here, for example, is math constant Z: MZ+001.00000000E+00

property delay_enable

Control delay. True=enable, False=disable

property delay_time

Control delay time.

property device_type

Get unit device type. Should return 1992 for a Racal-Dana 1992 or 1991 for a Racal-Dana 1991.

property gpib_software_version

Get GPIB software version

property math_mode

Set math mode. True=enable, False=disable

property math_x

Control math constant X.

property math_z

Control math constant Z.

property measured_value

Get measured value.

A Racal-Dana 1992 doesn’t return measurement data after a request for measurement data. Instead, it fills a FIFO with data whenever it completes a measurement. When the FIFO is full, the oldest measurement is removed.

The FIFO buffer gets cleared when a command is received that requires an immediate reply, such reading a setting. It also gets cleared when an operating mode is cleared.

When there is no measurement data, this property will stall until data is available. It will also timeout after a time that can be set with the standard pyvisa API.

One can make sure that measurement data is available by first calling wait_for_measurement().

property operating_mode

Set operating mode.

Permitted modes are:

‘self_check’, ‘frequency_a’, ‘period_a’, ‘phase_a_rel_b’, ‘ratio_a_to_b’, ‘ratio_c_to_b’, ‘interval_a_to_b’, ‘total_a_by_b’, ‘frequency_c’


Configure instrument with default presets.


Read up to (excluding) read_termination or the whole read buffer.


Reset ongoing measurement.

property resolution

Control the resolution of the counter with an integer from 3 to 10 that specifies the number of significant digits.

property software_version

Get instrument software version

property special_function_enable

Control special function. True=enable, False=disable

property special_function_number

Control special function.

property total_so_far

Get total number of events so far.

property trigger_level_a

Control trigger level for channel A

property trigger_level_b

Control trigger level for channel B

wait_for_measurement(timeout=None, progressDots=False)

Wait until a new measurement is available.

  • timeout – number of seconds to wait before timeout exception.

  • progressDots – when true, print ‘.’ after each ready-check


Add a space in front of all commands that are sent to the instrument to work around weird model issue.

It shouldn’t be needed on almost all devices, but it also doesn’t hurt. And it fixes a real issue that’s seen on a few devices.