Power On/Reset Conditions

A soft reset is generated when the reset bit in the control register is set active and then released. A hard reset is generated when the SYSRESET line on the backplane is active. In either of these cases all control bits will be set to "0". This includes bits in the Control/Status Register, Command Registers, the mask registers, and the Debounce Clock Register (which are actually set to 2).

Programming Examples

The following C language program demonstrates how to program at the register level. The program reads the ID, Device Type, and Status registers. This program was written and tested in Microsoft Visual C++ but should compile under any standard ANSI C compiler.

To run this program you must have the HP SICL library, the HP VISA library, an HP-IB interface module installed in your PC, and an HP E2406 Command Module.

#include <visa.h> #include <stdio.h> #include <stdlib.h>

ViSession viRM,E1459; int main()

{

unsigned short id_reg,dt_reg ;

/* ID & Device Type Registers */

unsigned short stat_reg ;

/* Status Register register */

ViStatus errStatus;

/*Status from each VISA call*/

/* Open the default resource manager */ errStatus = viOpenDefaultRM ( &viRM); if (VI_SUCCESS > errStatus){

printf(“ERROR: viOpenDefaultRM() returned 0x%x\n”,errStatus); return errStatus;}

/* Open the Module instrument session ; Logical Address = 8 */ errStatus = viOpen(viRM,”GPIB-VXI0::8”,VI_NULL,VI_NULL,&E1459); if (VI_SUCCESS > errStatus){

printf(“ERROR: viOpen() returned 0x%x\n”,errStatus); return errStatus;}

/* read and print the module’s ID Register */ errStatus = viIn16(E1459,VI_A16_SPACE,0x00,&id_reg); if (VI_SUCCESS > errStatus){

printf(“ERROR: viIn16() returned 0x%x\n”,errStatus); return errStatus;}

printf(“ID register = 0x%4X\n”, id_reg);

HP E1459A Register Definitions 91