Volume BaseComponent | |
Attributes: Runtime | Development | System | Template | Detail C Binding: Struct | Class | Code  ClassTree | INDEX NO INDEX |
Class RunTimeCounter | ||
---|---|---|
Version | 1.0 | |
Modified | 03-OCT-2005 17:31:18.55 | |
Code | rt_plc_bcomp.c |
Count the run time of a component. The RunTimeCounter handles running time measurement for a component, e.g a motor. The object contains a total measurement, and a trip measurement. The total measurement is the running time since the origin, and the trip measurement since the last reset. The reset is done from a button in the object graph, or from the Reset input of the function object. NoteThere need to be a backup of the attributes TotalNOfStarts, TotalRunTime and TotalTime, see example below.Object Graph
The graph shows the total time measurement, the trip measurement and the last trip measurement. The Running indicator is green when the drive is started. Other fields in the graph are - RunTime the measured run time. - Usage the run time compared to the toltal time in percent. - Starts number of starts. - ResetTime time for last reset. - StartTime Original start time.Example
The figure shows how to backup the attributes TotalNOfStarts, TotalRunTime and TotalTime.Plc coding
For plc coding the function object RunTimeCounterFo is used.
Create a function object in the plc editor and connect it to the current object with the connect function.See also
RtBody attributes pwr_sClass_RunTimeCounter | |||
---|---|---|---|
String40 | Description | Optional description of the component. | |
Boolean | TripReset | Optional description of the component. | |
Time | StartTime | Time for the original start. | |
Time | ResetTime | Time for last reset of trip measurement. | |
UInt32 | TotalNOfStarts | Total number of starts. | |
DeltaTime | TotalRunTime | Total run time. | |
DeltaTime | TotalTime | Total time since the original start. | |
Float32 | TotalUsage | Total run time compared to total time in percentage. | |
UInt32 | TripNOfStarts | Number of starts since last reset of trip measurement. | |
DeltaTime | TripRunTime | Run time since last reset of trip measurement. | |
DeltaTime | TripTime | Time since last reset of trip measurement. | |
Float32 | TripUsage | Trip run time compared to trip time in percentage. | |
UInt32 | OldTripNOfStarts | Number of starts for previous trip measurement. | |
DeltaTime | OldTripRunTime | Run time for previous trip measurement. | |
DeltaTime | OldTripTime | Time for previous trip measurement. | |
Float32 | OldTripUsage | Run time compared to time in percentage for previous trip measurement. | |
Boolean | Running | Component is running and run time measurement is active. | |
Boolean | AccTripReset | Not used. | |
AttrRef | PlcConnect | The plc function object connected to this object. |
Template Object |
---|
Description Attribute | ||
---|---|---|
Class | Attribute | |
Type | String40 | |
Flags | ||
Body | RtBody |
Optional description of the component.
TripReset Attribute | ||
---|---|---|
Class | Attribute | |
Type | Boolean | |
Flags | ReduTransfer|Noedit | |
Body | RtBody |
Optional description of the component.
StartTime Attribute | ||
---|---|---|
Class | Attribute | |
Type | Time | |
Flags | Noedit | |
Body | RtBody |
Time for the original start.
ResetTime Attribute | ||
---|---|---|
Class | Attribute | |
Type | Time | |
Flags | Noedit | |
Body | RtBody |
Time for last reset of trip measurement.
TotalNOfStarts Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt32 | |
Flags | ReduTransfer|Noedit | |
Body | RtBody |
Total number of starts.
TotalRunTime Attribute | ||
---|---|---|
Class | Attribute | |
Type | DeltaTime | |
Flags | Noedit | |
Body | RtBody |
Total run time.
TotalTime Attribute | ||
---|---|---|
Class | Attribute | |
Type | DeltaTime | |
Flags | Noedit | |
Body | RtBody |
Total time since the original start.
TotalUsage Attribute | ||
---|---|---|
Class | Attribute | |
Type | Float32 | |
Flags | ReduTransfer|Noedit | |
Body | RtBody |
Total run time compared to total time in percentage.
TripNOfStarts Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt32 | |
Flags | ReduTransfer|Noedit | |
Body | RtBody |
Number of starts since last reset of trip measurement.
TripRunTime Attribute | ||
---|---|---|
Class | Attribute | |
Type | DeltaTime | |
Flags | Noedit | |
Body | RtBody |
Run time since last reset of trip measurement.
TripTime Attribute | ||
---|---|---|
Class | Attribute | |
Type | DeltaTime | |
Flags | Noedit | |
Body | RtBody |
Time since last reset of trip measurement.
TripUsage Attribute | ||
---|---|---|
Class | Attribute | |
Type | Float32 | |
Flags | ReduTransfer|Noedit | |
Body | RtBody |
Trip run time compared to trip time in percentage.
OldTripNOfStarts Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt32 | |
Flags | ReduTransfer|Noedit | |
Body | RtBody |
Number of starts for previous trip measurement.
OldTripRunTime Attribute | ||
---|---|---|
Class | Attribute | |
Type | DeltaTime | |
Flags | Noedit | |
Body | RtBody |
Run time for previous trip measurement.
OldTripTime Attribute | ||
---|---|---|
Class | Attribute | |
Type | DeltaTime | |
Flags | Noedit | |
Body | RtBody |
Time for previous trip measurement.
OldTripUsage Attribute | ||
---|---|---|
Class | Attribute | |
Type | Float32 | |
Flags | ReduTransfer|Noedit | |
Body | RtBody |
Run time compared to time in percentage for previous trip measurement.
Running Attribute | ||
---|---|---|
Class | Attribute | |
Type | Boolean | |
Flags | ReduTransfer|Noedit | |
Body | RtBody |
Component is running and run time measurement is active.
AccTripReset Attribute | ||
---|---|---|
Class | Attribute | |
Type | Boolean | |
Flags | ReduTransfer|Noedit | |
Body | RtBody |
Not used.
PlcConnect Attribute | ||
---|---|---|
Class | Attribute | |
Type | AttrRef | |
Flags | ||
Body | RtBody |
The plc function object connected to this object. This attribute is set when the function object is connected from the plc editor by the connect function.