Browse Source

added PS voltage readout

Thomas Thuemmler 3 months ago
parent
commit
0efc4c0ea0
1 changed files with 37 additions and 5 deletions
  1. 37 5
      SDS_status_main.php

+ 37 - 5
SDS_status_main.php

@@ -590,14 +590,20 @@ if (($MSmode == 5) or ($MSmode == 4))
         $K65_TS = $adeiValue[30][4];
         $K65_RunFlag = $adeiValue[30][5];
             
-	// Kal1 = JRL at PS vessel voltage
 	// Kal1 = DVM at IE Common voltage for SuperKrypton 2021
         $Kal1_value = $adeiValue[30][6];
         $Kal1_link = $adeiChannel[30][6];
         $Kal1_TS = $adeiValue[30][7];
         $Kal1_RunFlag = $adeiValue[30][8];
-	$Kal1_text = "DVM @ IE Common";
-	
+        $Kal1_text = "DVM @ IE Common";
+
+    // Kal2 = JRL at PS vessel voltage
+        $Kal2_value = $adeiValue[30][9];
+        $Kal2_link = $adeiChannel[30][9];
+        $Kal2_TS = $adeiValue[30][10];
+        $Kal2_RunFlag = $adeiValue[30][11];
+        $Kal2_text = "DVM @ PS";
+        
 	$time_conversion_factor = 2082844800;
         $most_recent_TS = max($K35_TS,$K65_TS,$Kal1_TS);
 	if (max($K35_RunFlag,$K65_RunFlag,$Kal1_RunFlag) > 0)
@@ -740,7 +746,7 @@ if (($MSmode == 5) or ($MSmode == 4))
 	      
 	//############# HV Monitoring Kal_U1 #################
 	
-	// voltage monitoring readout Kal1 e.g. JRL at PS
+	// voltage monitoring readout Kal1
 	// in 2021 used for IE Common monitoring
 	$color = "#000000";
 	//$factor_m = 5000.1021;
@@ -758,7 +764,7 @@ if (($MSmode == 5) or ($MSmode == 4))
 	// voltage display
 	$link = $Kal1_link;
 	//	$text = "JRL divider at Kal1 monitoring input 436-REU-0-0501-0001, precision voltage value";
-	$text = "DVM at IE Common, 436-REU-0-0401-001, precision voltage value";
+	$text = "DVM at IE Common, 436-REU-0-0401-0001, precision voltage value";
 	
 	if ($Kal1_RunFlag > 0)
 	{
@@ -767,6 +773,32 @@ if (($MSmode == 5) or ($MSmode == 4))
 	  placeTextWithLink(284, 765, "U<sub>IE</sub> = ".sprintf('%.3F', $value ) . "(" . sprintf('%.0F', $voltage_error*100 ) .") V" , 230, 4, $color, $text, $link);
 	}
       
+    //############# HV Monitoring Kal_U2 #################
+        
+    // voltage monitoring readout Kal2
+    // from 2024 on used for PS monitoring
+        $color = "#000000";
+        $factor_m = 1.0;
+        $offset = 0.0;
+        $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 display
+        $link = $Kal2_link;
+        //    $text = "JRL divider at Kal1 monitoring input 436-REU-0-0501-0001, precision voltage value";
+        $text = "DVM at PS IE, 436-REU-0-0101-0001, precision voltage value";
+        
+        if ($Kal2_RunFlag > 0)
+        {
+          placeText(440, 145, $Kal2_text, 130, 2, $color); // Kal2 voltage reading
+          placeTextWithLink(420, 95, "U<sub>PS</sub> = ".sprintf('%.3F', $value ) . "(" . sprintf('%.0F', $voltage_error*100 ) .") V" , 230, 4, $color, $text, $link);
+        }
+        
+        
 	// Post Regulation Current Monitor
 
 	$U_ist = abs($adeiValue[10][0]);