
adccommunitymod (AutomationDirect) asked a question.
touch screen count down timer
Created Date: September 23,2008
Created By: toddj
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
Hello, I have a D2-260 and a 15 " c-more and need to build a touch screen count down timer. user enters a value in min. presses start counter counts down in min:sec at zero min:sec i need an audible alarm anyone have advice? I am very new to the software/hardware.. Thanks Todd
Created Date: September 24,2008
Created by: Nora
Hi-
You should start by doing the tutorials just to get used to the software.
From your post, it seems that you 've got some of the logic worked out.
Expand your logic, ie: flow chart to get your thoughts in order.
You can read the part of the PLC manual where it describes the different data types and how the inputs and outputs are handled.
It will make a lot more sense once you 've done that and you can then post a less general question. I am sure that you will get there without too much trouble!
My recent program uses a different PLC/ touchscreen combination but does the same operation as you want to do. It was my first program with this particular PLC and was not too difficult, although I had a terrible time due to some minor error.
Nora
Created Date: September 24,2008
Created by: KPrice
toddj, I agree with Nora, the tutorials are very good.
And there are many ways to go about it.
Here's one way to get started.
These tags are just what I used, use whatever tags you want.
I used a TMRA.
To convert your setpoint in minutes to tenths-of-a-second:
LD V2202 (setpoint in minutes up to 9999 minutes)
MUL K600
OUTD V2204 (TMRA preset tenths-of-a-second)
Use a TMRA timer (T0) with an Enable bit and a bit for the Reset.
Then to get your down-counting minutes and seconds:
LDD V2204 (TMRA preset tenths-of-a-second)
SUBD V0 (TMRA accumulating value TA0 tenths-of-a-second)
DIVD V2200 (constant K600 LDD into V2200 + V2201 by other means)
OUTD V2206 (minutes counted down)
POP
OUT V2210 (tenths-of-a-second counted down)
When timer times-out, T0 turns on for alarm.
As Nora suggests, you'll need some flow chart logic for timer Enable and Reset.
Hope this helps.
Created Date: September 24,2008
Created by: a agnone
Toddj I just did a project with an up down timer. I used a up/down counter. Trigger the up and down with a sp4. This gives you seconds to work in. Do a LD CTA0 to V2000, then divide by 60 out v2001, pop out v2003 and there you go. You will have minutes and seconds. Works great. With the c-more you use display numeric and label each. Of course you will have to figure out how to get the counter to work the way you want it to.
Created Date: September 23,2008
Created by: toddj
Hello, I have a D2-260 and a 15 " c-more and need to build a touch screen count down timer.
user enters a value in min.
presses start
counter counts down in min:sec
at zero min:sec i need an audible alarm
anyone have advice? I am very new to the software/hardware..
Thanks
Todd