Host Engineering Forum
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 23, 2018, 02:39:37 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Numeric Display Question  (Read 1952 times)
Mikek
Newbie
*
Posts: 1


« on: January 26, 2017, 04:59:39 pm »

Hello Everyone.

 Let me start by saying that I have only basic PLC programming skills and this is my first time using DirectSoft.
 What I am trying to do is display on my HMI the count down of time in minutes and seconds of a fixed time soak cycle.
 I can display the raw data from the timer but do not know how to convert to minutes and seconds.
Any help would be appreciated.

D0-06 AR  using Directsoft6C
Cmore EA9-T6CL using Cmore 6.30
KSeq

Thank you.
Logged
Mike Nash
Hero Member
*****
Posts: 521


« Reply #1 on: January 27, 2017, 09:50:10 pm »

I seem to recall others have asked this type of question, especially on the Automation Direct forum, but I didn't feel like looking, so I created this little snippet that works on a D0-06 and should work on most any DirectLogic processor since it is only a 4 digit BCD timer. If you are using something else, like an 8 digit timer the instructions will need tweaking for doubles.

I didn't use any Iboxes, mostly because they "hide" the memory locations in the equation from the cross reference, at least in DS5 and before. I don't yet have DS6 (because I have Do-more!) Also, the check for a negative subtraction result is easier to do this way, at least to me.

(Yes franji1 and BobO, I know it isn't "hiding" it really, but the result is the same.)
« Last Edit: January 27, 2017, 09:52:29 pm by Mike Nash » Logged
BobO
Host Moderator
*****
Posts: 4105


Yes Pinky, Do-more will control the world!


« Reply #2 on: January 27, 2017, 10:58:32 pm »

(Yes franji1 and BobO, I know it isn't "hiding" it really, but the result is the same.)

We're not judging. Just creating awesome new stuff that completely eliminates the issues. Wink
Logged

"We would rather apologize to 20% for what we chose not to do, than to apologize to 100% for what we did poorly." -BobO
Scallixu
Newbie
*
Posts: 2


« Reply #3 on: March 26, 2018, 10:03:34 pm »

I'm glad every time I get involved in hearing about this great comment. I will go researching to talk again.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM