Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities

Package Content

NameDescription
Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.SignalBus SignalBus  
Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.WatchDisplay WatchDisplay  
Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.Time Time  
Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.DisplayDecoder DisplayDecoder  
Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.AlarmTrigger AlarmTrigger  
Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.WatchController WatchController  

Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.SignalBus Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.SignalBus

Information

Extends from Modelica.Icons.SignalBus (Icon for signal bus).

Contents

NameDescription
a 
b 
c 
d 

Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.WatchDisplay Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.WatchDisplay

Information


Displays four large digits, one small digit and one two letter text according to signals provided through the IntegerInputs. The top IntegerInput defines the level of illumination of the display.

Signal inputs are:

Parameters

NameDescription
precision 

Connectors

NameDescription
large_digit1 
small_digit 
text_digit1 = Mo, 2 = Tu, 3 = We, 4 = Th, 5 = Fr, 6 = Sa, 7 = Su, 8 = AM, 9 = PM, 10 = Ch, 11 = SW
illumination 0 = dark {0,95,191}, 1 = standard {127,191,255}, 2 = bright {159,223,223}
large_digit2 
large_digit3 
large_digit4 

Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.Time Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.Time

Information


Outputs a time integer signal depending on what mode the watch is currently in. As all four time signals, current time, time setting, alarm1 setting and alarm2 setting should be decoded in the exact same fashion, the output of Time is handled the same in DisplayDecoder. This model also contains the actual clock that makes one tick every second. when a user sets a new time, the discrete state in TriggeredAdd will be reset and the output will re-set to that value and continue ticking.

Connectors

NameDescription
signalBus 
y 

Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.DisplayDecoder Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.DisplayDecoder

Information


Decodes a number of integer signals (input at the bottom) into six digits to be displayed on a LED display according to definition in the WatchDisplay. Depending on the selected mode, the signals are masked in order to show the chosen entity correctly.

Connectors

NameDescription
time_signalRaw input signal
large_digit_1 
large_digit_2 
large_digit_3 
large_digit_4 
small_digit 
text_digit 
time_modeRaw input signal
date_modeRaw input signal
year_modeRaw input signal
stopwatch_modeRaw input signal
day_signalRaw input signal
date_signalRaw input signal
year_signalRaw input signal
stopwatch_signalRaw input signal
mode_signalRaw input signal

Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.AlarmTrigger Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.AlarmTrigger

Information


Logic for deciding whether any alarm should sound. The logic is defined in D. Harel's paper (see reference on package level) as:


T1 is the time set when alarm1 will sound.

T2 is the time set when alarm1 will sound.

P1 = alarm1 enabled and (alarm2 disabled or not T1 == T2)

P2 = alarm2 enabled and (alarm1 disabled or not T1 == T2)

P = alarm1 enabled and alarm2 enabled and T1 == T2


Alarm 1 will beep when time becomes equal to T1 and P1 is true.

Alarm 2 will beep when time becomes equal to T2 and P2 is true.

Both alarms will beep when time becomes equal to T1 and P is true.

Connectors

NameDescription
alarm1_enabled 
alarm2_enabled 
T1 
T2 
P1 
P2 
P 
alarms_beep 
T_hits_T1 
T_hits_T2 

Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.WatchController Modelica_StateGraph2.Examples.Applications.HarelsWristWatch.Utilities.WatchController

Information


The watch controller contains the clock functionality, gathering of stopwatch signals, time settings and modes from different parts of the wristwatch that are gathered, grouped together and finally decoded into outputs to the LED display.

Connectors

NameDescription
display_node 
large_digit1 
large_digit2 
large_digit3 
large_digit4 
small_digit 
text_digit 

Automatically generated Tue Oct 01 16:04:22 2013.