Host Engineering Forum
General Category => General Discussion => Topic started by: PLCGuy on November 09, 2018, 06:50:46 AM
-
How can I display my up counter, or any counter, on the HMI. Example I see 19m 2.34s for the T0.ACC. I tried copy but that did not work. Move will not work either. I was trying to move it as a string but that is not going to work. Or is there another way to display a counter in minutes and seconds on the HMI. In DS I used division and POP to do it. I would take the total count and divide it out for minutes and seconds using POP. Do-More has to have a nicer way of doing this. Would I use symbolic by creating DEV002 as my port? If so, what would be the tag name or element?
-
Why will a string not work? That is the simplest way to do it unless your HMI just doesn't support strings at all.
There are quite a few posts on how to do this, both here and on ADC's forum.
-
Which HMI? C-more should have a Do-more Timer object already to reference T0 (not T0.Acc, it should know to look at the .Done bit vs. the .Acc based on the object type)
-
I guess I am not asking the right question. How do I display a counter accumulative value in minutes and seconds on the HMI. I can get T8.acc but it is just a single double word integer. Was hoping for a simpler way then in DS.
-
What is the HMI?
-
EA9-10 inch
-
Is this what your looking for?
Under Help contents search for Scripting Language for more information and formats.
-
Or are you looking for something more like this?
-
Nice I will try both. Actually going to do this with a counter.
The counter is an up down counter represents cooling up and cooling down time. counting with the ST4, 1sec bit. Take the seconds and display then on the HMI as minutes and seconds. Counter counts up to 20 mins and turns on a bit, when cooling down it cools down to zero seconds, a bit is on.
-
Can you do that with a counter? I am getting frustrated reading the help file and there is no counter example. It does mention if doing a counter you have to pay attention to .acc, .done, etc. I am trying to but can not get the formatting correct to get the green light. There is no up down timer. Is that possible to add?
-
There is no up/down timer, but creating a down timer is very simple math...just subtract the .Acc from the total time in milliseconds. MATH D0 = 1200000-T0.Acc will time down for 20 minutes.
As for being frustrated with the counter, what are you struggling to do exactly?
-
I was trying to format the counter like in the timer example.
FMTCNT(CT0.acc,sec)
FMtCnt((CT0,sec)
Tried variations, but not getting anywhere
-
The whole idea in this project is to allow the oven to heat up for 20mins before it is ready to go. This time would be displayed on the HMI. Then if the operator turns off the oven, it will show how long it has been cooling down, showing that time on the HMI. So basically an up down time display. The range is 0 to 20mins. Both ways.
I have done this before in DS5 using division and the POP command.
-
This code is using the same timer for up and down. C11 is selecting up timer or down timer.
-
Thank you. I will try this out later.
Would you consider making this or something similar in an i_box? ;D Or am I the only one doing an up down timer?
-
This is the first request I've ever heard for an up and down timer. If there is a need, I guess most just use TMR and TMRDOWN.
-
That surprises me. Some of our processes are critical and we need to know how long it has been on and how long the process has stopped. Having just one timer, or in this case a counter counting up and down using one display works for us. I need to know how long a process has been stopped to decide what to do next.
So I ended up doing the attached. Just a mock up using the simulator so far.