void LOGGER_init__(LOGGER *data__, BOOL retain) {
  __INIT_VAR(data__->EN,__BOOL_LITERAL(TRUE),retain)
  __INIT_VAR(data__->ENO,__BOOL_LITERAL(TRUE),retain)
  __INIT_VAR(data__->TRIG,__BOOL_LITERAL(FALSE),retain)
  __INIT_VAR(data__->MSG,__STRING_LITERAL(0,""),retain)
  __INIT_VAR(data__->LEVEL,LOGLEVEL__INFO,retain)
  __INIT_VAR(data__->TRIG0,__BOOL_LITERAL(FALSE),retain)
}

// Code part
void LOGGER_body__(LOGGER *data__) {
  // Control execution
  if (!__GET_VAR(data__->EN)) {
    __SET_VAR(data__->,ENO,,__BOOL_LITERAL(FALSE));
    return;
  }
  else {
    __SET_VAR(data__->,ENO,,__BOOL_LITERAL(TRUE));
  }
  // Initialise TEMP variables

  if ((__GET_VAR(data__->TRIG,) && !(__GET_VAR(data__->TRIG0,)))) {
    #define GetFbVar(var,...) __GET_VAR(data__->var,__VA_ARGS__)
    #define SetFbVar(var,val,...) __SET_VAR(data__->,var,__VA_ARGS__,val)

   LogMessage(GetFbVar(LEVEL),(char*)GetFbVar(MSG, .body),GetFbVar(MSG, .len));
  
    #undef GetFbVar
    #undef SetFbVar
;
  };
  __SET_VAR(data__->,TRIG0,,__GET_VAR(data__->TRIG,));

  goto __end;

__end:
  return;
} // LOGGER_body__() 





static inline WORD __HARDCHECK_MOVE__WORD__WORD1(BOOL EN,
  WORD IN,
  HARDCHECK *data__)
{
  WORD __res;
  BOOL __TMP_ENO = __GET_VAR(data__->_TMP_MOVE43_ENO,);
  __res = MOVE__WORD__WORD(EN,
    &__TMP_ENO,
    IN);
  __SET_VAR(,data__->_TMP_MOVE43_ENO,,__TMP_ENO);
  return __res;
}

static inline WORD __HARDCHECK_MOVE__WORD__WORD2(BOOL EN,
  WORD IN,
  HARDCHECK *data__)
{
  WORD __res;
  BOOL __TMP_ENO = __GET_VAR(data__->_TMP_MOVE46_ENO,);
  __res = MOVE__WORD__WORD(EN,
    &__TMP_ENO,
    IN);
  __SET_VAR(,data__->_TMP_MOVE46_ENO,,__TMP_ENO);
  return __res;
}

