RISC OS Software RISC OS
http://www.svrsig.org/ software/Locking.htm

Locking

I find things mechanical rather interesting and so I decided to try to display a complicated mechanism going through its motions. I have done an animated diagram of steam locomotive valve gear which shows the way steam is admitted to the cylinders with different ‘cut-off’ settings (see www.svrsig.org/ValveFwd.htm).

The challenge this time was to display the mechanical locking under a signal box as different levers were pulled. I had detailed information for quite a few signal boxes specifying exactly how the mechanical locking was laid out.

Mechanical locking can be in various forms but I have concentrated on the Great Western 3-bar and 5-bar frames, as that is what we have on the Severn Valley Railway.

On the operating floor of the signal box is the top half of the lever frame with the levers protruding through a slot in the floor plates. Below this level, the movement of the levers is transmitted through a fishplate to a cam slide which imparts vertical motion to a tappet in two stages: firstly to prove the lever is not locked and then as the lever is fully travelled it releases other locking.

Draw data in memory

By using MakeDraw to generate the vector graphic image, the location in memory of each component is known. As it is generated the characteristics of each element is also known: a lock for example will sit in channel c%, to the right of tappet t% and bits are set to note whether it has a nib to the left or right or both and whether it drives a condition. This provides enough information to draw the detailed outline of the lock in the correct place, as shown on the dog chart. It also allows its interaction with tappets to be inferred.

The overall drawing is built up in layers so that the different components are drawn in turn starting with the locking tray, then in turn each group of items finishing with whatever is on top (top bars or straps). All of the components are then drawn again as unfilled shapes with a dotted outline. Hidden lines thus appear dotted but solid lines are unaffected.

In the diagrammatic view only thin locks that sit on top of another lock are filled: this ensures that the outline of the lock underneath is shown as dotted where hidden. By convention conditions (which sit under the tappet on a 3-bar frame) are drawn in solid outline.

The application concentrates on a view of the mechanical locking, as it would appear under the signal box operating floor. A locking tray supports the movement of the tappets, spaced at the same spacing as the lever to lever separation on the operating floor. It also supports the moving locks and bars in separate channels.

The principle is very simple: notches are cut into the tappet to allow locks to slide sideways. In a particular channel, locks are connected by locking bars and thus lock or release other tappets.

I decided to animate both a view of the diagrammatic arrangement of the locking (called a dog chart) as well as a view of the actual locking as it would appear visually. A picture, as they say, is worth a thousand words and the screenshots illustrate the actual locking and dog chart.

When generating the vector graphic image, the shape of the lock depends on the nibs which interact with the tappet or with conditions or plates rivetted to the tappet. Various flags are set to mark whether a particular part of the nib each side of the lock is present. Bars may also have a stud driving a lock or may be fixed to a lock.

Once I had a vector graphic representation of the diagram (called a dog chart) it was relatively simple to animate it. If I rendered each part in turn, I could displace each item by a different amount to represent its movement. The complication was working out which items were free to move and which other items would move as a result.

A useful function is called recursively to work out the effect of moving a tappet. The output below (captured by using '*spool' while the application is running) shows that tappet 5 at Highley requires the following to move:

To move Tappet 5 requires:
Lock 3 to right of lever 4 in channel 1 must move left.
Lock 6 to right of lever 10 in channel 1 must move left.
Lock 8 to right of lever 12 in channel 1 must move left.
Lock 9 to right of lever 13 in channel 1 must move left.
Lock 10 to right of lever 1 in channel 2 must move right.
Lock 12 to right of lever 4 in channel 2 must move left.
Lock 13 to right of lever 6 in channel 2 must move right.
Lock 14 to right of lever 5 in channel 2 must move right.
Lock 15 to right of lever 7 in channel 2 must move left.
Bar (1) 2 in channel 2 (between tappets 4 and 8) must move left.
Bar (2) 4 in channel 2 (between tappets 1 and 7) must move right.
Bar (7) 4 in channel 1 (between tappets 3 and 14) must move left.

Then to move tappet 7 requires:
Lock 11 to right of lever 3 in channel 2 must move right.
Lock 12 to right of lever 4 in channel 2 must move right.
Lock 15 to right of lever 7 in channel 2 must move right.
Lock 35 to right of lever 6 in channel 4 must move left.
Lock 36 to right of lever 10 in channel 4 must move left.
Lock 44 to right of lever 7 in channel 2 must move right.
Condition 1 on lever 7 in channel 2 must move right.
Bar (1) 2 in channel 2 (between tappets 4 and 8) must move right.
Bar (9) 3 in channel 2 (between tappets 2 and 14) must move right.
Bar (18) 4 in channel 4 (between tappets 6 and 12) must move left.

From the dog chart you can therefore see that 5 locks 10 (lock 6), 12 (lock 8), 13 (lock 9), 2 (lock 10) and 4 (lock 12). Pulling 7 then locks 4 each way (lock 11), 5 reverse (lock 12), 8 (lock 15) and 10 each way (lock 36, already locked by pulling 5). A screen shot illustrates this sequence.

This application is available from !Store and may be downloaded directly from here.