Knowledgebase
* > eze System - Help Desk > Knowledgebase

Search help:


Monitoring run time

Solution

The ezeio can easily be set up to monitor run time.

First, you will need to set up an input to monitor the on/off state. In this example we will assume input #1 is set up to go into 'alarm' state when the equipment is running.

Add a second input that will be the run time counter. We will assume this is input #2 here. This input needs to be set for 'Special/Software', to allow the script to assign values to it.

Now add this script:

@Tick(uptime)
{
   if(GetInputState(1))
      SetInputCount(2, GetInputCount(2) + 1);
   SetInputValue(2, GetInputCount(2));
}

The @Tick function is automatically called by the system every second, so this script will monitor input #1, and when that input is in alarm, it will increase the counter on input #2.

The last line simply copies the value of the counter on input #2 to the input value so it is displayed on the status screen.

 
Was this article helpful? yes / no
Related articles Counter value as input value
Adding and subtracting input values
Set up an alarm
How does pulse inputs work?
Communicating input value to a different ezeio
Article details
Article ID: 33
Category: ezeio Configuration
Rating (Votes): Article rated 5.0/5.0 (2)

 
« Go back