Thx Jim, well here is some of my code, just to explain what was i thinking.
IF and ELSIF example ??? plc correct me if it is wrong
IF (plc_v1<>op7_v1) OR op7_i1=0 AND (zak.zac_vre=0) AND (zak.kon_vre=0)
//if the value of the plc inputs (plc_v1) is different then the value of the selected inputs on OP7 (op7_v1) or the value of selectd outputs on OP7 (op7_i1) is equal zero and if the analog tolerance (zak.zac_vre "value from" zak.kon_vre "value to") - means that nothing is selected on OP7
THEN vno_prog_stop:=true;
// then the error is displayed on the OP7, and the application is stopped
ELSIF (plc_v1=op7_v1) AND op7_i1<>0 AND (zak.zac_vre=0)OR (zak_kon_vre=0);
// if the value of plc inputs (plc_v1) corresponds to the value of inputs selected on the OP7 (op7_v1) and the value of outputs selected on the OP7 (op7_i1) is different from 0 and if tollerance is equal zero - means that we are useing just DI and DO
THEN set:=true; set2:=true;
// then two timers are started
ELSIF (plv_v1<>op7_v1) AND op7_il=0 AND (zak.zac_vre1>0) AND (zak.kon_vre1>0) AND (zak.zac_vre<zak.kon_vre)
//if the value of the plc inputs (plc_v1) is different then the value of the selected inputs on OP7 (op7_v1) or the value of selectd outputs on OP7 (op7_i1) is equal zero and if tolerance is different from zero - means that we are useing just analog inputs and outputs
THEN set:=true; set2:=true;
// then two timers are started and the program goes on
ELSIF (plc_v1=op7_v1) AND op7<>0 AND (zak.zac_vre>0) AND (zak.kon_vre>0) AND (zak.zac_vre<zak.kon_vre)
//if the value of plc inputs (plc_v1) corresponds to the value of inputs selected on the OP7 (op7_v1) and the value of outputs selected on the OP7 (op7_i1) is different from 0 and if the tollerance is different from zero - menas that we are useing both AI and AO and DI and DO
THEN set:=true; set2:=true;
// then two timers are started and the application goes on
END_IF;
nesting IF example; if it is wrong please correct me
IF (plc_v1<>op7_v1) OR op7_i1=0 AND (zak.zac_vre=0) OR (zak.kon_vre=0)
// if plc input value (plc_v1) differs from the value of selected inputs on OP7 (op7_i1) and the analog tolerance value (zak.zac_vre and zak.kon_vre) is equal zero
THEN vno_prog_stop:=true;
// the OP7 show the error on the screen
ELSE
IF ((plc_v1=op7_v1) AND op7_i1<>0) OR (zak.zac_vre>0 and zak.kon_vre>0 AND zak.kon_vre>zak.zac_vre)
// if the plc value of inputs (plc_v1) is equal to the OP7 value of inputs (op7_v1) or the analog tollerance is selected on OP7
THEN set:=true; set2:=true;
// the two timers are started and the application goes on
END_IF;
END_IF;
I wanted to put the third example, but i dont know how to do it, perhaps somebody of you guys knows and might give me an eazy example with ...
Thanks again for your time and help.
Regards
Bostjan.