Download - VZ06

Transcript
  • 7/27/2019 VZ06

    1/156

    FactoryTalk View Site Edition: ImplementingFactoryTalk Alarms and Events

    For Classroom Use Only!

  • 7/27/2019 VZ06

    2/156

    Important User Information

    This documentation, whether, illustrative,printed, online or electronic (hereinafter Documentation) is intended for use only asa learning aid when using Rockwell Automation approved demonstration hardware, software and firmware. The Documentationshould only be used as a learning tool by qualified professionals.

    The variety of uses for the hardwar e, software and firmware (hereinafter Products) described in this Documentation, mandatesthat those responsible for the application and use of those Products must satisfy themselves that all necessary steps have beentaken to ensure that each application and actual use meets all performance and safety requirements, including any applicablelaws, regulations, codes and standards in addition to any applicable technical documents.

    In no event will Rockwell Automation, Inc., or any of its affiliate or subsidiary companies (hereinafter Rockwell Automation) beresponsible or liable for any indirect or consequential damages resulting from the use or application of the Products described inthis Documentation. Rockwell Automation does not assume responsibility or liability for damages of any kind based on thealleged use of, or reliance on, this Documentation.

    No patent liability is assumed by Rockwell Automation with respect to use of information, circuits, equipment, or softwaredescribed in the Documentation.

    Except as specifically agreed in writing as part of a maintenance or support contract, equipment users are responsible for: properly using, calibrating, operating, monitoring and maintaining all Products consistent with all Rockwell Automation

    or third-party provided instructions, warnings, recommendations and documentation; ensuring that only properly trained personnel use, operate and maintain the Products at all times; staying informed of all Product updates and alerts and implementing all updates and fixes; and all other factors affecting the Products that are outside of the direct control of Rockwell Automation.

    Reproduction of the contents of the Documentation, in whole or in part, without written permission of Rockwell Automation isprohibited.

    Throughout this manual we use the following notes to make you aware of safety considerations:

    Identifies information about practices or circumstancesthat can cause an explosion in a hazardous environment,which may lead to personal injury or death, property damage, or economic loss.

    Identifies information that is critical for successful application and understanding of the product.

    Identifies information about practices or circumstances that can lead to personal injury or death, proper tydamage, or economic loss. Attentions help you: identify a hazard avoid a hazard recognize the consequence

    Labels may be located on or inside the drive to alert people that dangerous voltage may be present.

    Labels may be located on or inside the drive to alert people that surfaces may be dangerous temperatures.

  • 7/27/2019 VZ06

    3/156

    3 of 156

    FactoryTalk View Site Edition: Implementing FactoryTalk Alarms and Events

    Contents

    Before you begin ... ............................................... .............................................. ................................ 5

    About this lab .......... .......... ........... ......... .......... ........... ......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... ....5

    Tools & prerequisites ...........................................................................................................................................................................5

    Document conventions.........................................................................................................................................................................6

    Overview of FactoryTalk Alarms and Events ................................................................ ......................... 7

    FactoryTalk Alarms and Events components ......................................................................................................................................8

    System Architectures .........................................................................................................................................................................10

    Section 1: Getting started with FactoryTalk Alarms and Events ..... ...... ..... ..... ...... ..... ...... ..... ...... ..... ..... . 12

    Subscribing to Device-based Alarms and Events..............................................................................................................................12

    Working with Device-based Alarms and Events (Digital) ..................................................................................................................19

    Working with Device-based Alarms and Events (Analog) .................................................................................................................28

    Working with Tag-based Alarms and Events.....................................................................................................................................36

    Section 2: Setting up historical alarm and event logging ...................................................................... 49

    Add a database defini tion to the FactoryTalk sys tem........ .......... .......... .......... .......... .......... .......... .......... .......... ......... ........... .......... ..49

    Associa te database defini tion with alarm servers......... .......... ........... ......... .......... .......... .......... .......... .......... ......... ........... .......... .......52

    Test run using Log Viewer object.......................................................................................................................................................54

    View the Alarm History database in Excel .........................................................................................................................................56

    Querying Alarm History using VBA and FactoryTalk View SE ..........................................................................................................68

    Section 3: Using FactoryTalk Alarm and E vent Objects ........ ............................................... ................ 73

    Alarm and Even t Summary (display: Alarms) .......... .......... ........... ......... .......... .......... .......... .......... .......... .......... .......... .......... .......... ..73

    Alarm and Even t Banner (display: Alarm Banner) .......... .......... .......... ......... ........... .......... ......... ........... .......... ......... .......... ........... .....78

    Alarm and Even t Log Viewer (display: AlarmLogViewer) ............... ........... ......... .......... ........... ......... .......... ........... .......... ........... .......81 Alarm and Even t Status Explorer (display: AlarmStatusExplorer) .......... ........... .......... .......... .......... .......... ......... ........... .......... ......... .83

    Section 4: Configuring Redundancy ............................................ .............................................. ......... 88

    Configuring Redundancy....................................................................................................................................................................88

    Determining the Active and Standby Server......................................................................................................................................93

    Server Switchover ..............................................................................................................................................................................96

  • 7/27/2019 VZ06

    4/156

    4 of 156

    Section 5: Filtering and Subscriptions............ ................................................ ................................... 103

    Filtering with the Alarm and Event Summary Object .......................................................................................................................103

    Subscriptions....................................................................................................................................................................................107

    Section 6: Advanced Topics (Optional). .............................................. .............................................. 110

    Multi-Language Alarms ....................................................................................................................................................................110 Converting HMI Alarms to Tag Alarms and Events .........................................................................................................................123

    Alarm Annunciation using Win-911......... ........... .......... ......... .......... ........... ......... .......... ........... ......... .......... ........... ......... .......... .......133

    Section 7: Supplemental Reading ........................................................ ......................................... ... 140

    Alarms and Events Considera tions. .......... .......... ........... ........... .......... .......... ......... ........... .......... ......... ........... .......... ......... .......... ....141

    ALMA and ALMD Configura tion Options ..... .......... ........... ......... .......... ........... ......... .......... .......... ........... ........... .......... .......... ..........143

    Specific ALMD Configuration Options .............................................................................................................................................146

    Specific ALMA Configuration Options ..............................................................................................................................................146

    Controller Status Alarms ..................................................................................................................................................................149 Tag-Based Alarm Configuration Options .........................................................................................................................................150

    Alarm Backing Tags ........... .......... .......... .......... .......... .......... .......... .......... .......... ......... ........... .......... ......... ........... .......... ......... .........152

    Where to get more information ........................................................................................................................................................153

  • 7/27/2019 VZ06

    5/156

  • 7/27/2019 VZ06

    6/156

    6 of 156

    The following software has been installed and configured on theSecondary virtual machine:

    FactoryTalk Activation Manager v3.50

    FactoryTalk Alarms and Events v2.40.00000

    FactoryTalk Diagnostics v2.50.00

    FactoryTalk Services Platform v2.50.00 FactoryTalk View SE v6.10.00

    Microsoft SQL Server 2008 R2 Express

    RSLinx Enterprise v5.50.00000

    The following application files have been pre-configured and set up on the virtual machines:

    A FactoryTalk View SE Network application named InstantFizz.

    FactoryTalk View SE Client configuration file: InstantFizz.cli

    RSLogix 5000 project file: InstantFizz_Controller.acd

    Document conventions

    Throughout this workbook, we have used the following conventions to help guide you through the lab materials.

    This style or symbol: Indicates:

    Words shown in bold italics(e.g., RSLogix 5000 or OK )

    Any item or button that you must select, click on, or a menu name fromwhich you must choose an option or command. This will be an actualname of an item that you see on your screen or in an example.

    Words shown bolded, underlined andenclosed in single quotes(e.g., 'Controller1' )

    An entry that you must type in the specified field. This is informationthat you must supply based on your application (e.g., a variable).

    Note: When you type the text in the field, remember that you do notneed to type the quotes; simply type the words that are contained withinthem (e.g., Controller1).

    The lab topics marked by this icon indicate important features of thesoftware or tools that can make it easier for you to use this product.

    Tex t that appears beside this icon is supplemental informationregarding the software or lab materials; the information is not requiredfor you to complete the lab exercises. The supplemental text mayprov ide you with helpful hints that can make it easier for you to use thisproduct.

    Note: If the mouse button is not specified in the text, you should click on the left mouse button.

  • 7/27/2019 VZ06

    7/156

    7 of 156

    Overview of FactoryTalk Alarms and Events

    FactoryTalk Alarms and Events allows multiple FactoryTalk products to par ticipate together in a common, consistent view of alarms and events throughout a FactoryTalk application.

    FactoryTalk Alarms and Events supports two types of alarm monitoring:

    Device-based alarm monitoring. Built-in alarm instructions that are available in RSLogix 5000 v. 16 or later, areprogrammed in a logic project and then downloaded to a Logix5000 controller. The controller detects alarm conditionsand publishes event information, which can be displayed and logged.

    Tag-based alarm monitoring. If you are not using Logix5000 controllers, or if you do not want to use the built-in alarminstructions that are available with RSLogix 5000, tag-based alarm monitoring offers the equivalent of HMI tag alarmmonitoring, but with an expanded feature set. Software-based Tag Alarm and Event servers monitor controllers for alarm conditions through data servers and publish event information that can be displayed and logged. Tag-basedalarm monitoring is supported for Logix5000 controllers, PLC-5, and SLC 500 devices communicating throughRockwell Automation device servers (RSLinx Enterprise), or for third-party controllers communicating through OPCData Servers.

    FactoryTalk Alarms and Events:

    Provides a single, integrated set of alarm information. All participating FactoryTalk products work together toprovide a consistent way to define, manage, log, and view alarm and event information across a FactoryTalkapplication.

    Streamlines alarm programming and eliminates polling with device-based alarm monitoring . If your automationsystem includes Logix5000 controllers, you can use pre-built alarm instructions, available in RSLogix 5000 v. 16 or later, to simplify coding, and then download them to the controller. Dev ice-based alarm monitoring eliminates the needfor duplicating alarm tags in an HMI server and requires fewer controller communication resources by eliminating

    polling.

    Supports other controllers in the integrated system with tag -based alarm monitoring. If your automation systemincludes other Rockwell Automation controllers, such as PLC-5s or SLC 500s, or if you prefer not to use the new alarminstructions with Logix5000 controllers, software-based tag servers monitor controllers for alarm conditions and publish

    event information.

    Monitors alarms and events from third-party controllers. Tag-based alarm monitoring also makes it possible to

    monitor alarm conditions from third-party controllers, which communicate through OPC Data Servers.

    Provides accurate time stamps on alarm conditions that are generated from Logix5000 controllers using device-based alarm monitoring. When you use device-based alarm monitoring, timestamps are applied immediately in thecontroller and are not delayed until alarms reach an HMI server. To make sure that the timestamps on device-basedalarms are accurate, synchronize the clocks of all controllers that produce alarms. The event time is propagatedthroughout the FactoryTalk Alarms and Events system, so inaccurate timestamps can affect where alarms aredisplayed in the Alarm and Event Summary or the Alarm and Event Banner as well as reports about the alarm and

    event history.

    Sends process data with events and messages. You can associate up to four tags with each alarm to includeprocess data with event information and alarm messages.

    Secures access to alarm and event operations through integration with FactoryTalk Security.

  • 7/27/2019 VZ06

    8/156

    8 of 156

    Generates messages for logging , including audit messages that track operator actions, system-related diagnostic

    messages, and historical alarm and event messages.

    Displays alarm messages and status information at run time, from FactoryTalk View graphic displays.

    FactoryTalk Alarms and Events components

    The diagram below shows a high-level view of the components of the FactoryTalk Alarms and Events system.

    1. Device-based alarm monitoring

    To do device-based alarm monitoring, you program alarm instructions, that are available with RSLogix 5000 v. 16 or later, andthen download them to Logix5000 controllers. The controller detects alarm conditions and notifies RSLinx Enterprise of alarmstates. A Rockwell Automation Device Server (RSLinx Enterpr ise) ex tracts the alarm information and publishes it to FactoryTalk

  • 7/27/2019 VZ06

    9/156

    9 of 156

    Alarms and Events services.

    Use device-based alarm monitoring with:

    Logix5000 controllers, that you have programmed with RSLogix 5000 v. 16 or later software, and Rockwell Automationdevice servers (RSLinx Enterprise).

    2. Tag-based alarm monitoring

    The Tag Alarm and Event Server uses tags to monitor programmable controllers for alarm conditions. When an alarm conditionis detected, the server publishes the information to FactoryTalk Alarms and Events services.

    Use tag-based alarm monitoring with:

    PLC-5 or SLC 500 controllers, and Rockwell Automation device servers (RSLinx Enterprise).

    RSLinx Classic and RSLinx Gateway.

    Third-party controllers and OPC Data Servers.

    Logix5000 controllers.

    3. FactoryTalk Alarms and Events services

    Both device-based and tag-based alarms and events are published to FactoryTalk Alarms and Events services, which thenroutes the information to FactoryTalk Alarms and Events objects hosted in FactoryTalk View, the alarm and event history log,and to diagnostic logs and audit logs.

    4. Alarm and Event Historian Log

    The Alarm and Event Historian is a logging component that installs silently as part of the alarms and events software. It managesconnections between alarm servers and databases and logs data from each alarm server to an alarm history database. You canuse the Alarm and Event Log Viewer to view and print data from alarm history databases. Third-party database tools can alsoretrieve, view, analyze, and print alarm history information. To use alarm and event logging, install Microsoft SQL Server separately, or use an existing Microsoft SQL Server database.

    5. Diagnostic and audit logs

    FactoryTalk Diagnostics routes messages generated by FactoryTalk Alarms and Events to local logs on the computers hostingFactoryTalk components, and optionally to a centralized database log. Audit messages are routed to the local log and to theFactoryTalk Audit Log if FactoryTalk AssetCentre is installed.

    6. Alarm and event setup and monitoring

    FactoryTalk Alarms and Events includes a number of software components that allow engineers and operators to define alarmconditions, set up alarm servers, view and interact with alarm conditions, and view historical alarm and event information.

    Alarm and Event Summary

    Use the Alarm and Event Summary object, embedded in a FactoryTalk View graphic display, to acknowledge, disable, suppress,filter, and sort alarms at run time.

    Alarm and Event Banner Use the Alarm and Event Banner object, embedded in a FactoryTalk View graphic display, to monitor and respond to the mostserious alarms that require immediate attention.

    Alarm Status Explorer

    Use the Alarm Status Explorer object, embedded in a FactoryTalk View graphic display, to enable or disable alarms, suppress or unsuppress alarms, and view operator comments.

    Database definitions

  • 7/27/2019 VZ06

    10/156

    10 of 156

    Use database definitions to define logging options from an alarm server to a Microsoft SQL Server database.

    Alarm and Event Log Viewer

    Use the Alarm and Event Log Viewer object, embedded in a FactoryTalk View graphic display, to view and filter historical alarminformation stored in Microsoft SQL Server databases.

    Diagnostics Viewer Use the Diagnostics Viewer to view, filter, and export system-generated diagnostic messages. Run the Diagnostics Viewer fromeither FactoryTalk View Studio or FactoryTalk Administration Console.

    FactoryTalk Audit Log

    Use the FactoryTalk Audit Log to view and manage audit messages routed by FactoryTalk Diagnostics. To access the Audit Log,use FactoryTalk AssetCentre software.

    System Archi tectures

    Local application on a single computer

    The diagram below shows an example system architecture using a Local application as part of a stand-alone FactoryTalksystem.

    FactoryTalk Services PlatformFactoryTalk Administration Console

    FactoryTalk Alarms and Events

    FactoryTalk View StudioFactoryTalk View Site Edition

    RSLogix 5000

    RSLinx ClassicRSLinx Enterprise

    FactoryTalk Activation

    Stand-alone station

    Microsoft SQL Server 2008 Express

    Logix5000 controllers

  • 7/27/2019 VZ06

    11/156

    11 of 156

    Network application on distributed computers

    The diagram below shows an example system architecture using a Network application as part of a distributed FactoryTalksystem.

    FactoryTalk Services PlatformFactoryTalk Administration Console

    ControlLogix controllersPLC-5 controllers

    FactoryTalk Alarms and Events

    FactoryTalk View StudioFactoryTalk View SE Client

    RSLogix 5RSLogix 5000

    RSLinx ClassicRSLinx Enterprise

    FactoryTalk Services Platform

    FactoryTalk Alarms and Events

    FactoryTalk View SE Client

    FactoryTalk Services Platform

    FactoryTalk View SE Server

    FactoryTalk Services Platform

    RSLinx Enterprise

    FactoryTalk Alarms and Events

    Microsoft SQL Server 2008 Express

    FactoryTalk Activation FactoryTalk Activation

    Development station

    Operator stations

    Network Directory Server Data, alarm and event, and HMI servers

    Databases and historical logs

    FactoryTalk Activation

    RSSecurity Emulator

    FactoryTalk Activation

    FactoryTalk Alarms and Events

  • 7/27/2019 VZ06

    12/156

    12 of 156

    Section 1: Getting started with FactoryTalk Alarms and Events

    In this section you will be introduced to FactoryTalk Alarms and Events in a practical, hands-on way . This section will cover thebasics of both device-based alarms and tag-based alarms, with more detailed information included in the back of this manual for you to read later.

    Heres a breakdown of what youll be doing:

    Subscribing to Alarms and Events

    Enabling Alarms and Events on an existing data server

    Testing the Alarms and Events connection using the default alarm summary object in FactoryTalk View Studio.

    Exploring RSLogix 5000 alarm instructions: ALMD and ALMA

    Acknowledging an alarm from RSLogix 5000

    Learning about Associated Tags

    Embedding variables in alarm messages Exploring Tag-based Alarms and Events

    Viewing alarms as tags

    Changing tag update rates

    Acknowledging alarms from the alarm summary object.

    Acknowledging alarms remotely.

    The estimated time to complete this section is 40 minutes. Have fun!

    Subscribing to Device-based Alarms and Events

    In this part of the lab, you will:

    Enable Alarms and Events on an existing data server

    Enable Alarms and Events for an existing controller shortcut.

    Test the Alarms and Events connection using the default alarm summary object in FactoryTalk View Studio.

  • 7/27/2019 VZ06

    13/156

    13 of 156

    1. RunFactoryTalk View Studio . On the Windows Start menu, clickStart > All Programs > Rockwell Software> FactoryTalk View > FactoryTalk View Studio. (For convenience, a shortcut toFactoryTalk View Studio hasalso been added to the Start menu.)

    2. In theAppl ication Type Selection window, selectSite Edition (Network)and then clickContinue .

    3. In theNew/Open Site Edition (Network) Application dialog box, select theInstantFizz applic ation, and thenclickOpen.(Now sit back and relax because it takes about a minute for the application to open.)

    4. In theFactoryTalk View Studio Explorer window of FactoryTalk View Studio , open the application node( InstantFizz). Open the area named Data_Area. Right-clickRSLinx Enterprise and selectProperties.

  • 7/27/2019 VZ06

    14/156

    14 of 156

    5. In theRSLinx Enterprise Server Properties dialog box, click the Alarms and Events tab and then:

    Select the Enable alarm and event support check box

    Clear the Enable history check box (You will set up historical logging later in the lab.)

    6. Click Apply to apply changes.

    7. ClickOK to close theRSLinx Enterprise Server Properties dialog box.

    8. In theFactoryTalk View Studio Explorer window, double-click theRSLinx Enterprise server to expand it, andthen double-clickCommunication Setup . Resize the dialog (if needed) so that you can see everything.

    Check this box

    Un-check this box(for now!)

  • 7/27/2019 VZ06

    15/156

    15 of 156

    9. In theCommunication Setup dialog box, there is already an existingInstantFizz shortcut under DeviceShortcuts. However, Alarms & Events is not enabled. Lets createa new shortcut and enable this so that wereceived FactoryTalk Alarms and Events through this new shortcut.Under Device Shortcuts , click Add to create a new shortcut.

    10. Edit this name to Shortcut and hitEnter.

    11. WithShortcut selected, choose the InstantFizz_Controller on thePrimary tab located in slot 2 of our SoftLogixvirtual chassis.

    If the EtherNet driver or any other component in the path is not expanded, click the+ sign to expand it.

    12. Switch to theSecondary tab to define a path to the sameInstantFizz_Controller.

    If the EtherNet driver or any other component in the path is not expanded click the+ sign to expand it.

  • 7/27/2019 VZ06

    16/156

    16 of 156

    13. Under Alarms & Events, change the Enable setting toYes.

    14. ClickOK to save the shortcut configuration and close theCommunication Setup dialog box.

    15. ClickYes to confirm the changes.

    Congratulations! You have just configured a Rockwell Automation Device Server (RSLinx Enterprise) tosubscribe to alarms and events from the SoftLogix c ontroller running on this computer.

  • 7/27/2019 VZ06

    17/156

    17 of 156

    16. If you have not already done so,maximize the Fac toryTalk View Studio window.

    17. In theExplorer window, right-click theDisplays node (located under the HMI server node in theGraphics folder), and then clickNew .

    A blank display appears in the workspace.

    18. On theObjects menu, point toAlarm and Event, and then clickSummary or on the toolbar, click the Summarybutton .

    The mouse pointer changes to the Object drawing cursor.

  • 7/27/2019 VZ06

    18/156

    18 of 156

    19. Using the mouse, drag the rectangle to fill the display. Start in the upper left corner, drag down to the lower rightand then release the left mouse button.

    The Alarm and Event Summary object will appear in the display as follows:

    20. On theGraphics toolbar, clickTest Display button .

    21. You will see alarms!

  • 7/27/2019 VZ06

    19/156

    19 of 156

    You are looking at the default configuration of alarm summary object. This control is highlyconfigurable, so if you dont like the display choices, dont worry! Later in the lab, youll be learninghow to configure this control and work with one that has already been modified.

    22. On theGraphics toolbar, stop testing the display by c licking theEdit Display button .

    23. Save the display by clicking theSave button on the toolbar. In theSave dialog box, typeMy Alarm Summaryfor the name of the display and then clickOK .

    24. You can leave this display open and just minimizeFactoryTalk View SE Studio. Youll come back to it in thenext part.

    Congratulations!! You have successfully been introduced to FactoryTalk Alarms and Events. Lets quickly review what youve just done:

    Enabled a subscription to FactoryTalk Alarms and Events on the RSLinx Enterprise Server .

    Enabled Alarms and Events for an existing controller shortcut.

    Saw active alarms in a FactoryTalk View SE test display.Now we will explore in more detail device-based alarm instructions.

    Working with Device-based Alarms and Events (Digital)

    You will now explore device-based digital alarms with the RSLogix 5000 instruction named ALMD.

    A digital alarm (ALMD instruction) is configured to monitor its input for one of the following alarm conditions:

    the input value equal to one

    the input value equal to zero

    When the alarm condition is true, the alarm enters theIn Alarm state. When the alarm condition is false, the alarm enters theNormal or Out of Alarm state.

    In this part of the lab, you will:

    Trigger a digital alarm within RSLogix 5000.

    Change an alarms severity level and message while online.

    Acknowledge an alarm within RSLogix 5000.

    View the alarm status in a FactoryTalk View SE test display.

  • 7/27/2019 VZ06

    20/156

    20 of 156

    1. Double-click on theInstantFizz_Controller.ACDshortcut from the Desktop to open the project that isused in this lab. (For convenience, a shortcut toInstantFizz_Controller.ACD has also been added to the Startmenu.)

    2. Go online with the controller by clicking the pull down next to the Controller Status display and selectingGoOnline

    If you are prompted with the Connected To Go Online dialog, chooseUpload .

    3. In the left pane, expand theMainTask > Mainfolder under Tasks , and then double-click the Alarms routine.

  • 7/27/2019 VZ06

    21/156

    21 of 156

    4. Look atRung 0 and notice that theALMDalarm instruction namedCIPValve1is active. You can tell by lookingat the instructions output parameter InAlarm. Notice that it is highlighted green.

    The InAlmparameter is active because the input conditions are true. In this case, the input conditions are theBOOLEAN tags namedCIPAlarmTrigger[1]and CIPAlarm_Start.You can tell this condition is true becausethey both are highlighted in green.

    5. Return to FactoryTalk View SE Studio you should have it minimized in your Windows task bar from theprevious section.

    6. Select the My Alarm Summary screen you created earlier and click theTest Display button from theGraphics toolbar.

    Notice that the alarm in the list, with the Alarm Name of CIPValve1,corresponds to the ALMD instruction we had just observed on Rung 0 of RSLogix 5000. The Alarm and Event Summary object is indicating that the alarm isactive just as we would expect.

  • 7/27/2019 VZ06

    22/156

    22 of 156

    7. Return to RSLogix 5000. In Rung 0, select theExamine On instruction for CIPAlarmTrigger[1]. Right- click and select Toggle Bit or selectControl+T to turn the bit to off.

    Notice now that the input condition of CIPAlarmTrigger[1]is off and theInAlmparameter of theCIPValve1ALMDinstruction is no longer active.

    8. Return to FactoryTalk View SE Studio andselect the My Alarm Summaryscreen you created earlier. If it is

    not still running in test mode, on theGraphics toolbar, clickTest Display button .

    You will see in your test display that theCIPValve1alarm is still in the alarm list, but it is no longer active. (Tip:You may have to scroll down your alarm list to find it.)

  • 7/27/2019 VZ06

    23/156

    23 of 156

    9. Return to RSLogix 5000. Now we will see how the ALMD instruction is configured.

    Inside the alarm instruction, click the Browse button to open theALMD Propertiesdialog box.

    10. Change the Severity to500 .

    11. Change the Message fromWater Valve Jammed. Open Valve. to Water Valve Jammed. Call MaintenanceStaff. or to whatever message you want. Feel fr ee to be creative!

    There are many properties of anALMD instruction that you can configure within this dialog box. If youd like

    more information about them and what they do, see theSupplemental Reading section at the end of this lab or clickHelp on this dialog box.

    12. Click Apply to apply changes.

    13. ClickOK to close theALMD Propertiesdialog box.

  • 7/27/2019 VZ06

    24/156

    24 of 156

    14. Select again theExamine On instruction for CIPAlarmTrigger[1]. Right-click and select Toggle Bit or select Control+T to turn the bit to on.

    Notice now that the input condition of CIPAlarmTrigger[1]is on, the InAlmparameter of the CIPValve1 ALMD instruction is active.

    15. Return to FactoryTalk View SE Studio andselect the My Alarm Summaryscreen you created earlier. If it is

    not still running in test mode, on theGraphics toolbar, clickTest Display button .

    Scroll down to about the middle of your alarm list and you will see theCIPValve1alarm ac tive, but with differentcolors than previously seen and your new message.

    The color change occurs because we changed the Severity of the alarm. Also notice that the severity ic on haschanged from (Urgent) to (Medium).

  • 7/27/2019 VZ06

    25/156

    25 of 156

    16. Return to RSLogix 5000. Inside the alarm instruction, click the Browse button to open theALMDConfiguration Dialog box.

    17. In the ALMD Propertiesdialog box, select theStatus tab and then observe the In Alarm Timeand Return ToNormal Time.

  • 7/27/2019 VZ06

    26/156

    26 of 156

    18. To acknowledge the alarm fromRSLogix 5000, click the Acknowledge button near the bottom of the dialogwindow.

    TheAcknowledge Time will update on the Status tab.

    You will also see theAcked output of the alarm instruction becomes active (green highlight).

    19. ClickOK to close theALMD Propertiesdialog box.

    20. Return again to FactoryTalk View SE Studio andselect the My Alarm Summary screen you created earlier. If

    it is not still running in test mode, on theGraphics toolbar, clickTest Display button .

  • 7/27/2019 VZ06

    27/156

    27 of 156

    21. Find theCIPValve1alarm in your list.

    Notice that the alarm status icon has changed from (In Alarm and Unacknowledged) to (In Alarm and Acknowledged) indicating that the alarm has been acknowledged.

    22. On theGraphics toolbar, stop testing the display by c licking theEdit Display button .

    Congratulations!! You have just:

    Observed and manipulated an ALMD instruction online while the program is running.

    Acknowledged an alarm within RSLogix 5000.

    Viewed the alarm status in a FactoryTalk View SE test display.

    Whether you realize it or not, you have also witnessed that online changes to alarm instructions take effect without having toreboot your PC or restart your client. If an active alarm has a pending edit, the update takes affect whenever the alarm changesstate next.

    In the next section, you will explore ALMA instructions in a similar way.

  • 7/27/2019 VZ06

    28/156

    28 of 156

    Working with Device-based Alarms and Events (Analog)

    Now we will explore analog device-based alarms using the RSLogix 5000 instruction named ALMA.

    An analog alarm can be configured to monitor for two types of alarm conditions: Level and Rate of Change.

    A Level alarm monitors an input for alarm conditions that go In Alarm when the input value goes above or below predefinedlimits. When defining a level alarm, you can configure up to four alarm level conditions each with limits (sometimes calledthresholds), a sever ity and alarm message. The supported alarm conditions are:

    High High (HIHI)

    High (HI)

    Low (LO)

    Low Low (LOLO)

    A Rate of Change alarm monitors an input for alarm conditions that go In Alarm when the input value changes faster or slower than predefined limits. When defining a level alarm, you can configure up to two rate of change conditions each with limits, asever ity, and an alarm message. The supported alarm conditions are:

    Rate of Change Positive (ROC_POS)

    Rate of Change Negative (ROC_NEG)

    In this part of the lab, you will:

    Trigger different levels of an analog alarm within RSLogix 5000.

    Learn about associated tags.

    Learn how to embed a variable in an alarm message.

    View the alarm status in a FactoryTalk View SE test display.

  • 7/27/2019 VZ06

    29/156

    29 of 156

    1. Return to RSLogix 5000.

    2. If theAlarms subroutine is not open, then in the left pane,expand the Main folder under Tasks, and thendouble-click the Alarms routine.

    3. If not already online with the controller, cl ick the pull down next to the Controller Status display and selectGoOnline

    4. Scroll down toRung 4 to see an ALMA alarm instruction namedMotorOverheatAlarm. Notice that no alarmlevels are active you can tell because none of the alarm condition parameters are highlighted in green.

    The In input for this alarm is the tag namedMotorTemp. The value of this tag will trigger this alarm if it crossesany of the defined threshold limits.

    5. Double-click the35 value belowMotorTemp and change the value to 501.

    Notice how theHInAlarmcondition is now true and theHAckedcondition is now false.

    Inputtag value

    Alarmthresholdlimits.

  • 7/27/2019 VZ06

    30/156

    30 of 156

    6. Double-click the501 value belowMotorTemp and change the value to 1001.

    Notice now that both theHInAlmand HHInAlmconditions are true, while both theHAckedand HHAcked conditions have turned false.

    If a High High (HIHI) alarm level condition is met, the High (HI) alarm level condition is always true as well.Therefore, whenever a HH alarm is active the H alarm is as well. The same case applies to the two low levelalarms. If the Low Low (LOLO) alarm condition is met, the Low (LO) alarm is also triggered.

    7. Return to FactoryTalk View SE Studio andselect the My Alarm Summaryscreen you created earlier. If it is

    not still running in test mode, on theGraphics toolbar, clickTest Display button .

  • 7/27/2019 VZ06

    31/156

    31 of 156

    Find the 2 entries (HI, HIHI) for theMotorOverheatAlarm. You may need to scroll down the list.

    While both conditions are active, they each have a different severity level as designated by the different di splaycolors and the different severity icons: (Urgent) and (High).

    You can see on the alarm summary screen that the alarm message for theHIcondition isThe Motor isoverheating. The current temperature of the motor is 501 . Recall that 501 is the first value we set toMotorTemp to trigger theHIcondition.

    In many cases it is useful to have additional process information associated with an alarm. When an alarm isdefined, you can associate up to four tags with the alarm. At run time, the tag values are recorded in the alarmand event history log and can also be displayed in the Alarm and Event Summary or Alarm and Event LogViewer. T he values of associated tags can also be embedded in alarm messages and the contents of the Alarmand Event Summary or Alarm and Event Log Viewer can also be filtered based on the value of an associatedtag.

  • 7/27/2019 VZ06

    32/156

    32 of 156

    8. Notice how the alarm message for the HIHI condition is too long to be properly displayed on the summaryscreen. Fear not, however, the complete alarm message is not lost!

    Use the mouse to click on the HIHI alarm in the summary display. T he alarm details will appear in theDetailsPane below the summary display. Use the scrollbar on the right to sc roll to the end of the Details Pane where

    you will see the complete message:The Motor has overheated. Motor has stopped. The currenttemperature of the motor is 1001.

    Recall that 1001 is the second value we set toMotorTemp to trigger theHIHIcondition.

    9. Return to RSLogix 5000. Inside the alarm instruction, click the Browse button to open theALMAConfiguration Dialog box.

    Notice on theConfiguration tab the three levels that are enabled:High High,High, and Low. TheLow Low limit is not enabled, as indicated by the unchecked check box.

  • 7/27/2019 VZ06

    33/156

    33 of 156

    10. Select the Messages tab to see the messages defined for each level, as well theAssociated Tag (MotorTemp)that we observed was inc luded in each of the messages.

    11. In theLow level field, typeThe Motor is cooling down. The current temperature of the motor is : then c lick

    the Browse button to open the Alarm Message Editor.

    12. Select the variable to add to the alarm message by selectingTag 1 (Motor Temp) from theAdd Variable pulldown menu.

  • 7/27/2019 VZ06

    34/156

    34 of 156

    13. Click

  • 7/27/2019 VZ06

    35/156

    35 of 156

    18. Return to FactoryTalk View SE Studio andselect the My Alarm Summary screen you created earlier. If it is

    not still running in test mode, on theGraphics toolbar, clickTest Display button .

    19. Find theMotorOverheatAlarm entries on the alarm summary list.

    TheLOalarm condition is now active and theHIHI,HI conditions are now normal (but unacknowledged).

    By defining the Associated tag (MotorTemp) and using it in theLOalarm message, not only is the currenttemperature of the motor embedded in the alarm message and displayed but its value will be recorded in thealarm history (when configured) anytime theLO alarm is triggered.

    Notice also the alarm messages displayed for theHIHIand HIconditions. Both sayThe current temperatureof the motor is: 25 . What happened to the tag values 501 and 1001?

    The messages now display the current temperature of the motor since it was that tag input value that cleared thealarm state for that condition. The original messages containing 501 and 1001 would have already been savedin the historical database. (Well configure our historical database later.)

    20. On theGraphics toolbar, stop testing the display by c licking theEdit Display button .

    21. Close the My Alarm Summarydisplay by clicking the in the corner.

    22. Return to RSLogix 5000 and save the program by clicking theSave button on the toolbar and then clickYes on the confirmation dialog.

    Congratulations!! You have just:

    observed and made online edits to an ALMA instruction.

    learned about Associated Tags and how to embed variables in alarm messages.

    In the next part, we will explore Tag-Based FactoryTalk Alarms and Events.

  • 7/27/2019 VZ06

    36/156

    36 of 156

    Working with Tag-based Alarms and Events

    In this part of the lab, you will:

    Observe tag-based FactoryTalk alarms that have already been configured.

    Learn how to configure tag-based alarms for remote acknowledgement, allowing alarms to be acknowledged fromfaceplates or pushbuttons.

    View the alarm status in a FactoryTalk View SE test display.

    With tag-based alarm detection, a Tag Alarm and Event Server uses tags to monitor programmable controllers for alarmconditions. When an alarm condition is detected, the server generates an alarm to the FactoryTalk Alarms and Events system.

    Use tag-based alarm monitoring with:

    PLC-5 or SLC 500 controllers, communicating through RSLinx Classic or RSLinx Gateway.

    Third-party controllers, communicating through OPC-DA servers (e.g., KEPWare).

    Logix5000 controllers that have not been programmed with pre -built alarm instructions available in RSLogix 5000 v. 16or later. Tag-based alarms are also useful for monitoring alarm conditions in instructions that do not currently produce

    device-based alarms (e.g., PIDE).

  • 7/27/2019 VZ06

    37/156

    37 of 156

    1. Switch back to Fac toryTalk View Studio.

    2. In theExplorer window, under the application node ( Instant Fizz), expand the FTAETag_Area, expandthe FTAETag_Server , then double-click the Alarm and Event Setup .

    3. Notice in the Alarm and Event Setup, there are 5 alarms pre-configured one Level alarm and four Digitalalarms.

  • 7/27/2019 VZ06

    38/156

    38 of 156

    4. Select and double-click the first alarm in the list, which is aLevel alarm, namedChemValveFlow .

    Notice that the configuration of the tag-based Level alarm is very similar to the device-based ALMA with thefollowing exceptions:

    Inp ut Tag This is the tag that is monitored for the alarm condition.

    Show A larm as Tag This option allows you to monitor the status and operate on alarmsprogrammatically at run time using tags that are exposed by the Tag Alarm and Event server.Live Data clients can read and write to the alarm tags to monitor and change alarm states.

    Status Tags Status tags allow you to keep alarm state changes synchronized with aprogrammable controller. For example, if you assign a tag to the Acknowledged status tag, whenan operator acknowledges the alarm from the Alarm Summary, the status tag is set to 1.

    Like the device-based alarms, there are many properties of aLevel Alarmthat you can configure withinLevel

    Alarm Properties dialog box.If youd like more information about them and what they do, see theSupplemental Reading section at the end

    of this lab or clickHelp on this dialog box.

  • 7/27/2019 VZ06

    39/156

    39 of 156

    5. ClickOK to close theLevel Alarm Properties dialog box.

    6. Select and double-click theDigitalalarm in the list namedPaperOut.

    Notice that the configuration of the tag-based Digital alarm is very similar to the device-based ALMD with thefollowing exceptions:

    Inp ut Tag This is the tag that is monitored for the alarm condition.

    Show A larm as Tag This option allows you to monitor the status and operate on alarmsprogrammatically at run time using tags that are exposed by the Tag Alarm and Event server.Live Data clients can read and write to the alarm tags to monitor and change alarm states.

    Status Tags Status tags allow you to keep alarm state changes synchronized with a

    programmable controller. For example, if you assign a tag to the Acknowledged status tag, whenan operator acknowledges the alarm from the Alarm Summary, the status tag is se t to 1

  • 7/27/2019 VZ06

    40/156

    40 of 156

    Like the device-based alarms, there are many properties of aDigital Alarmthat you can configure within theDigital Alarm Properties dialog box.If youd like more information about them and what they do, see theSupplemental Reading section at the end

    of this lab or clickHelp on this dialog box.

    7. Select and enable the Show Alarm as a Tag checkbox.

    This will allow us to browse the alarm parameters in the tag browser later on in the section.

    8. ClickOK to close theDigital Alarm Properties dialog box.

    9. In theAlarm and Event Setup window, select theTag Update Rates tab.

    The default update rate for the tag-based alarms is 2 seconds. This means that tag values are polled andevaluated for alarm status every 2 seconds. The default rate can be modified to a value between 0.10s 120sand will affect all new alarms defined afterwards. The update rate for alarms already configured can bechanged individually as desired.

  • 7/27/2019 VZ06

    41/156

    41 of 156

    10. Select the AlarmPaperOut alarm and right-click. SelectChange Update Rate and select 1.

    Instead of being polled every 2 seconds, we will poll for this tag value every second.

    Be cautious when selecting higher-speed tag update rates such as 0.10 and 0.25. It does not mean that newalarms will appear on the alarm summary screen faster. Alarms c an only be polled as fast as the data server allows, depending on its load with the rest of the application. Additionally, the alarm summary screen refreshesat its own update rate; tag-based alarm server Tag Update Rates affect only the time stamp of the alarm.

    11. Save the changes to the Alarm and Event Setup by clicking theSave button on the toolbar.

    Clicking Save immediately loads any alarm edits or new alarms to the Alarms and Events server.

  • 7/27/2019 VZ06

    42/156

    42 of 156

    12. Click the X button in the corner to close theAlarm and Event Setup .

    13. In theExplorer window of Factory Talk View Studio, double-click thealarms screen located under the HMIserver node in theGraphics > Displays folder.

    The pre-configured alarm summary screen for the InstantFizz demo application will open.

    You may want tomaximize Factory Talk View Studio to see the entire screen, if you havent done soalready.

    14. On the alarms screen, select and double-click the Acknowledge button below theLabeler out of paper button.We are going to configure this button to acknowledge theAlarmPaperOut alarm.

  • 7/27/2019 VZ06

    43/156

  • 7/27/2019 VZ06

    44/156

    44 of 156

    17. Click theBrowse button next to theTag field to open theFactoryTalk Tag Browser .

    18. Right-click on theInstantFizz application name and selectRefresh All Folders.

    19. Browse under theFTAETag_Areafolder to selectPaperOut and select OperAck from theContents panel.

    Take a moment to note that all tags appearing in the T ag Browser under FTAETag_Areaare all of the tag-basedalarms that have Show Alarm as Tag enabled.

    ClickOK to select the tag.

  • 7/27/2019 VZ06

    45/156

    45 of 156

    20. Set Value or Label to 1.

    21. ClickFinish to exit the Command Wizard.

    22. The resulting Button Properties window will look like this:

    23. ClickOK to close theButton Properties dialog box.

    24. Save the display by clicking theSave button on the toolbar.

    25. On theGraphics toolbar, clickTest Display button . Since a simulation program is running, the display willbe filled with alarms!

    26. Select the Acknowledge All icon from the Alarm Summary toolbar and select Acknowledge on thefollowingAcknowledge Alarm with Comment confirmation dialog.

  • 7/27/2019 VZ06

    46/156

    46 of 156

    The resulting display will probably look something like this:

    Note: The simulation is still running so more alarms will keep appearing, but with the majority of the alarmsalready acknowledged, it will make it easier to search the list to find the alarms we will trigger in the followingsteps.

    27. To simulate some tag-based Digital alarms, click the 3 buttons shown below, rapidly in succession.

    Notice that the new alarms will appear in the alarm summary list after 3-4 seconds.

    FactoryTalk Alarms and Events capture the time of the event on the alarm server (for tag -based alarms) or in thecontroller (for device-based alarms) at the moment when the alarm condition was observed. It is this time stampthat is sent with the alarm data and populated in any of the alarm objects. Although there may be a delay indisplaying the alarm data, the time and date at which it is being reported is accurate.

  • 7/27/2019 VZ06

    47/156

    47 of 156

    28. Select the Tank1Jam alarm and acknowledge by clicking the Acknowledge icon on theAlarmSummary toolbar.

    The alarm will change state from Active to Acknowledged . (The blue highlight is because the alarm is

    still selected.TheAlarm Summary object and its toolbar is typically how operators will interact with alarms. In some cases,however, it is desired that operators be able to Acknowledge, Disable, or Suppress alarms from a custom screenor a faceplate.

    29. Select the Acknowledge button that you configured earlier, under theLabeler out of paper button.

    Notice that thePaperOut alarm has been acknowledged , requiring no interaction with theAlarm Summary object.

    30. Click theTurn off buttons for each of the three alarms to return the alarm conditions to normal.

    Observe that the 2 ac knowledged alarms (PaperOut and Tank1Jam ) will be removed from the

    alarm list, whileTank2Jam will change fromActive toNormal .

  • 7/27/2019 VZ06

    48/156

    48 of 156

    31. On theGraphics toolbar, stop testing the display by c licking theEdit Display button .

    32. Close the Alarms display by selectingFile > Close from the FactoryTalk View Studio menu.

    Congratulations!! You have just Observed and made online edits to tag-based alarms.

    Enabled a tag-based alarm to be seen as a tag in the tag browser.

    Changed the update rate for a tag-based alarm.

    Configured a button to remotely acknowledge a tag-based alarm.

    Acknowledged alarms at runtime via the alarm summary object and remotely via a button.

    In the next section, we will enable Alarm History and explore ways to query the historical database.

  • 7/27/2019 VZ06

    49/156

    49 of 156

    Section 2: Setting up historical alarm and event logging

    FactoryTalk Alarms and Events can log alarm and event information to a database so that the information can be viewed or reported on at a later date.

    The Alarm and Event Log Viewer object is used to view the historical alarm and event information in a simple grid view.

    In this section of the lab you will:

    Set up historical alarm and event logging.

    View historical events using the Log Viewer object.

    View historical events in Excel

    View historical events by querying the database with VBA.

    The estimated time to complete this section is 20 minutes. Have fun!

    Add a database definition to the FactoryTalk system

    1. In theFactoryTalk View Studio Explorer window, expand the foldersSystem > Connections , and then right-clic k theDatabases folder. On the c ontext menu, clickNew Database .

  • 7/27/2019 VZ06

    50/156

    50 of 156

    2. In theAlarm and Event Historian Database Properties dialog box:

    For the Definition name, type AlarmEventHistory.

    For the Computer name , type SERVER01.

    For the Database user name , type Labuser.

    For the Database password , type rockwell.

    For the Database name , type FTAEHistory.

    When you are finished, theAlarm and Event Historian Database Properties dialog box should look as follows:

  • 7/27/2019 VZ06

    51/156

    51 of 156

    3. In theAdvanced tab, change the Log events to database every setting from100 to 1.

    This change is just for testing purposes so that we do not have to wait for information to be logged to thedatabase.

    Change from 100 to 1.

  • 7/27/2019 VZ06

    52/156

    52 of 156

    TheLog events to database every setting controls how many events are cached before sending them to thedatabase. This makes writing to the database more efficient. The events are cached to a file located on thecomputer hosting the alarm server that is generating the alarm and event information.

    If the c onnection to the database is lost, alarm and event information will continue to be cached to files. Once theconnection is restored, the cached information will be sent to the database.

    The Limit database buffering to settings control how much information will be cached if the database connectionis lost for a long period of time. Once the limits are reached the oldest information is overwritten.

    4. ClickOK to save the Database Definition.

    Associate database definition with alarm servers

    For device-based FactoryTalk Alarms and Events servers:

    1. Right-click the alarm server namedRSLinx Enterprise . On the context menu, clickProperties

    2. In theRSLinx Enterprise Server Properties dialog box, click the Alarms and Events tab.

    3. Under Alarm and Event History , select the Enable history check box.

    4. In theDatabase definition list, select AlarmEventHistory .

  • 7/27/2019 VZ06

    53/156

    53 of 156

    5. ClickOK to save the changes.

    For tag-based FactoryTalk Alarms and Events servers:

    1. Right-click the alarm server namedFTAETag_Server . On the context menu, clickProperties

    2. In theFTAETag_Server Properties dialog box, click thePriorities and History tab.

    3. Under Alarm and Event History , select the Enable history check box.

    4. In theDatabase definition list, select AlarmEventHistory.

    5. From theLog Language definition list, selectEnglish (United States), en-US .

    6. ClickOK to save the changes.

    TheLog language setting is related to the Language Switching feature which allows you to configure multiplelanguages for user defined strings that can be switched between at runtime. The combo box allows you to selectthe language to log alarm messages in (only one language is supported for the alarm and event log).

    Congratulations!! You have just configured the both FactoryTalk Alarms and Events servers to send their alarm and eventinformation to the database.

  • 7/27/2019 VZ06

    54/156

    54 of 156

    Test run using Log Viewer object

    1. In theExplorer window of Factory Talk View Studio, double-click thealarmlogviewer screen located under theHMI server node in theGraphics > Displays folder).

    2. On theGraphics toolbar, clickTest Display button .

    3. The screen will automatically populate with the last 2000 events from the alarm history database.

    Since we have just added a historical database, we wont have 2000 events. These events are alarms that areoccurring in the simulation program thats running. The actual number of events is listed in the corner of thedisplay.

  • 7/27/2019 VZ06

    55/156

    55 of 156

    4. Click theRefresh button on the Log Viewer toolbar. T he event count will increase since our simulationprogram is continuously triggering and clearing alarms.

    5. Select an alarm (any alarm) from the list to see details in the Details pane of the Log Viewer objec t.

    The detailed information documents information about that particular event such as:Alarm State, Priority,Severity,Current Value (triggering condition), anyUser Comment , and much more.

    There are 4 events captured for each alarm, each designated by its respective icon:

    Alarm Active Alarm Acknowledged Alarm Normal and Acknowledged

    Alarm Normal and Unacknowledged

  • 7/27/2019 VZ06

    56/156

    56 of 156

    6. On theGraphics toolbar, stop testing the display by c licking theEdit Display button . You may also closethe display by clicking the in the corner.

    Congratulations!! You have just:

    Added a history database to the application.

    Linked the history database to both the device-based and tag-based Alarms and Events servers.

    Verified the database connection by viewing events in the standard Log Viewer control.

    In the next section, we will query the history database using Excel.

    View the Alarm History database in Excel

    In this part of the lab, you will learn how to view the alarm history database in Excel.

    The steps to do this include:

    Configuring an ODBC data source

    Opening the data source in Excel

    1. Open the ODBC Data Source Administrator fromStart > Administrative Tools > Data Sources (ODBC).

  • 7/27/2019 VZ06

    57/156

    57 of 156

    ODBC, which stands for Open Database Connectivity , offers a framework for database engines tocommunicate with client applications. ODBC drivers work as a bridge between a database and a clientapplic ation, coordinating transactions and translating between the client and the database

    You can make data sources available to clients by creating aData Source Name (DSN).There are three typesof DSNs. They are as follows:

    User : A user DSN is visible only to the user who is logged on when the DSN is created.

    System : A system DSN is visible to all local services on a computer and all users who log on locally to thecomputer.

    File: A file DSN can be shared by all users who have the same drivers installed and who have the necessarypermissions to access the DSN. Unlike user and system DSNs, file DSNs are stored in text files, rather than theregistry.

    The DSN recognizes the data source, the driver related with a data source, and other properties that define theinteraction between the client and the data source, such as timeout, read-only mode, and so on. You can use thesame process to create a DSN for most database types. The exception is SQL Server, which gives a wizard for setting up a data source.

    2. Choose File DSN and click Add

  • 7/27/2019 VZ06

    58/156

    58 of 156

    3. In theCreate New Data Source dialog, scroll to the end of the list. Select theSQL Server driver and clickNext .

    4. TypeFTAEHistory.dsnas the name for the file data source.

  • 7/27/2019 VZ06

    59/156

    59 of 156

    5. SelectNext then Finish .

    6. When prompted, enter aDescription for the connection, as well as the name of the PC hosting the database, inour case SERVER01\SQLExpressis entered into theServer field. ClickNext.

  • 7/27/2019 VZ06

    60/156

    60 of 156

    7. When asked for the authentication type, choose Windows NT (also known as mixed mode). This allows theWindows login to open this data source. Click Next.

    The system will now try to connect to the database. This may take a few seconds.

    8. Check theChange the default database to: checkbox and use the drop down menu to change the option frommaster toFTAEHistory . ClickNext if your configuration looks like the following:

  • 7/27/2019 VZ06

    61/156

    61 of 156

    9. No changes are necessary on the next screen, just clickFinish .

    10. Server setup is finished! You should see a happy confirmation window like this.

  • 7/27/2019 VZ06

    62/156

    62 of 156

    11. Choose the option toTest Data Source which should complete successfully! ClickOK to the three ODBCwindows that remain open.

    12. OpenMicrosoft Excel using the shortcut on the Start menu.

    13. In the blank spreadsheet, select theData tab. SelectConnections .

  • 7/27/2019 VZ06

    63/156

    63 of 156

    14. In theWorkbook Connections dialog, click Add

    15. If theFTAEHistory.dsn does not appear in the Existing Connections dialog list, selectBrowse for More

  • 7/27/2019 VZ06

    64/156

    64 of 156

    16. In the Select Data Source dialog, clic kMy Documents under Favorites to be redirectedto the LabusersDocuments folder. Then selectFTAEHistory.dsn.

    17. ClickOpen. You will be prompted to select a table. In theSelect Table dialog, scroll down to the bottom of thelist and chooseConditionEvent where the Owner is Labuser.

  • 7/27/2019 VZ06

    65/156

    65 of 156

    18. ClickOK and then close the Workbook Connections dialog.

    19. SelectExisting Connections from the Excel toolbar.

    20. Choose FTAEHistory from the Connections in this Workbook then clickOpen.

    21. ClickOK on the Import Data dialog. The data will start to populate starting at cell A1.

  • 7/27/2019 VZ06

    66/156

    66 of 156

    22. The spreadsheet will fill automatically with the all events from the alarm history database.

    Use the sc roll bars to browse through the data.

    In our exercise, we are viewing ALL the events from the database. If you want to customize the query, you maydo so by selectingProperties in theWorkbook Connections definition which you launched earlier from Data >Connections.

  • 7/27/2019 VZ06

    67/156

    67 of 156

    The SQL statement can be found on the Definition tab of theConnection Properties .

    23. Close Excel when you are finished. You may save the workbook if you would like but it is not necessary.

    Congratulations!! You have just:

    Created an ODBC source linked to the alarm database.

    Added an ODBC source to an Excel workbook.

    Viewed the contents of the database in Excel.

    In the next section, we will query the same history database using VBA in FactoryTalk View SE.

  • 7/27/2019 VZ06

    68/156

    68 of 156

    Querying Alarm History using VBA and FactoryTalk View SE

    In this part of the lab, you will learn how to query the alarm history database using VBA inside a View SE client. In the interest of time, a screen has been pre-configured with the VBA and necessary controls. Your job will be to observe the code and watch itwork!

    Prerequisite: We will be using the same ODBC database connection that you created in the prev ious section:View the AlarmHistory database in Excel. If you have skipped ahead to this section, then please go back to the prev ious section and followsteps 1-9 to create an ODBC connection. Dont worry; it will only take a few minutes!

    1. In theExplorer window of Factory Talk View Studio, double-click the Alarm History Event Results screenlocated under the HMI server node in theGraphics > Displays folder).

    The pre-configured alarm summary screen for the Instant Fizz demo application will open.

    You may want tomaximize Factory Talk View Studio and the display to see as muc h of the screen aspossible.

    2. On theGraphics toolbar, clickTest Display button .

  • 7/27/2019 VZ06

    69/156

    69 of 156

    3. You will see 2 windows in the screen: one is empty, while the other is an alarm summary object showingcurrently active alarms.

    4. Lets begin by clicking theLast 15 min button to getall the events from the alarmdatabase that has occurred in the last 15 minutes.

    Notice that the events will populate in the Event listing display, sorted first by alarm name, then by alarm time(including milliseconds) in descending order.

    Alarm Summary display

    These buttons are usedto query the alarmdatabase by time.

    Buttons to generatesome alarm activityfor demonstration.

    Event Listing display

  • 7/27/2019 VZ06

    70/156

    70 of 156

    5. For the purposes of creating some alarm activity, click the button toTurn off digital device-based CIP Valvealarms .

    .6. Now turn them on once more so they are again present in the summary list.

    The alarms will look like this:

    7. Select the CIPValve0 alarm from the summary list.

    The selected alarm name will appear in theSelected Alarm display.

    8. Enter 5in the text box, then click theSelected Minutes button.

    9. In the Event listing display, you will see the event where the alarm was triggered in Step 6 above and perhapsmore if other events occurred during the past 5 minutes.

  • 7/27/2019 VZ06

    71/156

    71 of 156

    Now all this functionality is great, but how much VBA code is behind it?

    10. On theGraphics toolbar, stop testing the display by clicking theEdit Display button .

    11. Select Alt+ F11on the keyboard to open theVisual Basic Editor .

    12. Notice in the VBA Project Explorer window, there are 4 modules present. One titledThisDisplay which ispresent for each screen that is using VBA enabled. There are three additional modules added to the code of thisdisplay: DBConnect ,SQLModule, and SystemLogModule .

    ModuleDBConnect handles the connection to the database using an ODBC connection

    ModuleSQLModule creates the SQL statement to query the database

    ModuleSystemLogModule compiles the error string to be logged to FactoryTalk Diagnostics.

    13. Double-clickDBConnect to open it.

    In the beginning of the module, you will find the definition of the ODBC connec tion that code is using. This line isthe only line that a user would need to change if using this code for a different application.

    The rest of the module handles the database connection, such as initialization, opening, reading, and closing.

  • 7/27/2019 VZ06

    72/156

    72 of 156

    14. Now double-clickSQLModuleto open it.

    In the beginning of the module, you will find the definition of the SQL table wed like to query. This line is theonly line that a user would need to change if using this code for a different application.

    [FTAEHistory] is the name of the database as defined in the FactoryTalk database definition.

    [Labuser] is the name of the administrator/owner of the database.

    For this exercise, we are querying the SQL table named[ConditionEvent] since it contains all the alarmtransitions.

    The rest of the module defines the entire SQL statement used to query the database.

    15. Now double-clickSystemLogModule to open it. This module creates a wrapper around the standard Appl ication.LogDiagnosticsMessage method so that all messages logged to the Fac toryTalk Diagnosticscontain the same format. This will help to debug if there are ever p roblems.

    When using VBA, proper error handling is essential! If your VBA c ode crashes due to unhandled errors, it canhalt your View SE client completely and require a reboot.

    16. If you are done exploring the VBA code, you may close theVisual Basic Editor by clicking the in the corner.

    17. If desired, you may once again use theTest Display button to continue exploring the functionality of thisscreen. Otherwise you may close the Alarm History Event Results display by selectingFile > Close from theFactoryTalk View Studio menu. No need to save the display changes if prompted.

    Congratulations!! You have just:

    Queried the alarm history database using VBA gathering results for a specific period of time.

    Queried the alarm history database using VBA gathering results for a specific alarm within a specific period of time

    Explored the VBA code used to perform this functionality.

    You may find this screen with VBA code on the Rockwell Automation Knowledgebase in AID 51768 - Sample VBA: Query the A&E History database and display results in ViewSE

    http://rockwellautomation.custhelp.com/app/answers/detail/a_id/51768http://rockwellautomation.custhelp.com/app/answers/detail/a_id/51768http://rockwellautomation.custhelp.com/app/answers/detail/a_id/51768http://rockwellautomation.custhelp.com/app/answers/detail/a_id/51768http://rockwellautomation.custhelp.com/app/answers/detail/a_id/51768http://rockwellautomation.custhelp.com/app/answers/detail/a_id/51768
  • 7/27/2019 VZ06

    73/156

    73 of 156

    Section 3: Using FactoryTalk Alarm and Event Objects

    To monitor and respond to FactoryTalk device-based and tag-based alarms at run time, the following FactoryTalk Alarm andEvent objects are available and can be embedded into FactoryTalk View SE graphic displays.

    Alarm andEvent Summary

    Alarm and Event Banner

    Alarm and Event Log Viewer

    Alarm and Event Status Explorer

    HMI tag alarm monitoring and FactoryTalk Alarms and Events are two separate alarm monitoring systems that do not sharealarm information with each other. FactoryTalk tag-based and device-based alarm information can only be displayed in theFactoryTalk Alarm and Event objects. FactoryTalk View HMI tag alarm information cannot be displayed in FactoryTalk Alarm andEvent objects and the HMI tag alarm monitoring objects remain available for compatibility with existing applications.

    In this section, you will observe all of the FactoryTalk Alarm and Event objects in both runtime via the SE client and design timevia FactoryTalk View Studio. You should have both FactoryTalk View Studio and the Client opened.

    The estimated time to complete this section is 20 minutes. Have fun!

    Alarm and Event Summary (display: Alarms)

    Use the Alarm and Event Summary object, embedded in a FactoryTalk View graphic display, to acknowledge, disable, suppress,filter, and sort alarms during run time. You must use the Alarm Status Explorer to unsuppress an alarm that has already beensuppressed.

    Run Time: Alarm Summary Object

    1. Double-click on the FactoryTalk View SE Client file,InstantFizz.cli , from the Desktop to launchthe InstantFizz application. (For convenience, a shortcut toInstantFizz.cli has also been added to the Startmenu.)

    You may want tomaximize the client in order to see the objects clearly.

    2. From the FactoryTalk View SE client, click the button in the navigation display.

    3. TheAlarms display is opened containing an Alarm and Event Summary objec t.

  • 7/27/2019 VZ06

    74/156

    74 of 156

    4. Click on theHIHI Limit button to trigger some alarms. (It may take a few seconds to generate the alarms.)

    5. Select a row in the summary list to see details about the alarm in the details pane. Scroll down if necessary.

    6. Mouse over the toolbar on the Summary to see what the c onfigured buttons do (read the tool tips).

    Observe also the Status Bar at the bottom of the Summary. Mouse over those icons to see what information it istelling you (read the tool tips).

    7. Select a row in the Summary and click on the run alarm command button or double-click on the row inthe Summary. The FactoryTalk View Command defined in the alarm configuration is then executed.

    Note: If the button is gray there is no FactoryTalk View command associated with that alarm or a row is not

    selected. Select another row and try it again.

  • 7/27/2019 VZ06

    75/156

    75 of 156

    For example, theCIPValve1alarm properties use the FactoryTalk View Command field to define Displaycommands and pass parameters.

    When you double-click on theCIPValve1alarm, you will then have the CIP Valves popup and theLogix_ALMD displays since both were defined in the FactoryTalk View command of the alarm property.

    Feel free to experiment by clicking more of the buttons in the tool bar to see what they do. Next well move on tousing the Summary object in design time.

  • 7/27/2019 VZ06

    76/156

    76 of 156

    8. Close the two pop-up displays in order to view the Alarm and Event Summary once again.

    Design Time: Alarm Summary Object

    1. From the Studio Explorer, double-click on theAlarms display to open it.

    2. Double-click on theAlarm and Event Summary Design View object in the display and the Alarm and EventSummary Properties will open.

    3. Clickon each tab to look at all the properties.

  • 7/27/2019 VZ06

    77/156

    77 of 156

    A few key points are:

    Appearance

    Button sizes and text fonts can be configured

    Columns

    Hide and show columns Resize columns

    Reorder columns

    Toolbar and Status Bar

    Hide and show buttons/panes

    Reorder buttons/panes

    Event Subscriptions

    This object, by default, will subscribe to all events with any priority

    Display Filters

    This object has four pre-configured filters. Each filter uses the Alarm Name field for the criteria.

    Sort

    Configure sort order

    States

    Configure text and background colors for the alarm states and priorities

    Behavior

    The double-click action was defined asRun Alarm Command so that the FactoryTalk View Command defined inthe alarm properties will be invoked when the operator double-clicks on an alarm in the Alarm Summary object.

    4. Feel free to make configuration changes to theAlarm and Event Summary properties and c lickOK.Skip to

    Step 7 if there are no changes made. Event Subscriptions and Display Filters are also covered inSection 5:Filtering and Subscriptions on page 103.

    5. On the Graphics toolbar, click Test Display button . Alternately, you can save your changes and use the

    button on the navigation display of the Client to open the display again to see your changes.

    6. On the Graphics toolbar, stop testing the display by clicking the Edit Display button .

    7. Close the Alarms display in FactoryTalk View Studio when you are done.

  • 7/27/2019 VZ06

    78/156

    78 of 156

    Alarm and Event Banner (display: Alarm Banner)

    The Alarm and Event Banner displays only the highest prior ity, most severe, most recent alarms in the following ord er:

    Alarms whose alarm condition is In Alarm and Unacknowledged.

    Alarms whose alarm condition is In Alarm and Acknowledged. Alarms whose alarm condition has returned to Normal but remain Unacknowledged. (Not displayed by default.)

    Use the Alarm and Event Banner object, embedded in a FactoryTalk View graphic display, to monitor and respond to the mostcurrent alarms requiring immediate attention.

    Run Time: Alarm Banner Object

    In this section, we are going to use the Alarm Summary object described in the previous section to demonstrate the features of the Alarm Banner object. So just as in the previous section

    1. Switch to the FactoryTalk View SE Client. TheAlarm and Event Summary display should already open but if

    not click the button in the navigation display. Observe that alarms appear both in the Alarm Banner located on the header of your client, as well as in the Alarm Summary.

    Note: The text and background colors have been pre-defined in this application. You may note that these colorsdiffer from the default settings used in theSubscribing to Device-based Alarms and Eventstopic of Section 1.

    2. Now click the and buttons to programmatically turn off some of the alarms.

  • 7/27/2019 VZ06

    79/156

    79 of 156

    Observe how the device-based and tag-based alarms have been replaced by a higher priority, more severe or more recent alarm in the Alarm Banner but stay visible in the Alarm Summary until they are acknowledged bythe operator.

    3. For the next step, click the button to enable alarms again.

    4. Navigate to another display other thanAlarms.

    5. Now, select a row in the Alarm Banner in the header display anddouble-click .

    6. Observe that the Alarm and Event Summary display is automatically launched. Note that this behavior isconfigurable and will be discussed on the next section.

    Design Time: Alarm Banner Object

    1. From the Studio Explorer, double-click on theAlarm Banner display to open it.

  • 7/27/2019 VZ06

    80/156

    80 of 156

    2. Double-click on theAlarm and Event Banner Design View object in the display and theAlarm and EventBanner Properties will open.

    Similar to double-clicking on an alarm in the Alarm and Event Summary object, the Alarm and Event Banner canbe configured to perform different actions when double-clicking on an item. From the properties dialog above,we see that the Row double-click action is set to Alarm and Event Summary command which is used to

    launch a display containing an Alarm and Event summary object.

    Therefore, any double-click action on an item in the Alarm and Event Banner will invoke theDisplay Alarmscommand and opens the Alarms display. Take a look at the other options available for the Row double-clickaction.

  • 7/27/2019 VZ06

    81/156

    81 of 156

    3. Click on each tab to look at all the properties.

    A few key points are:

    General

    The double-click action was configured as theAlarm and Event Summary command . This is why the Alarmsdisplay was selected to appear when you double-clicked on the row in the Alarm Banner.

    Button sizes and text fonts can be configured

    Columns

    Hide and show columns

    Resize columns

    Reorder columns

    Status Bar

    Hide and show panes

    Reorder panes

    Event Subscriptions

    This object, by default, will subscribe to all events with any priority

    States

    Configure text and background colors for the alarm states and priorities

    Normal and unacknowledged alarms will not appear in the banner.

    4. Feel free to make configuration changes to theAlarm Banner properties,clickOK and save any changes . Skipto Step 7 if there are no changes made.

    5. On theGraphics toolbar, clickTest Display button .

    6. On theGraphics toolbar, stop testing the display by clicking theEdit Display button .

    7. Close theAlarm Banner display in FactoryTalk View Studio when you are done.

    Alarm and Event Log Viewer (display: AlarmLogViewer)

    Use the Alarm and Event Log Viewer object, embedded in a FactoryTalk View graphic display, to view and filter historical alarminformation stored in Microsoft SQL Server databases.

  • 7/27/2019 VZ06

    82/156

    82 of 156

    Run Time: Alarm Log Viewer Object

    1. Switch to the FactoryTalk View SE Client. TheAlarm and Event Summary display should already open but if

    not click the button in the navigation display.

    2. Click the Alarm and Event Log Viewer button from the Alarm Summary display.

    3. Select a row in the list to see details about the alarm in the Details Pane.

    4. Explore the use of the toolbar buttons: Refresh , Find and Show/Hide Details Pane .

    5. Use the Close This Display button to close the Alarm and Event Log Viewer display when finished.

    Design Time: Alarm Log Viewer Object

    1. Switch back toStudio . From the Explorer, double-click on theAlarmLogViewer display to open it.

    2. Double-click on theAlarm and Event Log Viewer Design Viewobject in the display and theAlarm and EventLog Viewer Properties will open.

  • 7/27/2019 VZ06

    83/156

    83 of 156

    3. Click on each tab to look at all the properties.

    A few key points are:

    General

    The log must be selected

    Text fonts can be configured

    Columns

    Hide and show columns

    Resize columns

    Reorder columns

    Toolbar

    Hide and show buttons

    Reorder buttons

    Display Filters

    This Log Viewer object can have pre-configured filters.

    Notice that there is not an Event Subscription tab. This is strictly a historical view of what is in the log or database.

    4. Feel free to make configuration changes to theAlarm and Event Log Viewer properties and clickOK.Skip toStep 7 if there are no changes made.

    5. On the Graphics toolbar, click Test Display button . Alternately, you can save your changes and use the

    button on the Alarm and Event Summary display of the Client to open the display againto see your changes.

    6. On the Graphics toolbar, stop testing the display by clicking the Edit Display button .

    7. Close the AlarmLogViewer display in FactoryTalk View Studio when you are done.

    Alarm and Event Status Explorer (display: AlarmStatusExplorer)

    Use the Alarm Status Explorer object, embedded in a FactoryTalk View graphic display, to enable or disable alarms andsuppress or unsuppress alarms.

  • 7/27/2019 VZ06

    84/156

    84 of 156

    Run Time: Alarm Status Explorer

    1. Switch to the FactoryTalk View SE Client. TheAlarm and Event Summary display should already open but if

    not click the button in the navigation display.

    2. Click the Alarm Status Explorer icon from the Alarm Summary toolbar to launch a default Alarm Status Explorer object.

    To configure the default Alarm and Event Status Explorer object launched from the Alarm Summary toolbar, use theAlarm and Event Summary Properties dialog to access the Toolbar configuration settings from theAppearance ab.

  • 7/27/2019 VZ06

    85/156

    85 of 156

    3. Click theClose button to the display.

    4. Click the Alarm and Event Status Explorer button.

    This time a display contained within the InstantFizz application was opened. The display was developed like any other display and contains an Alarm Status Explorer object within it. A separate display is not needed to use the AlarmStatus Explorer object, as seen in Step 2, but it does allow you to incorporate other common features of your application if you choose.

  • 7/27/2019 VZ06

    86/156

    86 of 156

    5. Mouse over the icons on the Status Explorer to see what the toolbar buttons do.

    6. Select a row in the list and select theshow details for selected alarm button from the toolbar. Review thedetails window then close.

    7. Select a couple of rows and then click theSuppress button. On theSuppress Alarm pop up press theSuppress button to confirm the action.

    8. Click on acolumn header to see the list sort by that column. You may need to resize the columns to fully seetext.

    9. Click theSuppress column until the suppressed alarms appear at the top of the list.

    10. Select all the suppressed alarms and then click theUnsuppress button. On theUnsuppress Alarm pop uppress Unsuppress button to confirm the action.

    11. Type *Valve2* in thename field for theAlarm source filter and click the Apply Filter button.

    12. Observe the list is filtered to show only the alarms that contain Valve2 in the name.

    13. Click theCancel Filter button.

    14. Observe the list shows all alarms once again.

    15. Use the Close This Display button to close the Alarm and Event Status Explorer display when finished.

    Design time: Alarm Status Explorer

    1. In theExplorer window of Factory Talk View Studio, double-click on theAlarmStatusExplorer display to openit.

  • 7/27/2019 VZ06

    87/156

    87 of 156

    2. Right-click on theAlarm Status Explorer object in the display and then select theProperties context menuitem to open theAlarm Status Explorer Properties :.

    3. Feel free to make configuration changes to theAlarm Status Explorer Properties and clickOK.Skip to Step 6if there are no changes made.

    4. On the Graphics toolbar, click Test Display button . Alternately, you can save your changes and use the

    button on the Alarm and Event Summary display of the Client to open the display again tosee your changes.

    5. On the Graphics toolbar, stop testing the display by clicking the Edit Display button .

    6. Close the AlarmStatusExplorer display in FactoryTalk View Studio when you are done.

    Congratulations!! You have completed the section on the available FactoryTalk Alarms and Events graphical objects. Letsquickly review:

    Alarm and Event Summary object: Use to acknowledge, disable, suppress, filter, and sort alarms dur ing run time

    Alarm and Event Banner object: Use to monitor and respond to the most current alarms requiring immediate attention

    Alarm and Event Log Viewer object: Use to view and filter historical alarm information stored in Microsoft SQL Server databases

    Alarm Status Explorer object: Use to enable or disable alarms and suppress or unsuppress alarms.

  • 7/27/2019 VZ06

    88/156

    88 of 156

    Section 4: Configuring Redundancy

    The ideal redundant solution involves having at least two instances of everything hardware, software, and networks. Inpractice, this is seldom necessary. Redundant FactoryTalk server components duplicate server information on a secondarycomputer that is used if a primary server computer fails.

    Server redundancy is typically used to maximize system availability in case of:

    Computer hardware failure

    Software failure on one server computer

    Power failure on one server computer

    In this Section you will:

    Explore how FactoryTalk Alarms and Events redundancy is configured

    Observe a manual Switchover

    Use different tools to monitor a switchover The estimated time to c


Top Related