Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INST_OPEN()

 

NAME

INST_OPEN − Compiled SCPI Commands
 

SYNOPSIS

 
INST_OPEN (id, dev_addr);
 

DESCRIPTION

 
This is an HP Compiled SCPI macro command. The instrument open command opens the I/O channel of communication to the instrument specified by the id parameter.  REGISTER configured instruments are initialized and set to their power-on state.
 

Parameters

 

id

The user variable name for the instrument.  This is the variable name that you assign to the instrument in the INST_DECL or INST_EXTERN command.  For example,
 
INST_DECL (vm, "E1411B", REGISTER);
 
assigns vm as an instrument data pointer to the E1411B.  Now when you use vm as the id in INST_OPEN, the  HP E1411B will be initialized.
 

dev_addr

The SICL address for the instrument. This address can be a quoted string or a pointer to a char array.  With a pointer to a char array, you can assign card address at run time. 
 
If a VXI instrument is used, "vxi,xx" can be used with xx being the logical address of the instrument.  Multiple cards can be configured as a switchbox or scanning voltmeter.  To specify multiple cards, enclose the card addresses in parentheses and separate with commas. For example, "vxi,(24,25,26)" can be used for a scanning voltmeter.  The voltmeter is at logical address 24, and the switch cards are at logical addresses 25 and 26.
 
If an HP-IB instrument is used, "hpibxx,xx,xx" can be used with the first xx being the logical unit, the second xx being the primary address, and the last xx being the secondary address.  For example, "hpib7,23,1" can be used where 7,23,1 is the logical unit, primary address, and secondary address respectively.
 
See the HP SICL documentation for addition information.
 

COMMENTS

 
This command sets REGISTER configured instruments to their power-on state.  See the instrument’s VXI user manual for information on the instrument power-on state.
 
INST_OPEN must be executed after the instrument declaration (INST_DECL) and INST_STARTUP, and before any other instrument commands that use id.
 
If this command fails, the id parameter is set to 0.  It is good practice to check the id parameter before doing anything else. You can also check the cscpi_open_error global variable.
 
For MESSAGE configurations, C-SCPI uses the HP SICL iopen() function.  See the HP SICL documentation  for more information.
 
See also INST_CLOSE.
 

EXAMPLE

 
This example initializes the HP E1411B Multimeter and checks to make sure the value returned is nonzero.
 

INST_DECL(vm, "E1411B", REGISTER);
 .
 .
main()
{
 INST_STARTUP();
INST_OPEN (vm, "VXI,24");
 If (vm == 0)
{
printf ("The INST_OPEN command has failed.");
exit(1);
}
}

  —  December 04, 1992

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