I have had NO luck in getting the PLEG program to run. I would like to have a light go ON at sunset and OFF at approx. 22:30 and another that turns on a battery charger on the X day of the month for 30 minutes. RexBeckett sent me the following:
[u]Schedule
[b]Evening Start Type: DayofWeek Days 1,2,3,4,5,6,7 At sunset. Stop Type: DayofWeek Days 1,2,3,4,5,6,7. 22:30.
[b]DayX Start Type: DayofMonth Day X Time 12:00 Stop Type: Interval 1 hour (X is the day number)
[u]Actions
[b]LightOn Appliance Module #1 On
[b]LightOff Appliance Module #1 is Off
[b]ChargeOn Appliance Module #2 is On
[b]ChargeOff Appliance Module #2 is Off
When I installed the above I got an error message that !Evening is an invalid operator. I’m at a loss as to what to change the expression to. Rex please help. As I noted the X in the Day expression refers to a day number which will be added later.
Program Logic Event Generator
Device ID: 172014-02-08 17:48:39.239 PLC Version: 5.8
Schedules
Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last On Last Off
Evening Weekly t 1,2,3,4,5,6,7 None Weekly 20:00:00 1,2,3,4,6,7 None true 2014-02-07 18:04:30.468 0
Day7 Monthly 11:00:00 7 None Monthly 11:30:00 7 None false 0 0
Conditions
Name Expression State Last True Last False
Lighton Lighton LightSchedule null 0 2014-02-07 12:45:35.611
Lightoff Lightoff LightOff null 0 2014-02-07 12:45:35.612
Actions
Actions for Condition: Lightoff
Immediate
Device Action Arguments
Program Logic Event Generator SetArmed newArmedValue=1
Actions for Condition: Lighton
Immediate
Device Action Arguments
Program Logic Event Generator SetArmed newArmedValue=1
_Appliance Module #2 SetTarget newTargetValue=1
Appliance Module #1 SetTarget newTargetValue=1
That does not look anything like your previous post.
First let me tell you how to interpret much of what you see on the Forums.
When you see a table of conditions. The first column is the NAME of the condition … and what follows is the Value of the condition expression.
You need to have the following conditions: NAMEVALUE LightOn Evening LightOff ! Evening
The Value of a condition uses logic operators such as AND, OR, NOT, ! etc. as well as the NAMES of your Input Schedule, Triggers, Device Properties, or other Condition Names.
In the LightOn Condition above … you are indicating that the LightOn condition has the same value as the Evening schedule.
Also that the LightOff Condition has the opposite value, If LightOn is true than it is false, if LightOn is false than it is true.
When a condition changes from false to true … the actions associated with are fired.
Rex you baffled me. Do I enter TRUE for LightOn and False for LightOff? ??? Please be a little more specific and using the STATUS table what needs to be changed to what. Thanks to you and Richard for the fast response.
You do not need to enter TRUE or False anywhere. Step-by-step:
Schedules
Add day 5 to the Off part of the Evening schedule.
The times for both schedules are different to the ones you requested but I assume you did that intentionally…
Conditions
Change the expression for the condition Lightonfrom Lighton LightSchedule to Evening
Change the expression for the condition Lightofffrom Lightoff LightOff to Not Evening
Add the condition Chargeon with the expression: Day7
Add the condition Chargeoff with the expression: Not Day7
Actions
Delete all existing actions for Lightoff.
Delete all existing actions for Lighton.
Add action for Lightoff. Select Appliance Module#1 Off
Add action for Lighton. Select Appliance Module#1 On
Add action for Chargeon. Select _Appliance Module #2 On
Add action for Chargeoff. Select _Appliance Module #2 Off