Countdown timer

Jim G.

Member
Join Date
Nov 2007
Location
Georgia
Posts
187
I have an unwinding roll process. On a display (7 inch Comfort) is a timer that shows "Time to Splice" in seconds. In the PLC (S7-1500), this is calculated as an UInt data type.
I put in a calculation to divide by 60 and show the result as a real number tag "Time To Splice_Converted" and used this tag to display on HMI as a number with 2 decimal places. Display only shows the whole number. I assume its because I was using an integer value in the calculation.

I tried to take the "Time To Splice" (UInt) value and convert it to a Real number first and then do the calculation, but was unable to display this on the HMI. My display showed "####" The I/O field on the HMI is set for Decimal with 2 places in the properties.
I want to display the seconds until splice as a decimal number (ie.. 90seconds display as 1.50 on display, 45 seconds as .75, etc.)

What am I missing here? Does everything need to be the same data type for it to work? Or what?

Thank you for the help
 
I have an unwinding roll process. On a display (7 inch Comfort) is a timer that shows "Time to Splice" in seconds. In the PLC (S7-1500), this is calculated as an UInt data type.
I put in a calculation to divide by 60 and show the result as a real number tag "Time To Splice_Converted" and used this tag to display on HMI as a number with 2 decimal places. Display only shows the whole number. I assume its because I was using an integer value in the calculation.

I tried to take the "Time To Splice" (UInt) value and convert it to a Real number first and then do the calculation, but was unable to display this on the HMI. My display showed "####" The I/O field on the HMI is set for Decimal with 2 places in the properties.
I want to display the seconds until splice as a decimal number (ie.. 90seconds display as 1.50 on display, 45 seconds as .75, etc.)

What am I missing here? Does everything need to be the same data type for it to work? Or what?

Thank you for the help

Let me clarify.....

I want to display the seconds until splice as a decimal number which shows minutes as a decimal number iie.. 90 seconds display as 1.50 minutes on display, 45 seconds as .75 minutes, etc.)
Again Thanks for any help
 
Last edited:
Use a 60 seconds timer, every 60 seconds increment a counter.
If for instance your goal is 8 minutes. Your timer is 25 seconds and your counter is 1 then that means 1 minute and 25 seconds, at the same timer accumulator is up to 60.
60 means 100% that result in 1.4166 mins and if your goal is 8 minutes then if your countdown timer is 8 minus 1.4166 = 6.5834 mins to complete.
Am I clear.?
 
Hey, Jim, I don't know if this will help you. I also don't know Siemens well at all. Anyway, I had a project just this summer that had a lot of places where there were "time remaining" routines. It was rs5000 using CCW in a panelview. I had a lot of stuff like "off time remaining" , "on time remaining" "cycle time remaining" etc. So I gave the operators a keypad on the HMI that would enter the times they wanted in minutes, then did the conversion in logic for my timer presets, which as you know in 5000 are mSec. Then I reconverted it back to minutes for the HMI readback. I used compare instructions to operate valves and other things.
Don't know if this helped you, but good luck!!
 
Thanks for all the input. I went back and converted all values to REAL numbers and this time it started working. I have a display that shows my time remaining counting down in minutes in the format I wanted.

This is my first venture into the world of Siemens controllers and HMI's. I am muddling through. Right now, not a big fan. Maybe I'll get it figured out before I retire.
Thanks to all.

For those in the Carolinas (and I have family there), please be safe.
 
I tried to take the "Time To Splice" (UInt) value and convert it to a Real number first and then do the calculation, but was unable to display this on the HMI. My display showed "####" The I/O field on the HMI is set for Decimal with 2 places in the properties.
I want to display the seconds until splice as a decimal number (ie.. 90seconds display as 1.50 on display, 45 seconds as .75, etc.)

I know you sorted it out, but I wanted to reply back with some extra info.

####### on the HMI usually means one of two things:

1) The HMI can't read the tag. Either no connection to the PLC, or that tag doesn't exist in the PLC. I can't count the number of times i've forgotten to download, and been confused why the HMI won't work.

2) The field doesn't have enough space for what needs to be displayed. If you want to display 4 digits and 2 more after the decimal (9999.99), and your IO field is only wide enough for 4 digits, it will show as ####.

Also, if use decimal points on an IO field linked to an integer, it passes them to the tag as if the digits were never there (IE if there are 2 decimal places shown, 2.5 becomes 250 if transferred to an INT).
 
I had an application I did on old Butler roll stands many years ago that used two counters and tree prox sensors to trigger the splice very accurately and reliably reducing waste and the need for the second pressman to monitor the rolls. It cost less than $300 per roll stand. Adding a PLC and a little math allowed the current diameter of the roll to be calculated very accurately, but determining the time to splice was complicated because the linear feet of paper for a certain diameter changed depending on the thickness of the paper in use. I didn’t need this info anyway, so I didn’t even try to work this out. Maybe you can add this by having the operator enter info on the HMI. Let me know if you want further details.
 

Similar Topics

Hello all, I am working on an old machine that has a hydraulic filter that must be replaced every so often. When the filter needs changing, a...
Replies
7
Views
1,547
So I'm fairly new to PLC programing. in my PLC class my task right now is to write some logic that uses a thumbwheel to set the timer thats...
Replies
29
Views
4,297
Hi guys, Thought I might ask here if anyone knows, currently have tech support looking for a solution. I have a micro820 and wanting to...
Replies
8
Views
2,516
I did not create the program but I have a weird countdown timer problem. it is user input, say it is set for 5 minutes; it will countdown to...
Replies
9
Views
4,416
Is there a way to created a countdown timer that would display when a trigger becomes true and go away when the timer reaches zero?
Replies
5
Views
3,407
Back
Top Bottom