Host Engineering Forum

General Category => DirectSOFT => Topic started by: Mikek on January 26, 2017, 04:59:39 PM

Title: Numeric Display Question
Post by: Mikek 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.
Title: Re: Numeric Display Question
Post by: Mike Nash 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.)
Title: Re: Numeric Display Question
Post by: BobO 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. ;)
Title: Re: Numeric Display Question
Post by: Scallixu on March 26, 2018, 11:03:34 PM
I'm glad every time I get involved in hearing about this great comment. I will go researching to talk again.