/*2023-10-16T15:39:52-01:00*/

/********************************************************************
 * mdl_deplacement.c
 * 
 * generated by: plcgen 3.0.331
 ********************************************************************/

#include "cb_comp.h"
#include "iec_1131.h"

#include "mdl_deplacement.h"


/**************************** Variables *****************************/

CB_Index mdl_deplacement__num = 0;
CB_Mem_Int *mdl_deplacement_Dem_Pos;
CB_Mem_Bool *mdl_deplacement_GO;
CB_Mem_Bool *mdl_deplacement_acq;
CB_Mem_Bool *mdl_deplacement_AU;
CB_Mem_Bool *mdl_deplacement_CR_GXR;
CB_Mem_Bool *mdl_deplacement_CR_GXS;
CB_Mem_Bool *mdl_deplacement_def_GX;
CB_Mem_Bool *mdl_deplacement_CR_PXR;
CB_Mem_Bool *mdl_deplacement_CR_PXS;
CB_Mem_Bool *mdl_deplacement_def_PX;
CB_Mem_Bool *mdl_deplacement_CR_VRR;
CB_Mem_Bool *mdl_deplacement_CR_VRS;
CB_Mem_Bool *mdl_deplacement_def_VR;
CB_Mem_Int *mdl_deplacement_CR_Pos;
CB_Mem_Bool *mdl_deplacement_Def_Depl;
CB_Mem_Bool *mdl_deplacement_GXR;
CB_Mem_Bool *mdl_deplacement_GXS;
CB_Mem_Bool *mdl_deplacement_PXR;
CB_Mem_Bool *mdl_deplacement_PXS;
CB_Mem_Bool *mdl_deplacement_VRR;
CB_Mem_Bool *mdl_deplacement_VRS;

/**************************** Variables *****************************/

#define Dem_Pos (*((short *)&(mdl_deplacement_Dem_Pos->CB_current_value) + ALIGN_OFFSET_SHORT))
#define GO (mdl_deplacement_GO->CB_current_value)
#define acq (mdl_deplacement_acq->CB_current_value)
#define AU (mdl_deplacement_AU->CB_current_value)
#define CR_GXR (mdl_deplacement_CR_GXR->CB_current_value)
#define CR_GXS (mdl_deplacement_CR_GXS->CB_current_value)
#define def_GX (mdl_deplacement_def_GX->CB_current_value)
#define CR_PXR (mdl_deplacement_CR_PXR->CB_current_value)
#define CR_PXS (mdl_deplacement_CR_PXS->CB_current_value)
#define def_PX (mdl_deplacement_def_PX->CB_current_value)
#define CR_VRR (mdl_deplacement_CR_VRR->CB_current_value)
#define CR_VRS (mdl_deplacement_CR_VRS->CB_current_value)
#define def_VR (mdl_deplacement_def_VR->CB_current_value)
#define CR_Pos (*((short *)&(mdl_deplacement_CR_Pos->CB_current_value) + ALIGN_OFFSET_SHORT))
#define Def_Depl (mdl_deplacement_Def_Depl->CB_current_value)
#define GXR (mdl_deplacement_GXR->CB_current_value)
#define GXS (mdl_deplacement_GXS->CB_current_value)
#define PXR (mdl_deplacement_PXR->CB_current_value)
#define PXS (mdl_deplacement_PXS->CB_current_value)
#define VRR (mdl_deplacement_VRR->CB_current_value)
#define VRS (mdl_deplacement_VRS->CB_current_value)


/************************ Components offsets ************************/


/********************* Initialization function **********************/

int _sfp__mdl_deplacement_init(void)
{


	return 0;
}


/************************ Behavior function *************************/

int sfp__mdl_deplacement(void)
{
	if (exec_term_node(self_num)) {

		/*********************** Internals variables ************************/


		/********************* Pre-conditions execution *********************/

		/*no Pre-conditions*/

		/************************ Behavior execution ************************/

		{
		}

		CB_post_int(mdl_deplacement_CR_Pos);
		CB_post_bool(mdl_deplacement_Def_Depl);
		CB_post_bool(mdl_deplacement_GXR);
		CB_post_bool(mdl_deplacement_GXS);
		CB_post_bool(mdl_deplacement_PXR);
		CB_post_bool(mdl_deplacement_PXS);
		CB_post_bool(mdl_deplacement_VRR);
		CB_post_bool(mdl_deplacement_VRS);

		/******************** Post-conditions execution *********************/

		/*no Post-conditions*/
	}

	/*************************** self update ****************************/


	return 0;
}

