Author Topic: PLTS Basics - An Introduction to the Program Logic Timer Switch  (Read 16174 times)

Offline RexBeckett

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +482/-12
PLTS Basics - An Introduction to the Program Logic Timer Switch
« on: January 05, 2014, 01:37:34 pm »
Program Logic Timer Switch (PLTS) is a flexible timed switch that may be controlled using buttons on the User Interface (UI) and/or Condition expressions like those used in PLEG.

Use PLTS when you want an accurate timed output with relatively simple logic or if you want to monitor and control the timer from the UI. If you need multiple outputs or complex logic, PLEG may offer a better solution.

PLTS Basics is intended to provide newcomers with an explanation of how PLTS works and how to use its many features. Each feature is described in detail with examples of how it may be used. The guide is in the form of a pdf document with bookmarks to help with navigation.

Edit: 29/01/2014 15:18 Updated to reflect changes in PLTS V5.7
Edit: 07/03/2014 14:00 Updated to reflect changes in PLTS V6.2
« Last Edit: March 07, 2014, 09:01:14 am by RexBeckett »

Offline pacificdune

  • Jr. Member
  • **
  • Posts: 81
  • Karma: +1/-1
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #1 on: January 05, 2014, 02:08:16 pm »
This is great!  Thanks for putting it together...

Cheers!

PD

Offline flyveleder

  • Full Member
  • ***
  • Posts: 191
  • Karma: +5/-14
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #2 on: January 05, 2014, 02:40:39 pm »
Another great one; Thanks!

One thing you will have to explain to me in your example :

Condition Expressions
Reset FanOff
Trigger Humidity > 40
Trigger2 LightOn and ((LightOn; Now > 3:00) or (LightOff; LightOn < 10)) Restart LightOn and (LightOn; Now > 8:00)
On FanOn
Actions
On Turn Fan on
Off Turn Fan off
Restart Turn HWBoost VirtualSwitch on

In the condtions expressions you have "FanOn" in the "On" field, suggesting that for the "On" to be true, the fan must already be on. The action for "On" is to turn the fan on ... which is already on ... or ?

/Martin

Offline RexBeckett

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +482/-12
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #3 on: January 07, 2014, 02:25:15 pm »
Another great one; Thanks!

One thing you will have to explain to me in your example :

Condition Expressions
Reset FanOff
Trigger Humidity > 40
Trigger2 LightOn and ((LightOn; Now > 3:00) or (LightOff; LightOn < 10)) Restart LightOn and (LightOn; Now > 8:00)
On FanOn
Actions
On Turn Fan on
Off Turn Fan off
Restart Turn HWBoost VirtualSwitch on

In the condtions expressions you have "FanOn" in the "On" field, suggesting that for the "On" to be true, the fan must already be on. The action for "On" is to turn the fan on ... which is already on ... or ?

/Martin

The purpose of the Condition On, in this case, is to start the timer if the fan is switched on manually. This allows it to be switched off automatically after one hour. It is not necessary to have any expression for On or Off - they will be switched when the timer state changes between Default and Toggled.

There is so much flexibility in PLTS that it can take a while to realise which bits do what. The good bit is that you can poke the UI buttons and watch what happens. Once you see how that works, write your Conditions to poke the buttons for you.

« Last Edit: January 07, 2014, 07:35:24 pm by RexBeckett »

Offline flyveleder

  • Full Member
  • ***
  • Posts: 191
  • Karma: +5/-14
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #4 on: January 09, 2014, 03:04:05 pm »
I'm struggling to understand this ...

What I want : When a Virtual Switch is triggered a timer should start for 5 minutes; When time is up it should turn off some lights. If the lights are changed while the timer is running, the timer should be cancelled, and disregard the action to turn off the lights.

What I did in PLTS :

"Input" : LoS - LoadLevel of light bulb

Interval : 00:05:00
Trigger : VirtualSwitchOn
Reset : LoS != 20

