/
SimpleClockFrame.shtml
246 lines (192 loc) · 9.9 KB
/
SimpleClockFrame.shtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.17), see www.w3.org">
<title>JMRI: Setup Fast Clock</title>
<meta name="author" content="Bob Jacobsen">
<meta name="keywords" content="JMRI help Setup Fast Clock">
<!-- Style -->
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii">
<link rel="stylesheet" type="text/css" href="/css/default.css"
media="screen">
<link rel="stylesheet" type="text/css" href="/css/print.css"
media="print">
<link rel="icon" href="/images/jmri.ico" type="image/png">
<link rel="home" title="Home" href="/">
<!-- /Style -->
</head>
<body>
<!--#include virtual="/Header.shtml" -->
<div class="nomenu" id="mBody">
<div id="mainContent">
<h1>Fast Clock Setup </h1>
<h2>Introduction to JMRI Fast Clocks</h2>
<p>JMRI provides a fast
clock that can get its time from an internal fast clock or a
selected hardware fast clock if one exists on your layout.</p>
<p>This window ( Tools > Clocks > Set up Fast Clock )
provides for setting options for this fast clock system.</p>
<p>Information you set up here is saved when you save your
panels and configuration and allows you to set start
up options that take effect when you load your panels and
configuration.</p>
<p>JMRI also has clock displays that can run in
stand-alone dialogs or on a PanelPro panel.</p>
<a href="images/Fast_Clock_Setup_432x573.png"><img
src="images/Fast_Clock_Setup_432x573.png" width="432" height="573"
alt="Fast Clock Setup config pane" style="float:right"></a>
<h2>Pausing and Running the Fast Clock</h2>
<p>Your fast clock may be set paused or running by using the : </p>
<ul>
<li><b>Pause Clock / Run Clock</b> button at the top of this setup window.</li>
<li><b>Pause / Run</b> button at the bottom or side of a clock window.</li>
<li>Internal sensor with system name <b><i><a href="#isclockrunning">ISCLOCKRUNNING</a></i></b></li>
</ul>
<p>When the fast clock is resumed after having been paused,
the fast clock time continues where it left off.</p>
<h2>Setting Fast Clock Time and Fast Clock Rate</h2>
<p>The <b>Fast Clock Time</b> is entered as hours and minutes
using a 24-hour clock. After entry click the <b>Set</b>
button, the time is updated and broadcast to synchronized clocks.</p>
<p>The <b>Fast Clock Rate</b> is a factor that multiplies the
wall clock time rate. <br>For example, a fast clock rate of 4.000
means that the fast clock will run 4 times faster than the
wall clock, or will move an hour when the wall clock only
moves 15 minutes.</p>
<p>Enter your fast clock rate after <b>Fast
Clock Rate:</b>, then click the <b>Set</b> button to the
right of it.</p>
<p>It's important that
all clocks run with the same rate, even if they are
synchronized.</p>
<p>If any of the entered values are not right, an error message
is displayed, and the time / rate is not changed.
</p>
<h2>Setting up your Time Source</h2>
<p>Look in the <b>Time Source</b> selection box to see what
might be available for your system. If you don't have a
hardware fast clock, skip to the next section.</p>
<p>Usually you
will want to select <b>Internal Computer Clock</b> even if a
hardware fast clock is available. Usually also you will want
to check <b>Synchronize Internal Fast Clock with xxxxx Fast
Clock</b> so that the two clocks will show the same time,
even over long periods.
<br>Both the <b>Fast Clock Rate</b> and
the <b>Fast Clock Time</b> are synchronized when you check
this option.</p>
<p>For some hardware fast clocks another check box,
<b>Correct hardware clock</b>, will be shown.
<br>If you tried
using your DCC command station to create a fast clock, you
may have noticed that it didn't keep particularly good time.
<br>If <b>Correct hardware clock</b> is available and you check
it, JMRI will adjust the rate of your hardware clock so that
it keeps better time.</p>
<p>Some hardware fast clocks support changing a
12-hour/24-hour display option from the computer.
<br>For those
that do, a check box labeled <b>Use 12-hour clock
display</b>, will be shown.
<br>If you check this option, your
hardware clock will set up for a 12-hour clock display.
<br>If
this option is unchecked (the default), a 24-hour clock
display will be set up.</p>
<p>If you select <b>Internal Computer Clock</b> as your time
source, and do not check either the <b>Synchronize...</b> or
<b>Correct...</b> options, only the internal clock will be
used, and no commands will be sent to your hardware clock.</p>
<p>At
the end of this documentation there is more information on
specific hardware fast clocks, which includes recommendations on
the best way to set them up.</p>
<p><b>Caution: This window may show you have a time source
when you really don't have one.</b> For example, if
you're running LocoNet Simulator, a LocoNet Fast Clock will
be listed but doesn't exist. Unless you know you have the
hardware fast clock listed, you should not select the
hardware clock as your Time Source, and you should not check
either the <b>Synchronize...</b> or <b>Correct...</b> options
even if they show on this window.</p>
<h2>Setting Start Up Options</h2>
<p>The options set in this section take effect when you load
your panel file (or configuration file if you don't have any
panels).</p>
<p>The clock can be started up paused or running, depending on the selection.
<p>You can request that your fast clock start at a
specified time, by checking <b>Set Fast Clock Time to</b> and
entering the time after it.
<br>As with <b>Fast Clock Time</b>,
the time is entered as hours and minutes using a 24-hour
clock.</p>
<p>If you select a display clock in the <b>Start Selected
Clock</b> popup menu, that clock display will be
automatically started when your file is loaded.
<br>Clocks displayed on a PanelPro panel are configured
using Panel Editor or Layout Editor, and are saved and
restarted with your panel.</p>
<p><b>Important Note: To preserve the settings and options
entered in this dialog, you must save your configuration.</b>
<br>Fast clock settings are stored as part of your configuration
in the same file as your panels (if you have any).
<br>The safest
and easiest way to ensure that all your configuration items
and panels are saved is to save using <b>Store Configuration
and panels...</b>. (<b>Store panels...</b> may be used even
if you don't have any panels.)
<a href="images/FastClockSetupSave.png">
<img src="images/FastClockSetupSave.png" width="333" height="140"
alt="Fast Clock Setup config pane" style="float:right"></a>
<b>Store</b> options may be found in the <b>File</b> menu
while working on the Fast Clock Setup. A prompt will give
you the option to save either form when you close the
Fast Clock Setup by clicking Apply.</p>
<p>If you want to automatically load your panel
file when your application starts, add it to <b>Load panel
file at startup:</b> in the <b>Advanced Preferences</b>
section of your <b>Preferences...</b> window.</p>
<h2><a name="isclockrunning" id="isclockrunning">Clock-related Sensor and Memory</a></h2>
<p>When a clock is
running, JMRI creates an internal sensor and a memory
variable that you can use to control and access the clock.</p>
<p>The ISCLOCKRUNNING sensor controls whether the clock is
running (ACTIVE) or stopped (INACTIVE).</p>
<p>The state of this sensor
automatically follows the state of the fast
clock-<b>Active</b> if the fast clock is running, and
<b>Inactive</b> if the fast clock is paused. </p>
<p>You could add a <b>Sensor Icon</b> on your PanelPro panel
(Panel Editor or Layout Editor). Changing the
state of this sensor will run and pause your fast clock.</p>
<p>Regardless of which method you use to run and pause your
fast clock, button labels and the
<b><i>ISCLOCKRUNNING</i></b> sensor's state follow along.</p>
<hr>
<p>The IMCURRENTTIME memory contains the current fast-clock
time, and can be easily accessed from Logix and scripts.</p>
<p>The
format of the time / date string is controlled by the
jmri.jmrit.simpleclock.SimpleClockBundle TimeStorageFormat
property, and can be changed via the JMRI <a href=
"../../../../html/doc/Technical/I8N.shtml">Internationalization</a>
mechanism. More information on the DateFormat mechanism used
for this is available <a href=
"https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html">
here</a>.</p>
<h2>Further Clock Support</h2>
<a href="../../../../html/tools/fastclock/index.shtml">JMRI Fast Clocks</a>
<p>There are separate pages for:</p>
<ul>
<li><a href="../../../../html/tools/fastclock/LocoNetClock.shtml">LocoNet clocks</a></li>
<li><a href="../../../../html/hardware/can/cbus/CbusFastClock.shtml">MERG CBUS clocks</a></li>
<li><a href="../../../../package/jmri/jmrix/nce/clockmon/ClockMonFrame.shtml">NCE clocks</a></li>
</ul>
<!--#include virtual="/Footer.shtml" -->
</div>
</div>
</body>
</html>