From db7abaeca5dca11cc2cfc7d0d855149f0c3648e0 Mon Sep 17 00:00:00 2001
From: Jan Michel <michel@physik.uni-frankfurt.de>
Date: Fri, 28 Oct 2022 16:38:22 +0200
Subject: [PATCH] fix command for current limit (not overcurrent protection)

---
 powersupplies/web/htdocs/pwr_hmp.htm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/powersupplies/web/htdocs/pwr_hmp.htm b/powersupplies/web/htdocs/pwr_hmp.htm
index be482bc..9bee35a 100644
--- a/powersupplies/web/htdocs/pwr_hmp.htm
+++ b/powersupplies/web/htdocs/pwr_hmp.htm
@@ -104,7 +104,7 @@ function set_c_lim(chan) {
   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);
+  if(type=="DP")  command = ":SOUR"+chan+":CURR "+value.toFixed(3);
 	new_commands.push(command);
   forceShowReadings = 1;
 }
@@ -199,7 +199,7 @@ function communication() {
     if(type=="DP") {
       cmds="&%2AIDN%3F";
       for(i=1;i<=channels;i++)
-        cmds += "&:SOUR"+i+":VOLT%3F&:OUTP:OCP:VAL%3F CH"+i+"&:OUTP:OVP:VAL%3F CH"+i;
+        cmds += "&:SOUR"+i+":VOLT%3F&:SOUR"+i+":CURR%3F&:OUTP:OVP:VAL%3F CH"+i;
       }
     getdata('pwr.pl?'+ser_dev+'&'+type+"&"+speed+cmds,updatesettings);
     }
-- 
2.43.0