Commands and functions
P.
224 of 349
○
17: Alternative notation (s. man 3 printf), left-justified and a sign before a positive
number ( only permitted if
data
is of data type f
XX
)
○
18: Prefix 0x also for a zero and zero-padded (only permitted for a conversion into
hexadecimal notation 'x'; ignored if
precision
is given).
○
19: Prefix 0x also for a zero and left-justified (only permitted for a conversion into
hexadecimal notation 'x').
○
20: Prefix 0X also for a zero and zero-padded (only permitted for a conversion into
hexadecimal notation 'X'; ignored if
precision
is given).
○
21: Prefix 0X also for a zero and left-justified (only permitted for a conversion into
hexadecimal notation 'X').
●
field_width:
Definition of the minimum field width
●
precision:
Definition of the precision
Data type result (Return)
●
Data type c1400
Example: Stop watch V2 (Cf. Example:Stop watch, page 178).
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
. In contrast to Example:Stop watch (page 178), the time difference is
counted by means of
after
.
[EibPC]
Stopper=$$
Stopper_time=0s32
Stopper_Go=AUS
if (Stopper_Go) then {
Stopper_time=1s32;
write(address(85u16),$Start$c14)
} endif
if after(change(Stopper_time),1000u64) then Stopper_time=Stopp1s32 endif
// End of stop time
if !Stopper_Go then {
Stopper=stringformat(Stopper_time/86400s32,0,3,3,3)+$d:$+\\
stringformat(mod(Stopper_time,86400s32)/3600s32,0,3,3,3)+$h:$+\\
stringformat(mod(Stopper_time,3600s32)/60s32,0,3,3,3)+$m:$+\\
stringformat(mod(Stopper_time,60s32),0,3,3,3)+$s$
} endif
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]