Index: hvcontrol/src/HV.cc
===================================================================
--- hvcontrol/src/HV.cc	(revision 161)
+++ hvcontrol/src/HV.cc	(revision 183)
@@ -30,11 +30,8 @@
   Name = new DimService (Buffer, BoardName);
 
-  for (int i=0; i<NUM_CHAINS; i++) {
-    for (int j=0; j<NUM_CHANNELS; j++) {
-      snprintf(Buffer, sizeof(Buffer), SERVER_NAME"/VOLT/ID%.2d/%.2d-%.3d", BoardNumber, i, j);
-      BiasVolt[i][j] = new DimService (Buffer, HVV[i][j]);
-    }
-    Overcurrent[i] = false;
-  }
+  snprintf(Buffer, sizeof(Buffer), SERVER_NAME"/VOLT/ID%.2d", BoardNumber);
+  BiasVolt = new DimService (Buffer, "D", HVV, NUM_CHAINS*NUM_CHANNELS*sizeof(double));
+
+  for (int i=0; i<NUM_CHAINS; i++) Overcurrent[i] = false;
   ResetButton = false;
   WrapOK = true;
@@ -87,9 +84,5 @@
 
   delete Name;
-  for (int i=0; i<NUM_CHAINS; i++) {
-    for (int j=0; j<NUM_CHANNELS; j++) {
-      delete BiasVolt[i][j];
-    }
-  }
+  delete BiasVolt;
 }
 
@@ -202,10 +195,9 @@
     for (int k=0; k<NUM_CHANNELS; k++){
       HV[j][k] = 0;
-      HVV[j][k] = 0.0;
-      
-      // Update DIM services
-      BiasVolt[j][k]->updateService();
+      HVV[j][k] = 0.0;      
     }
   }
+  // Update DIM services
+  BiasVolt->updateService();
 }
 
Index: hvcontrol/src/HV.h
===================================================================
--- hvcontrol/src/HV.h	(revision 161)
+++ hvcontrol/src/HV.h	(revision 183)
@@ -55,5 +55,5 @@
 
    DimService *Name;
-   DimService *BiasVolt[NUM_CHAINS][NUM_CHANNELS];
+   DimService *BiasVolt;
 
    void ClearVoltageArrays();
Index: hvcontrol/src/ProcessIO.cc
===================================================================
--- hvcontrol/src/ProcessIO.cc	(revision 161)
+++ hvcontrol/src/ProcessIO.cc	(revision 183)
@@ -14,6 +14,5 @@
 static char* state_str[]    = {"active", "stopped", "n.a."};
 
