Calculating Run Time / In Hours

kandymann

Lifetime Supporting Member
Join Date
Jan 2011
Location
Virginia
Posts
168
Hello

I am using a Compact Logix controller 1769-L35E and FT View Studio ME

Logix5000 v19

I am on the verge of completing my first programming project for a silica proccessing compamy and they asked me to add one more feature to the project:

[To let the operator know the runtime of the operation in hours]

The runtime will be directly refrenced to a particular VFD. When the VFD is initiated, a timer is used keep track of how many hours it has been in operation.

At the end of the shift, the operator clears the time (in hours) and logs it.

In my thinking, I would think that I need to use some GSV instructions and calculating instructions such as ADD. I created a subroutine and named it 'VFD_Run_Time'. I want to place all my logic for this timer in this routine.

I am totally stumped on how I should go about programming this correctly.

Any advice or help would be greatly appreciated!

Thanks

Kandy
 
Yep

That was the solution. It works.

I forgot about checking out the sample code library.

Thank you sir


Hmmm scratch that

I have encountered a problem.

I imported the Time_Elapsed_FB Add-On
I created a UDT called "DateTime" and created a tag called "Wall_Clock"
I used GSV instructions and I see correct values in the for the year, month, day, hour, minute, second stamps.

The VFD bit is true but I am not getting anything in the Hour_Total, Minute_Total, or Second_Total tags. I am reading a "1" in the Second_Total tag but that is it. It is not increasing.

Any idea what may be the problem?

I atttached a pic of my logic. Check it out
 
Use a totalizer.
Logix has one as a function block.
You could create an AOI with the totalizer in it to expose it to ladder (if you need).
 
Yep

That was the solution. It works.

I forgot about checking out the sample code library.

Thank you sir

Use a totalizer.
Logix has one as a function block.
You could create an AOI with the totalizer in it to expose it to ladder (if you need).

Can you elaborate a little more on the totalizer?

I am not so sure I am ffollowing you.

Thanks
 
There is a totalizer instruction (TOT) in the Logix family, but it is a function block or structured text instruction.

If you wish to utilize this instruction in Ladder Diagram, then you would have to create an AOI with the programming within it.
 
There is a totalizer instruction (TOT) in the Logix family, but it is a function block or structured text instruction.

If you wish to utilize this instruction in Ladder Diagram, then you would have to create an AOI with the programming within it.

Thanks Oakley

Unfortunately I am not real familiar with the FBD language.

I am only familiar with Laddder at the moment.

I am just curious why my Totals are not adding up when the instruction is true. If I could figure it out, I would have to licked.
 
If you will do a forum search on TOT then you will find a number of posts showing you how to totalize time with that instruction.
 
I programmed an AOI that consist of an horometer for a PowerFlex, that count in hours, minutes and seconds the running time and has a time stamp of the last start and the last stop (very useful for example to know at what time the VDF stoppped cause a trip). It works in real time , with a GSV instruction of the CPU clock.

I use the VDF running bit to activate the AOI (in my case via DeviceNet). the only thing that not have is a reset (because the client asked like that), but is very easy to include in the code.

If you need it , I can send the AOI via email or the ladder code.
 

Similar Topics

This application has a motor with encoder feedback that drives a linear actuator that moves in/out, and is at roughly 45 degs from horiz. As the...
Replies
19
Views
1,365
I need to keep a running pass/fail yield of the previous 5,000 parts produced. I have used this formula before to calculate average: AvgValue =...
Replies
6
Views
2,156
Does anyone know how to calculate the savings from now needing to run an air compressor all day? Basically I have a design that replaced 6 * 1"...
Replies
26
Views
4,828
I would like to refer to this document of which I used some data ...
Replies
1
Views
1,478
Seems like this should be a simple thing but I’m struggling with it. The basis is that I am trying to detect if a linear assembly is stopped or...
Replies
6
Views
3,097
Back
Top Bottom