HP (Hewlett-Packard) E1459A Network Router User Manual


 
30 Using the HP E1459A Module
Power-on / Reset States
At power-on or reset (*RST) the HP E1459A is set to the following
conditions:
Watchdog timer is off (disabled).
Clock Source is Internal
Input Debounce Time is 18.0 µS.
DAV (Data Available) Event interrupts are disabled for all ports.
Edge Event interrupts are disabled for all ports.
Also, refer to the
STATus:PRESet command in Chapter 3.
Example 1:
Reset, Self Test,
and Module ID
This first example resets the HP E1459A, performs the module self test, and
reads the module ID and description.
/* Self Test
This program resets the HP E1459A, performs a Self Test,
and reads the ID string
Created in Microsoft Visual C++ */
#include <visa.h>
#include <stdio.h>
#include <stdlib.h>
#define INSTR_ADDR "GPIB0::9::3::INSTR"
/* HP E1459A logical address */
int main()
{
ViStatus errStatus;
/* status from VISA call */
ViSession viRM;
/* Resource Mgr. session */
ViSession E1459;
/* session for HP E1459A */
char id_string [256] = {0};
/* ID string buffer */
char selftst_string[256] = {0};
/*
Open a default Resource Manager
*/
errStatus = viOpenDefaultRM (&viRM);
if (VI_SUCCESS > errStatus){
printf("ERROR: viOpen() returned 0x%x\n",errStatus);
return errStatus;}
/*
Open the Instrument Session
*/
errStatus = viOpen (viRM, INSTR_ADDR,VI_NULL,VI_NULL, &E1459);
if (VI_SUCCESS > errStatus){
printf("ERROR: viOpen() returned 0x%x\n",errStatus);
return errStatus;}
/*
Reset the E1459A
*/
errStatus = viPrintf (E1459, "*RST;*CLS\n");
if (VI_SUCCESS > errStatus){
printf("ERROR: viPrintf() returned 0x%x\n",errStatus);
return errStatus;}