user26717: This is a basic battery monitor for a solar-powered control box.  It keeps the solar panels tracking the sun.  
The Arduino monitors the voltage on the battery and turns on an AC-powered battery charger if the voltage drops too low.  
It works, but there is an odd quirk.

Actual code is posted here. Too long to post and it does a bunch of other stuff that can be distracting.

One simple if statement isn't executing, as described below and shown on the plot.

HERE IS THE KEY CODE SEGMENT WHERE THE FAILURE OCCURS:
if (vind < vTriggerOn) {    // Batt low, turn on charger
  digitalWrite(powerPin,LOW); 
  digitalWrite(powerPin2,LOW);
  vAC=17.0;
  }  
if (vind > vTriggerOff) {   // Solar panels on, turn off charger
  digitalWrite(powerPin,HIGH); 
  digitalWrite(powerPin2,HIGH); 
  } 

//  HERE IS THE PROBLEM :  THIS ONE DOESN'T EXECUTE
if (vind > 15.5) {vind=15.48; vin=15.48;}   

This is followed by yet another if statement that works.  
Problem:  That if statement in question is supposed to keep it from going off-scale above the top of the plot.  Yet it is not executing. 

The two gray lines show that it is detecting the on and off triggers, but the voltage is going off the top.  This should be impossible. 
The first two if statements are executing but the third one is not.

Considered the fact that I hadn't upgraded the Arduino IDE since first installation.  It is "Arduino 2:1.0.6:dpsg2-4"
Tried this:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install arduino

and it told me I had the latest version.

Question:  How can I make it execute that third if statement?

user-1: This a new answer, upon the complete, original sketch as posted here by OP. 
I deleted all the code that doesn't affect vind directly. Also, I replaced the value=analogRead(A2) with worst case scenario value=1023. Also tested with 781 and 782, which produces values for vind around 15.5.
Reduced sketch
const float R1 = 147000.0;
const float R2 =  47000.0;
const float constADC = 5.0;
const float offsetADC = -0.25; //
const float convADC = constADC / 1024.0;
const float numReadings = 10.0;
const float vTrigAlertLow = 12.1;

float nReadings = 0.0;
float tReadings = 0.0;

int value = 0;
float vout, vin, vind;

void setup() {
  Serial.begin(9600);
  while (!Serial);
  Serial.println("");
}

void loop() {
  int value = 1023;
  vout = value * convADC;
  vin = vout / (R2 / (R1 + R2));
  vind = vin + offsetADC;
  tReadings = tReadings + vind;
  nReadings = nReadings + 1.0;

  Serial.print(nReadings); Serial.print(" "); Serial.print(tReadings); Serial.print(" ");   Serial.println(vind);

  if (nReadings >= numReadings) {
    vind = tReadings / numReadings;
    tReadings = 0.0;
    nReadings = 0;

    Serial.print("Before "); Serial.print(vind);
    if (vind > 15.5) vind = 15.48; // <----  PROBLEM - not executing
    Serial.print(" After "); Serial.println(vind);

    if (vind > vTrigAlertLow) { // Normal, otherwise below vTrigAlertLow it will send alerts in the 'else' below
      Serial.println(vind);
    }
    else {
      Serial.println("LOW VOLTAGE");  // send Texts
    }
    Serial.println("----");
  }
}

The output is
1 20.37 20.37
2 40.74 20.37
3 61.10 20.37
4 81.47 20.37
5 101.84 20.37
6 122.21 20.37
7 142.58 20.37
8 162.95 20.37
9 183.31 20.37
10 203.68 20.37
Before=20.37 After=15.48
Send to PI 15.48
----

The if works as intended. It must be something else.

26717: <p>This is a basic battery monitor for a solar-powered control box.  It keeps the solar panels tracking the sun.  </p>

<p>The Arduino monitors the voltage on the battery and turns on an AC-powered battery charger if the voltage drops too low.  </p>

<p>It works, but there is an odd quirk.</p>

<ul>
<li>Actual code is posted <a href="https://www.SDsolarBlog.com/files/OUTSIDE.ino" rel="nofollow noreferrer">here</a>. Too long to post and it does a bunch of other stuff that can be distracting.</li>
</ul>

<p>One simple <code>if</code> statement isn't executing, as described below and shown on the plot.</p>

