$Id: ph_info.txt,v 1.2 1992/05/27 20:56:28 carr Exp $
PV-WAVE / REAL-TIME PROCESS CONTROL APPLICATION

1. OBJECTIVE.
   This demonstration shows the mixing of Hydrochloric acid (HCl) and
   Sodium Hydroxide base (NaOH) to produce Water (H2O) and salt (NaCl).
   The objective of the operator is to control the HCl, NaOH, and drain
   valves to neutralize as much acid as possible while keeping the drain
   fluid temperature and pH within limits.

2. RUNNING THE DEMO.
   In the center of the window is an image that shows the pH levels
   in the tank.   The colors in this image match the colors shown in
   the legend.   Red and yellow are acidic and blue and cyan are basic.

   Each of the valves outlined in magenta can be opened and closed by
   clicking on the associated slider bar using any of the mouse buttons.
   If the mouse button is held down, a dynamic readout of the valve
   setting is displayed in an area adjacent to the slider bar.

   The left strip chart shows the concentration of acid in the fluid
   entering the tank.   The operator has no control over the acid
   concentration in this fluid, but the AMOUNT of fluid entering the tank
   can be controlled with the valve.   The farther open the HCl valve is,
   the faster the strip chart will go.   The color of the line on the
   strip chart also changes to match the pH scale shown in the legend.

   The chart on the far right shows the pH of the fluid being drained
   out of the tank.   This chart is updated more frequently when the
   drain valve is wide open.   The two round gauges show the temperature
   and salt concentration of the tank fluid just above the drain.
   The fluid level gauge shows the actual fluid level in the tank.

   Clicking on the DISPLAY OPTIONS button will bring up a menu of
   optional display modes.   Clicking on the EXIT button will quit
   the demo and return to the " PV-WAVE> " prompt.

   NOTE : Depending on the current CPU load, it may be necessary
          to hold the mouse button down longer to give PV-WAVE
          a chance to read the cursor position.



3. HOW IT WORKS.
   This process control application is monitoring over 500 variables
   in real time.   Depending on the chosen display options, this
   demo may actually monitor up to 1500 variables in real time.

   PV-WAVE spawns a C program that calculates the reaction in the tank.
   The C program continually writes data to a temporary file.
   PV-WAVE continually reads from this file and displays the data as
   an image.

   After writing the data to the file, the C program sets the file
   pointer to the beginning of the file.   This causes the C program to
   be continually over-writing the contents of the file with new data.
   When PV-WAVE goes to read the file it always positions the file pointer
   at the beginning of the file before it reads it.   By using this
   method, PV-WAVE will NEVER fall behind the C program.

   PV-WAVE also writes out the current valve settings to a different file.
   The C program reads in these valve settings and uses them in its
   calculations.

   In a real process control environment, the C program would be sub-
   stituted by monitoring equipment with a direct feed to the host CPU
   via Ethernet or some other communication protocol.   In this case,
   the process control software would run even faster because the CPU
   would not be performing the number crunching to calculate the
   reaction in the tank.
