How can we help?

Email on Machine Alarm

You are here:
< All Topics

Overview

This tutorial will show how to send an email when a machine goes into an alarm. Before starting, ensure the appropriate users have their email addresses assigned to them under the Manage → Users → Users form.

In order for email to be sent the Email Communication Target must be assigned for the Equipment. This is usually done automatically when a new machine is created but can be added manually if needed by following these steps:

  1. Go to the DataXchange tab and click on the desired piece of Equipment.
  2. Press the Communication button in the ribbon bar and then click the Add button on the form.
  3. Select Target as the Communication Role and Email as the Communication Type. Click Enter.
  4. Click Enter again to assign the Target as a Communication Role.

The next step will be to define the Email Template.

  1. From the DataXchange tab click the Email button in the ribbon bar. Select Templates.
  2. Define the subject and body of the email as desired. Click Enter when finished.
    • To add the Equipment Name to the message or subject, click the PCS Database button in the ribbon bar and use the PCSDB.Equipment variable.
    • To add the alarm number and message, click the Focas button and choose the Focas.alarm_detail variable.
  1. To assign users to the email template, go to Email → Assignments. Click Add.
  2. Enter a name for the assignment and select the email template you just created.
  3. Select the user emails that you would like to have this email template sent to. Click Enter to save, then Close to return to the DataXchange tab.
  4. Go to DataXchange → Expressions → Assign Expressions.

The next step will be to create the expression that will trigger the email

  1. While on the DataXchange tab go to Expressions → Create Expressions to bring up the Expression Builder.
  2. Press the Add button to create the new expression.
  3. Click in the Expression text box to enable the buttons in the ribbon bar and use the Focus variables to create the expression as shown below, or enter the following directly in the Expression text box:

([Focas.alarm_status] != 0) AND ([Focas.prev_alarm_status] = 0) AND ([PCSDB.general_equipment_status] != [PCSDB.Unplanned_Downtime])

The Focas.alarm_status variable identifies if any NC alarm is active. In this case we only want to trigger an email when the control goes from not being in an alarm to being in an alarm as well as exclude cases where the machine is already in an unplanned downtime. Select the Target of Email then select the associated Email Template.

Once the expression has been created it must be assigned to the desired equipment. From the DataXchange tab click the Expressions button in the ribbon bar and select Assign Expressions.

Select the desired equipment on the left and the newly created expressions on the right and press the Apply button.

Table of Contents