IsFirstMastCycle: Indica se questo ciclo è il primo ciclo MAST

Descrizione della funzione

Questa funzione restituisce TRUE durante il primo ciclo MAST dopo un avvio.

Rappresentazione grafica

Rappresentazione IL e ST

Per la rappresentazione generale in linguaggio IL o ST, fare riferimento al capitolo Rappresentazione di funzioni e blocchi funzione.

Descrizione delle variabili di I/O

Uscita

Tipo

Commento

IsFirstMastCycle

BOOL

TRUE durante il primo ciclo del task MAST dopo un avvio.

Esempio

Questo esempio descrive le tre funzioni IsFirstMastCycle, IsFirstMastColdCycle e IsFirstMastWarmCycle utilizzate insieme.

Usare questo esempio nel task MAST. Altrimenti, può essere eseguito più volte o non essere mai eseguito (un task aggiuntivo può essere chiamato più volte o non essere chiamato durante 1 ciclo del task MAST):

VAR
MyIsFirstMastCycle : BOOL;
MyIsFirstMastWarmCycle : BOOL;
MyIsFirstMastColdCycle : BOOL;
END_VAR
MyIsFirstMastWarmCycle := IsFirstMastWarmCycle();
MyIsFirstMastColdCycle := IsFirstMastColdCycle();
MyIsFirstMastCycle := IsFirstMastCycle();
IF (MyIsFirstMastWarmCycle) THEN
(*This is the first Mast Cycle after a Warm Start: all variables are set to their initialization values except the Retain variables*)
(*=> initialize the needed variables so that your application runs as expected in this case*)
END_IF;
IF (MyIsFirstMastColdCycle) THEN
(*This is the first Mast Cycle after a Cold Start: all variables are set to their initialization values including the Retain Variables*)
(*=> initialize the needed variables so that your application runs as expected in this case*)
END_IF;
IF (MyIsFirstMastCycle) THEN
(*This is the first Mast Cycle after a Start, i.e. after a Warm or Cold Start as well as STOP/RUN commands*)
(*=> initialize the needed variables so that your application runs as expected in this case*)
END_IF;