ISaGRAF. Version 3.4

         

CTU


Àðãóìåíòû:

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

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

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

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

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

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

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

Îïèñàíèå:

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

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



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

CTU1(R_TRIG1(command),NOT(auto_mode),100);

overflow := CTU1.Q;

result := CTU1.CV;

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

LD                     command

ST                     R_TRIG1.clk

CAL                  R_TRIG1

LD                     R_TRIG1.Q

ST                     CTU1.cu

LDN                   auto_mode

ST                     CTU1.reset

LD                     100

ST                     CTU1.pv

CAL                  CTU1

LD                     CTU1.Q

ST                     overflow

LD                     CTU1.cv

ST                     result



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