Algorithm To Algorithm Communication; Communication Using Channel Identifiers - HP VXI 75000 C Series User's And Scpi Programming Manual

Algorithmic closed loop controller
Table of Contents

Advertisement

Modifying the
Standard PIDA

Algorithm to Algorithm Communication

Communication
Using Channel
Identifiers
Implementing
Multivariable Control
130 Creating and Running Custom Algorithms
When the process value reading reaches 140 the "error term" would equal
zero so the value sent to the digital output would be 0 (heater off). Fine so
far, but as the bath temperature coasts even minutely above the setpoint, a
small negative value will be sent to the digital output which represents a
boolean true value. At this point the output will again be 1 (heater on) and
the bath temperature will continue go up rather than down. This process is
now out of control!
This behavior is easy to fix. We'll just modify the standard PIDA algorithm
source code (supplied with your HP E1415 in the file PIDA.C) and then
define it as a custom algorithm. Use the following steps.
1. Load the source file for the standard PIDA algorithm into your
favorite text editor.
2. Find the line of code near the end of PIDA that reads:
outchan = Error * P_factor + I_out + D_factor * (Error - Error_old)
and insert this line below it:
if ( outchan <= 0 ) outchan = 0; /* all value not positive are now zero */
3. going back to the beginning of the file change all occurrences of
"inchan" to the input channel specifier of your choice (e.g. I100).
4. As in step 3, change all occurrences of "outchan" to the digital output
channel/bit identifier of your choice (e.g. O108.B0).
5. Now save this algorithm source file as "ONOFFPID.C".
The ability for one algorithm to have access to values from another can be
very important particularly in more complex control situations. One of the
important features of the HP E1415 is that this communication can take
place entirely within the algorithms' environment. Your application program
is freed from having to retrieve values from one algorithm and then send
those values to another algorithm.
The value of all defined input and output channels can be read by any
algorithm. Here is an example of inter-algorithm channel communication.
In this example, two PID algorithms each control part of a process and due
to the process dynamics are interactive. This situation can call for what is
known as a "decoupler". The job of the decoupler is to correct for the
"coupling" between these two process controllers. Figure 4-3 shows the two
PID controllers and how the de-coupler algorithm fits into the control loops.
As mentioned before, algorithm output statements don't write to the output
Chapter 4

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents