Contents Links Search
 

RPN Scripts

RPN Documentation

Submit Script

Conversion
   Conversions
   Convert
   Euro
   Euro_Calculator
   Soundex
Engineering
   Feet_&_Inch
   Units
   Water
Entertainment
   Master_Mind
   Sticks!
Finance
   Annuity
   Euro_Calculator
   TVM_Financial_Functions
Math
   3D_Vectors_v1.2
   Base
   Base_Conversions
   Complex_Arithmetic
   Complex_Math
   Discrete_Math
   EBBases
   Fractions
   Fractions
   Least
   Logs_&_Powers
   Misc
   Regressions
   Scientific
   Scientific_Functions
   Scientific_Programmable
   Simple_Complex_Math
   Standard_Normal_Distribution
   Trig
Misc
   Health
   Husband's_Calculator
Physics
   Angle_of_View
   Depth_of_Field
   Physics_Functions
Time
   Clock
   Julian
   Multiple_Timer
   Stop5Watch
   Stopwatch
   Timer
Utility
   Board_Foot_Calculator
   Calendar_Functions
   Checkbook_II
   MiniG
   Stack_Handling_and_Saving
   WindChill

Stopwatch
Jann Scheuer - email


summary
Stopwatch with running clock and indexed split and lap
times

instructions
Application StopWatch

by Jann Scheuer, scheuer@coco.ihi.ku.dk

1 Units
Application StopWatch consists of two units: StopW and StopMod.
Only the first, StopW, should be chosen as current function set in RPN.
(I suggest you place unit StopMod at the bottom of the function set list.)

2 Description
Application StopWatch features a running clock (in seconds),
indexed split and lap times, and sorting facilities for viewing
and manipulating split and lap times.

Split and lap values are shown in seconds and hundreds of seconds.
Values are indexed (on the 6'th digit after the comma) so that the
operator may see which split and lap times go together (i.e. were
tapped in simultaneously).

Stopwatch may be operated by up and down scroll buttons, and therefore
it overrides function set scrolling by means of scroll buttons.

3 Buttons

Unit StopW

But
Menu for defining scroll button function in unit StopMod (i.e. running
stopwatch).
Lap - up button puts lap time on stack, shown as negative values.
Split - up button puts split time on stack.
Both - up button puts lap and split times on stack.
OvWr? - toggles clear/keep stack mode when putting split and lap values on
stack.

Off
Offset or delay. Value in hundreds of seconds added to time values so as to
compensate amongst others for operator's reaction time. If stack is empty
offset
value is shown. If stack is not empty, tos is saved as offset value.

Cls
Clear stack.

Up
Rotate stack upwards.

Dn
Rotate stack downwards.

Srt
Sort values on stack.
Values may be sorted according to their indexes (Asc-i, Des-i) or
according to
numeric values (Asc, Des).

Start
Start stopwatch.

Up scroll button
Clear stack.

Down scroll button
Start stopwatch.


Unit StopMod
(running stopwatch)

.....running.....
No function.

L
Put lap time on stack, shown as negative values.

S
Put split time on stack.

B
Put both lap and split time on stack.

Stop
Stop stopwatch.

Up scroll button
As defined in menu But in StopW.

Down scroll button
Stop stopwatch.

code
RPN.2.h \ StopW
{k}Ttxb+r2Vv#'12'=0(UhxaG'J-StopMod':v#'11'=0(UhhV{_vd1}Ud:d1;));
{o}xc0=0xc3=0|!(0Xc);
[h]#'100'*fb;
[s]Xh{1Xg0Xdh1-V{_vxd1+Xdxdg@Xexd1+g@Xfxhc(xexf>:xexf<:xeChxfCh>:xeChxfCh<)
(0Xgxfxd1+p@xexd2+p@)}xg(B)};
"StopW"
"But"D'Buttons: Dn - start/stop \Up - choose function: 
|Lap|Split|Both|OvWr?|'
Vv3=0(xc3-bXc:vXa)xa2>(xa3-Xa)xaxc+Xa;
"_Off"h(Xb:xb);
"Cls"hV{_vd1};
~
"Up"hr@;
"Dn"hk@;
"Srt"D'Sort order|Asc|Des|Asc-i|Des-i|'Cs;
~
"Start"Ttxb+xaG'StopMod';

RPN.2.f \ StopMod
{t}Ttxa-#'100'/wxc(d1Cu)#'30'UTUdd1;
[0]#'0.000001';
[+]xfC0+Xf;
[h]#'100';
[a]xa-Ch/xf+;
[l]Vvxb-Ch/nvXbxf-;
[u]G'J-StopW';
[d]XehV{_vd1}xe;
{k}TtUhC+r2Vv#'11'=0(xdc(Cl:Ca:g1Clr2Ca:CdCl:CdCa:Cdg1Clr2Ca):v#'12'=0(1Xc:d1));

{o}XdXaxaXb0Xc0Xf1UT;
{c}CaUd;
"StopMod"
".....running.....";
~
"L"TtC+Cl;
"S"TtC+Ca;
"B"TtC+g1Clr2Ca;
~
"Stop"TtC+Cu;

top
Nth Lab
©1996 - 2001 all rights reserved
August 03, 2001
contact