Action for "Off" : LightOff

---
First part works; It triggers correct, and starts the timer. Changing the lights also does the Reset and stops the timer - BUT : When Reset I noticed the timers goes to "Off" and therefore the action for "Off" is triggered, turning off the lights. That I do not want. I only want the timer to reset, not to do any actions.

What am I doing wrong ?

If I remove the action for "Off" then the lights doesn't turn off when the time is up.

/Martin

Offline RexBeckett

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +482/-12
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #5 on: January 09, 2014, 04:42:52 pm »
Try changing the timer type (SwitchMode) to Delayed Toggle/Explicit Reset and put your LightOff as an Action for On.

The Trigger will start the timer but it will only Toggle after 5 minutes. The Reset will just stop the timer. If the timer does complete and Toggle, the LightOff command should result in a Reset.

Offline flyveleder

  • Full Member
  • ***
  • Posts: 191
  • Karma: +5/-14
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #6 on: January 10, 2014, 01:49:48 am »
Great - thanks; I'll give it a try.

/Martin

Offline rtt3821

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #7 on: January 26, 2014, 05:52:27 pm »
I have a situation where I want a light go go ON at sundown and OFF at 11:00 PM with the time randomized. How do I do this with the timer switch? This is a great program for dummies like me. I wish there was a user manual.

Offline ih8gates

  • Full Member
  • ***
  • Posts: 207
  • Karma: +8/-1
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #8 on: January 26, 2014, 05:59:17 pm »
That actually sounds like something that would be easier with a normal schedule. PLTS is handy if you need a delayed action, but it might be overkill for what you're trying to do.

Sent from my Nexus 7 using Tapatalk

« Last Edit: January 26, 2014, 08:28:35 pm by ih8gates »

Offline BrianLBeaton

  • Sr. Member
  • ****
  • Posts: 325
  • Karma: +12/-1
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #9 on: January 26, 2014, 06:01:10 pm »
I have a situation where I want a light go go ON at sundown and OFF at 11:00 PM with the time randomized. How do I do this with the timer switch? This is a great program for dummies like me. I wish there was a user manual.

See PLTS Basics, which is attached to the first post in this thread as a pdf file.

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #10 on: January 27, 2014, 08:59:11 am »
@rtt3821
If you are going to use a timer ... to turn on a timer ... that is where the comment about over kill comes in.

You might try to use PLEG.
You will create a Input Schedule that has an ON Time with some random time, and an off timer/interval also with some random time. For this example call it Timer

Then create two condions:
TimerOn           Timer
TimerOff           Not Timer

Add actions to the above two conditions to turn on/off the lights.
The benefit of PLTS vs PLEG is that it provides a user interface to manually start the timer sequence as well as show you the progress of the timer sequences.

Offline RexBeckett

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +482/-12
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #11 on: January 29, 2014, 10:20:42 am »
There is a new version of PLTS Basics. It has been updated to reflect the changes in PLTS 5.7. See the first post to download the pdf.

Offline rtt3821

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #12 on: February 03, 2014, 01:38:10 pm »
I have tried using the simple way to program lights on & off. Added devices {appliance modules}, scenes, triggers and schedules. The log states that the schedule was reun at the right time and day. However the lights never went ON. I must be missing a step in the configuration. Anybody know what it could be?????

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #13 on: February 03, 2014, 02:05:51 pm »
Did you arm the PLEG ?

Offline rtt3821

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: PLTS Basics - An Introduction to the Program Logic Timer Switch
« Reply #14 on: February 04, 2014, 12:55:12 pm »
Yes, I armed the PLEG and it didn't work. I am getting an error message that states: version mismatch. PLEG version 5.7, PLC version 5.8. How do I correct this? I am also getting an error message that says: TIMER   NOT TIMER, is an invalid expression.
« Last Edit: February 04, 2014, 01:11:56 pm by rtt3821 »