 //measured (1000 = 1mm)
 double tablexdistance = 180;    //in microns (158mm )
 double tableydistance = 200.0625;    //in microns (200mm)
-double tablezdistance = 69.2347;    //in microns (96mm)
+double tablezdistance = 70.0;    //in microns (96mm)
 double tableedistance = 1000.000;    //in microns (96mm)
 
 

  */

    ////////////////////////////////////////////////////////ZERO Z - UPDOWN
    while (digitalRead(zZeropin) != zZeroNC) {             
      stepperZdestPosition = stepperZdestPosition + 1;
      while (stepperZdistanceToGo() != 0) {
        stepperZrun();
      }
    }

    //top most is equal to tablezsteps
    stepperZcurrPosition = tablezsteps;
 
    //moves to zero (table surface)
    stepperZdestPosition = 0;      
    while (stepperZdistanceToGo() != 0) {

double stepperZdestPosition = 0;
double stepperZtimer = 0;
int    stepperZtoggle = 0;
double stepperZspeed = 2560;

int motorpinEstep = 28;
int motorpinEdir  = 29;
