HP VXI 75000 C Series User's And Scpi Programming Manual page 28

Algorithmic closed loop controller
Table of Contents

Advertisement

#define LADD "208"
/* Declares module as a register device */
INST_DECL(e1415, "E1415A", REGISTER);
/* Prototypes of functions declared later */
voidrst_clr( void );
voidid_scps( void );
int32check_error( char * );
/************************************************************************/
void main() /* Main function */
{
charread_id[80];
/* Clear screen and announce program */
printf("\033H\033J\n\n
printf("\n\n
/* Start the register-based operating system for the module */
INST_STARTUP();
/* Enable communications to the module; check if successful */
INST_OPEN(e1415, "vxi," LADD);
if ( !e1415 )
{
printf("INST_OPEN failed (ladd = %s).Failure code is: %d\n",
LADD,cscpi_open_error);
exit(1);
}
/*
Read and print the module's identification */
INST_QUERY(e1415, "*idn?", "", read_id);
printf("\n\nInstrument ID: %s\n\n", read_id);
rst_clr();/* Function resets the module */
id_scps();/* Function checks for installed SCPs */
exit(0);
}
/************************************************************************/
voidrst_clr() /* Reset the A/D module to its power-on state */
{
int16opc_wait;
/* Reset the module and wait until it resets */
INST_QUERY(e1415, "*RST;*OPC?", "", &opc_wait);
/* Check for module generated errors; exit if errors read */
if (check_error("rst_clr"))
28 Getting Started
Installation Verification Program\n\n");
Please Wait...");
Chapter 1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents