Host Engineering Forum
General Category => General Discussion => Topic started by: maciek on April 03, 2019, 07:49:27 PM
-
i am trying to display remaining time on the c more hmi but i only care for seconds and minutes, milliseconds kind of make it confusing. Any ideas? all for brx
click has an easy option
-
C-more should support setting the resolution of the display of a timer.
-
As an alternative, use STRPRINT to put the timer into a string in the format you want.
-
a little late but can you show me how to use strprint and change ms timer to seconds
-
for all the details, see Help topic DMD0168, String Scripting Language Reference
FmtTMR - Timer Accumulator Formatting Function
FmtTMR(<tmrelement> | <numericelement> [, smart | full], [sec | tenths | hundredths | thousandths])
smart vs. full -
smart - only displays significant hour and minute time values
full - always displays hour and minute values
so
STRPRINT SS0 "FmtTmr(T0, full, sec)"
will display T0 accumulator full hours/minutes/seconds to a resolution of seconds.
So a .Acc value of 0 will be "0:00:00"
.Acc value of 3,600,000 will be "1:00:00"
STRPRINT SS0 "FmtTmr(T0, smart, sec)"
will be
"0:00"
and
"1:00:00"