Link a clock’s hands with gears
Build rotary instruments
STUDIO 0.86.4.6 • LESSON 5 OF 35
A clock needs a carry from seconds to minutes and from minutes to hours. Keep a separate alarm hand independent of that chain.
1. Open the working clock
Open examples/workbenches/Clock-and-Debugging.pca3d. Open the clock’s rotary settings and look at its individual hands. Note the stable IDs and the range each hand travels. The project starts a second before noon, which makes wraparound easy to test.
2. Trace the two connections
Enable Link hands with gears. For the second hand, set Drives hand ID to the actual minute-hand ID, with Driven units per driving unit set to 1/60 (enter approximately 0.0166667 in a decimal field). Set the minute hand to drive the hour hand at the same ratio. Leave the final hand’s destination empty.
3. Move across noon and back
In Runtime Preview, focus the clock. Use Up or Down to select the second hand, then Right once. Seconds, minutes and hours should roll over together. Press Left once to return to 11:59:59. Add an independent alarm hand with its own ID and leave its drive destination empty.
WHAT TO CHECK
If a hand advances twice, check whether both gearing and a Turn action are changing the same value. Keep a single source of movement for each driven hand. For a puzzle with freely adjustable hands, leave the drive links empty.
