targets/plc_main_head.c
changeset 1475 de4ee16f7c6c
parent 1463 de311ffe3961
child 1981 d0718654d9b0
equal deleted inserted replaced
1474:28e9d479aa65 1475:de4ee16f7c6c
    23  *  Variables used by generated C softPLC and plugins
    23  *  Variables used by generated C softPLC and plugins
    24  **/
    24  **/
    25 IEC_TIME __CURRENT_TIME;
    25 IEC_TIME __CURRENT_TIME;
    26 IEC_BOOL __DEBUG = 0;
    26 IEC_BOOL __DEBUG = 0;
    27 unsigned long __tick = 0;
    27 unsigned long __tick = 0;
       
    28 char *PLC_ID = NULL;
    28 
    29 
    29 /*
    30 /*
    30  *  Variable generated by C softPLC and plugins
    31  *  Variable generated by C softPLC and plugins
    31  **/
    32  **/
    32 extern unsigned long greatest_tick_count__;
    33 extern unsigned long greatest_tick_count__;
    33 
       
    34 /* Effective tick time with 1ms default value */
       
    35 static long long Ttick = 1000000;
       
    36 
    34 
    37 /* Help to quit cleanly when init fail at a certain level */
    35 /* Help to quit cleanly when init fail at a certain level */
    38 static int init_level = 0;
    36 static int init_level = 0;
    39 
    37 
    40 /*
    38 /*
    70 int __init(int argc,char **argv)
    68 int __init(int argc,char **argv)
    71 {
    69 {
    72     int res = 0;
    70     int res = 0;
    73     init_level = 0;
    71     init_level = 0;
    74     
    72     
    75     if(common_ticktime__)
    73     /* Effective tick time with 1ms default value */
    76         Ttick = common_ticktime__;
    74     if(!common_ticktime__)
       
    75         common_ticktime__ = 1000000;
    77 
    76 
    78     config_init__();
    77     config_init__();
    79     __init_debug();
    78     __init_debug();
    80     %(init_calls)s
    79     %(init_calls)s
    81     return res;
    80     return res;