]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
new supported power supply: Instek PST
authorJan Michel <j.michel@gsi.de>
Tue, 16 Jul 2013 13:25:40 +0000 (15:25 +0200)
committerJan Michel <j.michel@gsi.de>
Tue, 16 Jul 2013 13:25:40 +0000 (15:25 +0200)
web/htdocs/tools/pwr/build_index.pl
web/htdocs/tools/pwr/index.html
web/htdocs/tools/pwr/pwr.conf
web/htdocs/tools/pwr/pwr_hmp.htm
web/htdocs/tools/vxi/vxi.pl

index efcfa575eb402c739dbb300d05113ad806abc8eb..76327bb2eea981cc0cd7b5b1401e60f27bb06e24 100755 (executable)
@@ -25,7 +25,7 @@ print <<EOF;
 EOF
 }
 
-if($type =~ /HMP/) {
+if($type =~ /HMP/ or $type =~ /PST/) {
 print <<EOF;
 <p>
 <iframe name="inlineframe" src="pwr_hmp.htm?device=$ser_dev&id=$dev_id&type=$type&channels=$channels&speed=$speed" frameborder="0" scrolling="auto" width="800" height="340" ></iframe>
index 07390e963024eb4452031e8e0042d34502971e46..b7cf2cc0b228c46f4f58926df4c780b8cc22e7d4 100644 (file)
@@ -3,7 +3,7 @@
        <html>
          <head>
          <link href="../../layout/styles.css" rel="stylesheet" type="text/css"/>
-<script src="scripts.js" type="text/javascript"></script>
+<script src="../scripts.js" type="text/javascript"></script>
          <title>Access all POWER!</title>
 
          </head>
index e23ad0558e5283af11dfeac5b82a9b7b30544519..b0c2d9664d5cf511c4c9642fa7465ecfcd1137fc 100644 (file)
@@ -1,4 +1,5 @@
 //PWRSPLY:/path/to/device:speed:Name:Type:Channels
-//type can be HMP, PSP
+//type can be HMP, PSP, PST
 PWRSPLY:/dev/ttyUSB0:38400:HMP4030:HMP:3
-PWRSPLY:/dev/ttyUSB1:2400:PSP-405:PSP:1
\ No newline at end of file
+PWRSPLY:/dev/ttyUSB1:2400:PSP-405:PSP:1
+PWRSPLY:/dev/ttyUSB0:9600:PST3202:PST:3
index 381795b5ed454417a7dab941ac6abfba99d56c77..777d2d1f7c03f5b913de34b0e31fd6fb67f580cb 100644 (file)
@@ -73,6 +73,7 @@ function set_v(chan) {
        var value = parseFloat(document.getElementById("form_v"+chan).value);
        var command;
   if(type=="HMP") command = "INST OUT"+chan+"&VOLT "+value.toFixed(3);
+  if(type=="PST") command = ":CHAN"+chan+":VOLT "+value.toFixed(3);
        new_commands.push(command);
   forceShowReadings = 1;
 }
@@ -82,6 +83,7 @@ function set_v_lim(chan) {
        var value = parseInt(document.getElementById("form_v_lim"+chan).value);
        var command;
   if(type=="HMP") command = "INST OUT"+chan+"&VOLT:PROT "+value.toFixed(3);
+  if(type=="PST") command = ":CHAN"+chan+":PROT:VOLT "+value.toFixed(3);
        new_commands.push(command);
   forceShowReadings = 1;
 }
@@ -91,6 +93,7 @@ function set_c_lim(chan) {
        var value = parseFloat(document.getElementById("form_c_lim"+chan).value);
        var command;
   if(type=="HMP") command = "INST OUT"+chan+"&CURR "+value.toFixed(3);
+  if(type=="PST") command = ":CHAN"+chan+":PROT:CURR "+value.toFixed(3);
        new_commands.push(command);
   forceShowReadings = 1;
 }
@@ -98,12 +101,14 @@ function set_c_lim(chan) {
 function turn_on(chan) {
   if (chan > channels) return;
        if(type=="HMP") new_commands.push("INST OUT"+chan+"&OUTP ON");
+  if(type=="PST") command = ":OUTP:STAT 1";
   forceShowReadings = 1;
 }
 
 function turn_off(chan) {
   if (chan > channels) return;
   if(type=="HMP") new_commands.push("INST OUT"+chan+"&OUTP OFF");
+  if(type=="PST") command = ":OUTP:STAT 0";
   forceShowReadings = 1;
 }
 
@@ -142,16 +147,29 @@ function communication() {
     }
   else if(readSettingsRequest == 1) {
     readSettingsRequest = 0;
-    cmds = "&SYST:MIX&%2AIDN%3F";
-    for(i=1;i<=channels;i++)
-      cmds +="&INST OUT"+i+"&SOUR:VOLT%3F&SOUR:CURR%3F&VOLT:PROT%3F";
+    if(type=="HMP") {
+      cmds = "&SYST:MIX&%2AIDN%3F";
+      for(i=1;i<=channels;i++)
+        cmds +="&INST OUT"+i+"&SOUR:VOLT%3F&SOUR:CURR%3F&VOLT:PROT%3F";
+      }
+    if(type=="PST") {
+      cmd="%2AIDN%3F";
+      for(i=1;i<=channels;i++)
+        cmds +="&:CHAN"+i+":VOLT%3F&:CHAN"+i+":CURR%3F&:CHAN"+i+":PROT:VOLT%3F";
+      }
     getdata('pwr.pl?'+ser_dev+'&'+type+"&"+speed+cmds,updatesettings);
     }
   else if(document.getElementById("showreadings").checked || forceShowReadings) {
     forceShowReadings = 0;
     cmds = "";
-    for(i=1;i<=channels;i++)
-      cmds +="&INST OUT"+i+"&MEAS:VOLT%3F&MEAS:CURR%3F&OUTP:STAT%3F";
+    if(type=="HMP") {    
+      for(i=1;i<=channels;i++)
+        cmds +="&INST OUT"+i+"&MEAS:VOLT%3F&MEAS:CURR%3F&OUTP:STAT%3F";
+      }
+    if(type=="PST") {    
+      for(i=1;i<=channels;i++)
+        cmds +="&:CHAN"+i+":MEAS:VOLT%3F&:CHAN"+i+":MEAS:CURR%3F&OUTP:STAT%3F";
+      }
     getdata('pwr.pl?'+ser_dev+'&'+type+"&"+speed+cmds,updatereads);
     }
   else {
index 9eb723c8dbffd0d108df7718bdc7afa761cfb00b..56b688fda6425d3c3c02dbb7f3a3106cd18f11d1 100755 (executable)
@@ -12,10 +12,7 @@ if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
   $executable = "htdocs/tools/vxi/vxi11_cmd";
   }
 
-my $envstring = $ENV{'QUERY_STRING'};
-$envstring =~ s/%20/ /g;
-
-my @new_command = split('&',$envstring); 
+my @new_command = split('&',$ENV{'QUERY_STRING'}); 
 my $dev_ip = shift(@new_command);
 my $cmds   = shift(@new_command);