How Your Algorithms Fit In - HP VXI 75000 C Series User's And Scpi Programming Manual

Algorithmic closed loop controller
Table of Contents

Advertisement

and controls execution of your algorithm functions. See Figure 4-1 for a
partial listing of main().
How Your
When the module is INITiated, a set of control variables and a function
calling sequence is created for all algorithms you have defined. The value of
Algorithms Fit In
variable "State_n" is set with the ALGorithm:STATe command and
determines whether the algorithm will be called. The value of "Ratio_n" is
set with the ALGorithm:SCAN:RATio command and determines how often
the algorithm will be called (relative to trigger events).
Since the function-calling interface to your algorithms is fixed in the main()
function, the "header" of your algorithm function is also pre-defined. This
means that unlike standard 'C' language programming, your algorithm
program (a function) need not (must not) include the function declaration
header, opening brace "{", and closing brace "}". You only supply the
"body" of your function, the HP E1415's driver supplies the rest.
Think of the program space in the HP E1415 in the form of a source file with
any global variables first, then the main() function followed by as many
algorithms as you have defined. Of course what is really contained in the
HP E1415's algorithm memory are executable codes that have been
translated from your downloaded source code. While not an exact
representation of the algorithm execution environment, Figure 4-1 shows
the relationship between a normal 'C' program and two HP E1415
algorithms.
116 Creating and Running Custom Algorithms
Chapter 4

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents