diff --git a/ADbasic_program_buffered.bas b/ADbasic_program_buffered.bas index 4c50713f38b2819898b36339fea315c534e4953e..8017a0cb7bb0a441cde94a6a2974afb07692e714 100644 --- a/ADbasic_program_buffered.bas +++ b/ADbasic_program_buffered.bas @@ -113,6 +113,7 @@ init: PROCESSDELAY = 2000 par_1 = 1 'Process Status par_4 = 0 'Wait counter + par_6 = 0 'Retrigger wait 'Initialize Variables processIdx = 0 @@ -275,8 +276,8 @@ EVENT: 'Set all voltages synchronously P2_Sync_All(110000b) -'======================= INCREASE TIME (IF NO WAIT) ====================== -'======================= SAVE MEASURED AIN VALUES ====================== + '======================= INCREASE TIME (IF NO WAIT) ====================== + '======================= SAVE MEASURED AIN VALUES ====================== IF (Par_3 <> processIdx) THEN inc processIdx ' Write ADC Values @@ -292,7 +293,7 @@ EVENT: ELSE ' If Par_3 == processIdx we reached a wait. This means we pause the 'clock' until we get the singnal to continue. ' This signal can either be that Par_6 was set to 1, or we reach the timeout (in Par_5) - IF ((Par_6 = 1) OR (processIdx+Par_4 = Par_5)) THEN + IF ((Par_6 = 1) OR (Par_4 = Par_5)) THEN Par_3 = -1 'Disable wait P2_Set_Par(DIO1,1,4,-1) 'Resume DIO1 P2_Set_Par(DIO2,1,4,-1) 'Resume DIO2 diff --git a/Tico_DIO32.bas b/Tico_DIO32.bas index 7b815ac5521aa285fdf3d873e58af1c19f655a28..110b837eefe0c53a38b1d38ea6841650f9cbf93c 100644 --- a/Tico_DIO32.bas +++ b/Tico_DIO32.bas @@ -33,7 +33,7 @@ Event: Digout_Long(par_1) - IF Par_2 <> Par_4 THEN + IF (Par_2 <> Par_4) THEN inc par_2 ENDIF 'wait: pause time until Par_4 is changed from main process