Browse Source

updated PS HV display

Thomas Thuemmler 1 month ago
parent
commit
8a3c2a53e8
1 changed files with 3 additions and 4 deletions
  1. 3 4
      SDS_status_main.php

+ 3 - 4
SDS_status_main.php

@@ -783,9 +783,8 @@ if (($MSmode == 5) or ($MSmode == 4))
         $gain = 1.0;
         $value = ($Kal2_value - $offset) * $gain * $factor_m;
         //        $voltage_error = abs($value * 2e-3);
-        $voltage_error = abs($value * 75 * 10e-6);
-        //if ($voltage_error*100 < 1) { $voltage_error = 0.2; }
-        if ($voltage_error*100 < 0.02) { $voltage_error = 0.02; }
+        $voltage_error = abs($value * 75 * 1e-6);
+        if ($voltage_error < 0.1) { $voltage_error = 0.1; }
         
         // voltage display
         $link = $Kal2_link;
@@ -795,7 +794,7 @@ if (($MSmode == 5) or ($MSmode == 4))
         if ($Kal2_RunFlag > 0)
         {
           placeText(460, 135, $Kal2_text, 130, 2, $color); // Kal2 voltage reading
-          placeTextWithLink(440, 85, "U<sub>PS</sub> = ".sprintf('%.2F', $value ) . "(" . sprintf('%.0F', $voltage_error*100 ) .") V" , 230, 4, $color, $text, $link);
+          placeTextWithLink(440, 85, "U<sub>PS</sub> = ".sprintf('%.1F', $value ) . "(" . sprintf('%.0F', $voltage_error*10 ) .") V" , 230, 4, $color, $text, $link);
         }