targets/plc_common_main.c
changeset 236 a32817e81f5e
parent 235 a66e150f2888
child 239 112b4bc523b3
--- a/targets/plc_common_main.c	Wed Sep 03 17:28:17 2008 +0200
+++ b/targets/plc_common_main.c	Thu Sep 04 14:57:52 2008 +0200
@@ -33,7 +33,7 @@
  **/
  
 IEC_TIME __CURRENT_TIME;
-int __tick = 0;
+int __tick = -1;
 
 static int init_level = 0;
 static int Debugging = 0;
@@ -50,6 +50,8 @@
  **/
 void __run()
 {
+    __tick++;
+
     %(retrieve_calls)s
 
     if(Debugging) __retrieve_debug();
@@ -62,7 +64,6 @@
     
     %(publish_calls)s
 
-    __tick++;
 }
 
 /*