Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
TRAIN MASTER CONTROLLER
   
Award
Favorite
Favorited
Unfavorite
Vehicles: Land
Microcontrollers: Composite, Modular, Microcontroller
Tags: v1.6.5
File Size
Posted
Updated
53.021 KB
22 Apr, 2021 @ 7:57am
26 Oct, 2022 @ 10:01am
5 Change Notes ( view )

Subscribe to download
TRAIN MASTER CONTROLLER

In 1 collection by agrimes
ATG's train control system.
15 items
Description
This is the beating heart of my train control system. I'm sorry but it turned into a real nightmare, even using every optimization I know and strictly adhering to block placement rules, there was nothing I could do to tame this monster. =\

It should be placed on cars that can be used as locomotives, ie having engines and/or control stations.

For all of its complexity, I've been able to simply drop it into every locomotive in my collection and drive away, no issues -- provided I can find space for it (!!).

Update: made the code that detects the master status of the thing a bit less circular.

Status tooltip:

0 - Stand alone, should not transmit on composite line to end connectors.
1 - Master. Should transmit to both end connectors.
2 - slave mode, master detected at front connector.
3 - slave mode master detected at rear connector.

The controller always passes signals to the other end connector and relies on protocol to be the only active transmitter.

This update does NOT change any protocol and should be deployed to address glitchyness, etc. Update to the current version before reporting bugs.

Update: Bugfix, the overspeed logic was not behaving correctly. Now returns the correct value.
2 Comments
agrimes  [author] 23 Apr, 2024 @ 7:34pm 
It is a part of a suite of controllers that I use to control my trains. See the collection linked just before the description block in this post for associated controllers. The example train demonstrates most of the collection. When designing this controller, I could not know how you chose to set up your locomotive's actual engine. However, there seems to be two basic categories, A. a locomotive that is controlled by sending a throttle signal to an electric motor, and B. a locomotive controlled by sending a throttle signal to some kind of diesel engine. I have separate drive system modules for each of these cases which connect to the master controller. Each of these has a suite of tuning parameters and features for the specific type of drive system.
charlesvardy1992 19 Apr, 2024 @ 1:28pm 
how do u tie this into other systems like my engine ecu . what does control and control status connect to ? what does drive system control/feedback connect to ? and how do i tie in the lights to this system without messing up the main light connections ?