Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Content

Enumerations are a unique type of UDT (User Defined Types). They enumerate a collection of values, messages, and colors. These can be used as parameters for Tags or directly in script expressions.

Enumerations are frequently employed as parameters for other tags or variables. This practice enhances code readability and maintains a finite list of states or options that a variable can take. Utilizing an enumeration as a parameter restricts the value options for that variable, facilitating a clearer understanding of its purpose and minimizing the likelihood of errors.

For instance, consider a building control system with lights that can exist in one of several states: off, on, or emergency. Rather than using integers or strings to represent these states, one could employ an enumeration, such as LightStatus. This approach makes the code easier to read and write while also making it more robust by preventing invalid states from being assigned to the variable.


On this page:

Table of Contents
maxLevel3
minLevel2


Defining Enumerations

Content
  1. Navigate to Unified Namespace → Enumerations.
  2. On the toolbar of DataGrid, click on the "Plus" button to create a new enumeration.
  3. Insert a descriptive name for your new enumeration in the name field.
  4. Finally, define the enumeration values along with their respective display texts.

Enumerations Examples on Electrical Systems

NameValuesDisplay TextDescription
EnumPower0Unpowered

Unpowered: The system or device is not receiving power.

1Powered

Powered: The system or device is receiving power.

EnumCmd0Enable

Enable: Enables the system.

1Disable

Disable: Disables the system.

EnumOpenedClosed0Opened

Opened: Circuit is open.

1Closed

Closed: Circuit is closed.

EnumOpenClose0Open

Open: Command to open the circuit.

1Close

Close: Command to close the circuit.

EnumManualAuto0Manual

Manual: System is in manual mode.

1Auto

Auto: System is in automatic mode.

EnumActivateDeactivate0Activate

Activate: Activate the system or feature.

1Deactivate

Deactivate: Deactivate the system or feature.

EnumOnepoleThreepole0One-pole

One-pole: Single-phase connection.

1Three-pole

Three-pole: Three-phase connection.

EnumNormIntermTransf0Normal

Normal: Operating in standard conditions.

1Intermediary

Intermediary: Operating in an intermediary state.

2Transferred

Transferred: The component has been transferred to a different state.

EnumLocalRemote0Local

Local: Controlled locally.

1Remote

Remote: Controlled remotely.

EnumIntermOpenClosedInconsist0Open

Open: Circuit is open and inconsistent.

1Closed

Closed: Circuit is closed but inconsistent.

EnumUnblockedBlocked0Unblocked

Unblocked: System is unblocked.

1Blocked

Blocked: System is blocked.

EnumUpDown0Up

Up: Direction is up.

1Down

Down: Direction is down.

EnumParallelIndividual0Parallel

Parallel: Running in parallel.

1Individual

Individual: Running individually.

EnumStopStart0Stop

Stop: Stop the system.

1Start

Start: Start the system.

EnumOnOff0Off

Off: System is turned off.

1On

On: System is turned on.

EnumNormalActed0Normal

Normal: System is operating normally.

1Acted

Acted: System has acted on a command or event.

EnumBlockedUnblocked0Blocked

Blocked: System is blocked.

1Unblocked

Unblocked: System is unblocked.

EnumRemoteLocal0Remote

Remote: Controlled remotely.

1Local

Local: Controlled locally.

EnumActivatedDeactivated0Activated

Activated: System or feature is activated.

1Deactivated

Deactivated: System or feature is deactivated.

EnumTicketColor0Red

Red: High priority.

1Green

Green: Low priority.

EnumVisible0Visible

Visible: Can be seen.

1Invisible

Invisible: Cannot be seen.

EnumTypeConnector0Delta

Delta: A three-phase connection in a closed loop.

1Wye

Wye: Each phase connected to a central neutral point.

2WyeGrounded

WyeGrounded: Wye connection with grounded neutral.

EnumReclosing0Single

Single: Single reclosing operation.

1Auto

Auto: Automatic reclosing operation.

EnumTurnedOnTurnedOff0Turned On

Turned On: Device is turned on.

1Turned Off

Turned Off: Device is turned off.



In this section:

Page Tree
root@parent
spacesV10