Section
Last updated
Last updated
Your automation script will most likely consist out of a lot of different actions that can be grouped into bigger units like for example "Stop at station 1". A section provides you with this grouping and helps you to keep an clear overview about the different steps of your script.
If a section is conditional Model Train Script will evaluate the configured conditions. You can configure whether all (AND) or only one (OR) condition have to be met to execute the section. Conditions can be defined for (layout) accessories, feedback sensors, vehicle state or flag state.
This way you can make a section only execute when for example a specific turnout is thrown or a sensor is active.
Just as the execute conditions you can define a set of conditions that have to be met for the section to repeat. This allows you for example to create a section that retries as long as for example a sensor is active.
Inside the section you can create actions performing the actual work of the script. You can create, delete and order them. Remember that the order that you see in the app will be the execution order of the script.
Actions can be added with the "+" button on the top of the screen or on any position within the section by swiping right on an existing action. The new actions will be inserted at that position.