/*******************************************/
/*     FILE GENERATED BY iec2c             */
/* Editing this file is not recommended... */
/*******************************************/

#include "iec_std_lib.h"

#include "accessor.h"

#include "POUS.h"

// CONFIGURATION CONFIG
__DECLARE_GLOBAL(INT,CONFIG,RESETCOUNTERVALUE)
__DECLARE_GLOBAL_LOCATION(LREAL,__IL1_2)
__DECLARE_GLOBAL_LOCATED(LREAL,CONFIG,OI_SENSOR_COUNTER)
__DECLARE_GLOBAL_LOCATION(DINT,__QD0_0)
__DECLARE_GLOBAL_LOCATED(DINT,CONFIG,VFD_RELAY0)
__DECLARE_GLOBAL_LOCATION(DINT,__QD0_1)
__DECLARE_GLOBAL_LOCATED(DINT,CONFIG,AIR_VALVE_RELAY0)
__DECLARE_GLOBAL_LOCATION(LINT,__IL2_2)
__DECLARE_GLOBAL_LOCATED(LINT,CONFIG,MES5_INT_COUNTER_IN)
__DECLARE_GLOBAL_LOCATION(LINT,__QL2_2)
__DECLARE_GLOBAL_LOCATED(LINT,CONFIG,MES5_INT_COUNTER_OUT)
__DECLARE_GLOBAL(BOOL,CONFIG,PYEXT_CSV_UPDATE)

void RESOURCE1_init__(void);

void config_init__(void) {
  BOOL retain;
  retain = 0;
  __INIT_GLOBAL(INT,RESETCOUNTERVALUE,__INITIAL_VALUE(0),retain)
  __INIT_GLOBAL_LOCATED(CONFIG,OI_SENSOR_COUNTER,__IL1_2,retain)
  __INIT_GLOBAL(LREAL,OI_SENSOR_COUNTER,__INITIAL_VALUE(0),retain)
  __INIT_GLOBAL_LOCATED(CONFIG,VFD_RELAY0,__QD0_0,retain)
  __INIT_GLOBAL(DINT,VFD_RELAY0,__INITIAL_VALUE(0),retain)
  __INIT_GLOBAL_LOCATED(CONFIG,AIR_VALVE_RELAY0,__QD0_1,retain)
  __INIT_GLOBAL(DINT,AIR_VALVE_RELAY0,__INITIAL_VALUE(0),retain)
  __INIT_GLOBAL_LOCATED(CONFIG,MES5_INT_COUNTER_IN,__IL2_2,retain)
  __INIT_GLOBAL(LINT,MES5_INT_COUNTER_IN,__INITIAL_VALUE(0),retain)
  __INIT_GLOBAL_LOCATED(CONFIG,MES5_INT_COUNTER_OUT,__QL2_2,retain)
  __INIT_GLOBAL(LINT,MES5_INT_COUNTER_OUT,__INITIAL_VALUE(0),retain)
  __INIT_GLOBAL(BOOL,PYEXT_CSV_UPDATE,__INITIAL_VALUE(__BOOL_LITERAL(TRUE)),retain)
  RESOURCE1_init__();
}

void RESOURCE1_run__(unsigned long tick);

void config_run__(unsigned long tick) {
  RESOURCE1_run__(tick);
}
unsigned long long common_ticktime__ = 50000000ULL * 1ULL; /*ns*/
unsigned long greatest_tick_count__ = (unsigned long)0UL; /*tick*/
