Overview Of The Algorithm Language - HP E1419A User Manual

Measurement and control module
Table of Contents

Advertisement

Overview of the Algorithm Language

110 The Algorithm Language and Environment
Bitfield Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Language Syntax Summary . . . . . . . . . . . . . . . . . . . . . . . . . 133
Program Structure and Syntax . . . . . . . . . . . . . . . . . . . . . . . 138
The HP E1419A's Algorithm Language is a limited version of the 'C'
programming language. It is designed to provide the necessary control
constructs and algebraic operations to support measurement and control
algorithms. There are no loop constructs, multi-dimensional arrays, or
transcendental functions. Further, an algorithm must be completely
contained within a single function subprogram 'ALGn'. The algorithm can
not call another user-written function subprogram.
It is important to note, that while the HP E1419A's Algorithm Language has
a limited set of intrinsic arithmetic operators, it also provides the capability
to call special user defined functions "f(x)". The HP VEE example programs
"fn_1419.vee" and "eufn1419.vee" in Chapter 5 will convert your functions
into piece-wise linear interpolated tables and give them names you choose.
The HP E1419A can extract function values from these tables in under
18µseconds regardless of the function's original complexity. This method provides
faster algorithm execution by moving the complex math operations off-board.
This section assumes that you already program in some language. If you are
already a 'C' language programmer, this chapter is all you'll probably need
to create your algorithm. If you are not familiar with the C programming
language, you should study the "Program Structure and Syntax" section
before you begin to write your custom algorithms.
This section will present a quick look at the Algorithm Language. The
complete language reference is provided later in this chapter.
Arithmetic Operators: add +, subtract -, multiply *, divide /
NOTE: Also see "Calling User Defined Functions" on page 4-118.
Assignment Operator: =
Comparison Functions: less than <, less than or equal <=, greater than >,
greater than or equal >=, equal to ==, not equal to !=
Boolean Functions: and &&, or ||, not !
Variables: scalars of type static float, and single dimensioned
arrays of type static float limited to 1024 elements.
Chapter 4

Advertisement

Table of Contents
loading

Table of Contents