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 January 21st, 2014, 06:30 AM   #1
whussain6
Member
United Kingdom

whussain6 is offline
 
Join Date: Oct 2013
Location: Newcastle
Posts: 90
Calculate/Find RedLion System OFF Time

Dears,

I have Productivity station which is running specific code every midnight. Now if for example system is off for couple of days it will mess up the code.

So I want to find out the time it has stayed OFF (only the days, time may not matter) Then I will find out the number of days it has stayed off and will execute the code same number of times.

An idea comes in mind is that if we get the date just before turning off and then get date when it turns on and find the difference? not sure how it will work?
  Reply With Quote
Old January 23rd, 2014, 05:50 AM   #2
Pollasit
Member
Thailand

Pollasit is offline
 
Join Date: Jan 2014
Location: Bangkok
Posts: 10
Create numeric Tag "LastDay", Set it as "Retentive"
Numeric Tag "NowDays" that define source as general : GetDays()
Numeric Tag "DaysOff" thst define source as general : NowDays - LastDay

Then at every midnight you run the script : LastDay = GetDays();

Assume if system is off across 1 midnight, After system is on "DaysOff" value will be 1.
and so on.


I didn't test this method but I hope it could help you.
  Reply With Quote
Old January 23rd, 2014, 08:33 AM   #3
whussain6
Member
United Kingdom

whussain6 is offline
 
Join Date: Oct 2013
Location: Newcastle
Posts: 90
I will try this, Thanks Pollasit
  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
Failed to Set System Time jonfarrugia LIVE PLC Questions And Answers 3 December 3rd, 2012 03:27 PM
Redlion Triggers based on time wutnots LIVE PLC Questions And Answers 5 August 4th, 2010 08:44 PM
Elapsed time calculation in s7 400 Ultimate99 LIVE PLC Questions And Answers 3 November 2nd, 2009 11:18 AM
access system time nehe bhimaji LIVE PLC Questions And Answers 0 June 20th, 2009 11:32 PM
PV+ System Date Time Adjustment scottmurphy LIVE PLC Questions And Answers 5 October 6th, 2008 03:21 PM


All times are GMT -5. The time now is 09:33 AM.


.