Added stub axis_s type in EtherLAB CiA402 support code, until Motion Contol Library comes back
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Thu, 07 Mar 2019 21:57:18 +0100
changeset 2491 362039519454
parent 2490 2d72d8a8d7e5
child 2492 7dd551ac2fa0
Added stub axis_s type in EtherLAB CiA402 support code, until Motion Contol Library comes back
etherlab/plc_cia402node.c
--- a/etherlab/plc_cia402node.c	Tue Feb 19 11:27:29 2019 +0100
+++ b/etherlab/plc_cia402node.c	Thu Mar 07 21:57:18 2019 +0100
@@ -74,6 +74,31 @@
 
 static IEC_BOOL __FirstTick = 1;
 
+typedef enum {
+    mc_mode_none, // No motion mode
+    mc_mode_csp,  // Continuous Synchronous Positionning mode
+    mc_mode_csv,  // Continuous Synchronous Velocity mode
+    mc_mode_cst,  // Continuous Synchronous Torque mode
+} mc_axismotionmode_enum;
+
+typedef struct {
+   IEC_BOOL Power;
+   IEC_BOOL CommunicationReady;
+   IEC_UINT NetworkPosition;
+   IEC_BOOL ReadyForPowerOn;
+   IEC_BOOL PowerFeedback;
+   IEC_DINT ActualRawPosition;
+   IEC_DINT ActualRawVelocity;
+   IEC_DINT ActualRawTorque;
+   IEC_DINT RawPositionSetPoint;
+   IEC_DINT RawVelocitySetPoint;
+   IEC_DINT RawTorqueSetPoint;
+   mc_axismotionmode_enum AxisMotionMode;
+   IEC_LREAL ActualVelocity;
+   IEC_LREAL ActualPosition;
+   IEC_LREAL ActualTorque;
+}axis_s;
+
 typedef struct {
 %(entry_variables)s
     axis_s* axis;