LogixNG Reference - Chapter 4

Actions and Expressions

LogixNG has four basic building blocks: Actions, Expressions, Male sockets and Female sockets.

Actions do something, for example throw a turnout or sets a signal mast. Expressions ask something, for example if a sensor is active or if a signal head has a particular appearance. The actions and expressions form a tree and complex logic can be built with them.

Each action/expression is embedded in one or several male sockets. Male sockets allow actions/expressions to be connected to a female socket of the correct type.

A ConditionalNG has a female socket that is the root of the ConditionalNG tree. And some actions/expressions have one or several female sockets as children. There are several different types of female sockets and the female socket type decides which types of actions or expressions can be connected.


Since there is a large number of actions and expressions, they are assigned a category. The main categories are Item, Common and Flow Control.

Action and Expression types

Each action and expression is built for a specific socket type.

Symbol Type Description Categories
! Digital action Execute, no parameter Item, Common, Flow Control, Other, Display, LocoNet
!b Digital boolean action Execute using a boolean parameter Common
!~ Analog action Execute using a double parameter Item, Common
!s String action Execute using a string parameter Item, Common
? Digital expression Return boolean Item, Common, Flow Control, Other, LocoNet
?~ Analog expression Return a double Item, Common
?s String expression Return a string Item, Common
?* Generic expression Return an Object (Digital, Analog, and String merged)


Adding an action or expression

When Add is selected from the context menu for an empty socket, the category and type sub-menus are displayed.

Chapter 4 add sub menus

The first sub-menu list contains the Category names. The second level contains the available Type names for the selected category. For example, Digital Action socket using the Item category is quite long while Analog Action socket using the Common category is short. The Type list always displays the valid selections for the socket type and category.

There are many combinations of socket types, categories. These are described in Chapter 5 - Actions and Chapter 6 - Expressions.

Chapter 5 - Action Descriptions

Return to the Reference TOC