Index: trunk/MagicSoft/Cosy/devdrv/macs.cc
===================================================================
--- trunk/MagicSoft/Cosy/devdrv/macs.cc	(revision 1953)
+++ trunk/MagicSoft/Cosy/devdrv/macs.cc	(revision 1959)
@@ -44,4 +44,6 @@
 void Macs::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv)
 {
+  // cout << "SdoRx: Idx=0x"<< hex << idx << "/" << (int)subidx;
+  // cout << ", val=0x" << val << endl;
     switch (idx)
     {
@@ -127,4 +129,5 @@
 void Macs::HandleSDOOK(WORD_t idx, BYTE_t subidx, timeval_t *tv)
 {
+//    cout << "Node #" << dec << (int)GetId() << ": Sdo=" << hex << idx  << "/" << (int)subidx << " set." << endl;
     switch (idx)
     {
@@ -201,5 +204,4 @@
 }
 
-
 void Macs::ReqVelRes()
 {
@@ -243,4 +245,6 @@
         SetZombie();
     }
+    if (IsZombieNode())
+        return;
 
     StopHostGuarding();
@@ -252,9 +256,6 @@
     RequestSDO(0x100a);
     WaitForSdo(0x100a);
-    if (IsZombieNode())
-        return;
-
     // FIXME! Not statically linked!
-    if (fSoftVersion<0x00000042) // 00.66
+    if (fSoftVersion<0x00000044) // 00.68
     {
         lout << GetNodeName() << " - Software Version too old!" << endl;
@@ -272,10 +273,4 @@
     WaitForSdo(0x3000);
 
-//    SetHome(250000);
-
-//    lout << "- Requesting SDO 0x2001 of " << (int)GetId() << endl;
-//    RequestSDO(0x2001);
-//    WaitForSdo(0x2001);
-
     SetPDO1On(FALSE); // this is a workaround for the Macs
     SetPDO1On(TRUE);
@@ -283,6 +278,6 @@
     SetNoWait(TRUE);
 
-    //    StartGuarding(500, 2);
-    //    StartHostGuarding();
+//    StartGuarding(250, 4);
+//    StartHostGuarding();
 }
 
@@ -301,4 +296,7 @@
 
     SetNoWait(FALSE);
+
+    StopHostGuarding();
+    StopGuarding();
 
     //
@@ -506,4 +504,10 @@
     switch (errnum)
     {
+    case 3:
+        lout << "Axis does not existing." << endl;
+        return;
+    case 5:
+        lout << "Error not cleared (while trying to move axis)" << endl;
+        return;
     case 6:
         //
@@ -515,13 +519,14 @@
         SetError(0);
         return;
-
     case 8:
         lout << "Control deviation overflow." << endl;
         return;
-
     case 9:
         lout << "Zero index not found." << endl;
         return;
-
+    case 10:
+        lout << "Unknown command, syntax error." << endl;
+        lout << "Please recompile and reload program." << endl;
+        return;
     case 11:
     case 25:
@@ -540,18 +545,60 @@
         {
         case 11:
-            lout << " software endswitch activated." << endl;
+            lout << " software";
             break;
         case 25:
-            lout << " hardware endswitch activated." << endl;
+            lout << " hardware";
             break;
         }
-        return;
-
+        lout << " endswitch activated." << endl;
+        return;
+    case 12:
+        lout << "Wrong parameter number used in SET command." << endl;
+        return;
+    case 14:
+        lout << " Too many LOOP calls." << endl;
+        return;
+    case 16:
+        lout << "Parameter in EEPROM broken (means: EEPROM broken, or saving not finished)" << endl;
+        lout << "Please use APOSS to 'Reset' the MACS and reload the parameters." << endl;
+        return;
+    case 17:
+        lout << "Program in EEPROM broken (means: EEPROM broken, or saving not finished)" << endl;
+        lout << "Please use APOSS to delete all Programs restore the programs." << endl;
+        return;
+    case 18:
+        lout << "Reset by CPU (reset called by Watch-dog cause of CPU halted)" << endl;
+        lout << "Possible reasons: short under-/overvoltage or shortcut." << endl;
+        return;
+    case 19:
+        lout << "User break (autostart program stopped by user)" << endl;
+        return;
+    case 51:
+        lout << "Too many (>=10) GOSUB calls." << endl;
+        return;
+    case 52:
+        lout << "Too many RETURN calls." << endl;
+        return;
+    case 62:
+        lout << "Error veryfiing EEPROM after access (Try again savaing parameters or program)" << endl;
+        return;
+    case 70:
+        lout << "Error in DIM call (call to DIM doesn't fit existing DIM call)" << endl;
+        return;
     case 71:
         lout << "Array out of bound." << endl;
         return;
-
+    case 79:
+        lout << "Timeout waiting for index (WAITNDX)." << endl;
+        return;
     case 84:
         lout << "Too many (>12) ON TIME calls." << endl;
+        return;
+    case 87:
+        lout << "Out of memory for variables - Check APOSS predifined number of" << endl;
+        lout << "variables and try deleting the array by doing a 'Reset' from APOSS." << endl;
+        return;
+    case 89:
+        lout << "CAN I/O error (REOPEN=" << dec << errinf << " " << (errinf==0?"OK":"ERR") << ")" << endl;
         return;
 
