"Safeworking" is an Australian term for the various methods used by railways and railroads to ensure the safe operation of trains. In other parts of the world it is generally known as railway signalling (or railroad signaling), despite signals not being involved in some forms of safeworking
Safeworking is designed to prevent two or more trains colliding with each other. This is generally achieved by dividing the railway into various sections, often known as blocks, and only allowing one train in each block at any given time.
Most blocks are defined as being between two fixed points, which might be stations, signal boxes, or other suitable locations. Some modern computer-based systems use moving blocks, where the block moves with the passage of trains, creating a zone around the train into which no other train is allowed to enter.
Enforcement of the one-train-in-the-block rule is carried out either by requiring that any train entering the block carry an authority to occupy that particular block, or by requiring that a train receive permission to enter the block, usually by means of a signal.
Token systems, which are used for single-track sections, fall into two main types. In the first type, a single token exists for a particular block, marked with the names of the ends of the block. As only a single token exists, a train driver (US: engineer) having possession of the token for that section can be confident that no other train is in that block. In the second type, multiple tokens exist for a particular block, but are contained in one of two instruments at each end of the block. The two instruments are electrically connected and only allow one token to be withdrawn from the instruments at a time.
The tokens in token systems are known variously as staffs, tablets, balls, or keys, depending in some cases on the shape of the token.
In operation, a token for the section between stations A and B is given to the driver of a train which has to travel from A to B. When the train arrives at B, the driver hands over the token to the signalman there. The signalman at B can then give the token to the next train travelling from B to A.
A problem arises, however, when two trains have to travel from A to B before one returns from B to A. In this case, the first train would carry the token from A to B, and that token would then not be available at A for the next train travelling in that direction.
Many railways therefore use a modified token system, in which the tokens are supplemented with tickets. A ticket is a paper form which is an alternative authority that the driver may carry. However, the driver is only allowed to use the ticket if he also sights the token. This ensures that there can be no other train already in the section travelling toward him. Once the ticket is issued to the driver, no further ticket, nor the token itself, is allowed to be used until advice has been received from the station at the other end of the block that the train has arrived there.
The second system, by which multiple tokens are held in electrically-connected instruments, also allows for more than one train to travel from A to B before a train travels in the opposite direction. In this case, the driver of the first train is issued with a token, and no other token can be removed from either instrument until the first token is returned to one of the instruments.