BC9001 or station sign - ShadowJonathan/ByteCart GitHub Wiki
Abstract
The BC9001 sign is the sign dedicated to stations in the network.
Function
This sign is placed under the rail and reads the destination of all carts passing above it. When a cart passes above it, if the destination address ofthe cart matches exactly the address on line #4 of the sign, BC9001 sign powers a "station" lever placed on its left or its right, otherwise it unpowers it. The signal given by the lever can be used to change a rail intersection to extract the matching cart and send it to the station.
If the first cart is the head of a train, all subsequent carts passing above BC9001 before the train time slot timer expiry will follow the head of the train without address evaluation: the "station" lever will be maintained in its position. Each cart of the train will reset the train time frame timer. After expiry of the train time slot timer, BC9001 will operate normally and evaluate destination address of carts to come.
Input and output
Outputs
- Direction lever (mandatory)
- Section occupancy, or "red light" (optional)
Inputs
All inputs are optional.
- counter from BC7002 (cart detector)
- busy line, or "occupied" signal
Anti-collision feature
Associated with a BC7002 sign, BC9001 can optionnaly deliver a "red light" signal when a portion of track between it and the BC7002 is not free of cart. The "red light" signal will be powered if there is at least one cart on the portion of track between the BC7002 and the BC9001, and unpowered a short while after the last cart hast left the portion of track. The signal can be used to prevent carts leaving the station to enter the network in unsafe way. In other words, it can detect a free space slot in the circulation flow where a limited number of carts can be inserted. The further the BC7002 is upstream from BC9001, the larger the free space slot is, allowing more carts to be inserted.
There is a default timeout of 10 seconds before "red light" turns green, after last redstone pulse received from BC7002, to avoid lockage due to (rare) buggy behaviour.
Busy station
BC9001 can take a optional "busy" signal as input. When "busy" signal is up, BC9001 will unpower the "station" lever and maintain it in this position until "busy" signal is off, thus preventing carts on the network to go to the station. "Busy" signal is ignored while a train passes above BC9001 to avoid to break the train.
"Busy" station may be used to avoid crowded stations, but be aware that carts prevented from entering the station will not stay in the network for an infinite time and will go to garbage collector after TTL expiry, so don't abuse of "busy" signal or you will loose material.
Usage
BC9001 sign must be placed under a rail. At least a lever should be present on the left or on the right of the sign to command an intersection.
Optionnally a BC7002 can be placed upstream on the main track, with output connected on redstone dust on the left or the right block next to the sign, opposite to the "direction" lever. Due to a bug you must use at least a 1-tick repeater to repeat the signal from BC7002. "Red light" signal is available on a lever placed 2 blocks behind the sign.
"Busy" signal is an input. It is taken from redstone dust on the left or on the right block next to the "red light" output lever described above, i.e 2 blocks behind the 9001 sign and 1 block left or right.
Syntax
Line #1 : Free
Line #2 : [BC9001]
Line #3 : Station name
Line #4 : the address of the station in the form XX.YY.ZZ
Example
The blue line indicates the main track, the red line is the track to the station. Some blocks were removed for better visibility.
There must be redstone dust or a redstone torch on the block with the lever so that the rail changes position when the lever is ON. There is a redstone torch here, but it is not visible behind the block.
A simple station access without anti-collision or "busy" feature. The sign is under the wood block:
Here is a different view of the same example:
A general view of BC9001 with busy line added. When the lever on the left is on, no cart can enter the station. The track was removed for better visibility:
Now we add a BC7002 upstream and we link it to the BC9001:
A more detailed view of the BC9001 with the redstone dust on the left to receive the signal from BC7002, and the new lever 2 blocks behind to give a red light signal:
The same thing with the track. The station is down left:
We can add a BC7001 sign to manage the entry on the network. It will react to the red light signal. In this example, we connected it to the busy line as well through a lever placed behind the BC7001:
Another view from another orientation:
The same with the track:
If a cart comes from the right and has this station as destination, it will enter the station, stop on the BC7001, power on the busy light, wait about 15 seconds until the red light become green, and start again.
A cart that does not have this station as destination will put the red light on for about 15 seconds to have the time to pass.