etherlab/plc_cia402node.c
changeset 2154 6bbe93799956
parent 2153 91c10856adaa
child 2165 02a2b5dee5e3
equal deleted inserted replaced
2153:91c10856adaa 2154:6bbe93799956
    54 #define EnableOperation 0x0008
    54 #define EnableOperation 0x0008
    55 #define FaultReset      0x0080
    55 #define FaultReset      0x0080
    56 #define Halt            0x0100
    56 #define Halt            0x0100
    57 
    57 
    58 
    58 
    59 IEC_INT beremiz__IW%(location_str)s_0;
    59 IEC_INT beremiz__IW%(location_str)s = %(slave_pos)s;
    60 IEC_INT *__IW%(location_str)s_0 = &beremiz__IW%(location_str)s_0;
    60 IEC_INT *__IW%(location_str)s = &beremiz__IW%(location_str)s;
       
    61 IEC_INT beremiz__IW%(location_str)s_402;
       
    62 IEC_INT *__IW%(location_str)s_402 = &beremiz__IW%(location_str)s_402;
    61 
    63 
    62 %(MCL_headers)s
    64 %(MCL_headers)s
    63 
    65 
    64 static IEC_BOOL __FirstTick = 1;
    66 static IEC_BOOL __FirstTick = 1;
    65 
    67 
    89 }
    91 }
    90 
    92 
    91 void __retrieve_%(location_str)s()
    93 void __retrieve_%(location_str)s()
    92 {
    94 {
    93 	if (__FirstTick) {
    95 	if (__FirstTick) {
    94 		*__IW%(location_str)s_0 = __MK_Alloc_AXIS_REF();
    96 		*__IW%(location_str)s_402 = __MK_Alloc_AXIS_REF();
    95 		AxsPub.axis = 
    97 		AxsPub.axis = 
    96             __MK_GetPublic_AXIS_REF(*__IW%(location_str)s_0);
    98             __MK_GetPublic_AXIS_REF(*__IW%(location_str)s_402);
    97 		AxsPub.axis->NetworkPosition = %(slave_pos)d;
    99 		AxsPub.axis->NetworkPosition = beremiz__IW%(location_str)s;
    98 %(init_axis_params)s
   100 %(init_axis_params)s
    99 %(fieldbus_interface_definition)s
   101 %(fieldbus_interface_definition)s
   100 		__FirstTick = 0;
   102 		__FirstTick = 0;
   101 	}
   103 	}
   102 
   104