etherlab/plc_cia402node.c
changeset 2092 c9776ae8b5d0
parent 2091 d964dbc2c7b0
child 2094 72b74099b873
equal deleted inserted replaced
2091:d964dbc2c7b0 2092:c9776ae8b5d0
     8 #ifdef _WINDOWS_H
     8 #ifdef _WINDOWS_H
     9   #include "iec_types.h"
     9   #include "iec_types.h"
    10 #else
    10 #else
    11   #include "iec_std_lib.h"
    11   #include "iec_std_lib.h"
    12 #endif
    12 #endif
       
    13 
       
    14 #include "POUS.h"
    13 
    15 
    14 IEC_INT beremiz__IW%(location)s_0;
    16 IEC_INT beremiz__IW%(location)s_0;
    15 IEC_INT *__IW%(location)s_0 = &beremiz__IW%(location)s_0;
    17 IEC_INT *__IW%(location)s_0 = &beremiz__IW%(location)s_0;
    16 
    18 
    17 %(MCL_headers)s
    19 %(MCL_headers)s
    46 
    48 
    47 static __CIA402Node __CIA402Node_%(location)s;
    49 static __CIA402Node __CIA402Node_%(location)s;
    48 
    50 
    49 %(extern_located_variables_declaration)s
    51 %(extern_located_variables_declaration)s
    50 
    52 
       
    53 %(fieldbus_interface_declaration)s
       
    54 
    51 int __init_%(location)s()
    55 int __init_%(location)s()
    52 {
    56 {
    53 %(init_entry_variables)s
    57 %(init_entry_variables)s
    54 	*__IW%(location)s_0 = __MK_Alloc_AXIS_REF();
    58 	*__IW%(location)s_0 = __MK_Alloc_AXIS_REF();
    55 	__CIA402Node_%(location)s.axis = __MK_GetPublic_AXIS_REF(*__IW%(location)s_0);
    59 	__CIA402Node_%(location)s.axis = __MK_GetPublic_AXIS_REF(*__IW%(location)s_0);
       
    60 %(fieldbus_interface_definition)s
    56 	__MK_Set_AXIS_REF_Pos(*__IW%(location)s_0, %(slave_pos)d);
    61 	__MK_Set_AXIS_REF_Pos(*__IW%(location)s_0, %(slave_pos)d);
    57 	*(__CIA402Node_%(location)s.ModesOfOperation) = 0x08;
    62 	*(__CIA402Node_%(location)s.ModesOfOperation) = 0x08;
    58     return 0;
    63     return 0;
    59 }
    64 }
    60 
    65