diff --git a/Tico_DIO32.bas b/Tico_DIO32.bas index 705a2fcc2c2b7c2600201f6f6cfc4f70b6a1d2a8..4a6d1e666941f6d7dfb55afdf01de6bf4092c3d9 100644 --- a/Tico_DIO32.bas +++ b/Tico_DIO32.bas @@ -18,41 +18,22 @@ DIM DATA_1[MAXTICOEVENTS] AS long AT DM_LOCAL 'Time DIM DATA_2[MAXTICOEVENTS] AS Long AT DM_LOCAL 'Digital Output -'DIM digitaloutvalue AS Long at dm_local 'tu das zu den digitalkan�len schicken tun Par_1 -'DIM prozessindex AS Long at dm_local 'loop iteration counter Par_2 -'DIM index_next_event AS Long at dm_local 'array index next timing event Par_3 - - - - - - -init: +INIT: PROCESSDELAY = 25 - par_20=0 - do - until (par_20=1) - 'nops(0) 'for tico module 5 (started second) + DO + UNTIL (par_20=1) + 'nops(0) 'for tico module 2 (started second) nops(10) 'for tico module 1 (started first) - 'par_6=0 Event: - - 'par_4 = read_timer() - Digout_Long(par_1) ' TODO: why do we set the Output every cycle and not just when it changes? + Digout_Long(par_1) inc par_2 - If (Data_1[par_3] = Par_2)THEN 'check wether next event reached + + If (Data_1[par_3] = Par_2) THEN 'check wether next event reached Par_1 = DATA_2[par_3] inc par_3 ENDIF - 'par_5 = read_timer()- par_4 - 'if(par_5 > par_6) then par_6 = par_5 - - - - -