From: Jan Michel Date: Thu, 27 Oct 2022 18:45:00 +0000 (+0200) Subject: add support for Rigol DP932 power supply X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=49589e41fb05bea4c6078f6dd01a113393402c0e;p=labtools.git add support for Rigol DP932 power supply --- diff --git a/powersupplies/web/htdocs/build_index.pl b/powersupplies/web/htdocs/build_index.pl index 4151fea..4072592 100755 --- a/powersupplies/web/htdocs/build_index.pl +++ b/powersupplies/web/htdocs/build_index.pl @@ -39,7 +39,7 @@ print <Power Supply $dev_id [connected to $ser_dev] diff --git a/powersupplies/web/htdocs/pwr.conf b/powersupplies/web/htdocs/pwr.conf index bb515a2..1a53612 100644 --- a/powersupplies/web/htdocs/pwr.conf +++ b/powersupplies/web/htdocs/pwr.conf @@ -1,5 +1,5 @@ //PWRSPLY:/path/to/device:speed:Name:Type:Channels -//type can be HMP, HMC, PSP, PST +//type can be HMP, HMC, PSP, PST, KA3000 //PWRSPLY:/dev/ttyUSB0:9600:PST3202:PST:3 //PWRSPLY:/dev/ttyUSB0:115200:HMP4030:HMP:3 @@ -11,7 +11,14 @@ //PWRSPLY:/dev/TRB3_Power48_00002:0:Rack48:PWRSW:4:Desk::: PWRSPLY:/dev/FTDI_FT232R_USB_UART_AH02HFZW:2400:PSP2010:PSP:1 -PWRSPLY:/dev/FTDI_Xmatter_TTL_ALR1AJS:57600:Desk:PWRSW:6:TestAdrian:Pulser:::TrgDistr:ADC -PWRSPLY:/dev/HAMEG_HO732_VCP023842636:0:HMP4040:HMP:4 -PWRSPLY:IP192.168.0.56:5050:HMP4040 DiRich:HMP:4:LP1:LP2:LP3:DCDC +PWRSPLY:/dev/FTDI_Xmatter_TTL_ALR1AJS:57600:Desk:PWRSW:4:::Trb160:TrgDistr +PWRSPLY:IP192.168.0.56:5050:HMP4040 OEP:HMP:4:MBO1:MBO2:Trb3sc:DCDC +PWRSPLY:IP192.168.0.57:5025:HMP4040 Trigger:HMP:4 +PWRSPLY:IP192.168.0.58:5025:HMP4040 MVD:HMP:4 PWRSPLY:IP192.168.0.139:5025:HMC8043:HMC:3::: +PWRSPLY:/dev/HAMEG_HAMEG_HO720_018442435:0:HMP4030_TRB:HMP:3:TRB:TRB: +PWRSPLY:/dev/Nuvoton_USB_Virtual_COM_A02014090305:9600:KA3000:KA3000:1 +PWRSPLY:SERhadaq@jspc76/dev/FTDI_FT232R_USB_UART_AH18PT33:2400:PSP405:PSP:1 + + +//PWRSPLY:/dev/HAMEG_HO732_VCP023842636:0:HMP4040:HMP:4 diff --git a/powersupplies/web/htdocs/pwr.pl b/powersupplies/web/htdocs/pwr.pl index 268fcc6..64f8e3e 100755 --- a/powersupplies/web/htdocs/pwr.pl +++ b/powersupplies/web/htdocs/pwr.pl @@ -83,10 +83,10 @@ else { print qx($cmd); } else { - print HMP_serial() if (($ser_type eq "HMP" or $ser_type eq "HMC") && $isIP == 0) or $ser_type eq "PST"; + print HMP_serial() if (($ser_type eq "HMP" or $ser_type eq "HMC" or $ser_type eq "DP") && $isIP == 0) or $ser_type eq "PST"; print PWRSW_serial() if $ser_type eq "PWRSW"; print KA3000_serial() if $ser_type eq "KA3000"; - print HMP_ethernet() if (($ser_type eq "HMP" or $ser_type eq "HMC") && $isIP == 1); + print HMP_ethernet() if (($ser_type eq "HMP" or $ser_type eq "HMC" or $ser_type eq "DP") && $isIP == 1); print PSP() if $ser_type eq 'PSP'; } diff --git a/powersupplies/web/htdocs/pwr_hmp.htm b/powersupplies/web/htdocs/pwr_hmp.htm index 639ccc8..be482bc 100644 --- a/powersupplies/web/htdocs/pwr_hmp.htm +++ b/powersupplies/web/htdocs/pwr_hmp.htm @@ -77,8 +77,10 @@ function set_v(chan) { if (chan > channels) return; var value = parseFloat(document.getElementById("form_v"+chan).value); var command; - if(type=="HMP" || type=="HMC") command = "INST OUT"+chan+"&VOLT "+value.toFixed(3); + if(type=="HMP" || type=="HMC") + command = "INST OUT"+chan+"&VOLT "+value.toFixed(3); if(type=="PST") command = ":CHAN"+chan+":VOLT "+value.toFixed(3); + if(type=="DP") command = ":SOUR"+chan+":VOLT "+value.toFixed(3); new_commands.push(command); forceShowReadings = 1; } @@ -90,6 +92,7 @@ function set_v_lim(chan) { if(type=="HMP") command = "INST OUT"+chan+"&VOLT:PROT "+value.toFixed(3); if(type=="HMC") command = "INST OUT"+chan+"&VOLT:PROT ON&VOLT:PROT:LEV "+value.toFixed(3); if(type=="PST") command = ":CHAN"+chan+":PROT:VOLT "+value.toFixed(3); + if(type=="DP") command = ":OUTP:OVP:VAL CH"+chan+","+value.toFixed(3); new_commands.push(command); forceShowReadings = 1; } @@ -98,8 +101,10 @@ function set_c_lim(chan) { if (chan > channels) return; var value = parseFloat(document.getElementById("form_c_lim"+chan).value); var command; - if(type=="HMP" || type=="HMC") command = "INST OUT"+chan+"&CURR "+value.toFixed(3); + if(type=="HMP" || type=="HMC") + command = "INST OUT"+chan+"&CURR "+value.toFixed(3); if(type=="PST") command = ":CHAN"+chan+":PROT:CURR "+value.toFixed(3); + if(type=="DP") command = ":OUTP:OCP:VAL CH"+chan+","+value.toFixed(3); new_commands.push(command); forceShowReadings = 1; } @@ -109,6 +114,7 @@ function turn_on(chan) { if(type=="HMP") new_commands.push("INST OUT"+chan+"&OUTP:SEL ON"); if(type=="HMC") new_commands.push("INST OUT"+chan+"&OUTP:CHAN ON"); if(type=="PST") new_commands.push(":OUTP:STAT ON"); + if(type=="DP") new_commands.push(":OUTP CH"+chan+",ON"); forceShowReadings = 1; } @@ -117,18 +123,21 @@ function turn_off(chan) { if(type=="HMP") new_commands.push("INST OUT"+chan+"&OUTP:SEL OFF"); if(type=="HMC") new_commands.push("INST OUT"+chan+"&OUTP:CHAN OFF"); if(type=="PST") new_commands.push(":OUTP:STAT OFF"); + if(type=="DP") new_commands.push(":OUTP CH"+chan+",OFF"); forceShowReadings = 1; } function globalOn() { if(type=="HMP") new_commands.push("OUTP:GEN ON"); if(type=="HMC") new_commands.push("OUTP:MAST ON"); + if(type=="DP") new_commands.push(":OUTP ALL,ON"); forceShowReadings = 1; } function globalOff() { if(type=="HMP") new_commands.push("OUTP:GEN OFF"); if(type=="HMC") new_commands.push("OUTP:MAST OFF"); + if(type=="DP") new_commands.push(":OUTP ALL,OFF"); forceShowReadings = 1; } @@ -140,11 +149,13 @@ function update(data) { function updatereads(data) { var e = data.split("&"); document.getElementById("info").innerHTML = e.shift(); - document.getElementById("master").style.background=(e.shift()=='1')?"limegreen":"#C00"; + if(type!="DP") + document.getElementById("master").style.background=(e.shift()=='1')?"limegreen":"#C00"; for(i=0;i