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

Algorithmic closed loop controller
Table of Contents

Advertisement

tri_sine.cs
/* $Header: $
*
* C-SCPI Example program for the E1415A Algorithmic Closed Loop Controller
*
* tri_sine.cs
*
* This example shows how to use Custom Functions in the E1415A by generating
* both a triangle and sine wave to a current output DAC.
*
* This is a template for building E1415A C programs that may use C-SCPI
* or SICL to control instruments.
*/
/* Standard include files */
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h> /* This file is also often useful */
#include <math.h>
/* Other system include files */
/* Whenever using system or library calls, check the call description to see
* which include files should be included.
*/
/* Instrument control include files */
#include <cscpi.h>
/* Declare any constants that will be useful to the program. In particular,
* it is usually best to put instrument addresses in this area to make the code
* more maintainable.
*/
#define E1415_ADDR
INST_DECL(e1415, "E1415A", REGISTER);
/* Use something like this for HP-IB and HP E1405/6 Command Module */
/* #define E1415_ADDR "hpib,22,26"
/*INST_DECL(e1415, "E1415A", MESSAGE); /* E1415 */
/* Declare instruments that will be accessed with SICL. These declarations
* can also be moved into local contexts.
*/
INST
/* Trap instrument errors. If this function is used, it will be called every
* time a C-SCPI instrument puts an error in the error queue. As written, the
* function will figure out which instrument generated the error, retrieve the
* error, print a message, and exit. You may want to modify the way the error
Appendix G
/* Most programs use one or more
* functions from the C standard
* library.
*/
/* Most programs will also use standard
* I/O functions.
*/
/* Needed for any floating point fn's */
/* C-SCPI include file */
"vxi,208"
vxi;
/* VXI interface session */
/* The SICL address of your E1415 */
/* E1415 */
/* The SICL address of your E1415 */
Example Program Listings
411

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents