ISaGRAF. Version 3.4

         

TRUNC


Àðãóìåíòû:

IN                         REAL                   ëþáàÿ äåéñòâèòåëüíàÿ àíàëîãîâàÿ âåëè÷èíà

Q                          REAL                   åñëè IN>0 íàèáîëüøåå öåëîå ìåíüøåå èëè ðàâíîå

                                                        âõîäà

                                                        åñëè IN<0 íàèìåíüøåå öåëîå áîëüøåå èëè ðàâíîå

                                                               âõîäà

Îïèñàíèå:

Îòñåêàåò äðîáíóþ ÷àñòü.

(*FBD ïðèìåð áëîêà “TRUNC”*)

(* ST Ýêâèâàëåíò: *)

result := TRUNC (+2.67) + TRUNC (-2.0891);

(* îçíà÷àåò: result := 2.0 + (-2.0) := 0.0; *)

(* IL Ýêâèâàëåíò: *)

LD                     2.67

TRUNC

ST                     temporary  (* âðåìåííûé ðåçóëüòàò TRUNC *)

LD                     -2.0891

TRUNC

ADD                  temporary

ST                     result



Ñîäåðæàíèå  Íàçàä  Âïåðåä