fluidlab.instruments.iec60488

IEC60488 drivers (fluidlab.instruments.iec60488)

Todo

Verify if IEC60488 drivers work and are convenient (which names for the functions and values?)…

[This module is inspired by the module slave.iec60488. Part of the documentation is taken from it. Thank you to the Slave authors.]

This module implements an IEC 60488-2:2004(E) compliant interface.

The IEC 60488-2 describes a standard digital interface for programmable instrumentation. It is used by devices connected via the IEEE 488.1 bus, commonly known as GPIB. It is an adoption of the IEEE std. 488.2-1992 standard.

The IEC 60488-2 requires the existence of several commands which are implemented in the class:

class fluidlab.instruments.iec60488.IEC60488(interface=None, backend='')[source]

Bases: fluidlab.instruments.drivers.VISADriver

Instrument driver with IEC 60488-2 interface

The IEC 60488-2 requires the existence of several commands which are logically grouped.

Reporting Commands

  • *CLS - Clears the data status structure.
  • *ESE - Write the event status enable register.
  • *ESE? - Query the event status enable register.
  • *ESR? - Query the event status register.
  • *SRE - Write the status enable register.
  • *SRE? - Query the status enable register.
  • *STB - Query the status register.

Internal operation commands

  • *IDN? - Identification query.
  • *RST - Perform a device reset.
  • *TST? - Perform internal self-test.

Synchronization commands

  • *OPC - Set operation complete flag high.
  • *OPC? - Query operation complete flag.
  • *WAI - Wait to continue.
Parameters:

interface : {str or interface}

A VISA interface or a string defining a VISA interface.

backend : str

Defines the backend used by pyvisa (“@py”, “@ni”, “@sim”…)

clear_status()

Clears the data status structure

event_status_enable_register = <fluidlab.instruments.features.RegisterValue object>
get_operation_complete_flag()

Get operation complete flag

perform_internal_test()

Perform internal self-test

query_esr()

Query the event status register

query_identification()

Identification query

query_stb()

Query the status register

reset_device()

Perform a device reset

status_enable_register = <fluidlab.instruments.features.RegisterValue object>
wait()

Wait to continue

wait_till_completion_of_operations()

Return “1” when all operation are completed

Despite the required commands, there are several optional command groups defined. The standard requires that if one command is used, it’s complete group must be implemented. These are implemented in the following mixin classes.

class fluidlab.instruments.iec60488.PowerOn(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional power on commands.

Power on common commands

  • *PSC - Set the power-on status clear bit.
  • *PSC? - Query the power-on status clear bit.
power_on_status = <fluidlab.instruments.features.BoolValue object>
class fluidlab.instruments.iec60488.ParallelPoll(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional parallel poll commands.

Parallel poll common commands

  • *IST? - Query the individual status message bit.
  • *PRE - Set the parallel poll enable register.
  • *PRE? - Query the parallel poll enable register.
parallel_poll = <fluidlab.instruments.features.RegisterValue object>
query_status_message_bit()

Query the individual status message bit

class fluidlab.instruments.iec60488.ResourceDescription(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional resource description common commands.

Resource description common commands

  • *RDT - Store the resource description in the device.
  • *RDT? - Query the stored resource description.
resource_description = <fluidlab.instruments.features.StringValue object>
class fluidlab.instruments.iec60488.ProtectedUserData(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the protected user data commands.

Protected user data commands

  • *PUD - Store protected user data in the device.
  • *PUD? - Query the protected user data.
user_data = <fluidlab.instruments.features.StringValue object>
class fluidlab.instruments.iec60488.Calibration(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional calibration command.

Calibration command

  • *CAL? - Perform internal self calibration.
perform_calibration()

Perform internal self calibration

class fluidlab.instruments.iec60488.Trigger(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional trigger command.

Trigger command

  • *TRG - Execute trigger command.
trigger()

Execute trigger command.

class fluidlab.instruments.iec60488.TriggerMacro(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional trigger macro commands.

Trigger macro commands

  • *DDT - Define device trigger.
  • *DDT? - Define device trigger query.
define_device_trigger = <fluidlab.instruments.features.StringValue object>
class fluidlab.instruments.iec60488.Macro(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional macro commands.

Macro Commands

  • *DMC - Define device trigger.
  • *EMC - Define device trigger query.
  • *EMC? - Define device trigger.
  • *GMC? - Define device trigger query.
  • *LMC? - Define device trigger.
  • *PMC - Define device trigger query.
dmc()

Define device trigger (???).

emc = <fluidlab.instruments.features.StringValue object>
gmc()

Define device trigger (???).

lmc()

Define device trigger (???).

pmc()

Define device trigger (???).

class fluidlab.instruments.iec60488.ObjectIdentification(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional object identification command.

Option Identification command

  • *OPT? - Option identification query.
opt_identification()

Option identification query.

class fluidlab.instruments.iec60488.StoredSetting(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional stored setting commands.

Stored settings commands

  • *RCL - Restore device settings from local memory.
  • *SAV - Store current settings of the device in local memory.
restore_device_settings()

Restore device settings from local memory.

store_current_settings()

Store current settings of the device in local memory.

class fluidlab.instruments.iec60488.Learn(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional learn command.

Learn command

  • *LRN? - Learn device setup query.
learn_device_setup()

Learn device setup query.

class fluidlab.instruments.iec60488.SystemConfiguration(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional system configuration commands.

System configuration commands

  • *AAD - Accept address command.
  • *DLF - Disable listener function command.
accept_address_command()

Accept address command.

disable_listener()

Disable listener function command.

class fluidlab.instruments.iec60488.PassingControl(interface=None, backend='@py')[source]

Bases: fluidlab.instruments.drivers.VISADriver

A mixin class, implementing the optional passing control command.

Passing control command

  • *PCB - Pass control back.
pass_control_back()

Pass control back.

Classes

Calibration([interface, backend]) A mixin class, implementing the optional calibration command.
IEC60488([interface, backend]) Instrument driver with IEC 60488-2 interface
Learn([interface, backend]) A mixin class, implementing the optional learn command.
Macro([interface, backend]) A mixin class, implementing the optional macro commands.
ObjectIdentification([interface, backend]) A mixin class, implementing the optional object identification command.
ParallelPoll([interface, backend]) A mixin class, implementing the optional parallel poll commands.
PassingControl([interface, backend]) A mixin class, implementing the optional passing control command.
PowerOn([interface, backend]) A mixin class, implementing the optional power on commands.
ProtectedUserData([interface, backend]) A mixin class, implementing the protected user data commands.
ResourceDescription([interface, backend]) A mixin class, implementing the optional resource description common commands.
StoredSetting([interface, backend]) A mixin class, implementing the optional stored setting commands.
SystemConfiguration([interface, backend]) A mixin class, implementing the optional system configuration commands.
Trigger([interface, backend]) A mixin class, implementing the optional trigger command.
TriggerMacro([interface, backend]) A mixin class, implementing the optional trigger macro commands.