user48967: This is a pseudo code from my LED cube project
void loop(){
  //switch( map(constrain(analogRead(pt),10,1020),10,1020,1,4));  - for select pattern
  //show(1);
 for(lp=128;lp>=1;lp = lp/2){
  runfor(1000,lp,1,0,0,0,0);
  //Serial.println("HI");
 }
}

void runfor(short mills,byte a,byte b,byte c,byte d,byte e,byte f){
  timer = millis();
  Serial.println(a);
  while((millis()-timer)<=mills){
    light_L1(a,b);
    //light_L2(c,d);
    //light_L3(e,f);
  }
}

the variable 'lp' here never changes its value and remains 128
Why is this?

user37622: Don't ever use a global variable for for loop.
You use the same variable in functions for loops which count down to zero. If lp is zero for loop in loop() ends and new loop() starts.

user313: When I ran your code as you presented it in the chat, lp stayed at 128. When I commented-out the "light_L1()" call in "runfor()", lp decremented by 1/2 its value per step as you would expect. The issue is that lp is global and therefore, accessible by any other function. One of your lower functions is resetting it. 

48967: <p>This is a pseudo code from my LED cube project</p>

<pre><code>void loop(){
  //switch( map(constrain(analogRead(pt),10,1020),10,1020,1,4));  - for select pattern
  //show(1);
 for(lp=128;lp&gt;=1;lp = lp/2){
  runfor(1000,lp,1,0,0,0,0);
  //Serial.println("HI");
 }
}

void runfor(short mills,byte a,byte b,byte c,byte d,byte e,byte f){
  timer = millis();
  Serial.println(a);
  while((millis()-timer)&lt;=mills){
    light_L1(a,b);
    //light_L2(c,d);
    //light_L3(e,f);
  }
}
</code></pre>

<p>the variable 'lp' here never changes its value and remains 128</p>

<p>Why is this?</p>
 37622: <p><strong>Don't ever use a global variable for <code>for</code> loop.</strong></p>

<p>You use the same variable in functions <code>for</code> loops which count down to zero. If <code>lp</code> is zero <code>for</code> loop in <code>loop()</code> ends and new <code>loop()</code> starts.</p>
 313: <p>When I ran your code as you presented it in the chat, lp stayed at 128. When I commented-out the "light_L1()" call in "runfor()", lp decremented by 1/2 its value per step as you would expect. The issue is that lp is global and therefore, accessible by any other function. One of your lower functions is resetting it. </p>
