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)[source]

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.

backendstr

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

clear_status()

Clears the data status structure

event_status_enable_register Event status enable register = <RegisterValue object>
event_status_enable_register = <RegisterValue object>
IEC60488.event_status_enable_registerUsed in the status and events reporting system.
event_status_enable_register = <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 Status enable register = <RegisterValue object>
status_enable_register = <RegisterValue object>
IEC60488.status_enable_registerUsed in the status reporting system.
status_enable_register = <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)[source]

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 Power-on status. = <BoolValue object>
class fluidlab.instruments.iec60488.ParallelPoll(interface=None)[source]

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 Parallel poll enable register. = <RegisterValue object>
query_status_message_bit()

Query the individual status message bit

class fluidlab.instruments.iec60488.ResourceDescription(interface=None)[source]

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 Resource description. = <StringValue object>
class fluidlab.instruments.iec60488.ProtectedUserData(interface=None)[source]

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 Protected user data. = <StringValue object>
class fluidlab.instruments.iec60488.Calibration(interface=None)[source]

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)[source]

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)[source]

A mixin class, implementing the optional trigger macro commands.

Trigger macro commands

  • *DDT - Define device trigger.

  • *DDT? - Define device trigger query.

define_device_trigger Define device trigger. = <StringValue object>
class fluidlab.instruments.iec60488.Macro(interface=None)[source]

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 Define device trigger (???). = <StringValue object>
gmc()

Define device trigger (???).

lmc()

Define device trigger (???).

pmc()

Define device trigger (???).

class fluidlab.instruments.iec60488.ObjectIdentification(interface=None)[source]

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)[source]

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)[source]

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)[source]

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)[source]

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])

A mixin class, implementing the optional calibration command.

IEC60488([interface])

Instrument driver with IEC 60488-2 interface

Learn([interface])

A mixin class, implementing the optional learn command.

Macro([interface])

A mixin class, implementing the optional macro commands.

ObjectIdentification([interface])

A mixin class, implementing the optional object identification command.

ParallelPoll([interface])

A mixin class, implementing the optional parallel poll commands.

PassingControl([interface])

A mixin class, implementing the optional passing control command.

PowerOn([interface])

A mixin class, implementing the optional power on commands.

ProtectedUserData([interface])

A mixin class, implementing the protected user data commands.

ResourceDescription([interface])

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

StoredSetting([interface])

A mixin class, implementing the optional stored setting commands.

SystemConfiguration([interface])

A mixin class, implementing the optional system configuration commands.

Trigger([interface])

A mixin class, implementing the optional trigger command.

TriggerMacro([interface])

A mixin class, implementing the optional trigger macro commands.