You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old September 13th, 2018, 11:03 AM   #1
Jim G.
Member
United States

Jim G. is offline
 
Join Date: Nov 2007
Location: Georgia
Posts: 78
Countdown timer

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
  Reply With Quote
Old September 13th, 2018, 11:39 AM   #2
Jim G.
Member
United States

Jim G. is offline
 
Join Date: Nov 2007
Location: Georgia
Posts: 78
Quote:
Originally Posted by Jim G. View Post
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 by Jim G.; September 13th, 2018 at 11:40 AM. Reason: spelling
  Reply With Quote
Old September 13th, 2018, 12:03 PM   #3
widelto
Member
Colombia

widelto is offline
 
widelto's Avatar
 
Join Date: Jul 2005
Location: barranquilla
Posts: 2,595
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.?
__________________
My two cents.
  Reply With Quote
Old September 13th, 2018, 01:32 PM   #4
saultgeorge
Lifetime Supporting Member
United States

saultgeorge is offline
 
Join Date: Jul 2015
Location: Detroit
Posts: 146
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!!
__________________
Detroit City Limit: An Automation Alley Community
  Reply With Quote
Old September 13th, 2018, 02:53 PM   #5
Jim G.
Member
United States

Jim G. is offline
 
Join Date: Nov 2007
Location: Georgia
Posts: 78
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.
  Reply With Quote
Old September 13th, 2018, 03:36 PM   #6
mk42
Member
United States

mk42 is online now
 
Join Date: Jun 2013
Location: MI
Posts: 1,935
Quote:
Originally Posted by Jim G. View Post
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).
  Reply With Quote
Old September 14th, 2018, 06:59 AM   #7
Jim G.
Member
United States

Jim G. is offline
 
Join Date: Nov 2007
Location: Georgia
Posts: 78
Thank you for the info mk42. I can use all the help that I can get.
Starting to make some sense of this.
  Reply With Quote
Old September 15th, 2018, 01:59 PM   #8
Lawton_S
Member
United States

Lawton_S is offline
 
Join Date: Aug 2016
Location: Tallahassee
Posts: 1
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.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
micro800 time/timestamps components and countdown timer matt303 LIVE PLC Questions And Answers 8 January 22nd, 2018 05:56 PM
FactoryTalk View SE odd countdown timer problem cocsbob LIVE PLC Questions And Answers 9 February 21st, 2017 04:17 PM
Countdown timer for Vijeo Citect 7.20 jmzhale LIVE PLC Questions And Answers 5 December 9th, 2016 04:26 AM
scan question slc 5/03 just the cowboy LIVE PLC Questions And Answers 6 March 27th, 2015 10:27 AM
Outputs After Countdown Timer jessreyes LIVE PLC Questions And Answers 2 August 1st, 2012 04:31 PM


All times are GMT -5. The time now is 12:05 AM.


.