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

Algorithmic closed loop controller
Table of Contents

Advertisement

/* C-SCPI Example program for the E1415A Algorithmic Closed Loop Controller
* file name "simp_pid.cs"
*
* This program example shows the use of the intrinsic function PIDB.
*/
/* Standard include files */
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <math.h>
/* Instrument control include files */
#include <cscpi.h>/* C-SCPI include file */
/* Declare constants
#define E1415_ADDR"vxi,208"/* The C-SCPI address of your E1415 */
INST_DECL(e1415, "E1415A", REGISTER);/* E1415 */
/* Main program */
void main()
{
/* Main program local variable declarations */
char
int
char
int32
INST_STARTUP();/* Initialize the C-SCPI routines */
/* Open the E1415 device session with error checking */
INST_OPEN(e1415, E1415_ADDR);/* Open the E1415 */
if (! e1415) {/* Did it open? */
(void) fprintf(stderr, "Failed to open the E1415 at address %s\n",
Chapter 3
trapping. The source file for this example does implement error trapping.
The source file is named "simp_pid.cs". See Appendix G page 389 for
program listings.
Figure 3-10. Quick Start Example
*/
*algorithm;
alg_num;
string[333];
error;
/* Algorithm string */
/* Algorithm number being loaded */
/* Holds error information */
/* Holds error number */
Programming the HP E1415 for PID Control
93

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents