IsFirstMastCycle: indicar si este ciclo es el primer ciclo MAST

Descripción de la función

Esta función devuelve TRUE durante el primer ciclo MAST después de un arranque.

Representación gráfica

Representación IL y ST

Para ver la representación general en lenguaje IL o ST, consulte el capítulo Representación de funciones y de bloques de funciones.

Descripción de variables de E/S

Salida

Tipo

Comentario

IsFirstMastCycle

BOOL

TRUE durante el primer ciclo de tarea MAST después de un arranque.

Ejemplo

En este ejemplo se describen las tres funciones utilizadas a la vez: IsFirstMastCycle, IsFirstMastColdCycle y IsFirstMastWarmCycle.

Use este ejemplo en la tarea MAST. De lo contrario, se puede ejecutar varias veces o posiblemente nunca (puede llamarse varias veces a una tarea adicional o no llamarse durante un ciclo de tarea 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;