Index: trunk/FACT++/scripts/handleDriveArmed.js
===================================================================
--- trunk/FACT++/scripts/handleDriveArmed.js	(revision 18369)
+++ trunk/FACT++/scripts/handleDriveArmed.js	(revision 18370)
@@ -16,18 +16,21 @@
     {
     case "Disconnected":
+        console.out("Drivectrl in 'Disconnected'... sending RECONNECT... waiting for 'Initialized'.");
+        dim.send("DRIVE_CONTROL/RECONNECT");
+        return "Initialized";
+
     case "Connected":
-    case "Ready":
+    case "Parking":
+    case "Stopping":
+    case "Armed":
+    case "Blocked":
         v8.sleep(1000);
         return undefined;
 
     case "Locked":
-        //console.warn("Drive is LOCKED. Not all observation types will be supported.");
         console.out("WARNING - Drive is LOCKED. Please unlock manually.");
+        // Do NOT unlock the drive here... it is a safety feature which should
+        // never be used in an auotmatic process otherwise it is not realiable!
         return "";
-        //throw new Error("Drive is LOCKED. Please unlock manually.");
-        //return undefined;
-        //dim.log("Drive in Locked... unlock.");
-        //dim.send("DRIVE_CONTROL/UNLOCK");
-        //return "Armed";
 
     case "Moving":
@@ -38,12 +41,10 @@
         return "Armed";
 
-    case "NotReady":
     case "ERROR":
-        console.out("Drive in '"+state.name+"'... sending STOP.");
+        console.out("Drive in '"+state.name+"'... sending STOP... waiting for 'Initialized'");
         dim.send("DRIVE_CONTROL/STOP");
-        dim.wait("DRIVE_CONTROL", "Armed", 60000);
-        return undefined;  // Process that again if necessary
+        return "Initialized";  // Process that again if necessary
 
-    case "Armed":
+    case "Initialized":
         return "";
     }
