Frequently Asked Questions

Use the -ALT switch to specify an alternative startup program for HTBasic to run and it will override the default “AUTOST” file. For example, the following will start HTBasic and run the file named MyStartup.bas in the root directory of drive C, regardless of what the current directory is:

HTBasic -ALT C:\MyStartup.bas

To start HTBasic without running any startup program, simply specify any nonexistent file name. For example:

HTBasic -ALT nostart

First make sure the card has been configured correctly in Agilent’s SICL software, and then use the following statement in HTBasic:

LOAD BIN “HPIBS;DEV lan[IP Address]:lan0 ISC 7”

where lan0, the default device name, should be replaced with the device name assigned in SICL.

Alternately you can add the LAN to GPIB controller from the Device Setup dialog (in the Tools menu) by first adding the HPIBS driver into the list of drivers and then adding lan[address IP]:lan0 into the properties SICL Device name field. Then you can simply click the “Load” button to load the driver.

Make sure the card has been configured correctly in the third party software. Either use a LOAD BIN statement, or the HTBasic Device Setup to load the necessary driver. Examples:



where xxxx is the Device Name assigned in the third party software.

No. The USBS driver only supports USBTMC and USBTMC-USB488 Devices.

First, make sure your device has been recognized and configured in Agilent’s IO Libraries. Then load the USBS driver from the Device Setup menu or with a LOAD BIN statement. For example:


where xxxx is the SICL Alias, or Device Name assigned in Agilent’s IO Libraries.

The string array declared on the HTBasic side must be the exact size of the string array declared in the DLL.

HTBasic stores strings with two bytes at the end of the string for its size instead of a NULL char like C++.

To pass a string array to a DLL the first element of the array is a pointer to the array in the DLL and you also need to add 2 to the size of each string in the array in the DLL to compensate for the extra two characters added on by HTBasic. 

To send a string array back to HTBasic the reverse needs to happen with each string in the array having two have two extra characters containing the size of the string.

A file called HTBasicStrings.cpp has two functions which format the strings to be passed to and from the DLL.

The following command enables DUMP GRAPHICS to print a Widget:


First, plug in the card and then install and configure it using the HP I/O SICL Libraries making a note of the device name given the card. You can confirm that the GPIOS.DW6 driver is there by doing a CAT listing. Assuming you configured the GPIO card with device name “gpio12”, you could add the following line to the AUTOST file:


You can then use commands like:

OUTPUT 12;dat

You can assign any ISC you like except for a predefined ISC like 10.

You can send HPGL or PCL commands through ISC 26 by redirecting an LPT port to a shared printer TCP/IP address. In older versions of Windows you can use the “net use” command following these steps:

  1. If you are not connected to a network you can simulate one by using a network “loop back plug” where pin 1 is looped to pin 3, and pin 2 is looped to pin 6.
  2. Open a command prompt window as adminstartor in Windows 7+ by going to Start>All Programs > Accessories, then right-click Command Prompt and select Run as Administrator.
  3. At the command prompt type: net use lptx \\pc_name\share_name where pc_name is the name of the PC on which the printer is shared; share_name is the shared name of the printer; and  lptx is the number of the LPT port you wish to print from. After pressing Enter, you should get a confirmation message: “The command completed successfully.” Note that the selected LPT port does not have to be a physical LPT port. Also you can add the “/persistent:yes” switch to enable the setting to survive reboots and power cycles as in the following example:
    net use lpt1 \\mypc\pr1 /persistent:yes

    You could test the connection by executing a command like:

    dir > lpt1


Modify the following template program so that @Oldbdat points to your HP workstation bdat file. It creates a new file and outputs the properly formatted data into a new file:

DIM Oldbdat$[256]
ASSIGN @Oldbdat TO “a:\OldBdat.bdat”;FORMAT MSB FIRST
ENTER @Oldbdat;S$
CREATE BDAT “c:\NewBdat.bdat”,1
ASSIGN @Newbdat TO “c:\NewBdat.bdat”
OUTPUT @Newbdat;Oldbdat$
ASSIGN @Oldbdat TO *
ASSIGN @Newbdat TO *
Scroll to Top