Index: fact/FADctrl/FAD.cc
===================================================================
--- fact/FADctrl/FAD.cc	(revision 10757)
+++ fact/FADctrl/FAD.cc	(revision 10813)
@@ -656,5 +656,5 @@
 
 	// Other data
-	PrintMessage("Frequency %.2f GHz    Phase shift %d    PLL lock %d %d %d %d\n", S.Frequency, S.PhaseShift, S.Lock[0], S.Lock[1], S.Lock[2], S.Lock[3]);
+	PrintMessage("Frequency %.2f GHz (%s)    Phase shift %d    PLL lock %d %d %d %d\n", S.Frequency, S.RefClk_low ? "too low":"OK",  S.PhaseShift, S.Lock[0], S.Lock[1], S.Lock[2], S.Lock[3]);
 	PrintMessage("DENABLE %d   DWRITE %d   SPI_clk %d   DCM_lock %d   DCM_ready %d\n", S.denable, S.dwrite, S.spi_clk, S.DCM_lock, S.DCM_ready);	
 	PrintMessage("DAC %d %d %d %d   %d %d %d %d\n", S.DAC[0], S.DAC[1], S.DAC[2], S.DAC[3], S.DAC[4], S.DAC[5], S.DAC[6], S.DAC[7] );
@@ -1121,8 +1121,8 @@
   
   // Print to console
-  if (Text[strlen(Text)-1] == '\n') printf("\r");		// Overwrite prompt
+  //if (Text[strlen(Text)-1] == '\n') printf("\r");		// Overwrite prompt
   printf("%s", Text);
   fflush(stdout);
-  if (Text[strlen(Text)-1]=='\n') rl_on_new_line();		// New prompt
+  if (Text[strlen(Text)-1] == '\n') rl_on_new_line();
 
   // Send to DIM text service
Index: fact/FADctrl/FADBoard.cc
===================================================================
--- fact/FADctrl/FADBoard.cc	(revision 10757)
+++ fact/FADctrl/FADBoard.cc	(revision 10813)
@@ -508,7 +508,8 @@
 	  Status.denable = (bool) ( ntohs(Header->PLLLCK) & (1<<11) );
 	  Status.dwrite = (bool) ( ntohs(Header->PLLLCK) & (1<<10) );
-	  Status.DCM_lock = (bool) ( ntohs(Header->PLLLCK) & (1<<9) );
-	  Status.DCM_ready = (bool) ( ntohs(Header->PLLLCK) & (1<<8) );
-	  Status.spi_clk = (bool) ( ntohs(Header->PLLLCK) & (1<<7) );
+	  Status.DCM_lock = (bool) ( ntohs(Header->PLLLCK) & (1<<7) );
+	  Status.DCM_ready = (bool) ( ntohs(Header->PLLLCK) & (1<<6) );
+	  Status.spi_clk = (bool) ( ntohs(Header->PLLLCK) & (1<<5) );
+	  Status.RefClk_low = (bool) ( ntohs(Header->PLLLCK) & (1<<8) );
 
 	  // Extract temperatures (MSB indicates if temperature is positive or negative)
Index: fact/FADctrl/FADBoard.h
===================================================================
--- fact/FADctrl/FADBoard.h	(revision 10757)
+++ fact/FADctrl/FADBoard.h	(revision 10813)
@@ -67,5 +67,6 @@
 	  bool DCM_ready;
 	  bool spi_clk;
-
+	  bool RefClk_low;
+	  
 	  uint16_t ROI[NChips][NChannels];
 	  uint16_t DAC[NDAC];
Index: fact/FADctrl/FADctrl.cc
===================================================================
--- fact/FADctrl/FADctrl.cc	(revision 10757)
+++ fact/FADctrl/FADctrl.cc	(revision 10813)
@@ -42,6 +42,6 @@
 
   while (!M.ExitRequest) {
-    Command = readline("\rFADctrl> ");
-
+    Command = readline("FADctrl> ");
+	
 	// Check for interruption by signal
     if (Command == NULL) continue;
Index: fact/FADctrl/History.txt
===================================================================
--- fact/FADctrl/History.txt	(revision 10757)
+++ fact/FADctrl/History.txt	(revision 10813)
@@ -29,2 +29,3 @@
 			Added cleanup handler to thread in FADBoard class to ensure mutex is unlocked when thread
 			cancelled
+25/5/2011	dcm_lock and dcm_ready bits were incorrectly evaluated.
