HTBasic Help
×
Menu
Index

HPIBS

 
The HPIBS driver supports Hewlett-Packard / Agilent IEEE and compatible interfaces. Before this driver can be used, the Agilent I/O Libraries (SICL) software must be installed, and the interface must be configured correctly for SICL. Many parameters and configuration options such as default timeouts are controlled in the SICL software.
 
Agilent 82350 PCI-GPIB cards and later support the CLEAR-I/O and RESET commands. Older interface cards require an ON TIMEOUT statement to keep them from blocking if communication fails.
 

Loading

Load the HPIBS driver from from the Device Setup dialog or with the following statement syntax:
 
LOAD BIN "HPIBS[;DEVICE Device_name] [ ISC Isc] [ BUS Bus] [ TIMEOUT Timeout] [ NOTSYS| SYSTEM]"
 
where Device_name is the name of the device assigned to the GPIB card in the I/O Libraries setup.
 

Device Name

If you do not specify a DEVICE name from the SICL I/O Configuration Utility in the Device Setup dialog, the default name "hpib" is used. An example of specifying a different name is:
 
LOAD BIN "HPIBS;DEV ieee7" 
 

ISC Option

The default ISC is 7, but if you are using multiple IEEE-488 boards, you must use the ISC option give each one a unique ISC.
 

BUS Option

The BUS option specifies the cards BUS address which must be set if it is anything other than the default of 21.
If the card is loaded as NOTSYS, the default BUS address is 20.
 

SYSTEM vs NOTSYS

Set the SYSTEM vs NOTSYS option in the Agilent I/O Configuration Utility. These options may be specified in LOAD BIN statement, however if they conflict with the settings in the configuration utility, an error will be generated.
 
LOAD BIN "HPIBS;TIME 12"
 

Unsupported Keywords

READIO and WRITE/IO of interface registers are not supported by the HPIBS driver. Attempts to use READIO or WRITE/IO cause Error 170.
 
PPOLL Note. Parallel Poll configuration is automatic with the HPIBS driver. The Active Controller can configure a non-controller PC GPIB interface for parallel poll, and the PC interface will respond correctly based upon that configuration.
 
If bit 14 of the Interrupt Enable register is set, HTBasic will receive an interrupt indicating that a parallel poll configuration has occurred. There is no way, however, to know the value of the configuration byte that came from the Active Controller.
 
You can set the parallel poll response by using CONTROL register 2 or 5, or you can automatically accept the configuration sent by an Active Controller.
 

Interface Control Registers

CONTROL Registers. The IEEE-488 section of the User’s Guide documents the STATUS and CONTROL registers normally available for GPIB interfaces. The HPIBS driver supports all of these registers, with the following exceptions:
 
STATUS Registers. The HPIBS driver does not support user control of NDAC holdoff. CONTROL register 4 is not implemented and will give Error 55.
 
The following ENABLE INTR events are not supported by the HPIBS driver. Status register 5 always reports them as 0:
                         
Bit
Value
Meaning
6
64
Handshake Error
5
32
Unrecognized universal command
4
16
Secondary command while addressed
2
4
Unrecognized addressed command
 
All other HP-IB interrupt events are supported and reported properly in STATUS registers 4 and 5.
The "LSB of last address" bit (bit 8) in STATUS register 6 is not implemented by the HPIBS driver and is always reported as 0.
 
STATUS register 7 has a high byte that reports bus control lines and a low byte that reports bus data lines. The HPIBS driver does not support the direct reading of bus data lines the upper byte of this register is supported, but the lower byte is always 0.
 
CONTROL and STATUS Register 255:
 
Bit
Value
Meaning
7
128
Not Used
6
64
Not Used
5
32
Reserved for future use
4
16
Reserved for future use
3
8
Reserved for future use
2
4
ENTER buffering
1
2
Not Used
0
1
Interface Lock
 
Some examples using register 255 follow:
 
CONTROL 7,255;4        !Enables buffering for ENTER 
CONTROL 7,255;0        !Disables buffering for ENTER 
CONTROL 7,255;4+1      !Lock GPIB, enable buffering 
STATUS7,255;Stat       !Get status of register 255 
 
Interface locking can be used to help HTBasic cooperate with other Windows applications that might also access SICL-based interfaces. Setting bit 0 locks the interface, while clearing bit 0 unlocks the interface.
 
ENTER buffering can increase the speed of free-field ENTER statements. A free-field ENTER is one without a USING clause, such as:
 
ENTER @Dev;A$