Index: tools/vchvtest/vchvtest.cc
===================================================================
--- tools/vchvtest/vchvtest.cc	(revision 200)
+++ tools/vchvtest/vchvtest.cc	(revision 201)
@@ -37,4 +37,5 @@
 void cmd_help();	void cmd_repeat();
 void cmd_config();	void cmd_rate();
+void cmd_test();
 
 int ParseInput(char*, const char *Param[]);
@@ -63,4 +64,5 @@
    {"rate", &cmd_rate, 1, "<n>", "Make n 'rd 0 0' cycles and measure time", false},
    {"repeat", &cmd_repeat, 1, "<on|off>", "Command repetition (ENTER to stop)", false},
+   {"test", &cmd_test, 1, "<Voltage>", "Set all channels consecutively", false},   
    {"exit", &cmd_exit, 0, "", "Exit program", false},
    {"help", &cmd_help, 0, "", "Print help", false}};
@@ -221,4 +223,28 @@
 }
 
+// Switch on all channels consecutively for cabling test 
+void cmd_test() {
+
+  for (int i=FirstCrate; i<=LastCrate; i++) {
+    printf("Testing board %d  (Enter to continue, any key plus enter to stop)\n", fHVBoard[i]->BoardNumber);
+    if (fHVBoard[i]->GlobalSet(0) != 1) {
+      printf("Error: Could not global set board to zero\n");
+	  return;
+    }    
+
+	for (int k=0; k<MAX_NUM_BOARDS; k++) for (int j=0; j<NUM_CHANNELS; j++) {
+	  printf("\rBoard %d, channel %d", k, j);
+	  fflush(stdout);
+	  Verbose = false;
+	  if (fHVBoard[i]->ChannelSet(k, j, atoi(Param[1])) != 1) {
+        printf("Error setting voltage\n");
+		return;
+	  }
+	  Verbose = true;
+	  if (getchar() != '\n') return; 
+	}
+  } 
+}
+
 // Send bytes and wait for response
 void cmd_send() {
