From: Jan Michel Date: Tue, 16 Jul 2013 13:25:40 +0000 (+0200) Subject: new supported power supply: Instek PST X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=6b832abdc8a240cd2b574ef50c3d901fc8b5c521;p=daqtools.git new supported power supply: Instek PST --- diff --git a/web/htdocs/tools/pwr/build_index.pl b/web/htdocs/tools/pwr/build_index.pl index efcfa57..76327bb 100755 --- a/web/htdocs/tools/pwr/build_index.pl +++ b/web/htdocs/tools/pwr/build_index.pl @@ -25,7 +25,7 @@ print < diff --git a/web/htdocs/tools/pwr/index.html b/web/htdocs/tools/pwr/index.html index 07390e9..b7cf2cc 100644 --- a/web/htdocs/tools/pwr/index.html +++ b/web/htdocs/tools/pwr/index.html @@ -3,7 +3,7 @@ - + Access all POWER! diff --git a/web/htdocs/tools/pwr/pwr.conf b/web/htdocs/tools/pwr/pwr.conf index e23ad05..b0c2d96 100644 --- a/web/htdocs/tools/pwr/pwr.conf +++ b/web/htdocs/tools/pwr/pwr.conf @@ -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 diff --git a/web/htdocs/tools/pwr/pwr_hmp.htm b/web/htdocs/tools/pwr/pwr_hmp.htm index 381795b..777d2d1 100644 --- a/web/htdocs/tools/pwr/pwr_hmp.htm +++ b/web/htdocs/tools/pwr/pwr_hmp.htm @@ -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 { diff --git a/web/htdocs/tools/vxi/vxi.pl b/web/htdocs/tools/vxi/vxi.pl index 9eb723c..56b688f 100755 --- a/web/htdocs/tools/vxi/vxi.pl +++ b/web/htdocs/tools/vxi/vxi.pl @@ -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);