-
-ProcessIO::ProcessIO(const char *ConfigFile): 
+ProcessIO::ProcessIO(): 
     	    DimCommand((char *) SERVER_NAME"/Command", (char *) "C"),
     	    EvidenceServer(SERVER_NAME) {
@@ -24,10 +23,9 @@
   // Create DIM text output service
   Textout = new DimService (SERVER_NAME"/Textout", (char *) "");
+  UpdateDelay = 0.0;
 
   // Initialize status variables
   state     = active;
   Exit      = false;
-  CmdFromSocket = false;
-  Socket    = -1;
   
   NumHVBoards = 0;
@@ -38,14 +36,13 @@
 
   // Get configuration data
-  char *Boards = GetConfig(SERVER_NAME " Boards");
-  fPixMapTable = GetConfig(SERVER_NAME " PixMapTable");
-  fTimeOut = atof(GetConfig(SERVER_NAME " TimeOut"));
-  fStatusRefreshRate = atof(GetConfig(SERVER_NAME " StatusRefreshRate"));
-  fCCPort = atoi(GetConfig(SERVER_NAME " CCPort"));
-  DACMin = atoi(GetConfig(SERVER_NAME " DACMin"));
-  DACMax = atoi(GetConfig(SERVER_NAME " DACMax"));
-  fHVCalibOffset = atof(GetConfig(SERVER_NAME " HVCalibOffset"));
-  fHVCalibSlope = atof(GetConfig(SERVER_NAME " HVCalibSlope"));
-  fHVMaxDiff = atoi(GetConfig(SERVER_NAME " HVMaxDiff"));
+  char *Boards = GetConfig("Boards");
+  fPixMapTable = GetConfig("PixMapTable");
+  fTimeOut = atof(GetConfig("TimeOut"));
+  fStatusRefreshRate = atof(GetConfig("StatusRefreshRate"));
+  DACMin = atoi(GetConfig("DACMin"));
+  DACMax = atoi(GetConfig("DACMax"));
+  fHVCalibOffset = atof(GetConfig("HVCalibOffset"));
+  fHVCalibSlope = atof(GetConfig("HVCalibSlope"));
+  fHVMaxDiff = atoi(GetConfig("HVMaxDiff"));
 
   if (fStatusRefreshRate < MIN_RATE || fStatusRefreshRate > MAX_RATE)  fStatusRefreshRate = 1;
@@ -164,5 +161,4 @@
     PrintMessage( " TimeOut:           %.2f s\n"
     	    	  " StatusRefreshRate: %.2f Hz\n"
-    	    	  " CCPort:            %d\n"
     	    	  " DACMin value:      %d\n"
     	    	  " DACMax value:      %d\n"
@@ -170,5 +166,5 @@
     	    	  " HVCalibSlope :     %f\n"
     	    	  " HVMaxDiff :        %u\n", fTimeOut,
-		  fStatusRefreshRate, fCCPort, DACMin,
+		  fStatusRefreshRate, DACMin,
 		  DACMax, fHVCalibOffset, fHVCalibSlope,
 		  fHVMaxDiff);
@@ -182,6 +178,5 @@
     PrintMessage(" board <i>|<i> <j>|<all>           Address board i, boards i-j or all boards or list boards\n"
     	" chain <i>|<i> <j>|<all>           Address chain i, chains i-j or all chains\n"
-    	" hv <PXL id>|<ch>|<all> <v>        Set bias of pixel ID, ch. or all ch. of active chain(s)/board(s)\n"
-    	" hvdiff <PXL id>|<ch>|<all> <diff> Change bias by <diff>\n"
+    	" hv <PXL id>|<ch>|<all> <v>        Set/change bias of pixel, ch. or all ch. of active chain(s)/board(s)\n"
 		" status [dac]                      Show status information (DAC values if requested)\n"
 		" config                            Print configuration\n"
@@ -204,5 +199,5 @@
   // Set new bias voltage (if no boards available, simply returns OK)
   // First reponse to socket should be 'OK' if no error occurred.
-  if (Match(Param[0], "hv") || Match(Param[0], "hvdiff")) {
+  if (Match(Param[0], "hv")) {
 
     int hvoltage, DACValue, Errors=0, Board=-1, Chain=-1, Channel=-1;
@@ -212,5 +207,5 @@
     // Need two or parameters
     if (NParam<3 || NParam>4) {
-      PrintMessage("Usage: hv/hvdiff <channel>|<all> <voltage> [dac]\n");
+      PrintMessage("Usage: hv <channel>|<all> <voltage> [dac]\n");
       return;
     }
@@ -250,15 +245,15 @@
 	  if (k!=Channel && Channel!=-1) continue;
 
-	  // hvdiff is ignored if DAC value is zero
-	  if ((strlen(Param[0])>2 || isdigit(*Param[2])==0) && (fHVBoard[i]->HV[j][k] == 0)) continue;
+	  // Voltage change ignored if DAC value is zero
+	  if (isdigit(*Param[2])==0 && fHVBoard[i]->HV[j][k] == 0) continue;
 
 	  // Determine new DAC values
 	  if (!SetDac){
-		if (strlen(Param[0])>2 || isdigit(*Param[2])==0) fHVBoard[i]->HVV[j][k] += hvoltageV; // hvdiff
+		if (isdigit(*Param[2])==0) fHVBoard[i]->HVV[j][k] += hvoltageV; // voltage change
 	    else fHVBoard[i]->HVV[j][k] = hvoltageV;
 	    DACValue = calib->HVToDAC(fHVBoard[i]->HVV[j][k], i, j, k);
 	  }
 	  else {
-	    if(strlen(Param[0])>2 || isdigit(*Param[2])==0) DACValue = fHVBoard[i]->HV[j][k] + hvoltage; // hvdiff
+	    if (isdigit(*Param[2])==0) DACValue = fHVBoard[i]->HV[j][k] + hvoltage; // voltage change
 	    else DACValue = hvoltage;
 	  }
@@ -269,12 +264,11 @@
 
       // Update DIM services
-      fHVBoard[i]->BiasVolt[j][k]->updateService();
-
+      //fHVBoard[i]->BiasVolt[j][k]->updateService();
+	  UpdateDelay = 1.0;
 	} // Channels	
     } // Chains
     } // Boards
 
-    if (Errors > 0) PrintMessage("ERROR - Errors on %d channel(s) occurred\n", Errors);
-    else PrintMessage("OK - no errors\n");
+    if (Errors > 0) PrintMessage("Errors on %d channel(s) occurred\n", Errors);
     
     return;
@@ -318,6 +312,6 @@
 
 	    // Update DIM services
-    	    fHVBoard[Board]->BiasVolt[Chain][Channel]->updateService();
-
+    	    //fHVBoard[Board]->BiasVolt[Chain][Channel]->updateService();
+		UpdateDelay = 1.0;
 	    if(++Channel == NUM_CHANNELS) {
 	      Chain++;
@@ -440,5 +434,4 @@
     PrintMessage("\n Status monitor: %s\n", state_str[state]);
     PrintMessage(" Status refresh rate [Hz]: %.2f\n", fStatusRefreshRate);
-    PrintMessage(" Socket state: %s\n", Socket==-1 ? "disconnected":"connected");
     PrintMessage(" Total number of boards: %d\n", NumHVBoards);
     PrintMessage(" Active boards: %d\n\n", LastBoard - FirstBoard + 1);
@@ -519,13 +512,6 @@
   else if(Match(Param[0], "exit")) {
 
-    if (CmdFromSocket) {
-      PrintMessage("Exit command not allowed over socket.\n");
-      return;
-    }  	
-
     Exit = true;
-    pthread_kill(HVMonitor, SIGUSR1);
-    pthread_kill(SocketThread, SIGUSR1);
- 
+    pthread_kill(HVMonitor, SIGUSR1); 
     return;
   }
@@ -549,6 +535,5 @@
   va_list ArgumentPointer;
   va_start(ArgumentPointer, Format);
-  if (CmdFromSocket) DoPrintMessage(Format, ArgumentPointer, Client);
-  else DoPrintMessage(Format, ArgumentPointer, Console);
+  DoPrintMessage(Format, ArgumentPointer, Console);
   va_end(ArgumentPointer);
 }
@@ -575,17 +560,12 @@
   Textout->updateService(Textbuffer); 
 
-  // Print to socket
-  if((Target & Client) && Socket!=-1) {
-    write(Socket, Textbuffer, strlen(Textbuffer));
-  }
-
   // Send to log
   if(Target & Log) {
     char *Buf;
     if (asprintf(&Buf, "%s %s", SERVER_NAME, Textbuffer) != -1) { 
-      DimClient::sendCommand("DColl/Log", Buf);
+      DimClient::sendCommandNB("DColl/Log", Buf);
       free(Buf);
     }
-    else DimClient::sendCommand("DColl/Log", SERVER_NAME" asprintf() failed"); 
+    else DimClient::sendCommandNB("DColl/Log", SERVER_NAME" asprintf() failed"); 
   }
 }
