VXi VT1422A 사용자 설명서

다운로드
페이지 529
182 Creating and Running Algorithms  
-- Identifiers  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   page 207
-- Special Identifiers for Channels  . . . . . . . . . . . . . . . . . . . .   page 208
-- Special Identifiers for Remote Scan Status . . . . . . . . . . . .   page 208
-- Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   page 208
-- Intrinsic Functions and Statements . . . . . . . . . . . . . . . . . .   page 209
-- Program Flow Control. . . . . . . . . . . . . . . . . . . . . . . . . . . .   page 210
-- Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   page 210
-- Data Structures  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . page 211
-- Bitfield Access  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   page 212
Overview of the Algorithm Language
The VT1422A'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'. An algorithm cannot 
call another user-written function subprogram.
It is important to note that while the VT1422A's Algorithm Language has a 
limited set of intrinsic arithmetic operators, it also provides the capability to 
call special user defined functions "f(x)." Appendix F page 487 shows how 
to convert user defined functions into piece-wise linear interpolated tables 
which can be downloaded into the VT1422A. The VT1422A can extract 
function values from these tables in approximately 18 µs 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 the user already programs in some language. If the 
experience is in the 'C' programming language, this chapter is probably all 
that will be needed to create an algorithm. If unfamiliar with the 'C' 
programming language, studying the "Program Structure and Syntax" 
section before beginning to write algorithms is recommended.
This section will present a quick look at the Algorithm Language. 
The complete language reference is provided later in this chapter.