targets/plc_main_head.c
changeset 1428 e14003eb4d42
parent 1392 7d295f013061
child 1457 ff7cfce737ca
equal deleted inserted replaced
1423:4e33f644f7cf 1428:e14003eb4d42
    28 
    28 
    29 /*
    29 /*
    30  *  Variable generated by C softPLC and plugins
    30  *  Variable generated by C softPLC and plugins
    31  **/
    31  **/
    32 extern unsigned long greatest_tick_count__;
    32 extern unsigned long greatest_tick_count__;
    33 
       
    34 /* Effective tick time with 1ms default value */
       
    35 static long long Ttick = 1000000;
       
    36 
    33 
    37 /* Help to quit cleanly when init fail at a certain level */
    34 /* Help to quit cleanly when init fail at a certain level */
    38 static int init_level = 0;
    35 static int init_level = 0;
    39 
    36 
    40 /*
    37 /*
    70 int __init(int argc,char **argv)
    67 int __init(int argc,char **argv)
    71 {
    68 {
    72     int res = 0;
    69     int res = 0;
    73     init_level = 0;
    70     init_level = 0;
    74     
    71     
    75     if(common_ticktime__)
    72     /* Effective tick time with 1ms default value */
    76         Ttick = common_ticktime__;
    73     if(!common_ticktime__)
       
    74         common_ticktime__ = 1000000;
    77 
    75 
    78     config_init__();
    76     config_init__();
    79     __init_debug();
    77     __init_debug();
    80     %(init_calls)s
    78     %(init_calls)s
    81     return res;
    79     return res;