Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ INST_DECL(3) — HP-UX SCPI B.02.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INST_DECL()

 

NAME

INST_DECL − Compiled SCPI Commands
 

SYNOPSIS

 
INST_DECL (id, driver, type);
 

DESCRIPTION

 
This is an HP Compiled SCPI macro command. Instrument declare creates a variable declaration for the instrument data pointer.  This variable can be a global variable in the main program, or a local variable declared in a function.  This command also designates the name of the instrument driver and the type of instrument (register-based or message-based instrument).
 

PARAMETERS

 

id

The user variable name for the instrument.  This is where you assign the variable name for the instrument.  The name specified by id  is used in all other C-SCPI commands for that instrument. 
 

driver

The parameter that defines the HP driver. This parameter is a quoted string, for example, "E1411B" is the driver name for the HP E1411B Multimeter.  See the HP 75000 Family of VXI Products catalog for a list of available drivers (available from your nearest HP Sales and Service Office). 
 

type

The parameter that defines the configuration type.  The configuration type can be one of the following:
 
MESSAGE - for HP-IB or VXI message-based cards
 
REGISTER - for register-based cards
 

COMMENTS

 
INST_DECL, INST_EXTERN, or INST_PARAM is required to declare the id parameter.  This declaration must be done before any command that uses id.
 
The contents of the driver parameter are ignored for message-based cards. For those cards use the instrument name as the driver parameter for program readability.
 
It is good practice to use INST_DECL at the beginning of your program to ensure you are not declaring an instrument in the middle of an executable statement.  You can only use INST_DECL where you declare a normal C variable.
 
See also INST_EXTERN and INST_PARAM.
 

EXAMPLE

 
This example declares a global variable for the HP E1411B.
 

INST_DECL (vm, "E1411B", REGISTER);
 main()
{
INST_STARTUP();
INST_OPEN (vm, "VXI,24");
 .
}

  —  December 04, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026