ISaGRAF. Version 3.4

         

CTUD


Àðãóìåíòû:

                CU           BOO        âõîä äëÿ ñ÷åòà ââåðõ (ñ÷èòàòü êîãäà CU ðàâíî TRUE)

                CD           BOO        âõîä äëÿ ñ÷åòà âíèç (ñ÷èòàòü êîãäà CD ðàâíî TRUE)

                RESET     BOO        êîìàíäà ñáðîñà (äîìèíàíòà)

                                               (CV=0 êîãäà RESET = TRUE)

                LOAD      BOO        êîìàíäà çàãðóçèòü (CV=PV êîãäà LOAD = TRUE)

                PV           INT           ïëàíèðóåìîå ìàêñèìàëüíîå çíà÷åíèå

                QU           BOO        ïåðåïîëíåíèå: TRUE åñëè CV = PV

                QD           BOO        ïåðåïîëíåíèå: TRUE åñëè CV = 0

                CV          INT           ðåçóëüòàò ñ÷åòà

Ïðåäóïðåæäåíèå:

Áëîê CTUD íå îïðåäåëÿåò ïåðåäíèé è çàäíèé ôðîíòû âõîäà (CU è CD). Äëÿ òîãî ÷òîáû ñîçäàòü èìïóëüñíûé ñ÷åò÷èê, åãî íóæíî ñâÿçàòü ñ áëîêàìè “R_TRIG” èëè “F_TRIG”.

Îïèñàíèå:

Ñ÷èòàåò îò 0 äî çàäàííîãî çíà÷åíèÿ ïî 1 èëè îò çàäàííîãî çíà÷åíèÿ âíèç äî 0 ïî 1.

(* FBD ïðîãðàììà èñïîëüçóþùàÿ áëîê "CTUD" *)

 

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

CTUD1(R_TRIG1(add_elt), R_TRIG2(sub_elt), reset_cmd, load_cmd,100);

full := CTUD1.QU;

empty := CTUD1.QD;

nb_elt := CTUD1.CV;

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

LD                     add_elt

ST                     R_TRIG1.clk

CAL                  R_TRIG1

LD                     R_TRIG1.Q

ST                     CTUD1.cu

LD                     sub_elt

ST                     R_TRIG2.clk

CAL                  R_TRIG2

LD                     R_TRIG2.Q

ST                     CTUD1.cd

LD                     reset_cmd

ST                     CTUD1.reset

LD                     load_cmd

ST                     CTUD1.load

LD                     100

ST                     CTUD1.pv

CAL                  CTUD1

LD                     CTUD1.QU

ST                     full

LD                     CTUD1.QD

ST                     empty

LD                     CTUD1.CV

ST                     nb_elt



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