Time Clock Help - AWE Europe
Time Clock Help - AWE Europe
Time Clock Help - AWE Europe
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
365 Day Real <strong>Time</strong> <strong>Clock</strong> Programming<br />
The Dynalite Real <strong>Time</strong> <strong>Clock</strong> is found in many Dynalite products, including Load<br />
Controllers and Control Panels, as well as being available as a stand alone <strong>Time</strong><br />
<strong>Clock</strong>. Products include:DDTC001, DTC602, DTCE602, DPP601,<br />
DDRC810GLMOT, DDRC810DTGLMOT & DDMC802GLT. This is a technical<br />
document that discusses the low level programming of the <strong>Clock</strong>. End users can also<br />
program the clock in a user friendly way from a GUI in EP software, consult the EP<br />
manual for details (f1). Its is advisable to set the time zone within the EP software<br />
BEFORE assign any device with time clock capabilities.<br />
Tools: Set Location & <strong>Time</strong> Zone<br />
Sunrise / Sunset Table<br />
Description:<br />
This table is normally the first entry in an event (EVT) file. One entry per month,<br />
based on the 1st day of the month, each in the format of:<br />
,<br />
<strong>Time</strong>s are in 24hr format. The times for dates between the 1st of each month are<br />
interpolated.<br />
Example Sunrise/Sunset table:<br />
SRSS: London<br />
{<br />
Jan 8:06,16:03<br />
Feb 7:39,16:50<br />
Mar 6:46,17:41<br />
Apr 5:36,18:34<br />
May 4:33,19:24<br />
Jun 3:49,20:08<br />
Jul 3:48,20:21<br />
Aug 4:24,19:49
Sep 5:13,18:47<br />
Oct 6:01,17:38<br />
Nov 6:54,16:34<br />
Dec 7:44,15:55<br />
}<br />
<strong>Time</strong>s for different locations can be obtained by various methods, including<br />
ALW.EXE, from time related websites and from Dynalite customer service.<br />
To specify a sunrise or sunset trigger time for an Event, use SR or SS instead of a<br />
fixed time optionally with the + - operands in addition to a time. For example:<br />
<strong>Time</strong>=SR // Trigger the Event at Sunrise<br />
<strong>Time</strong>=SR+01:30 // Trigger the Event at 1 hour and 30 minutes after<br />
Sunrise<br />
<strong>Time</strong>=SS // Trigger the Event at Sunset<br />
<strong>Time</strong>=SR-00:30 // Trigger the Event at 30 minutes before Sunrise<br />
Daylight Saving Table<br />
Description:<br />
This table is normally the second entry in an event (EVT) file, immediately after the Sunrise / Sunset<br />
table (if used). Words that are filtered are "First, 1st, Second, 2nd, Third, 3rd, Forth, 4th, 5th, Last.<br />
Days and months are abbreviated to 3 letters. Daylight saving will not change 1 hour either side of<br />
midnight. The Start() Stop() parameters are:<br />
(,,,,)<br />
Once an event is triggered it sets a run flag to prevent it from running again. This run flag will normally<br />
not be cleared until the next hour rolls over. For testing purposes you can clear all run flags by<br />
recompiling and dumping the EVT file or set the clock forward 1 hr, then set it back.<br />
Example Daylight Saving Table:<br />
DaylightSaving<br />
{<br />
Start(Fifth, Sun, Mar, 1:00, 60)<br />
Stop(Fifth, Sun, Oct, 2:00, 0)<br />
}<br />
Events<br />
Example:<br />
Event1 // Event number, 1 - 250 are valid<br />
{<br />
Name="Turn Everything Off" // String that is displayed in EP<br />
Enable=True // Valid are True, False. Event set to<br />
False will not run<br />
Days(Sat,Sun) // Days to run.<br />
Date(30,Mar,Jun,Jul) // Days of month to run. Valid are 1 -<br />
31, Jan - Dec.
<strong>Time</strong>=17:30:00 // <strong>Time</strong> to run. Valid are 00:00:00 -<br />
23:59:59, SR, SS.<br />
Task1() // Event action.<br />
}<br />
Eventx:<br />
Event number. Valid Event numbers are 1 - 250. This statement is not optional.<br />
Name="ssss":<br />
String that is displayed in EP. This statement is optional.<br />
Enable=<br />
Valid are True, False. Event set to False will not run. This statement is not optional.<br />
Days():<br />
Days to run. Valid days are Mon, Tue, Wed, Thu, Fri, Sat, Sun. This statement is not<br />
optional.<br />
Date():<br />
Days of month to run. There can be only one date specified, Valid are 1 - 31. There<br />
can be multiple months specified, valid months are Jan, Feb, Mar, Apr, May, Jun, Jul,<br />
Aug, Sep, Oct, Nov, Dec. For the Date() statement to be true there must also be a<br />
valid match on the Days() statement. This statement is optional.<br />
<strong>Time</strong>=<br />
<strong>Time</strong> that the event is to run, in 24 hr format. Valid time formats are: hh:mm,<br />
hh:mm:ss, SR, SR+/-hh:mm SS, SS+/-hh:mm.<br />
Event Action:<br />
An Event is a timed operation that can perform several single actions:<br />
Preset() - Send a Preset message.<br />
Task() - Start a single internal Task.<br />
CancelTask() - Stops one or more internal Tasks. 0 = All Tasks<br />
PauseTask() - Pauses one or more internal Tasks. 0 = All Tasks<br />
ReStartTask() - Restart one or more currently paused internal Tasks. 0 = All Tasks<br />
Dynet() - Send a Dynet message<br />
EnableEvent() Enable an event that is in the same device. 0 = All Events<br />
DisableEvent() Disable an event that is in the same device. 0 = All Events<br />
Setting the Real <strong>Time</strong> <strong>Clock</strong><br />
Description:<br />
The <strong>Clock</strong> can be set via a network message. This is the method that EP's <strong>Clock</strong><br />
window employs to set the <strong>Clock</strong> to the correct time. The message can be sent to a<br />
single clock, or globally to set the time of all <strong>Clock</strong>s on the network in one operation.<br />
Below is an example of one master <strong>Clock</strong> synchronizing all other <strong>Clock</strong>s on the<br />
network with it's time:<br />
M1: Dynet(0x5c,0xaa,0x55,0x50,0,0,0) // Template message
Task1()<br />
{<br />
Name="Set all clocks"<br />
TryLater:<br />
Yield()<br />
LDA ^23,0<br />
AND #0x0f<br />
CMP #0x05<br />
BPL TryLater //Wait for a seconds value that can be incremented<br />
Dynet(0x5c,0xaa,0x55,1,1,1,0) //Global setup mode<br />
COPY M1,~0,7<br />
LDA ^23,0 //Seconds<br />
INC //Increment the seconds for latency<br />
STA ~6<br />
LDA ^23,1<br />
STA ~5<br />
LDA ^23,2<br />
STA ~4<br />
TX ~0,2,7<br />
Dynet(0x5c,0xaa,0x55,1,1,0,0) //Global exit setup mode<br />
}