News:

  • August 29, 2026, 02:41:28 AM

Login with username, password and session length

Author Topic: Do More Time  (Read 18253 times)

Rastus81

  • Jr. Member
  • **
  • Posts: 15
Do More Time
« on: March 03, 2013, 01:52:39 AM »
Hello All,

Ive previously posted my initial question on the AD forum here.
http://forum.automationdirect.com/showthread.php?t=10836

But now I've discovered that the string copy does not show double digits for single minute values.

Can anyone suggest how i can display 17.04, instead of 17.4

Im just trying to display a captured time.

Thanks
Rastus


b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Do More Time
« Reply #1 on: March 03, 2013, 10:37:10 AM »
In the 'help' fro the STRPRINT function click the 'Help Reference for the String Scripting language'. There check out 'zeropad' under 'Number Formatting Functions'. It looks like 'FmtInt(SDT0.Minute,dec,2,zeropad)' instead of just 'SDT0.Minute' should give you what you want.
An output is a PLC's way of getting its inputs to change.

Rastus81

  • Jr. Member
  • **
  • Posts: 15
Re: Do More Time
« Reply #2 on: March 03, 2013, 09:18:29 PM »
Thankyou, that works great.

I didn't know there were so many string handling options! Wow.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: Do More Time
« Reply #3 on: March 04, 2013, 08:45:40 AM »
I didn't know there were so many string handling options! Wow.
Hence, the name.  ;D

Rastus81

  • Jr. Member
  • **
  • Posts: 15
Re: Do More Time
« Reply #4 on: March 04, 2013, 09:36:46 AM »

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6174
  • Yes Pinky, Do-more will control the world!
Re: Do More Time
« Reply #5 on: March 04, 2013, 10:17:23 AM »
Well to be completely honest, it was this capable when it was called something else, but the attorneys had contrary opinions. ::) But hey, it does do more, no?

Glad it was able to give you what you want.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO