Timer 32-bit
The F183 instruction activates an upward counting 32-bit timer which works on-delayed. The smallest counting unit is 0.01s. During execution of F183 (start = TRUE), elapsing time is added to the elapsed value d. The timer output will be enabled when the elapsed value d equals the set value s. If the start condition EN is set to FALSE, execution will be interrupted and the elapsed value d will be reset to zero. The set value s can be changed during execution of F183.
Input
set value, range 0 to 2147483647
Output
elapsed value, range 0 to 2147483647
The delay time of the timer can be calculated using the following formula: (Set Value s) * (0.01s) = on-delay
All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.
VAR
Start: BOOL:=FALSE;
SetValue: DINT:=0;
TimerOutput: BOOL:=FALSE;
ElapsedValue: DINT:=0;
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
B(B_VARIN,,SetValue,7,3,9,5,);
B(B_VAROUT,,ElapsedValue,16,3,18,5,);
B(B_F,F183_DSTM!,Instance,9,1,16,5,,?DEN?D@'s'?AENO?Cd);
B(B_CONTACT,,Start,3,2,5,4,);
B(B_COIL,,TimerOutput,17,2,19,4,);
L(5,3,9,3);
L(1,3,3,3);
L(1,0,1,5);
L(16,3,17,3);
END_NETWORK_BODY
END_NET_WORK
END_BODY