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

Reply
 
Thread Tools Display Modes
Old May 18th, 2020, 10:25 AM   #31
JRW
Member
United States

JRW is offline
 
JRW's Avatar
 
Join Date: Jun 2002
Location: Upstate South Cackalacky
Posts: 1,907
"drbitboy;
Really? Which PLCs provide an hour-meter built-in?"




Siemens
S7 has an RTM instruction

When are you going to teach yourself how to program that S71200 you bought from Fleabay?

Last edited by JRW; May 18th, 2020 at 10:27 AM.
  Reply With Quote
Old May 18th, 2020, 10:57 AM   #32
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 845
Quote:
Originally Posted by JRW View Post
"drbitboy;
Really? Which PLCs provide an hour-meter built-in?"




Siemens
S7 has an RTM instruction

When are you going to teach yourself how to program that S71200 you bought from Fleabay?
PS It turns out CLX has one as well, and it's better because more general than just an hour meter.


Regarding S7: Well, you asked...


I'm working on it. It's slow, oh my goodness, how long it took me to write a simple test program with two timers because I couldn't suss out the tag scheme and could not for the life of me add a second timer tag, oh dear.


And the unbelievably poor real estate management of the TIA make anemic RSLogix seem almost preferable by comparison; how does anyone use TIA with fewer than two or four large monitors?


I mean, I've written software and I understand the positive correlation between powerful interfaces and complex interfaces, but I didn't realize it was an expnential!

Last edited by drbitboy; May 18th, 2020 at 10:59 AM.
  Reply With Quote
Old May 18th, 2020, 07:22 PM   #33
TheWaterboy
Lifetime Supporting Member + Moderator
United States

TheWaterboy is offline
 
TheWaterboy's Avatar
 
Join Date: May 2006
Location: State of Denial
Posts: 1,025
I use a totalizer with the Timebase input set to the units you need: Seconds, Min or Hours. Like Ken said they can be overwritten so may not be suitable if you need a real totalizer number that cant be manipulated.
Hour meter.jpg
  Reply With Quote
Old May 19th, 2020, 04:20 AM   #34
rdrast
Lifetime Supporting Member
United States

rdrast is offline
 
rdrast's Avatar
 
Join Date: Apr 2003
Location: South Carolina Lowcountry
Posts: 5,434
I always use Mike Lamond's method, and have for years.
Every program I write, I start by dropping in a Utility Routine to generate a global, base one second pulse off of the WallClockTime. In each separate Task, I also one-shot that to a task-local one second time pulse.


In Utility, I also generate a string version of the time/date (05/20/20 - 15:18), an integer for Day of the Week, and convert the WallClockTime into UTC Time (based in seconds)
__________________
------------------------------------
How to ask questions the SMART Way!

Look First, Ask Second!

  Reply With Quote
Old May 19th, 2020, 05:03 AM   #35
kalabdel
Member
Canada

kalabdel is offline
 
Join Date: Feb 2015
Location: Ontario
Posts: 553
The number of RTM timers in S7 are limited and depend on the CPU.
But even using timers and counters is not practical when you're logging hundreds of device with potential of 50-80 running at the same time.

I use one lonely timer and a whole lot of code to log start and stop time of each device and keep track of the sum. Methods/sub functions to add devices, querry device data and all that jazz. It's convoluted but very very cheap on resources.
  Reply With Quote
Old May 19th, 2020, 12:02 PM   #36
lee1968nh
Member
United States

lee1968nh is offline
 
Join Date: Nov 2010
Location: NH
Posts: 48
All timers are bound to the same clock. In reality there are no separate timers. There is only a single timer no matter how many you declare in your program. Any and all timers rely on the same clock. It is just a simple compare used to determine when timer is "done" or what state the timer is in. Very very simple math. Having many timers rather than a few is not in any way more "stressful" on the processor. Internally, it is just a move and compare operation.
  Reply With Quote
Old May 19th, 2020, 04:21 PM   #37
alive15
Member
United States

alive15 is offline
 
Join Date: Oct 2015
Location: al
Posts: 454
Smile

Quote:
Originally Posted by Rson View Post
I understand the whole idea is to use programming, but hour meters are about $15 or so and only have two wires.

Just buy an hour meter, IMO.
Yeah, but he is from India, you mean 1135.20 Indian Rupees
  Reply With Quote
Old May 19th, 2020, 04:29 PM   #38
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,764
Quote:
Originally Posted by alive15 View Post
Yeah, but he is from India, you mean 1135.20 Indian Rupees

1135.43 now, the INR is falling
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
if you've never made a mistake at work, you've never worked


  Reply With Quote
Old May 19th, 2020, 10:58 PM   #39
kalabdel
Member
Canada

kalabdel is offline
 
Join Date: Feb 2015
Location: Ontario
Posts: 553
Quote:
Originally Posted by lee1968nh View Post
All timers are bound to the same clock. In reality there are no separate timers. There is only a single timer no matter how many you declare in your program. Any and all timers rely on the same clock. It is just a simple compare used to determine when timer is "done" or what state the timer is in. Very very simple math. Having many timers rather than a few is not in any way more "stressful" on the processor. Internally, it is just a move and compare operation.

Siemens RTM instruction for S7-1200 have a limit of 10 instances/counters. The reason is not very clear in the documentation but I am guessing they use hardware counters.


