Communication Using Global Variables - HP VXI 75000 C Series User's And Scpi Programming Manual

Algorithmic closed loop controller
Table of Contents

Advertisement

_
Setpoint
+
Setpoint
+
_
Communication
Using Global
Variables
Implementing Feed
Forward Control
Chapter 4
SCP channels but are instead buffered in the Output Channel Buffer until the
Output Phase occurs. This situation allows easy implementation of
decouplers because it allows an algorithm following the two PIDs to inspect
their output values and make adjustments to them before they are sent to
output channels. The decoupler algorithm's Decoupl_factor1 and
Decouple_factor2 variables (assumes a simple interaction) are local and can
be independently set using ALG:SCALAR:
/* decoupler algorithm. (must follow the coupled algorithms in execution sequence) */
static float Decouple_factor1, Decouple_factor2;
O124 = O124 + Decouple_factor2 * O125;
O125 = O125 + Decouple_factor1 * O124;
PID Controller ALG1
PID Controller ALG2
Figure 4-3. Algorithm Communication with Channels
A more traditional method of inter-algorithm communication uses global
variables. Global variables are defined using the ALG:DEF command in the
form:
ALG:DEF 'GLOBALS','<variable_declaration_statements>'
Example of global declaration
ALG:DEF 'GLOBALS','static float cold_setpoint;'
In this example two algorithms mix hot and cold water supplies in a ratio that
results in a tank being filled to a desired temperature. The temperature of the
make-up supplies is assumed to be constant. Figure 4-4 shows the process
diagram.
O124
+
Decoupl_factor1
+
ALG3
De-coupler
+
Decoupl_factor2
O125
+
Creating and Running Custom Algorithms
O124
O125
Process Interaction
131

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents