TilliT
HomepageChangelogDeveloper
  • Home
  • Introduction to TilliT
    • Introduction for New TilliT Customers
    • Videos
  • Getting Started
    • Overview
    • Definitions
    • Set up a Site & Assets
    • Set up an Activity
    • Create an Order
    • Start an Order
    • Next steps
  • Planning
    • Overview
    • Data Gathering
      • Site & Assets
      • Production Orders
      • Activities
      • Shifts & Calendars
      • Materials
      • Process Variables
      • Attributes
      • Articles
      • Checklist
  • Knowledge Base
    • Everyday Usage
      • Layout Overview
      • Login to TilliT
      • Basic functionality
      • Lock screen
      • Pinning Assets
      • Switch Site
      • Next Steps
      • Activities
        • Claiming
        • Completing
        • Manually starting
      • Orders
        • Create adhoc Order
      • Events
        • Raising an Event Using the UI
      • Notifications
    • Scheduler
      • Introduction
      • Feature Overview
      • Scheduler to Digital Operations integration
      • Scheduling
        • Scheduling
        • Orders
        • Scenarios
        • Inventory
      • Configuration
        • Operations
        • Equipment
        • Personnel
        • Materials
        • Availability
        • Optimisation
        • Changeovers
        • Loading data with excel Add-in
      • MVP Setup Guide
    • Insights
      • Activity report
      • Production Report
      • Dashboards
      • Advanced Analytics
        • Sharing dashboard
    • Users
      • User
        • User Confirmation
        • User channels
        • User subscriptions
      • Groups
      • Permissions
      • User authentication with SSO
    • Boards
    • Settings
      • Asset Hierarchy
        • Site
        • Asset
          • Asset Attributes
          • Asset Tolerances
          • Downtime periods
          • Attribute Group
          • Edge data tags
        • Asset class
        • Order Templates
          • Order Template with Unit Conversion
        • Calendar
          • Calendar item
        • Shifts Templates
          • Creating Shift Templates
          • Manual shift patterns
        • Asset Meter
      • Material Definition
        • Material
        • Material group
        • Material attributes
          • Example of material attributes
        • Material tolerance
          • Example of Material tolerance
        • Material component
        • Material conversion
      • Activity Templates
        • Activity template
          • Creating an activity
          • Where
          • When
          • Versioning
          • Building
          • Elements
            • Item types
              • Item properties
                • Active item & hidden expressions
                • Hint
                • Tolerance Source
              • Update Attribute
              • Board Item
              • Raise event
            • Data Types
              • Evaluate Data types & Dynamic Note
              • Note
              • Option list
              • Dynamic option list
              • Barcode
              • GS1 Barcode Scanner
              • Edge data
              • Material Component
              • Image capture
              • Sections
              • Digital Signature
              • Material
              • Dynamic Form Items
              • Inventory Key
        • Activity class
      • Events
        • Event Type
        • Event Relay
        • Event Schedule
      • Articles
      • Integrations
        • Adding Webhook Subscriptions
        • MQTT Integration
        • Receive the TilliT Event
        • Notifications
      • Configuration
        • Attribute
        • Attribute group
        • Tolerances
        • Dashboard group
        • Report Templates
          • Creating and Using Report Templates
        • Process variable
        • Unit of Measure
        • Run Rate Template
      • Translation
      • Audit Log
    • Edge
      • Introduction
      • Before You Start
        • Security / Firewall
        • TilliT Edge
        • Understanding your Networks
        • Common Installation Solutions
        • Managing and Publishing changes
      • Physical Device
        • Setup
      • Using Docker
        • Upgrading a docker container from before 2025
      • Common Data Sources
        • OPC-UA
        • Modbus TCP
        • Ethernet IP
        • Profinet
        • RTLE
        • Simulator
      • Data Tags
        • Data Tag Templates
        • Order Number Tag Template
        • Edge Data Tag Options
      • Edge Triggers
      • TilliT Sensors
        • Connect TilliT Edge to a Wireless Gateway
        • Bind a Wireless Counter to a Wireless Gateway
        • Configure FEN-20 PNP Sensor
      • Troubleshooting
      • Windows Edge Installer
    • History
    • OEE
      • Two Steps to Availability
      • Two Steps to Performance
      • A Step to Quality
    • Track and Trace
      • Before you begin
      • Transaction Types
      • Movement Types
      • Movement Types Field
      • Adding Material Movement to an Activity Template
      • Completing the Activity
      • Reporting
    • Mobile View
      • Device shortcut
      • Unable to enter Negative Numbers
    • Importing, Exporting and Cloning Entities
    • Troubleshooting
  • Tools
    • Excel add-in
      • How to Install the Excel Add-in
        • Excel Online
        • Desktop
      • How to Update the Excel Add-in
      • Loading multiple orders
      • Maintaining Master Data in Bulk
      • Downloading Time-Series Data
    • Staging Environment
    • Ignition Module
      • Installation
      • TilliT Tag Provider
        • Data From TilliT to Ignition
        • Data From Ignition To TilliT
      • Scripting Using the TilliT Module
      • Network Security
  • INFRASTRUCTURE
    • FAQ
    • Architecture
    • Disaster Recovery
    • Software Quality Assurance
