Attributes

Enumerations

Enumerations are a list of items in a collection, or elements within a set. They represent a set of choices, or a set of options, for the state that something exists in. For example, when creating a Motor, one would first want to assert what kind of motor is being created based on a list of of motors: DC - Series, DC - Shunt, AC 1-Phase Induction, AC 3-Phase Induction, AC 1-Phase Synchronous, AC 3-Phase Synchronous. A motor is only one of these. Enumerations are used to supply a specific, limited list of states or conditions that a thing can assume.

In manufacturing, examples of enumeration usage could be the Running State that a piece of equipment can be in: Running, Idle, Stopped, Off, or the state a valve is in: Opening, Open, Closing, Closed. That is the human-readable state of the item: PLCs and other software often return a state as a number: 0,1,2,3. Enumerations in ThinkIQ allow the platform to transform the state to a human-readable form.

Enumerations provide tremendous flexibility for defining a thing, and in ThinkIQ, end users can create their own enumerations.

A specific enumeration can be shared among instances of equipment. Taking Running State, above: once it is defined as a Type it can be added as an attribute to any equipment that shares some or all of the states: Running, Idle, Stopped, Off. The actual code that matches the running state can be edited for each piece of equipment. If a particular state doesn't exist for an equipment instance - say, Idle does not exist - you can assign the next number in the series to that item as it will never be returned from the data source, and it will simply be ignored.

 

Create an Enumeration Type

Enumeration Types are created and maintained under the More - Enumeration Types tab in the Model Explorer.
Click the plus button at the top right to Add Enumeration Type. Highlight a row and double click to Edit Enumeration Type.

add enumeration type

Create an Enumeration Type 

  1. Give the Enumeration Type a name
  2. Provide a description (optional)
  3. Add Enumeration Details
    1. Enumeration Names are human readable descriptions of the 'state' or 'condition'
    2. Descriptions can help when selecting the correct Enumeration when creating an instance.
    3. Enumeration Default Values are defaults expected: they can be changed when the type is added to an instance. This is usually a numeric.
    4. Color is optional. Click the color box to open a Color Picker. Color will display in different areas of the Platform
    5. Use the plus icon to add another Enumeration option.
    6. Drag items to reorder the list using the icons under the Order column.
    7. Delete items using the trash can icon.
  4. Local Library is the default location for a new enumeration. This can be changed.
  5. While building your model, it can be useful to track status.

 

 Add an Enumeration to an Instance

In the Model Explorer, select the instance to which you want to Add an enumeration. Open the Attributes Grid for the instance to see a list of current attributes. Use the plus icon on the top left of the grid to Add an enumeration. Enumerations that you add must come from pre-existing Enumeration Types.

add enum attr to instance

Add an Enumeration Attribute to an Instance

  1. Give the attribute a name
  2. Provide a description (optional)
  3. Select Enumeration from the Data Type drop down list.
  4. Click the list picker icon to browse for and select the Enumeration Type
    1. You can search for the Enumeration by Display Name
    2. Highlight your choice and click Select to insert the Enumeration Type into the attribute
  5. The Data Storage for the Enumeration can be
    1. Time Series - in which case you will choose a Data Source and Interpolation Method:
      1. Tag, (Choose from the Tag List)
      2. Internal (from a script) or
      3. Expression (for which you write the expression)
    2. Static - in which you select a Config Value from the Type's pre-configured list

 

 

 

Add an Enumeration to a Type

When adding an enumeration attribute to a Type, if the Data Storage method is Time Series, there are only two data sources: Dynamic - the data will come from a tag or be internally updated by script, or Expression. Determining which of these to apply will occur at the instance level.

 

Contact Us

ThinkIQ

65 Enterprise
Aliso Viejo, CA  92656
United States

phone: 844-THINKIQ (844)844-6547
email: support@thinkiq.com
websitewww.thinkiq.com