lib/iec_types_all.h
changeset 897 8c3e91c385f5
parent 743 fbf77edf54ca
child 899 a3f734a23566
equal deleted inserted replaced
896:c1cf7259160d 897:8c3e91c385f5
   124 /* Those typdefs clash with windows.h */
   124 /* Those typdefs clash with windows.h */
   125 /* i.e. this file cannot be included aside windows.h */
   125 /* i.e. this file cannot be included aside windows.h */
   126 __ANY(__DECLARE_IEC_TYPE)
   126 __ANY(__DECLARE_IEC_TYPE)
   127 
   127 
   128 typedef struct {
   128 typedef struct {
   129   __IEC_BOOL_t state;     // current step state. 0 : inative, 1: active
   129   __IEC_BOOL_t X;  // state;  --> current step state. 0 : inative, 1: active.   We name it 'X' as it may be accessed from IEC 61131.3 code using stepname.X syntax!!
   130   BOOL prev_state;  // previous step state. 0 : inative, 1: active
   130   BOOL prev_state;  // previous step state. 0 : inative, 1: active
   131   TIME elapsed_time;  // time since step is active
   131   TIME elapsed_time; // T; // elapsed_time;  --> time since step is active.   We name it 'T' as it may be accessed from IEC 61131.3 code using stepname.T syntax!!
   132 } STEP;
   132 } STEP;
       
   133 
   133 
   134 
   134 typedef struct {
   135 typedef struct {
   135   BOOL stored;  // action storing state. 0 : not stored, 1: stored
   136   BOOL stored;  // action storing state. 0 : not stored, 1: stored
   136   __IEC_BOOL_t state; // current action state. 0 : inative, 1: active
   137   __IEC_BOOL_t state; // current action state. 0 : inative, 1: active
   137   BOOL set;   // set have been requested (reset each time the body is evaluated)
   138   BOOL set;   // set have been requested (reset each time the body is evaluated)