Index: trunk/MagicSoft/Cosy/devdrv/macs.cc
===================================================================
--- trunk/MagicSoft/Cosy/devdrv/macs.cc	(revision 1804)
+++ trunk/MagicSoft/Cosy/devdrv/macs.cc	(revision 1953)
@@ -46,4 +46,12 @@
     switch (idx)
     {
+    case 0x1003:
+        // FIXME, see Init
+        if (subidx!=2)
+            return;
+        lout << "- " << GetNodeName() << ": Error[0]=" << dec << val << endl;
+        SetError(val);
+        return;
+
     case 0x100a:
         lout << "- " << GetNodeName() << ": Using Software Version V" << dec << (int)(val>>16) << "." << (int)(val&0xff) << endl;
@@ -221,7 +229,13 @@
 }
 
-
 void Macs::Init()
 {
+    //
+    // Request current error status (FIXME: is the first entry in the
+    // error list)
+    //
+    lout << "- " << GetNodeName() << ": Requesting Error[0]." << endl;
+    RequestSDO(0x1003, 2);
+    WaitForSdo(0x1003, 2);
     if (HasError())
     {
@@ -238,10 +252,6 @@
     RequestSDO(0x100a);
     WaitForSdo(0x100a);
-
     if (IsZombieNode())
-    {
-        lout << GetNodeName() << " - InitDevice failed!" << endl;
-        return;
-    }
+        return;
 
     // FIXME! Not statically linked!
@@ -538,4 +548,8 @@
         return;
 
+    case 71:
+        lout << "Array out of bound." << endl;
+        return;
+
     case 84:
         lout << "Too many (>12) ON TIME calls." << endl;
Index: trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc
===================================================================
--- trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc	(revision 1804)
+++ trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc	(revision 1953)
@@ -40,8 +40,10 @@
             default:
                 lout << "?" << endl;
+                SetZombie();
                 return;
             }
         default:
             lout << "???" << endl;
+            SetZombie();
             return;
         }
@@ -88,7 +90,7 @@
 
     case 0x6502:
-        if (val==0)
-            val = 1;  // Single Turn = Multiturn with one turn
-        lout << "- Possible Turns: " << dec << val << endl;
+        //if (val==0)
+        //    val = 1;  // Single Turn = Multiturn with one turn
+        lout << "- Number of Revolutions: " << dec << val << endl;
         fTurns = val; 
         return;
@@ -105,10 +107,6 @@
     if (IsZombieNode())
     {
-        fLabel[0]->SetText(new TGString(""));
-        fLabel[1]->SetText(new TGString(""));
-        fLabel[2]->SetText(new TGString(""));
+        fLabel->SetText(new TGString(""));
         fUpdPos = ~fPos;
-        fUpdVel = ~fVel;
-        fUpdAcc = ~fAcc;
         return;
     }
@@ -116,23 +114,9 @@
     char text[21];
 
-    if (fPos!=fUpdPos && fLabel[0])
+    if (fPos!=fUpdPos && fLabel)
     {
         sprintf(text, "%ld", fPos);
-        fLabel[0]->SetText(new TGString(text));
+        fLabel->SetText(new TGString(text));
         fUpdPos = fPos;
-    }
-
-    if (fVel!=fUpdVel && fLabel[1])
-    {
-        sprintf(text, "%d", fVel);
-        fLabel[1]->SetText(new TGString(text));
-        fUpdVel = fVel;
-    }
-
-    if (fAcc!=fUpdAcc && fLabel[2])
-    {
-        sprintf(text, "%d", fAcc);
-        fLabel[2]->SetText(new TGString(text));
-        fUpdAcc = fAcc;
     }
 }
@@ -183,6 +167,6 @@
     fAcc = data[6] | (data[7]<<8);
 
-    const int uplim = 9*fTicks/10;
-    const int dnlim = 1*fTicks/10;
+    const int dnlim = fTicks/10;
+    const int uplim = fTurns*fTicks-dnlim;
 
     int turn = fTurn;
@@ -199,6 +183,4 @@
     fPos  = pos;
     fTurn = turn;
-
-    //fout << dec << (int)GetId() << " " << turn << " " << pos << endl;
 
     fTime.SetTimer(tv);
@@ -230,10 +212,6 @@
     RequestSDO(0x1000);
     WaitForSdo(0x1000);
-
     if (IsZombieNode())
-    {
-        lout << GetNodeName() << " - Init failed!" << endl;
-        return;
-    }
+        return;
 
     //
Index: trunk/MagicSoft/Cosy/devdrv/shaftencoder.h
===================================================================
--- trunk/MagicSoft/Cosy/devdrv/shaftencoder.h	(revision 1804)
+++ trunk/MagicSoft/Cosy/devdrv/shaftencoder.h	(revision 1953)
@@ -17,8 +17,8 @@
     WORD_t   fTurns; // Number of possible turns
 
-    TGLabel **fLabel;     //
+    TGLabel  *fLabel;     //
     LWORDS_t  fUpdPos;    // ticks
-    WORDS_t   fUpdVel;    // ticks per 5ms
-    WORDS_t   fUpdAcc;    // ticks per 25ms^2
+    //    WORDS_t   fUpdVel;    // ticks per 5ms
+    //    WORDS_t   fUpdAcc;    // ticks per 25ms^2
 
     bool fPosHasChanged;  //!
@@ -40,5 +40,5 @@
     void StopDevice();
 
-    void SetDisplay(TGLabel **label) { fLabel = label; }
+    void SetDisplay(TGLabel *label) { fLabel = label; }
 
     void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv);
