My car spreadsheet (600+ records) has the following fields: carID, type sub-type, road, number, length, color, built, manufacturer, ?weight, wheels, resistance wheel (Y/N), couplers, coupler screw (Y/N), weathered )(Y/N), date last checked, load (if any), comment; and new fields I added for the barcode reader code: destination pointer, destination 1, destination 2, ....destination n (typically 4 to 8 destinations). I primarily use this spreadsheet to keep track of my cars and what I need to do to them.
-
My layout centers on the Enola freight yard in Harrisburg, Pa. Trains arrive from various cities (staging), cars pass over one of two humps, eastbound or westbound, and are routed to new trains which depart to destination cities (staging).
-
I read the carID as the car passes over one of the two humps with a bar code reader. The program gets the car length and next destination from the car spreadsheet. I find the next destination by incrementing the pointer each time the car returns to the hump for classification. That way the car will cycle between 4 to 8 destinations, eastbound and westbound.
-
In a second spreadsheet, given the destination, the program finds the next train (of about 20 scheduled trains) bound for the destination and its assigned track. The assigned track is updated in the trains spreadsheet by the departure yard master during the operating session. The available track length is decremented by the car length and then the new available track length is written back to the spreadsheet. When no room on the track is left, the program routes the car to an overflow track.?
-
In jmri, when the track is entered the program adds the commands for the turnouts involved to a turnout.list. Since more than one car is rolling down the hump at a time, turnouts can't be thrown until previous cars have passed over it. When a car passes over a turnout, photocells activate a sensor and Logix runs a script which clears the top command in the turnout.list and throws the turnout to the next position in the list.
-
I haven't had a chance to study the csv examples yet. But, if I run the program outside of jmri to find the track number, I really only need to pass that track number into jmri which may not be that hard using a csv file as an intermediary. Then I can run the rest of the script in jmri to enter the new turnout commands into turnout.list and eventually throw the turnouts and control panel lights.?
-
Hope this wasn't to much information. If you are interested, I've uploaded the program into files as Nick Brownsberger's hump control program.
Nick