Jump to content

Last Run Time is the same as Last Finish Time


Recommended Posts

I have a program that uses a wait for 20 minutes to shut off a light when it has been turned on. The program works correctly; that is, it shuts the light off after 20 minutes but I noticed that the last finish time is always the same as the last run time. Should the last finish time not be 20 minutes longer?

Gary

Link to comment

I just took a look at one of my programs that has a 15 minute wait and the LAST RUN TIME and the LAST FINISH TIME show the 15 minute difference.

Not sure why you're not displaying the correct finish time.  Are there any other conditions in your program?  What controler and firmware are you running?

Link to comment

Are there multiple conditions for the program to execute? The last run time and finish time will match when one of the conditions is true and iox evaluates...even if all the conditions are not true and it doesn't run. You may be seeing the results of that.

As an example, I have the ring plugin and have an iox program that uses the doorbell motion sensor to report movement at night after a certain time. I just came home around 1pm and the program shows it ran and finished around that time, even though the "Then" of the program did not execute.

Edited by paulbates
Link to comment

Here is one of the programs.

Utility Room Lights OFF - [ID 0042][Parent 002F]

If
        $s_Utility_lights_switched_on is 1
     Or 'Utility Room near Stairs' Status is On
 
Then
        Wait  12 minutes 
        Set 'Utility Lights' Off
        $s_Utility_lights_switched_on  = 0
 
Else
   - No Actions - (To add one, press 'Action')
 

If I look at the status it shows the program as running (all green) and lights go off after in this case 12 minutes. Both conditions are true while the program is running

Link to comment

Thanks. I believe the variable or light status can only be changed by the code that follows the wait. I removed the 2nd OR condition from the program above just to simplify things but I still get identical times. Not really a problem since everything works ok but just puzzling. FYI here is the program that triggers the "OFF" one above

Utility Room Lights On - [ID 0041][Parent 002F]

If
        (
             'Alarm Panel / Basement Stairs Motion' Zone State is Open
          Or 'Alarm Panel / Furnace Motion' Zone State is Open
          Or 'Utility Room near Stairs' is switched On
        )
 
Then
        Disable Program 'Utility Room Lights OFF'
        Set 'Utility Lights' On
        $s_Utility_lights_switched_on  = 1
        Enable Program 'Utility Room Lights OFF'
        Run Program 'Utility Room Lights OFF' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 

Link to comment

This follows the same logic, either the wait finished and the variable/state change caused the program to reevaluate to False or Wait is interrupted which caused the program to reevaluated to False.

This should be easy to see in UD Mobile as the Program's Status would be Idle False indicating the last run time was an evaluation to False which finished running the Else Actions.  Idle True would indicate the last evaluation was true and finished running Then Actions.  If the Program's Status is Running Then/Else it is no longer possible to link the last finish time to True/False evaluation.

 

If the timestamp for last run on true evaluation (Then) is important, a second disabled program can be used. The original program would be changed to trigger the new program to Run Then Action in Then and Stop in Else. The new program would contain the original programs Then Actions.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      36.8k
    • Total Posts
      369.9k
×
×
  • Create New...