Index: trunk/MagicSoft/Cosy/devdrv/macs.cc
===================================================================
--- trunk/MagicSoft/Cosy/devdrv/macs.cc	(revision 1531)
+++ trunk/MagicSoft/Cosy/devdrv/macs.cc	(revision 1690)
@@ -113,4 +113,9 @@
         fVelRes = val;
         return;
+
+    case 0x6501:
+        lout << "- Encoder resolution " << GetNodeName() << ": " << dec << val << " ticks/min" << endl;
+        fRes = val;
+        return;
     }
     cout << "Macs: SDO, idx=0x"<< hex << idx << "/" << (int)subidx;
@@ -211,5 +216,7 @@
 void Macs::InitDevice(Network *net)
 {
+    lout << "- MAC Init device." << endl;
     NodeDrv::InitDevice(net);
+    lout << "- MAC Init device...done." << endl;
 
 //    SendSDO(0x4003, (LWORD_t)('E'<<24 | 'X'<<16 | 'I'<<8 'T'));
@@ -295,4 +302,11 @@
     RequestSDO(0x6004);
     WaitForSdo(0x6004);
+}
+
+void Macs::ReqRes()
+{
+    lout << "- Requesting Encoder Resolution of " << GetNodeName() << endl;
+    RequestSDO(0x6501);
+    WaitForSdo(0x6501);
 }
 
@@ -491,4 +505,5 @@
     case 100:
         lout << "Connection timed out." << endl;
+        EnableTimeout(false);
         return;
 
@@ -592,4 +607,5 @@
 void Macs::EnableTimeout(bool enable, LWORDS_t ms)
 {
+    lout << "- MAC " << (enable?"En":"Dis") << "able timeout, " << dec << ms << "ms." << endl;
     if (!enable)
     {
@@ -597,4 +613,6 @@
         WaitForSdo(0x4000, 1);
 
+        lout << "- Stopping handshake (PC)." << endl;
+
         fTimeout->Stop(); //kTRUE);
 
@@ -610,4 +628,5 @@
         fTimerOn = kTRUE;
         fTimeout->Start(fGuardTime/*/3*2*/, kTRUE); //kFALSE); //TRUE);
+
         //
         // Start with kFALSE would be a continous timer, but this
@@ -615,7 +634,7 @@
         // any reason
         //
-
-//        SendSDO(0x4000, 1, string('o', 'n'));
-//        WaitForSdo(0x4000, 1);
+        lout << "- MAC starting handshake." << endl;
+        SendSDO(0x4000, 1, string('o', 'n'));
+        WaitForSdo(0x4000, 1);
     }
     lout << "- Timeout timer of " << GetNodeName() << " turned "
@@ -666,5 +685,5 @@
     // --- lout << edev(MLog::eGui);
 
-    if (time.Now() > fTimeoutTime+0.5)
+    if (time.Now() > fTimeoutTime)
     {
         lout << ddev(MLog::eGui);
@@ -703,5 +722,5 @@
     fGuardTime = ms/3;      // how often do we send/request the handshake
 
-    SendSDO(0x4000, 2, ms); // How often do we check for the handshake
+    SendSDO(0x4000, 2, ms*2); // How often do we check for the handshake
     WaitForSdo(0x4000, 2);
 }
Index: trunk/MagicSoft/Cosy/devdrv/macs.h
===================================================================
--- trunk/MagicSoft/Cosy/devdrv/macs.h	(revision 1531)
+++ trunk/MagicSoft/Cosy/devdrv/macs.h	(revision 1690)
@@ -18,4 +18,6 @@
     Timer    fPosTime;
 
+    LWORD_t  fRes;      // Encoder resolution
+
     LWORDS_t fPdoPos;
     Timer    fPdoTime;
@@ -36,4 +38,6 @@
     void ResetTimeout();
     Bool_t HandleTimer(TTimer *t);
+
+    void ReqRes();
 
 public:
@@ -100,4 +104,5 @@
     LWORDS_t GetVel()    { return fVel; }
     LWORD_t  GetVelRes() { return fVelRes; } // Velocity units (would be 100 for %)
+    LWORD_t  GetRes()    { return fRes; }    // Encoder resolution
 
     void HandleError();
Index: trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc
===================================================================
--- trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc	(revision 1531)
+++ trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc	(revision 1690)
@@ -200,5 +200,10 @@
     lout << "- Requesting Hardware Type (SDO 0x1000) of " << GetNodeName() << endl;
     RequestSDO(0x1000);
-    WaitForSdo(0x1000);
+    if (!WaitForSdo(0x1000))
+    {
+        lout << "  ... failed." << endl;
+        fIsZombie = true;
+        return;
+    }
 
     //
Index: trunk/MagicSoft/Cosy/devdrv/shaftencoder.h
===================================================================
--- trunk/MagicSoft/Cosy/devdrv/shaftencoder.h	(revision 1531)
+++ trunk/MagicSoft/Cosy/devdrv/shaftencoder.h	(revision 1690)
@@ -51,4 +51,5 @@
 
     LWORDS_t GetPos() { return fPos+fTurn*fTicks; }
+    LWORD_t  GetPhysRes() { return fTicks; }
 
     double GetTime();
