Index: trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc
===================================================================
--- trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc	(revision 1690)
+++ trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc	(revision 1701)
@@ -60,4 +60,5 @@
         lout << "Scaling: " <<  (val&4   ?"on":"off") << "  ";
         lout << "Modulo: " <<   (val&4096?"on":"off") << endl;
+        return;
 
     case 0x6001:
@@ -78,6 +79,8 @@
 
     case 0x6502:
+        if (val==0)
+            val = 1;  // Single Turn = Multiturn with one turn
         lout << "- Possible Turns: " << dec << val << endl;
-        fTurns = val ? val : 1; // Single Turn = Multiturn with one turn
+        fTurns = val; 
         return;
 
@@ -198,5 +201,5 @@
     // Requesting and checking (FIXME) type of encoder
     //
-    lout << "- Requesting Hardware Type (SDO 0x1000) of " << GetNodeName() << endl;
+    lout << "- " << GetNodeName() << ": Requesting Hardware Type (0x1000)." << endl;
     RequestSDO(0x1000);
     if (!WaitForSdo(0x1000))
@@ -210,5 +213,5 @@
     // Read physical ticks per revolution
     //
-    lout << "- Requesting physical ticks/revolution (SDO 0x6501) of " << GetNodeName() << endl;
+    lout << "- " << GetNodeName() << ": Requesting physical ticks/revolution (SDO 0x6501)." << endl;
     RequestSDO(0x6501);
     WaitForSdo(0x6501);
@@ -217,5 +220,5 @@
     // Read number of possible ticks per revolution
     //
-    lout << "- Requesting possible ticks/revolution (SDO 0x6502) of " << GetNodeName() << endl;
+    lout << "- " << GetNodeName() << ": Requesting possible ticks/revolution (SDO 0x6502)." << endl;
     RequestSDO(0x6502);
     WaitForSdo(0x6502);
@@ -224,5 +227,5 @@
     // Set logic ticks/revolution = physical ticks/revolution => scale factor = 1
     //
-    lout << "- Configuring SDO 0x6001 of " << GetNodeName() << endl;
+    lout << "- " << GetNodeName() << ": Configuring log. tick/rev (0x6001)." << endl;
     SendSDO(0x6001, fTicks);
     WaitForSdo(0x6001);
@@ -231,26 +234,26 @@
     // Set maximum number of ticks (ticks * turns)
     //
-    lout << "- Configuring SDO 0x6002 of " << GetNodeName() << endl;
+    lout << "- " << GetNodeName() << ": Configuring max number of ticks (0x6002)." << endl;
     SendSDO(0x6002, (LWORD_t)(fTicks*fTurns));
     WaitForSdo(0x6002);
 
     //
+    // Delete preset Value
+    //
+    lout << "- " << GetNodeName() << ": Delete preset value (0x6003)." << endl;
+    SendSDO(0x6003, (LWORD_t)0xffffffff);
+    WaitForSdo(0x6003);
+
+    //
     // Configure PDOs
     //
-    lout << "- Configuring SDO 0x1802 of " << GetNodeName() << endl;
+    lout << "- " << GetNodeName() << ": Configuring PDOs (0x1802)." << endl;
     SendSDO(0x1802, 1, (LWORD_t)0x281);
     WaitForSdo(0x1802, 1);
 
     //
-    // Delete preset Value
-    //
-    lout << "- Configuring SDO 0x6003 of " << GetNodeName() << endl;
-    SendSDO(0x6003, (LWORD_t)0xffffffff);
-    WaitForSdo(0x6003);
-
-    //
     // Request Parameter
     //
-    lout << "- Requesting SDO 0x6000 of " << GetNodeName() << endl;
+    lout << "- " << GetNodeName() << ": Requesting SDO 0x6000." << endl;
     RequestSDO(0x6000);
     WaitForSdo(0x6000);
@@ -258,5 +261,5 @@
     ReqPos();
 
-    lout << "- Start Node " << GetNodeName() << endl;
+    lout << "- " << GetNodeName() << ": Start Node (NMT)." << endl;
     SendNMT(kNMT_START);
 }
@@ -267,5 +270,5 @@
     // Request Position
     //
-    lout << "- Requesting Position of " << GetNodeName() << endl;
+    lout << "- " << GetNodeName() << ": Requesting Position." << endl;
     RequestSDO(0x6004);
     WaitForSdo(0x6004);
@@ -277,5 +280,5 @@
     fTurn = pre/16384;
 
-    lout << " - Setting Preset " << GetNodeName() << endl;
+    lout << "- " << GetNodeName() << ": Setting Preset." << endl;
     SendSDO(0x6003, (LWORD_t)fPos);
     WaitForSdo(0x6003);
@@ -284,5 +287,5 @@
 void ShaftEncoder::StopDevice()
 {
-    lout << "- Stop Node " << GetNodeName() << endl;
+    lout << "- " << GetNodeName() << ": Stop Node (NMT)." << endl;
     SendNMT(kNMT_STOP);
 }