void HARDCHECK_init__(HARDCHECK *data__, BOOL retain) {
  __INIT_LOCATED(BOOL,__IX0_0,data__->SW1,retain)
  __INIT_LOCATED_VALUE(data__->SW1,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_1,data__->SW2,retain)
  __INIT_LOCATED_VALUE(data__->SW2,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_2,data__->SW3,retain)
  __INIT_LOCATED_VALUE(data__->SW3,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_3,data__->SW4,retain)
  __INIT_LOCATED_VALUE(data__->SW4,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_4,data__->SW5,retain)
  __INIT_LOCATED_VALUE(data__->SW5,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_5,data__->SW6,retain)
  __INIT_LOCATED_VALUE(data__->SW6,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_6,data__->SW7,retain)
  __INIT_LOCATED_VALUE(data__->SW7,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_7,data__->SW8,retain)
  __INIT_LOCATED_VALUE(data__->SW8,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX1_0,data__->SW9,retain)
  __INIT_LOCATED_VALUE(data__->SW9,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_0,data__->D1,retain)
  __INIT_LOCATED_VALUE(data__->D1,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_1,data__->D2,retain)
  __INIT_LOCATED_VALUE(data__->D2,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_2,data__->D3,retain)
  __INIT_LOCATED_VALUE(data__->D3,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_3,data__->D4,retain)
  __INIT_LOCATED_VALUE(data__->D4,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_4,data__->D5,retain)
  __INIT_LOCATED_VALUE(data__->D5,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_5,data__->D6,retain)
  __INIT_LOCATED_VALUE(data__->D6,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_6,data__->D7,retain)
  __INIT_LOCATED_VALUE(data__->D7,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_7,data__->D8,retain)
  __INIT_LOCATED_VALUE(data__->D8,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX1_0,data__->D9,retain)
  __INIT_LOCATED_VALUE(data__->D9,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX1_1,data__->D10,retain)
  __INIT_LOCATED_VALUE(data__->D10,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(WORD,__IW0,data__->AIN1,retain)
  __INIT_LOCATED_VALUE(data__->AIN1,0)
  __INIT_LOCATED(WORD,__IW1,data__->AIN2,retain)
  __INIT_LOCATED_VALUE(data__->AIN2,0)
  __INIT_LOCATED(WORD,__QW0,data__->AOUT1,retain)
  __INIT_LOCATED_VALUE(data__->AOUT1,0)
  __INIT_LOCATED(WORD,__QW1,data__->AOUT2,retain)
  __INIT_LOCATED_VALUE(data__->AOUT2,0)
  TON_init__(&data__->TON0,retain);
  __INIT_VAR(data__->_TMP_MOVE43_ENO,__BOOL_LITERAL(FALSE),retain)
  __INIT_VAR(data__->_TMP_MOVE43_OUT,0,retain)
  __INIT_VAR(data__->_TMP_MOVE46_ENO,__BOOL_LITERAL(FALSE),retain)
  __INIT_VAR(data__->_TMP_MOVE46_OUT,0,retain)
}

// Code part
void HARDCHECK_body__(HARDCHECK *data__) {
  // Initialise TEMP variables

  __SET_LOCATED(data__->,D1,,__GET_LOCATED(data__->SW1,));
  __SET_LOCATED(data__->,D2,,__GET_LOCATED(data__->SW2,));
  __SET_LOCATED(data__->,D3,,__GET_LOCATED(data__->SW3,));
  __SET_LOCATED(data__->,D4,,__GET_LOCATED(data__->SW4,));
  __SET_LOCATED(data__->,D5,,__GET_LOCATED(data__->SW5,));
  __SET_LOCATED(data__->,D6,,__GET_LOCATED(data__->SW6,));
  __SET_LOCATED(data__->,D7,,__GET_LOCATED(data__->SW7,));
  __SET_LOCATED(data__->,D8,,__GET_LOCATED(data__->SW8,));
  __SET_LOCATED(data__->,D9,,__GET_LOCATED(data__->SW9,));
  __SET_VAR(data__->TON0.,IN,,__GET_LOCATED(data__->SW9,));
  __SET_VAR(data__->TON0.,PT,,__time_to_timespec(1, 0, 1, 0, 0, 0));
  TON_body__(&data__->TON0);
  __SET_LOCATED(data__->,D10,,__GET_VAR(data__->TON0.Q,));
  __SET_VAR(data__->,_TMP_MOVE43_OUT,,__HARDCHECK_MOVE__WORD__WORD1(
    (BOOL)__BOOL_LITERAL(TRUE),
    (WORD)__GET_LOCATED(data__->AIN1,),
    data__));
  if (__GET_VAR(data__->_TMP_MOVE43_ENO,)) {
    __SET_LOCATED(data__->,AOUT1,,__GET_VAR(data__->_TMP_MOVE43_OUT,));
  };
  __SET_VAR(data__->,_TMP_MOVE46_OUT,,__HARDCHECK_MOVE__WORD__WORD2(
    (BOOL)__BOOL_LITERAL(TRUE),
    (WORD)__GET_LOCATED(data__->AIN2,),
    data__));
  if (__GET_VAR(data__->_TMP_MOVE46_ENO,)) {
    __SET_LOCATED(data__->,AOUT2,,__GET_VAR(data__->_TMP_MOVE46_OUT,));
  };

  goto __end;

__end:
  return;
} // HARDCHECK_body__() 





