Confronto degli editor di programmazione

I criteri di scelta di un editor di programmazione possono essere:

Operazioni booleane: Editor LD/FBD raccomandato

LD/FBD (raccomandato)

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 passi

35 passi

35 passi

Chiamate di funzioni: Editor LD/FBD raccomandato

LD/FBD (raccomandato)

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 passi

35 passi

35 passi

Calcoli incondizionati: Testo Strutturato (ST) raccomandato

LD/FBD

ST (raccomandato)

IL

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

108 passi

108 passi

108 passi

Calcoli condizionati: Testo Strutturato (ST) raccomandato

LD/FBD

ST (raccomandato)

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 passi

109 passi

109 passi

Calcoli "if-else" condizionati: Testo Strutturato (ST) raccomandato

LD/FBD

ST (raccomandato)

IL

NOTA

Quando si passa dal funzionamento incondizionato a quello condizionato, occorre ridisegnare l'intera rete!

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 passi

190 passi

194 passi

Operazioni circuito: Testo Strutturato (ST) raccomandato

LD/FBD

ST (raccomandato)

IL

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

Conclusione:

L'ultima revisione: 2022-04-19Feedback su questa paginaPanasonic hotline