<hr>

<p><strong>HERE IS THE KEY CODE SEGMENT WHERE THE FAILURE OCCURS:</strong></p>

<pre><code>if (vind &lt; vTriggerOn) {    // Batt low, turn on charger
  digitalWrite(powerPin,LOW); 
  digitalWrite(powerPin2,LOW);
  vAC=17.0;
  }  
if (vind &gt; vTriggerOff) {   // Solar panels on, turn off charger
  digitalWrite(powerPin,HIGH); 
  digitalWrite(powerPin2,HIGH); 
  } 

//  HERE IS THE PROBLEM :  THIS ONE DOESN'T EXECUTE
if (vind &gt; 15.5) {vind=15.48; vin=15.48;}   
</code></pre>

<p>This is followed by yet another <code>if</code> statement that works.  </p>

<p><strong>Problem:  That <code>if</code> statement in question is supposed to keep it from going off-scale above the top of the plot.  Yet it is not executing.</strong>  </p>

<p><a href="https://i.stack.imgur.com/IpuSY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IpuSY.png" alt="enter image description here"></a></p>

<p><strong>The two gray lines show that it is detecting the on and off triggers, but the voltage is going off the top.  This should be impossible.</strong>  </p>

<p><strong>The first two <code>if</code> statements are executing but the third one is not.</strong></p>

<hr>

<p>Considered the fact that I hadn't upgraded the Arduino IDE since first installation.  It is "Arduino 2:1.0.6:dpsg2-4"</p>

<p>Tried this:</p>

<pre><code>sudo apt-get update
sudo apt-get upgrade
sudo apt-get install arduino
</code></pre>

<p>and it told me I had the latest version.</p>

<hr>

<p><strong>Question:  How can I make it execute that third <code>if</code> statement?</strong></p>
 -1: <p>This a new answer, upon the complete, original sketch as posted <a href="https://www.sdsolarblog.com/files/OUTSIDE.ino" rel="nofollow noreferrer">here</a> by OP. </p>

<p>I deleted all the code that doesn't affect <code>vind</code> directly. Also, I replaced the <code>value=analogRead(A2)</code> with worst case scenario <code>value=1023</code>. Also tested with 781 and 782, which produces values for <code>vind</code> around 15.5.</p>

<p><strong>Reduced sketch</strong></p>

<pre><code>const float R1 = 147000.0;
const float R2 =  47000.0;
const float constADC = 5.0;
const float offsetADC = -0.25; //
const float convADC = constADC / 1024.0;
const float numReadings = 10.0;
const float vTrigAlertLow = 12.1;

float nReadings = 0.0;
float tReadings = 0.0;

int value = 0;
float vout, vin, vind;

void setup() {
  Serial.begin(9600);
  while (!Serial);
  Serial.println("");
}

void loop() {
  int value = 1023;
  vout = value * convADC;
  vin = vout / (R2 / (R1 + R2));
  vind = vin + offsetADC;
  tReadings = tReadings + vind;
  nReadings = nReadings + 1.0;

  Serial.print(nReadings); Serial.print(" "); Serial.print(tReadings); Serial.print(" ");   Serial.println(vind);

  if (nReadings &gt;= numReadings) {
    vind = tReadings / numReadings;
    tReadings = 0.0;
    nReadings = 0;

    Serial.print("Before "); Serial.print(vind);
    if (vind &gt; 15.5) vind = 15.48; // &lt;----  PROBLEM - not executing
    Serial.print(" After "); Serial.println(vind);

    if (vind &gt; vTrigAlertLow) { // Normal, otherwise below vTrigAlertLow it will send alerts in the 'else' below
      Serial.println(vind);
    }
    else {
      Serial.println("LOW VOLTAGE");  // send Texts
    }
    Serial.println("----");
  }
}
</code></pre>

<p>The output is</p>

<pre><code>1 20.37 20.37
2 40.74 20.37
3 61.10 20.37
4 81.47 20.37
5 101.84 20.37
6 122.21 20.37
7 142.58 20.37
8 162.95 20.37
9 183.31 20.37
10 203.68 20.37
Before=20.37 After=15.48
Send to PI 15.48
----
</code></pre>

<p>The <code>if</code> works as intended. It must be something else.</p>
