On Saturday we finished the connection between the temporary flex track running
across the future F-yard area and the helix, which was previously linked to
Berkmannville. I pushed a car all the way through to prove that it works!
To make this operational we need to complete the wiring. James's diagram on the
computer shows 4 blocks in each side of the double track between existing
blocks (the former location of the Engine Yard connection) and the middle-level
tracks off the helix where there'll be a station. a crossover and 2 sidings.
Thaddeus and I cut block gaps accordingly and installed dropper wires, then I
wired up 2 blocks on each track taking it as far as the F-yard west exit and
its adjacent crossover. Here we'll need an X block but for the moment I assume
we'll connect the track temporarily to one of the neighboring blocks. Maybe on
Monday night I'll put in wires for 4 more blocks, taking it all the way to the
middle level. I've used the 16Ga wire and brought the ends to the set of
cabinets under F-yard where I assume we'll have a block card, but 4 blocks on
each of 2 tracks exhausts the capability of a single card. We could double up
some of the wires and use larger blocks, but I don't really know the plan.
Today, we redid the demo layout so that it can run the trains automatically. To do so, it uses a modified block card which, instead of using train feedback, uses light sensors on the end of the track to detect when the train has reached the end.
The layout is designed to run two locomtives. The block card runs a basic state machine that looks at the current state (which two tracks the locomotives are on) and then randomly chooses a new reachable state and attempts to move into that state.
However, I did run into some problems late wednesday night after everyone doing the physical construction of the layout had gone home, solved them in a somewhat ugly fashion, and sent out this email:
The demo track is working, although I had to use a somewhat unconventional technique in order to keep the trains from running off the end. Basically, the sensors are too close to the edge, and thus if track power is simply turned off when the train goes over the sensor, it always coasts straight off the end (and possibly onto the floor, although I managed to avoid having that happen -- be careful if you test it!!).
So, currently, the code is setup to reverse the track power direction relay, under load, immediately when the train goes over the sensor, and then keep powering the train (reversed) for a little bit. This causes the train to make an abrupt halt instead of coasting off the end, usually. For some reason it seems not to work occasionally, probably a bug in the code (so don't leave trains running unattended!). I'm sure doing this isn't too nice on the relays and such, but oh well.
Other than that it seems to be working reliably. I'm not sure the randomness of the state change is all that random since it's being taken from the current value of the 100th of a 60th of a second being counted up by the timer but it's at least somewhat random.