Powered by GitBook
On this page
  • EVALUATE(EXPRESSION)
  • How to Use EVALUATE
  • Key Points
  • Evaluation Process
  • Examples
  • Structuring and evaluation script
  1. Knowledge Base
  2. Edge
  3. Common Data Sources

RTLE

EVALUATE(EXPRESSION)

  • EXPRESSION: A string that can be evaluated to a result. This expression can reference other tags' current or previous values and can return any type (string, number, boolean, null, etc.).

  • Examples:

    • EVALUATE('5 + 5') will always return 10.

    • EVALUATE('tag['Tag'] * 100') will multiply the value of the tag with name Tag by 100.

How to Use EVALUATE

The Simulator can use the EVALUATE() tag address to perform simple operations. This acts as a separate tag and helps to create reliable real-time logic expressions (RTLE) to transform raw data without changing PLC programming.

Key Points

  • Current Value: Use the value keyword to reference a tag's current value.

  • Previous Value: Use the lastvalue keyword to reference a tag's previous value.

Evaluation Process

  • TilliT Edge first evaluates data tags not connected to a simulator, ensuring they are up-to-date.

  • Then, simulator tags are evaluated one by one.

  • Tags in the simulator cannot reference other simulator tags because of the evaluation order.

Examples

Current Value:

tagId 5 has EVALUATE(value['10'] / 10 == 5) 
tagId 10 has EVALUATE(5 + 5)
Cannot be done because tag id 10 is evaluated after tag id 5

Using Previous Value:

We have a machine tag with ID 67 that represents the machine's state as an integer. The goal is to convert this integer tag into multiple boolean tags compatible with the EQUIPMENT_STATUS_ template*, which expects boolean values instead of integers.

1

Equipment Running

2

Equipment Faulted

3

Equipment Blocked

4

Equipment Stopped

5

Equipment Starved

Structuring and evaluation script

An evaluation script is simply an expression that when true will cause an event to fire. The script support all types of math operators to help define the exact behavior you require.

There are many TilliT keywords that can be used in your script to substitute an Edge Data Tag value. These are shown below.

  • value: is replaced with the current value that was read by this tag

  • lastvalue: is replaced with the previous value that was read by this tag

  • tag['id']: is replaced with the current value that was read by the specified tag id

  • now: is replaced with the current unix time in milliseconds

  • dayOfWeek: is replaced with the current day of the week as a number (0-6)

  • hours: is replaced with the number of hours into the local day it is

  • minutes: is replaced with the number of minutes into the local day it is

  • day: is replaced with the number of days into the month

  • order.fieldName: is replaced with the corresponding fieldName of the current running order. See the bottom of this page for available fields

  • orderAttr.attrName: is replaced with the corresponding value of attrName of the current running order.

  • prevOrder.fieldName: is replaced with the corresponding fieldName of the previous running order.

  • prevOrderAttr.attrName: is replaced with the corresponding value of attrName of the previous running order.

Trigger Setup: Set up triggers for events, such as when the machine is running (value = 1).

  • Conversion Using RTLE: Use RTLE to create new tags that convert the integer machine state into boolean tags. This is done using a ternary operator to evaluate the integer state as a boolean value.

  • Extra Logic for Equipment Stopped: Add logic to treat both "machine fault" and "machine stopped" states as a "stopped" event.

  • Assigning Tags: Each boolean tag is linked to a trigger for value > 0, which activates the respective event type.

This approach allows the creation of multiple boolean tags from a single integer tag, ensuring compatibility with templates and providing a clear representation of the machine's state.

PreviousProfinetNextSimulator

Last updated 3 months ago