Comparison of programming editors

Possible criteria for selecting a programming editor may be to:

Boolean operations: LD/FBD editor recommended

LD/FBD (recommended)

ST

IL

(* 2 of 3 *)
Y1:=NOT X1 AND X2 AND X3 OR
    X1 AND NOT X2 AND X3 OR
    X1 AND X2 AND NOT X3;

(* Handle error case *)
if (Error1 OR Error2 OR Error3) then
    Alarm:=TRUE;
    Horn :=TRUE;
end_if;

(* Confirm alarm *)
if (ConfirmAlarm) then
    Horn:=FALSE;
end_if;

(* Reset alarm *)
if (ResetAlarm AND NOT Error1 AND NOT Error2 AND
NOT Error3) then
    Alarm:=FALSE;
    Horn :=FALSE;
end_if;

42 steps

35 steps

35 steps

Function calls: LD/FBD editor recommended

LD/FBD (recommended)

ST

IL

(* Calculate statistical parameters *)
if (bCalculateStatistics) then
   	StatisticalCalculations(CalculateSum := bCalcSum,
                            CalculateMean := bCalcMean,
                            CalculateDeviation := bCalcDeviation,
                            Number := 3,
                            Input1 := Integer1,
                            Input2 := Integer2,
                            Input3 := Integer3,
                            Sum => Sum,
                            Mean => Mean,
                            Deviation => Deviation);
end_if;

32 steps

35 steps

35 steps

Unconditional calculations: ST editor recommended

LD/FBD

ST (recommended)

IL

(* Linear interpolation: *)
y:=y1+(x-x1)*(y2-y1)/(x2-x1);

108 steps

108 steps

108 steps

Conditional calculations: ST editor recommended

LD/FBD

ST (recommended)

IL

(* Conditional linear interpolation *)
if (NOT(XLtX1) AND NOT(XGtX2) AND
    NOT(X1EqualX2)) then
    y:=y1+(x-x1)*(y2-y1)/(x2-x1);
end_if;

111 steps

109 steps

109 steps

Conditional if-else calculations: ST editor recommended

LD/FBD

ST (recommended)

IL

NOTE

When changing from unconditional to conditional operation the whole network has to be redrawn!

if (x > x1) then
    y:=y1;
elsif (x < x2) then
    y:=y2;
elsif (x1 = x2) then
    y:=(y1 + y2)/2;
else	(* Linear interpolation *)
    y:=y1+(x - x1)*(y2 - y1)/(x2 - x1);
end_if;

194 steps

190 steps

194 steps

Loop operations: ST editor recommended

LD/FBD

ST (recommendation)

IL

Sum:=0;
for i := 1 to 10 do
    Sum:=Sum+Array1[i];
end_for;
Mean:=Sum/10;

Conclusion:

Modified on: 2022-03-02Feedback on this pagePanasonic hotline