---
title: "Use machine outputs in triggers"
slug: "use-machine-outputs-in-triggers"
updated: 2022-09-30T16:57:58Z
published: 2022-09-30T16:57:58Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.tulip.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Use machine outputs in triggers

## How to Use Machine Outputs in Triggers

*Use Machine outputs to build logic throughout your Tulip Apps*

Before you can use Machine Outputs in a Trigger, you have to first [set up a machine](https://support.tulip.co/docs/how-to-add-individual-machines-and-view-their-history) Make sure your Machine Types and Attributes are [configured](https://support.tulip.co/docs/how-to-set-up-machine-types) in Tulip appropriately. Verify that data is flowing from your machines to the Machine tab in Tulip to successfully set up Output triggers.

Machine Outputs monitor any number of machine attributes in real time from your machines, such as spindle speed. These outputs can be used to determine machine [statuses](https://support.tulip.co/docs/how-to-create-your-first-machine-trigger) independent from apps, but can also be utilized to build logic within apps.

These triggers are useful for reacting to Machine Outputs while using an app. In an app, you may want to use the last output of a machine to determine an operator is going on break, or that the job is complete. There are many use cases for creating in-app logic for machines, including:

- Sending Machine Down Notifications
- Routing Steps
- Complete an Application
- Writing to Activity History

## Creating a Trigger for Machine Outputs

In the Side Pane of an app, select ADD on the Machines & Devices Trigger option.

![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20Machine%20Outputs%20in%20Triggers_195394173.png)

A Machine Output Trigger can be based on any of the Machines defined [Attributes](https://support.tulip.co/docs/how-to-set-up-machine-types). It can also be based on the State change of the Machine.

In the trigger editor, any logic can be added based on the Machines Outputs. Below will outline example use cases.

## Example 1 - Send Machine Down Notifications

If a Machine goes into a downtime state, specified by the [Machine Trigger page](https://support.tulip.co/docs/how-to-create-your-first-machine-trigger), you likely want to know about it.

To set this up, you can select the output of a specific Machine, or an output of the Machine that is at the same Station as the app. In this Trigger, select the output option for State Change.

![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20Machine%20Outputs%20in%20Triggers_195395407.png)

From here, you will need to select the Machine Status that is best suited for a notification. In this case, the state Stopped will be used to send the notification. This will be a conditional statement to only send the notification on a stopped state, rather than all state changes. To do this, create an If condition that says the following:

IF Machine Output - State Change - = - Static Value - Enum - Stopped

THEN Send SMS - *to* - USER - *Message* - your message

![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20Machine%20Outputs%20in%20Triggers_195396641.png)

Now, the application will send a message to the administrator anytime the machine enters this state, along with where the problematic machine is.

## Example 2- Route App

Routing applications based on machine Triggers allows an app to automatically progress without other intervention. Perhaps a Machine must reach a certain spindle speed, or achieve a certain value in order to progress the work. In this case, the Machine Output trigger can check this and automatically progress when met.

To do this, select the Machine Attribute to check as the output.

![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20Machine%20Outputs%20in%20Triggers_195398898.png)

Then, set up the appropriate condition. In this case, the app should only progress when the ramp function achieves a value of 75, then routes the app automatically to the next step. The trigger will look something like this:

IF Machine Output - ramp1 - > - Static Value - Number - 75

THEN Go to Step - Next

![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20Machine%20Outputs%20in%20Triggers_195399573.png)

This functionality can be built around any Machine Attribute, and route to targeted steps as well. For example, if Spindle Speed is 0, you might route to a "Maintenance" or "Lunch Break" step.

## Example 3- Writing Activity History

In this case, you can use a machine output, or any other conditional statement to write to an Activity History field.

For example, you may use a Tulip app to set a downtime reason. If a Tulip App is used to aid in a machine's setup, you may want to note that the machine is down due to set up. In this case, you may want to check if the machine is down when the App begins, and give it the Setup tag if so. The Trigger for such an app might look something like this:

![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20Machine%20Outputs%20in%20Triggers_214454193.png)

IF: Machine Activity Field - At This Station - State - = - Static Value - Enum - Stopped

THEN: Data Manipulation- Set Downtime Reason- *machine:* At This Station - *value:* Static Value - Enum - Setup

The trigger above fires when the step opens. If the machine is down when this "Setup" step is opened, the Downtime Reason will be attributed to Setup.

---

Did you find what you were looking for?

You can also head to [community.tulip.co](https://community.tulip.co/?utm_source=intercom&amp;utm_medium=article-link&amp;utm_campaign=all) to post your question or see if others have faced a similar question!

**Machine**

A **Machine**is a digital representation of a physical datasource. Machines have **Attributes**that are updated through an OPC-UA Connector or the Tulip API.

**Trigger**

**Triggers** are groups of logic that are tied to an app event, such as step open, timer, widget interaction, etc. App builders can add triggers to **widgets**, **machines**, **devices**, **apps**, and **steps**.

**Triggers** can contain **actions**, **transitions**, and **conditions**.

**Machine Type**

**Machine Types** are global definitions of what data to expect from machines of different types. Each Machine Type will have different states, **triggers**, and **attributes**.*EX. We have 5 makes/models of CNC mill, but they all have the same set of attributes (Spindle speed, feed rate, etc.) These can all be combined into a single "CNC Mill" Machine Type*

**Attribute**

**Attributes**are properties. In Tulip, an attribute generally references a property of a machine. Attributes can be either set points or actuals.

*Ex. Cycle time, Spindle speed, Feed rate, ect.*

**Steps**

A view your users will see within an application. **Steps** can be viewed chronologically or in whatever order best fits your process.

Steps can be grouped into **Step Groups**to manage and organize your app Steps.

**App Completion**

**App Completions**are a mechanism to store immutable data from a Tulip app. When an app is completed, all **Variable's**current values will be stored in the app completions tab.****This completion data can be analyzed in **Analytics.**

By default, after a Completion users will be brought back to the **Begin Screen**of your application. This behavior can be adjusted with other **Transition**types.

**Side Pane** **(Context Pane)**

The**Side Pane**is the configuration pane on the right side of the **App Editor**where steps, apps, and widgets can be configured. **Triggers**can be added to adjust widget behavior.![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Context%20Pane.png)

**Station**

**Stations**are a digital representation of a physical place or device in your facility. Stations are 1:1 with **Interfaces (display devices)** running Tulip Player, but Stations can also be assigned **Edge Devices,**Tulip Vision Camera Configurations, Machines,****and more.

**Trigger**

**Triggers** are groups of logic that are tied to an app event, such as step open, timer, widget interaction, etc. App builders can add triggers to **widgets**, **machines**, **devices**, **apps**, and **steps**.

**Triggers** can contain **actions**, **transitions**, and **conditions**.

**Machine Attribute**

**Machine Attributes**are setpoints and actual values for different parameters of your **Machine.**Attributes can be mapped to OPC-UA datasource Tags.

**Step**

A view your users will see within an application. **Steps** can be viewed chronologically or in whatever order best fits your process.

Steps can be grouped into **Step Groups**to manage and organize your app Steps.
