Commands and functions
P.
178 of 349
Minute
Second
Stringformat for a formatted
output/conversion
Definition
●
Function
minute
()
Arguments
●
none
Effect
●
The system time (minute) is stored in a variable
Data type result (Return)
●
Data type u08
Example:
Stop watch see page 178
Definition
●
Function
second
()
Arguments
●
none
Effect
●
The system time (second) is stored in a variable
Data type result (Return)
●
Data type u08
Example:Stop watch
Timing the seconds at which the variable Stopper_Go has the value ON. A c1400 text string
shall be given that prints the time in the format 000d:000h:000m:000s (days, hours, minutes,
seconds).
Here the implementation, at which the seconds can be found in the variable
Stopper_time
and the
formatted output in
Stopper
. Cf.example Stop watch V2 on page 224).
[EibPC]
Stopper=$$
Stopper_start=0s32
Stopper_time=1s32
Stopper_Go=AUS
// Start the stop watch (calculate offset)
if (Stopper_Go) then {
Stopper_start=-convert(hour(),0s32)*3600s32-convert(minute(),0s32)*60s32-
convert(second(),0s32)
} endif
if change(dayofweek()) then Stopper_start=Stoppe86400s32 endif
// End of stop time
if !Stopper_Go then {
Stopper_time=convert(hour(),0s32)*convert(minute(),0s32)*60s32+convert(second(),
0s32)+Stopper_start;
Stopper=stringformat(Stopper_start/86400s32,0,3,3,3)+$d:$+\\
stringformat(mod(Stopper_start,86400s32)/3600s32,0,3,3,3)+$h:$+\\
stringformat(mod(Stopper_start,3600s32)/60s32,0,3,3,3)+$m:$+\\
stringformat(mod(Stopper_start,60s32),0,3,3,3)+$s$
} endif
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]