Specifically Siemens IEC_TON (SFB4) timers add considerably to load and work memory and don't seem to impact cycle scan that much.
The difference between 1 timer and 100 timers is over 60KB (Over 1.5% of available load memory) and over 50KB of work memory (over 4% of available work memory).
These numbers are to satisfy a very small requirement of a much larger program and if I design programs the same way I better have unlimited money to spend on hardware.


The older Siemens S5 had much smaller footprint.


What about Rockwell, is it very different?
  Reply With Quote
Old May 20th, 2020, 08:38 AM   #40
Stuwertz
Member
India

Stuwertz is offline
 
Join Date: Feb 2018
Location: *******
Posts: 44
Quote:
Originally Posted by alive15 View Post
Yeah, but he is from India, you mean 1135.20 Indian Rupees
I have total 48 equipments in our plant. I need to calculate the BAG maker total running hours through this interlock with power flux 527 . While this inverter running I can able to know the running hours of bag maker also . So that I will plan Preventative maintenance chart for this equipment.

Installing hour meter is simple only. But total for 48 equipment comparatively high . Due to that I planned for existing resources
  Reply With Quote
Old May 20th, 2020, 10:06 AM   #41
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 845
Quote:
Originally Posted by Stuwertz View Post
Installing hour meter is simple only. But total for 48 equipment comparatively high . Due to that I planned for existing resources

There are other considerations, below, but those still might not change the decision to put this functionality this in the PLC.


  1. How does your time to write the software compare to the cost of 48 hour-meters? Although not relevant, I am fairly certain that the collective spare time spent on this thread alone has, metaphorically speaking, already paid for the 48 hour meters, plus a full set of spares, and then some. Of course that has to be weighed against installing 48 devices.
  2. PLCs memory is volatile; these data would be better accumulated and/or stored, elsewhere in a "cloud," spreadsheet, database, etc. It's a SCADA function, not a PLC function.

Last edited by drbitboy; May 20th, 2020 at 10:19 AM. Reason: fix typo
  Reply With Quote
Old May 20th, 2020, 12:59 PM   #42
kallileo
Lifetime Supporting Member
Greece

kallileo is offline
 
Join Date: Jun 2008
Location: Thessaloniki, Macedonia, Hellas
Posts: 243
This is why I like Codesys based PLCs where you can have so many option for storing and manipulating data.
In open automation library OSCAT there is a ready to use function block called OnTime which implements an hour meter function.
The easiest solution is to save data in Persistent type variables which are not re-initialized even during program download.
Then are many other options like saving recorded hours in txt files in local plc flash or on a ftp server or even in cloud using MQTT and other protocols.

You could install a Codesys based PLC like Schneider's M241 and DI modules with total 48 digital inputs for each of your devices and program it to record the working hours. Should be much more cost effecting than having to buy and install 48 hardware counters.
You could also use AdvancedHMI to communicate with the PLC through Modbus TCP and log the data in to text files on your PC.
__________________
automationofthings.blogspot.com
  Reply With Quote
Old May 20th, 2020, 03:12 PM   #43
Stuwertz
Member
India

Stuwertz is offline
 
Join Date: Feb 2018
Location: *******
Posts: 44
Quote:
Originally Posted by drbitboy View Post
There are other considerations, below, but those still might not change the decision to put this functionality this in the PLC.


  1. How does your time to write the software compare to the cost of 48 hour-meters? Although not relevant, I am fairly certain that the collective spare time spent on this thread alone has, metaphorically speaking, already paid for the 48 hour meters, plus a full set of spares, and then some. Of course that has to be weighed against installing 48 devices.
  2. PLCs memory is volatile; these data would be better accumulated and/or stored, elsewhere in a "cloud," spreadsheet, database, etc. It's a SCADA function, not a PLC function.


Thanks. Every one posted on this thread. I don't have not much knowledge in PLC programming. But now somehow im learning through such like new ideas.

So could you kindly summarize same like with picture. Is the counter value will loss when PLC is off condition.
  Reply With Quote
Old May 20th, 2020, 03:57 PM   #44
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,764
Quote:
Originally Posted by TheWaterboy View Post
I use a totalizer with the Timebase input set to the units you need: Seconds, Min or Hours. Like Ken said they can be overwritten so may not be suitable if you need a real totalizer number that cant be manipulated.
Attachment 54421

Check out the "Data Preserved Download Tool". I haven't had need to use it myself, but it is supposed to allow you to download the entire program with the current data.

I suspect it uploads the tag values first into the offline file, then downloads the new program with those tags and values.

If that's what it does, make sure nothing is actually "running" that could change the values before the download starts ...
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
if you've never made a mistake at work, you've never worked


  Reply With Quote
Old May 20th, 2020, 04:17 PM   #45
lee1968nh
Member
United States

lee1968nh is offline
 
Join Date: Nov 2010
Location: NH
Posts: 48
That tool is a piece of junk. Don't waste time.
  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
Function Block/ AOI Demonstration ndzied1 LIVE PLC Questions And Answers 11 December 13th, 2018 09:06 AM
KB4093108 causing issues on some Rockwell computers Stonent LIVE PLC Questions And Answers 0 June 12th, 2018 12:09 PM
FYI - Rockwell Software padees LIVE PLC Questions And Answers 8 August 27th, 2017 12:55 PM
Weigh feeder or flow meter .rss programming jitu360 LIVE PLC Questions And Answers 0 July 29th, 2014 06:45 AM


All times are GMT -4. The time now is 04:32 AM.


.