@@ -648,5 +628,11 @@
       }
     }
-    
+  }
+
+  if (UpdateDelay >= 0) {
+	UpdateDelay -= 1.0/(NumHVBoards*fStatusRefreshRate);
+	if (UpdateDelay <= 0) for (int i=0; i<NumHVBoards; i++) {
+	  fHVBoard[i]->BiasVolt->updateService();
+	}
   }
 }
@@ -700,12 +686,8 @@
 
 //
-// Command handling (the only command is 'BIAS/Command')
+// Command handling (the only command is 'Bias/Command')
 //
 void ProcessIO::commandHandler() {
 
-    // Log command
-    PrintMessage(Log, "DIM> %s\n", getString());
-
-    // Process command     
     pthread_mutex_lock(&control_mutex);
     CommandControl(getString());
Index: hvcontrol/src/ProcessIO.h
===================================================================
--- hvcontrol/src/ProcessIO.h	(revision 161)
+++ hvcontrol/src/ProcessIO.h	(revision 183)
@@ -28,5 +28,5 @@
 #define MAX_NUM_TOKEN 10
 
-enum MsgTarget {Console=1, Log=2, Client=4, All=7};
+enum MsgTarget {Console=1, Log=2, All=7};
 typedef enum stateenum {active, stopped, na} state_enum;
 
@@ -36,10 +36,10 @@
   PixelMap *pm;
   DimService *Textout;
-  
+  float UpdateDelay;
+
   void commandHandler();
 
  public:
-  
-  //HVConfig    *config;
+
   HVCalib     *calib;
   HVBoard **fHVBoard;
@@ -50,5 +50,4 @@
   const char *Param[MAX_NUM_TOKEN]; // For parser
   int NParam;
-  bool CmdFromSocket;
 
   // Configuration data
@@ -56,5 +55,4 @@
   float fTimeOut;
   float fStatusRefreshRate;
-  int fCCPort;
   int DACMin;
   int DACMax;
@@ -65,8 +63,5 @@
   // Status variables  
   pthread_t HVMonitor;       // exit function sends signal to these threads
-  pthread_t SocketThread;
   
-  int Socket;                // -1 if not connected
-
   int NumHVBoards;
   int FirstBoard;
@@ -79,5 +74,5 @@
     
   // Methods
-  ProcessIO(const char *);
+  ProcessIO();
   ~ProcessIO();
 
