SOES implementation i.c.w. ET1100 (Beckhoff ASIC)

Dependencies:   KL25Z_ClockControl MODSERIAL mbed

Fork of EtherCAT-XbusMaster by First Last

Revision:
36:8e6ac6082e97
Parent:
28:8505285f65ed
--- a/xbus.cpp	Fri Sep 11 11:33:53 2015 +0000
+++ b/xbus.cpp	Fri Sep 11 11:49:14 2015 +0000
@@ -162,14 +162,30 @@
     XbusCreateMessage(0xFF,0x04,2,data,msg);//SetPeriod
     XbusSendArray(msg);
     
-    data[0] = 0;//0x40;
-    data[1] = 2;//0x00;//0002: callibrated data
+    /*
+    data[0] = 0;//0x00;
+    data[1] = 2;//0x02;//0002: callibrated data
+    */
+    data[0] = 0;
+    data[1] = 0x04;//0004: orientation data
     for (int i = 0 ; i<3 ; i++)
     {
-        XbusCreateMessage(i+1,0xD0,2,data,msg);//Set Output Data Format
+        XbusCreateMessage(i+1,0xD0,2,data,msg);//Set Output Mode
+        XbusSendArray(msg);
+    }
+    
+    data[0] = 0;//Reserved
+    data[1] = 0;// LLAWGS84
+    data[2] = 0;//Float output, Enable aux outputs
+    data[3] = 0x01;//SampleCounter, Quaternion, Enable all sensor outputs, Reserved 
+    
+    for (int i = 0 ; i<3 ; i++)
+    {
+        XbusCreateMessage(i+1,0xD2,4,data,msg);//Set Output Settings
         XbusSendArray(msg);
     }
     wait_ms(10);
+    
     XbusCreateMessage(0xFF,0x10,0,msg,msg);//GoToMeasurement
     XbusSendArray(msg);
 }