NCE Macros

Below is a discussion about using NCE macros. NCE "Macros" is an advanced function found in NCE's Command Stations and Mini/Macro panel boards.

If you are interested in the Macro Command Set and Memory Capability of NCE systems

go here: NCE Macro System Specifications

TOPIC COVERED IN THIS SECTION:

Definition of a Macro

Examples & Benefits of using Macros

What do Macros control?

How do Macros control decoders?

Macro file/script structure

Macro command Arguments (data)

How Do You Enter Macro Commands?

What NCE products support Macros?

Definition of a Macro

Definition: A Macro consist of various "macro commands" that are put together in a sequential string or "script" and stored in some memory. When triggered by some event, button or user input, these "macro commands" are automatically executed sequentially till all of them have been carried out. When completed, it will have accomplish a specific task or function on the layout.

Stated another way, macros are a form of software programming using very simple commands that are relatively easy to understand by the end user.

Macros are not something you buy. They are written by the user to solve a specific problem or make something happen that the user has on the layout. Given that all layouts are unique, the macros written will always be specific to that layout.

Examples & Benefits of using Macros

1) Allows faster execution of a series of keystrokes that would take to long to do by hand.

2) Implement complex functions on demand.

3) Perform some basic layout automation for effects.

Examples of task Macros can do:

1) Set up a defined route through a switching or staging yard, interlocking or some complex arrangement of tracks and track switches to a specific track with a push of a button.

2) Implement some simple signaling and/or implement some simple interlocking. Track detection triggers a macro to set signals and set/lock a route.

3) Control (run) a train on a closed pre-defined path. Run a train back and forth point to point for background action.

4) Implement scenic animation or sound effects. Run a weather storm sequence upon command complete with flashing lights and sound.

MOST COMMON TASK: Setup up a track route or path through a yard with a single push of a button.

Other Macro Information:

1) Digitrax has a "Route" feature which are macros that are limited to specifically controlling track routes.

2) Microsoft Excel has a "Macro" feature which allows one to automate the processing of data.

What do Macros control?

Macro used in DCC systems are intended to control DCC decoders. There are two types of DCC decoders. Mobile (Engine) and Stationary (Accessory). All DCC decoders have addresses.

Mobile decoder addresses are typically the engine number itself. Using that address, you can control motor speed, lights and sound. Mobile engine decoder are specifically designed to control engines.

Accessory decoder addresses are assigned by the user and documented as to what they are going to control. Accessory decoders are designed to control many different types of devices or various forms of a given device. The two most common types of accessory decoders are for control of Switch Machines and Signals. For more information about Accessory Decoders, go here: Accessory Decoders

How do Macros control decoders?

They send DCC commands to specific decoder addresses.

WHAT IS IMPORTANT for any macro to work are:

1) the macro must have some type of DCC decoder to control. Mobile or Accessory.

2) the address of the decoders must be known ahead of time.

Why? These decoder addresses will be coded into the macro at the time you program them.

Example using a Track Switch Machine Accessory Decoder: By assigning the accessory decoder an accessory addresses, you are then assigning each track switch an unique accessory address. With this information, you can then have a specific macro command tell a specific track switch what to do. If you do not have any of these accessory devices installed on your layout, macros will not work.

Macro file/script structure

1) A macro consist of one or more macro commands that collectively form a macro script.

2) Each "macro command" performs a single and specific function.

3) Each macro script has a macro number (name) to identify it from other macros. One can call a macro up for execution by giving its number.

4) A Macro can call other Macros. This is used to extend the length of the given macro and/or make a collection of macro more structured minimizing redundant scrips by sharing.

5) You can have many different macros with each built to perform a different type of "high level" function.

Macro command Arguments (data)

Some commands will require additional "Arguments" which are needed to complete the commands function.

One form of an Argument is the decoder address so we specify which decoder to send the data too.

After the address is specified, there is a 2nd Argument which is the data we want to send. For an accessory address, It can be as simple as a On (A 1 bit value) or Off (A 0 bit value) data. This can correspond to throwing switch machine one way or the other. Turning a light on or off.

How Do You Enter Macro Commands?

Macros can be entered two different ways.

1) Using the ProCab with a PowerPro system.

2) Using software on a PC such a JMRI.

The instructions for entering and using the macros are found in the manuals for the NCE system that support it. In the case of the Mini/MAcro panel, there is also a technical reference document given the large command set offered.

What NCE products support Macros?

ALL NCE DCC command station support macros. There are also special devices that greatly expand macro capabilities for building control panel with pushbutton inputs such as the NCE Minipanel.

For a complete list of Macro commands and memory limitatons of all NCE products,

go here: NCE Macro System Specifications

COMMAND STATION MACROS:

The command station macros are very simple because they are very limited. They ONLY control accessory decoders which in terms of NCE products means limited to talking to NCE Switch-it or NCE Switch-8 devices. These two devices control slow motion switch machines with the primary device being the ever popular Tortoise. (There are compatible third party accessory decoders that can control more than switch machines.)

Therefore the primary "high level" goal of the NCE command station macros is to set up a "through track route" or "Path" through an interlocking or yard/staging ladder tracks.

Activation of a specific macro is done by pressing the macro button and entering the macro number (name) you wish to run on the throttle. The users effort to run a simple or complex macro is exactly the same. Hence the more complex the route gets, the more valuable the macro becomes.

Most people use the macro number to refer to a specific track such as in a yard. Example: Track one is in the front to track 6 in the back. Hence to access track 6 from the main line, all one does it call up macro 6 and run it. It will then throw all the necessary switches to allow the train to reach track 6.

MACRO/MINI PANEL MACROS:

Go here to learn about NCE Mini/Macro Panel devices: NCE Mini/Macro Panel