Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Time from an Analog
Hi All,
I'm sure this is obvious, but my brain is a bit soft lately...:) I have an application where I have a 'countdown' analog signal representing time in seconds, where it is hours of time (1 hour = 3600d, 4 hours = 14400d). I need to display the countdown time on touchpanels in a readable form, preferably hours and minutes.? Anyone have a module or a simple technique to do this? |
If this is a SmartGraphics panel?? Just format the analog as "time" On Mon, Jun 21, 2021 at 9:25 PM ckangis <chris@...> wrote: Hi All, |
A simple calculation could help you : Seconds = TotalTime % 60 Minutes =
TotalTime?
% 60 Hours =
TotalTime?
/ 3600 % 3600 Regards, Le?lun. 21 juin 2021 ¨¤?21:38, Phil Bridges <gravityhammer@...> a ¨¦crit?:
|
Sorry a little mistake The calculation is the following : Seconds = TotalTime % 60 Minutes = TotalTime / 60 % 60 Hours = TotalTime? / 3600 % 3600 Regards, Le?mar. 22 juin 2021 ¨¤?06:42, S¨¦bastien LENOIR via <sebastien.lenoir=[email protected]> a ¨¦crit?:
|
Thanks Guys!
Phil, yes an SG panel and that was what I was looking/hoping for. Formats just as I wanted...? I'm using the (cm) CountDown Timer module. When initially triggers, the analog populates as expected (xx:yy:zz), However, as the seconds count down (I see it decrementing in Debug) the display does not change. until I hit the STOP button on the CDTimer. At this point the display updates to the current time. If I send values in DBg directly,? the display updates. If I set up an Analog Increment with a 1d increment value, the Display counts as expected!! I put the CDT Analog thru ABUFs and even though the values change in DBg, the display doesn't until the Timer is stopped. ?Its as if the Display object knows that the Analog decrement is coming from the CDT vs. my manual triggers - this of course doesn't make any sense!! ? ?Any ideas??? TIA! |
to navigate to use esc to dismiss