ISaGRAF. Version 3.4

         

SHL


Àðãóìåíòû:

IN                         INT                 ëþáàÿ öåëàÿ àíàëîãîâàÿ âåëè÷èíà

NbR                     INT                 êîëè÷åñòâà ñäâèãàåìûõ áèò (â äèàïàçîíå [1..31])

Q                          INT                 ïðîâåðíóòàÿ âïðàâî âåëè÷èíà

                                                        åñëè NbR <= 0, òî íåò íèêàêîãî ýôôåêòà

                                                        ìëàäøèé áèò çàìåíÿåò íóëåì

Îïèñàíèå:

Ñäâèãàåò áèòû âëåâî. Ñäâèãàþòñÿ 32 áèòà.

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

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

result := SHL (register,1);

(* register = 2#0100_1101_0011_0101 *)

(* result    = 2#1001_1010_0110_1010 *)

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

LD                     register

SHL                   1

ST                     result



Ñîäåðæàíèå ðàçäåëà