ISaGRAF. Version 3.4

         

CMP


Àðãóìåíòû:

VAL1                                         INT     ëþáîå çíàêîâîå öåëîå àíàëîãîâîå çíà÷åíèå

VAL2                                         INT     ëþáîå çíàêîâîå öåëîå àíàëîãîâîå çíà÷åíèå

LT                                              BOO   TRUE åñëè val1 ìåíüøå ÷åì val2

EQ                                              BOO   TRUE åñëè val1 ðàâíî val2

GT                                             BOO   TRUE åñëè val1 áîëüøå ÷åì val2

Îïèñàíèå:

Ñðàâíèâàåò äâå âåëè÷èíû: ñîîáùàåò îíè ðàâíû èëè ïåðâàÿ áîëüøå èëè ìåíüøå âòîðîé.

(*FBD ïðèìåð áëîêîâ CMP*)

(* ST Ýêâèâàëåíò: Ìû ïðåäïîëàãàåì, ÷òî CMP1 - ýòî ýêçåìïëÿð áëîêà CMP *)

CMP1(level, max_level);

pump_cmd:= CMP1.LT OR CMP1.EQ;

alarm := CMP1.GT AND NOT(manual_mode);

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

LD                     level

ST                     CMP1.val1

LD                     max_level

ST                     CMP1.val2

CAL                  CMP1

LD                     CMP1.LT

OR                    CMP1.EQ

ST                     pump_cmd

LD                     CMP1.GT

ANDN                manual_mode

ST                     alarm



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