etherlab/plc_cia402node.c
changeset 2491 362039519454
parent 2165 02a2b5dee5e3
child 2643 b98d9e08231f
equal deleted inserted replaced
2490:2d72d8a8d7e5 2491:362039519454
    72 
    72 
    73 %(MCL_headers)s
    73 %(MCL_headers)s
    74 
    74 
    75 static IEC_BOOL __FirstTick = 1;
    75 static IEC_BOOL __FirstTick = 1;
    76 
    76 
       
    77 typedef enum {
       
    78     mc_mode_none, // No motion mode
       
    79     mc_mode_csp,  // Continuous Synchronous Positionning mode
       
    80     mc_mode_csv,  // Continuous Synchronous Velocity mode
       
    81     mc_mode_cst,  // Continuous Synchronous Torque mode
       
    82 } mc_axismotionmode_enum;
       
    83 
       
    84 typedef struct {
       
    85    IEC_BOOL Power;
       
    86    IEC_BOOL CommunicationReady;
       
    87    IEC_UINT NetworkPosition;
       
    88    IEC_BOOL ReadyForPowerOn;
       
    89    IEC_BOOL PowerFeedback;
       
    90    IEC_DINT ActualRawPosition;
       
    91    IEC_DINT ActualRawVelocity;
       
    92    IEC_DINT ActualRawTorque;
       
    93    IEC_DINT RawPositionSetPoint;
       
    94    IEC_DINT RawVelocitySetPoint;
       
    95    IEC_DINT RawTorqueSetPoint;
       
    96    mc_axismotionmode_enum AxisMotionMode;
       
    97    IEC_LREAL ActualVelocity;
       
    98    IEC_LREAL ActualPosition;
       
    99    IEC_LREAL ActualTorque;
       
   100 }axis_s;
       
   101 
    77 typedef struct {
   102 typedef struct {
    78 %(entry_variables)s
   103 %(entry_variables)s
    79     axis_s* axis;
   104     axis_s* axis;
    80 } __CIA402Node;
   105 } __CIA402Node;
    81 
   106