ITG Drivers

ITG (Interactive Test Generator) Drivers are long considered obsolete but work with all versions of VEE and can still be very useful. For older (R2D2 and other pre-SCPI) instruments these are often the only drivers available.


Documents

ITG (Interactive Test Generator) drivers are written in an HP proprietary Instrument Driver Language. The drivers are designed to provide a local state table that matches that of the driven instrument. As such they are capable of "panel" mode which keeps the local state table synced with the actual instrument.

They can also be used in "component" mode which allows control or access of a single instrument state.

The Panel driver is very convenient for interactive or setup usage. For repetitive usage it can be quite slow since the full state table must be maintained. For that reason it is common to use the Panel driver once at the beginning of a routine and then use the Component driver for the rest.

The Instrument Driver Language is very simple and is fully documented: see HP Instrument Driver Language Reference (or this alternate version). Furthermore the source code for existing ITG drivers is included with VEE distributions and can be optionally installed along with VEE. To find these drivers look in the "ids" directory in your VEE installation. Optionally you can find the drivers on the Instrument Driver Page.

A typical snippet from an ITG driver looks like:

COMPONENT FUNCTION;
  TYPE DISCRETE;
  VALUES DCV,ACV,OHM2,OHM4,OHMX,DCI,ACI;
  INITIAL  DCV;
  SET ACTIONS;
    OUTPUT FUNCTION TABLE F1,F2,F3,F4,F7,F5,F6;
    IF RECALLING THEN;
    ELSE;
      SELECT ARANGE;
      CASE 0;
        FETCH REAL_RANGE;
        STORE RANGE;
        GOSUB CHKRANGE;
      CASE ELSE;
      END SELECT;
    END IF;
  END ACTIONS;
  PANEL SET ACTIONS;
    INVALIDATE READING;
    DONTCARE HOMES;
  END ACTIONS;
END COMPONENT;

Since access to existing source is available, it can be very simple and convenient to modify existing drivers for specialized purposes.

If you check the existing drivers you will find three types of files:


Compiler

In principle, VEE compiles these drivers on-the-fly but this does not always work reliably. Hence it is suggested that you compile the drivers yourself before using them. The compiler is part of the VEE install but is also provided here (idc.exe) for convenience. To use the compiler simply bring up a command line and run the executable with ITG source as a sole argument.

idc myDriver.id
creates myDriver.cid in the same directory from which idc is invoked. Copy this to the ids directory of your VEE install and it will be seen by VEE's Instrument Manager.

Driver Writing Tool

The Driver Writing Tool is a graphical user interface (GUI) tool that generates Instrument Driver code. While it creates very simplistic drivers by itself, the best use of the Driver Writing Tool is to create example drivers that can be examined. This is a good starting point for more sophisticated drivers and also an excellent way to help learn the language.

This tool is available below for download.


© 2015-2025. All Rights Reserved. Stan Bischof (stan@worldbadminton.com). Last updated 13 February 2024 08:50.