Professional Documents
Culture Documents
Proprietary Notice The manual and software contain confidential information which represents trade secrets of GE Fanuc International, Inc. and/or its suppliers, and may not be copied or disclosed except as provided in the license with GE Fanuc International, Inc. The information in this manual is subject to change without notice and should not be construed as a commitment by GE Fanuc International, Inc. GE Fanuc International, Inc. assumes no responsibility for any errors that may be in this document. 2003 GE Fanuc International, Inc. ALL RIGHTS RESERVED.
Trademarks 2003 GE Fanuc International, Inc. All rights reserved. Microsoft is a registered trademark of Microsoft Corporation. All other brands or names are property of their respective holders. iFIX Version 3.5 - 07.03
Contents
Why You Should Read This Manual ................................................................................................ xiii 1. Scheduler ........................................................................................................................................ 1 Overview .................................................................................................................................. 1 Using the Scheduler with iFIX ................................................................................................. 4 Getting Started with the Scheduler .......................................................................................... 5 Using the Scheduler .................................................................................................... 6 Securing Schedules .................................................................................................... 6 Resolving Schedules .................................................................................................. 6 Running Foreground and Background Schedules ...................................................... 7 Opening Pictures From Background Schedules.......................................................... 7 Debugging VBA Scripts .............................................................................................. 8 Starting the FixBackgroundServer Task ..................................................................... 8 Adding Schedules to the Background Task Startup List ............................................ 8 Foreground Schedule Checklist .................................................................................. 9 Background Schedule Checklist .................................................................................. 9 Designing Schedules ............................................................................................................... 9 Event-Based Entries ................................................................................................. 10 Time-Based Entries .................................................................................................. 11 Script Authoring Experts ........................................................................................... 12 Writing VBA Scripts that Access the Intellution WorkSpace ..................................... 12
Contents
iii
Creating and Editing Schedules and Entries ......................................................................... 13 Sorting the Spreadsheet ........................................................................................................ 14 Viewing and Controlling Entry Diagnostics ............................................................................ 15 Writing Custom Scripts for the Scheduler .............................................................................. 15 Script Authoring Expert Sample Code ....................................................................... 16 Form Script Sample Code ......................................................................................... 19 Button Script Sample Code ....................................................................................... 20 Generated Script Sample Code................................................................................. 20 2. Failover and Redundancy............................................................................................................. 21 Understanding Failover and LAN Redundancy ..................................................................... 21 SCADA Server Failover and LAN Redundancy Configuration Example .................. 22 Overview Checklist ................................................................................................... 24 Understanding SCADA Server Failover ................................................................................ 24 SCADA Server Failover Messages ........................................................................... 25 Writing Data ............................................................................................................... 25 Alarm Handling for SCADA Servers ......................................................................... 25 SCADA Server Failover Configurations .................................................................... 27 Primary and Backup Groupings ................................................................................ 28 Configuring SCADA Server Failover ..................................................................................... 35 Updating the HOSTS File for SCADA Server Failover ............................................. 35 Configuring the SCADA Server Pair ......................................................................... 36 Enabling SCADA Server Failover ............................................................................. 36 Disabling SCADA Server Failover ............................................................................ 36 Synchronizing the Clocks on the SCADA Servers .................................................... 36 Assigning Manual Failover Privileges ....................................................................... 37 Understanding LAN Redundancy .......................................................................................... 37 LAN Failover Messages ........................................................................................... 38 Reading and Writing Data ......................................................................................... 38 Alarm Handling for LAN Redundancy ....................................................................... 38
iv
Mastering iFIX
LAN Redundancy Configuration ............................................................................... 39 Configuring LAN Redundancy ............................................................................................... 40 Enabling LAN Redundancy ...................................................................................... 40 Updating the HOSTS File for LAN Redundancy ....................................................... 40 Disabling LAN Redundancy ...................................................................................... 41 Optimizing System Performance .............................................................................. 41 Enabling the Alarm Startup Queue Service ........................................................................... 43 Working with the Network Status Server ............................................................................... 43 Using the iFIX Diagnostic Display ............................................................................. 45 Accessing SCADA Servers Using True Links ........................................................... 46 Reading Data............................................................................................................. 46 Creating Displays Using Logical and Physical Node Names .................................... 47 Network Status Server Fields ................................................................................... 47 Troubleshooting ...................................................................................................................... 53 3. Local Node Alias ........................................................................................................................... 57 Enabling Local Node Alias ..................................................................................................... 57 Using Local Node Alias ......................................................................................................... 57 Local Node Alias Examples ................................................................................................... 57 Picture Example ........................................................................................................ 58 Recipe Example ........................................................................................................ 58 Historical Collection Group Example ......................................................................... 59 4. Reporting ....................................................................................................................................... 61 iFIX Report Experts ............................................................................................................... 61 Using the Report Experts ...................................................................................................... 62 Print Crystal Report .................................................................................................. 62 Print Crystal Report Expert ....................................................................................... 63
Contents
Sample Report ....................................................................................................................... 64 5. The Cross Reference Tool ............................................................................................................ 67 Understanding the Cross Reference Tool .............................................................................. 67 Searching for All Tags ............................................................................................... 68 Searching for One Tag .............................................................................................. 68 Searching for Text ..................................................................................................... 69 Using the Report Wizard or the Quick Report ........................................................... 70 Exploring the Cross Reference Tool Interface........................................................................ 72 Using the Cross Reference Tool Toolbar .................................................................. 75 Creating Quick Reports .......................................................................................................... 76 Creating Reports Using the Cross Reference Report Wizard ................................................ 78 Specifying Search Settings........................................................................................ 78 Specifying Multiple Files for the Report ..................................................................... 79 Specifying Report Settings Options ........................................................................... 81 Reviewing the Report Settings .................................................................................. 82 Viewing the Report Results .................................................................................................... 83 Viewing the Status Trail ............................................................................................. 84 Viewing a Search that Resolves Tags Using All Tag Group Files ............................. 85 Viewing a Search that Includes VBA Scripts ............................................................. 86 Selecting Print Options and Printing a Report ........................................................................ 87 Selecting Page Options for Printing........................................................................... 89 Customizing Header or Footer Text........................................................................... 90 Creating a Cross Reference Tool Report from the Command-Line ....................................... 91 6. Creating Picture-specific Help Files ........................................................................................... 93 Why Create Picture-specific Help Files? ................................................................................ 93 What's This? Help .................................................................................................................. 94 What's This? Help Design ........................................................................................ 95
vi
Mastering iFIX
Adding Help to an iFIX Picture .............................................................................................. 96 Creating the Help File ............................................................................................................ 97 Requirements ............................................................................................................ 97 Creating a Topic File ................................................................................................ 97 Creating a Map File .................................................................................................. 98 Creating and Compiling a Project File ...................................................................... 99 Testing Your Help File ............................................................................................... 99 Example: Creating a Picture-specific Help File ................................................................... 100 In Microsoft Word .................................................................................................... 100 In the Intellution WorkSpace.................................................................................... 100 In Microsoft Help Workshop .................................................................................... 101 Testing the Sample Help File .................................................................................. 101 7. Customizing the System Tree ................................................................................................... 103 Adding Folders to the System Tree ..................................................................................... 105 Adding Files to the System Tree ......................................................................................... 107 Deleting Folders and Files from the System Tree ............................................................... 111 8. Validating an Application............................................................................................................ 113 Application Validator Basics ................................................................................................. 113 Running the Application Validator ........................................................................... 114 Running With or Without iFIX .................................................................................. 114 Running in Demo Mode ........................................................................................... 115 General Configuration for the Application Validator................................................. 116 Working with Default Settings.................................................................................. 116 Using the Application Validator Toolbar and Quick Keys ........................................ 117 Types of Reports from the Application Validator .................................................................. 119 Summary Report ..................................................................................................... 120 Comparison Detail Report ....................................................................................... 121
Contents
vii
General Overview of Steps for Using the Application Validator ........................................... 122 Command Line Options for the Application Validator........................................................... 123 Understanding Auditing for the Application Validator ........................................................... 125 Understanding the AppValConfig.ini File and Auditing ............................................ 126 Viewing the Audited Messages ............................................................................... 126 Sample Audit Message from the Application Validator............................................ 127 List of Audit Messages from the Application Validator............................................. 128 Activity Log in the Main Window........................................................................................... 129 Best Practices....................................................................................................................... 130 Index ................................................................................................................................................. 133
viii
Mastering iFIX
Figures
Figure 1-1: Figure 1-2: Figure 2-1: Figure 2-2: Figure 2-3: Figure 2-4: Figure 2-5: Figure 2-6: Figure 2-7: Figure 2-8: Figure 2-9: Figure 2-10: Figure 2-11: Figure 4-1: Figure 5-1: Figure 5-2: Figure 5-3: Figure 5-4: Figure 5-5: Figure 5-6: Figure 5-7: Figure 5-8: Figure 5-9: Figure 5-10: Figure 5-11: Figure 5-12: Figure 5-13: Figure 5-14: Figure 5-15: Figure 5-16: Figure 7-1: Figure 8-1: Figure 8-2: Scheduler in the Configuration Environment............................................................. 2 Scheduler in the Run-time Environment ................................................................... 3 SCADA Backup Node and LAN Redundancy Configuration................................... 23 SCADA Server Failover Configuration from an iClient............................................ 27 SCADA Server Failover Configuration from a SCADA Server................................ 28 Typical Configuration of an iClient with a Primary and Backup SCADA ................. 30 SCADA Server Configuration with a Backup SCADA ............................................. 31 Invalid Primary and Backup Grouping Configuration .............................................. 32 Correct Primary and Backup Grouping Configuration............................................. 33 Invalid SCADA Configuration in a SCADA Server Pair........................................... 34 Invalid Version Configuration in a SCADA Server Pair ........................................... 35 Typical LAN Redundancy Configuration ................................................................. 39 LAN Redundancy Configuration with an Excluded Card......................................... 40 Sample Crystal Report ............................................................................................ 66 Report Results of a Search for All Tags.................................................................. 68 Report Results for a One Tag Search..................................................................... 69 Report Results of a Text Search ............................................................................. 70 Cross Reference Tool Toolbar Button..................................................................... 72 The Cross Reference Tool Window ........................................................................ 74 The Quick Report Dialog Box.................................................................................. 77 Cross Reference Report Wizard - Search Settings Tab ......................................... 79 Cross Reference Report Wizard - Files Tab ........................................................... 80 Cross Reference Report Wizard - Report Settings Tab .......................................... 82 Cross Reference Wizard - Apply and Go Tab......................................................... 83 Status Trail .............................................................................................................. 85 Search Results of Resolving Tags using All Tag Group Files................................. 86 Search Results of Including VBA Scripts in Search ................................................ 87 Cross Reference Tool Print Dialog Box .................................................................. 88 Page Setup Dialog Box ........................................................................................... 89 Change Header and Footer Attributes Dialog Box.................................................. 90 System Tree Customization Overview .................................................................. 104 Example of the Summary Report from the Main Window ..................................... 120 Example of Comparison Detail Report Window .................................................... 121
Figures
ix
Format of Audit Message Sent to iFIX Alarm System........................................... 127 Application Validator with Log Window Displayed ................................................ 130
Mastering iFIX
Tables
Table 2-1: Table 5-1: Table 5-2: Table 7-1: Table 7-2: Table 8-1: Table 8-2: Table 8-3: Network Status Server (NSS) Fields....................................................................... 48 Cross Reference Tool Toolbar Buttons................................................................... 75 Search Results........................................................................................................ 84 Folder Attributes.................................................................................................... 106 File Attributes ........................................................................................................ 109 Running the Application Validator ......................................................................... 114 Application Validator Toolbar Buttons ................................................................... 117 Application Validator Command Line Options....................................................... 124
Tables
xi
xii
Mastering iFIX
xiii
xiv
Mastering iFIX
1. Scheduler
There are certain tasks that you may want to perform at a specified time or interval, or when a change occurs in a database value or in any OPC data server value. For example, you may want to run a Visual Basic for Applications (VBA) script that generates a report at the end of every shift or replaces the currently-displayed picture when a database point exceeds a certain value. The Scheduler allows you to create, edit, monitor, and run both types of actions as scheduled entries. In the Scheduler, you define the time or event that triggers a scheduled entry, and the action, referred to as an operation, that you want to occur. iFIX supplies Script Authoring Experts for common tasks such as replacing a picture. These Experts generate scripts based on the information that you supply to the Expert. You can also write custom scripts for common tasks that do not have Script Authoring Experts. Refer to the Writing Scripts manual for detailed information on writing VBA scripts.
Overview
In the configuration environment, iFIX displays schedules in the Intellution WorkSpace, allowing you to easily create, edit, and start monitoring entries while you work on your project.
Chapter 1. Scheduler
Indicates if the schedule runs in the foreground (F) or background (B) Scheduled entries
Figure 1-1: Scheduler in the Configuration Environment In the run-time environment, you can view the status and statistics of the entries in your schedule. You can also control your entries using the Start/Stop, Reset, and Fire Now buttons.
Mastering iFIX
Scheduled entries Indicates if the schedule runs in the foreground (F) or background (B) Schedule Entry tabs
Chapter 1. Scheduler
The Scheduler provides the following features: Spreadsheet design that allows you to easily view and edit entries. Ability to schedule as many entries as necessary and to trigger them as often as necessary. Ability to run as a service under Microsoft Windows. Script Authoring Experts for common events. Ability to easily monitor entries and view diagnostic statistics. Ability to trigger scheduled scripts on demand. Ability to run schedules as a foreground or background task.
Mastering iFIX
You can create multiple schedules, which allows you to organize and easily maintain entries. Each schedule can be configured individually to run as a background or foreground task. Also, as you add events to a schedule, you can choose whether or not to start monitoring them immediately, or to wait until the next time the Intellution WorkSpace starts. The Scheduler supports a powerful Find and Replace feature that allows you to quickly and easily modify information in a schedule. For additional information on using the Find and Replace feature, refer to the Finding and Replacing Data section of the Understanding iFIX manual.
Chapter 1. Scheduler
Securing Schedules
iFIXs schedule protection prevents unauthorized users from accessing or modifying schedules. To configure security for your schedules, enter a security area in the Properties window. For more information on configuring security, refer to the Implementing Security manual.
Resolving Schedules
Database information for each data source in a schedule is saved as part of the file on disk. When a schedule executes in the run-time environment, and the database information is not up-to-date, iFIX queries the database and resolves the tag definitions. This can be a time-consuming process which slows the execution of the schedule. Resolving schedules removes the need for iFIX to query the database. Therefore, resolved schedules execute faster in the run-time environment. We recommend resolving your schedules as a final step in the configuration process. The Resolve feature is available for both schedules and pictures. If the process database is modified after you resolve a schedule, you need to run Resolve again. These modifications include: Loading a different database. Deleting database tags.
Mastering iFIX
Chapter 1. Scheduler
For more information on creating new schedules and using the Scheduler Properties dialog box, refer to the Creating and Editing Schedules and Entries section.
Mastering iFIX
[2]
[2]
[3]
Designing Schedules
This chapter explains the issues you need to consider while you are designing schedules. When creating schedules, there are two types of entries that you can select: event-based entries and time-based entries. This section describes both types of entries and the triggers that can be used by each.
Chapter 1. Scheduler
Event-Based Entries
Event-based entries are created using the Add Event Entry dialog box. Event-based entries can use any data source available to the system to trigger an action. To select a data source, you can either enter the data source in the Data Source field or click the Browse button to access the Expression Builder. Five event types are available to trigger an action based on the value of a data source. For example, you may want to have a certain action occur when an alarm equals HIHI. By tying the value of the alarm field to the OnTrue event type, you can trigger an action when the value of this field becomes equal to HIHI. The following table lists the event types that are available and when they trigger:
Triggers... When the expression changes. When the expression resolves to a non-zero value. When the expression resolves to zero. At the specified interval as long as the expression evaluates to a non-zero value. At the specified interval as long as the expression evaluates to zero.
10
Mastering iFIX
Time-Based Entries
Time-based entries are created using the Add Timer Entry dialog box. Time-based entries trigger at a scheduled time and are not tied to a data source. The following table lists the time triggers that are available and when they trigger:
Triggers... Once at the specified date and time. For example, you can schedule an entry to trigger at 5:00 p.m. on 7/4/98. Continuously at the specified interval, starting at the specified time. For example, you can schedule an entry to trigger every eight hours. NOTE: You may notice in the log file that the timers occasionally fire +/- 1 or 2 milliseconds off. This may happen on the first fire and will return to the specified interval in a subsequent firing.
Daily
On the scheduled days of the week at a particular time. Optionally, you can specify an end time and interval. For example, you can schedule an entry to trigger Monday through Friday, at noon, or every hour from noon until 6:00 p.m. On the scheduled days of the month at a particular time. Optionally, you can specify an end time and interval. For example, you can schedule an event for the 15th of the month, at 9:00 a.m., or every hour from 9:00 a.m. until 5:00 p.m. You can also schedule an event for the end of the month at a particular time. This setting determines the last day of the month for you.
Monthly
NOTE: If you have Daylight Saving Time enabled and you create a timed-based entry to have a 2:30 AM Start Time, be aware that during the transition from Standard Time to Daylight Saving Time, the schedule will actually fire at 1:30 AM. All other days of the year, it will fire at 2:30 AM. All time-based entries run the script tied to the OnTimeOut event procedure.
Chapter 1. Scheduler
11
Adjusting for Daylight Saving Time The Scheduler supports daylight saving time for time-based events. Before allowing automatic Daylight Saving Time to be used in a production environment, you should test your application under each of the following scenarios for proper behavior: While in Standard Time. While in Daylight Time. During the transition from Standard Time to Daylight Time. During the transition from Daylight Time to Standard Time.
12
Mastering iFIX
Before you can access any information about the active picture in the Intellution WorkSpace, you must activate the Intellution Workspace using the GetObject method as shown in the following example.
Dim AppObj As Object Set AppObj = GetObject("","Workspace.Application")
You can then check to see which document or picture is open, and replace it if it is not the one you need. Once the proper picture is open, you can access its objects. Refer to the Writing Scripts manual for more information on using VBA with iFIX.
Window Properties
Chapter 1. Scheduler
13
Properties Timer Statistics Refresh Rate (in seconds) Event Statistics Refresh Rate (in seconds)
Background Files
Lists all schedules running in the background. No changes can be made from this tab.
You can create new schedules when the Intellution WorkSpace is in the configuration environment. NOTE: iFIX does not support schedules that use the same name as the local node. Therefore, do not use your local nodes name for any schedules you create. Once you have created a schedule, the schedule and all its entries appear in the Schedules folder of the system tree. You can open a schedule and view or edit its properties at any time by double-clicking the schedule name in the system tree. Once you have created a schedule, you can add new entries to it using the Script Authoring Experts in the Scheduler category or by writing your own custom scripts. You can edit an existing entry by selecting the entire entry or a particular cell within the entry. Once created, entries can be easily copied or moved from one schedule to another.
14
Mastering iFIX
If you have loaded a schedule, but the scripts are not firing, you need to determine whether the problem is caused by the firing mechanism or by the script itself.
Chapter 1. Scheduler
15
Only the following two properties have a specific purpose: ProcedureObject the Timer or Event entry to which the script will be attached. For example, Event5 or Timer 3. EventProcedure the name of the event type that will trigger the script. For example, OnTrue. Property1 through Property10 are available to the Expert for operational parameters specific to the Expert. Initially, these parameters are passed from the Expert to the Scheduler, and do not appear in the Scheduler until after the script has been generated. For example, if the user re-enters the Expert, the Scheduler passes them back to the Expert, which can then use them to populate a form. The following example shows the code behind the Toggle Digital Point Script Authoring Expert.
Private Sub ToggleDigitalPointWizard_Click() Dim CurrentObj As Object Dim szEventName As String On Error GoTo ErrorHandler Application.DeActivateWorkspaceUI True, False Prevent this button from being used in a Picture document If InStr(1, Application.ActiveDocument.Type, "FIXSchedule",_ vbTextCompare) = 0 Then Application.ActivateWorkspaceUI MsgBox "This button is not for use. Use the button _ from the Command Tasks category." Exit Sub End If
16
Mastering iFIX
Pass the timer or event objects ProcedureObject and EventProceduure to the form Set CurrentObj = ToggleDigitalPointWizard.ProcedureObject szEventName = ToggleDigitalPointWizard.EventProcedure The FIX database tag is in Property1. Enter the tag in the form field frmToggleDigitalPointCommand.ExpressionEditor1.EditText = ToggleDigitalPointWizard.Property1 Call a subroutine in the form that enters the ProcedureObject and EventProcedure as global variables so that the script in the form can act on them Call frmToggleDigitalPointCommand.GetSchedulerValues(CurrentObj, szEventName) frmToggleDigitalPointCommand.bCancel = False Open the form frmToggleDigitalPointCommand.Show Pass the FIX database tag back to the scheduler If frmToggleDigitalPointCommand.bCancel = False Then ToggleDigitalPointWizard.Property1 = frmToggleDigitalPointCommand.ExpressionEditor1.EditText End If Application.ActivateWorkspaceUI Exit Sub ErrorHandler: HandleError End Sub
The following example shows the code behind the Generate Report Script Authoring Expert.
Private Sub GenerateReportWizard_Click() Dim CurrentObj As Object Dim szEventName As String On Error GoTo ErrorHandler Application.DeActivateWorkspaceUI True, False
Chapter 1. Scheduler
17
Prevent this button from being used in a Picture document If InStr(1, Application.ActiveDocument.Type, "FIXSchedule", vbTextCompare) = 0 Then Application.ActivateWorkspaceUI MsgBox "This button is not for use. Use the button _ from the Command Tasks category." Exit Sub End If Pass the timer or event objects ProcedureObject and EventProceduure to the form Set CurrentObj = GenerateReportWizard.ProcedureObject szEventName = GenerateReportWizard.EventProcedure The Crystal Report name is in Property1. Enter the report name in the form field frmGenerateReportCommand.txtReport.Text = GenerateReportWizard.Property1 Call a subroutine in the form that enters the ProcedureObject and EventProcedure as global variables so that the script in the form can act on them Call frmGenerateReportCommand.GetSchedulerValues_ (CurrentObj, szEventName) frmGenerateReportCommand.bCancel = False Open the form frmGenerateReportCommand.Show Pass the Crystal Report name back to the scheduler If frmGenerateReportCommand.bCancel = False Then GenerateReportWizard.Property1 = frmGenerateReportCommand.txtReport End If Application.ActivateWorkspaceUI Exit Sub ErrorHandler: HandleError End Sub
18
Mastering iFIX
Chapter 1. Scheduler
19
20
Mastering iFIX
21
LAN redundancy allows two physical network connections between the iClient and SCADA server, providing two network paths to the same process data. When the connection over one network path is lost, iFIX automatically fails over to the other network path. Failover works the same way regardless of whether you are using SCADA server failover or LAN redundancy. In either case, failover to the non-active SCADA server or non-active network path occurs only if the non-active connection is available. You can use SCADA server failover and LAN redundancy either individually or together. If you enable both SCADA server failover and LAN redundancy, SCADA server failover takes precedence over LAN redundancy. In other words, iFIX tries to fail over to the partner SCADA node first. If the partner SCADA node is not available, failover occurs to the backup network path. iFIX also provides the following features: Automatic session monitoring of each SCADA server and managed LAN connection. Improved display portability by using logical node names to represent the primary and backup SCADA partners. Availability of connection status information using the Network Status Server (NSS). Alarm acknowledgment synchronization when both partner SCADA servers are up and running, ensuring that you only have to acknowledge an alarm once. Manual failover feature that allows an operator to initiate SCADA failover to the non-active SCADA server.
22
Mastering iFIX
communicating with SCADA PACKER1 over network path 1. If the connection is lost, the iClient will attempt to fail over to PACKER2 before reconnecting to PACKER1 over network path 2.
Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2
iClient
Network Path 2 Primary SCADA Node Network Path 1 Backup SCADA Node
PLC
23
Overview Checklist
The following is a list of general tasks for implementing failover and redundancy: [1] Install your hardware and network connections, and ensure that they work and communicate independently of iFIX. Configure SCADA server failover: [a] [b] [c] [d] [e] [f] [3] Define a Logical Name. Configure primary and backup SCADA servers in the SCU. Configure the SCADA partners. Configure alarm acknowledgement synchronization. Synchronize the clocks on the SCADA servers. Assign manual failover privileges if security is enabled.
[2]
Configure LAN redundancy: [a] [b] [c] Configure network paths for LAN redundancy in the SCU. Update the hosts file if you are using TCP/IP. If necessary, optimize system performance by disabling network paths and balancing network timers and failover time.
[4]
Monitor and control network status using the Network Status Server fields and diagnostic displays supplied with iFIX.
24
Mastering iFIX
If both nodes are available, the iClient establishes a connection with both of them. The first SCADA node it establishes a connection with is the active node. If only one SCADA server is available, the iClient establishes a connection with it. If neither SCADA server is available, the iClient polls both nodes until it establishes a connection with at least one SCADA server. If the iClient fails over to the backup SCADA, it remains connected to the backup SCADA even when the primary SCADA becomes available. Automatic failover to the primary SCADA only occurs if the connection to the backup SCADA is lost and the primary SCADA is available. You can also manually initiate failover back to the primary SCADA once it becomes available.
Writing Data
Data is written to the active SCADA server only. For example, if the active node is PACKER1 and the non-active node is PACKER2, before a failover the iClient writes data to PACKER1. After a failover, the iClient writes data to PACKER2.
25
To enable alarm acknowledgement synchronization between a pair of SCADA nodes, you need to define the partner SCADA for each SCADA. For example, if you have two SCADA nodes (SCADA1 and SCADA2), you can enable alarm acknowledgement synchronization by doing the following: [1] [2] [3] In Local Startup, define your logical node name. In the SCU of SCADA1, select SCADA from the Configure menu. In the SCADA Name field in the Partner SCADA section of the SCADA Configuration dialog box, enter SCADA2. In the SCU of SCADA2, select SCADA from the Configure menu. In the SCADA Name field in the Partner SCADA section of the SCADA Configuration dialog box, enter SCADA1. Make sure the primary and backup SCADA servers are listed as part of a logical pair in the Configured Remote Nodes list box of each computers SCU network configuration. For more information on logical pairs, refer to Primary and Backup Groupings. NOTE: Do not list the primary and backup SCADA servers as individual remote nodes. [7] Make sure the process databases of both nodes are identical. The easiest way to do this is to compare the serial numbers of both databases. If they do not match, integrate the two databases and copy the resulting PDB file and AlarmAreas.AAD to each SCADA server.
[4] [5]
[6]
When an alarm occurs on a SCADA server, the alarm is sent to its iClient. The iClient accepts alarms from the active node only, regardless of whether it is the primary or backup SCADA. You cannot view alarms generated by the non-active SCADA. At the iClient, alarms and messages display the logical node name in brackets. In the following example, the logical node name is LNN.
04/29/98 22:49:45.1 [LNN] AI-1 HI 72.00
However, if the message is generated by the Database Manager or because of networking problems, node names within the alarm text display the physical node name.
26
Mastering iFIX
When a node is configured as part of a partner SCADA server pair, the Alarm Summary Queue needs to be twice as big as it would be if the node were not part of a SCADA pair. For example, if you are generating 500 alarms, the Alarm Summary Queue must be set to 1000. If the Alarm Summary Queue overflows, you may see alarms appear and disappear in the alarm summary. Refer to the Implementing Alarms and Messages manual for more information on queue sizes.
iClient
PLC
27
The following figure illustrates a SCADA server failover configuration that involves two SCADA servers.
Figure 2-3: SCADA Server Failover Configuration from a SCADA Server Even in this simple configuration, you want most applications on your iClients referencing the same database. In this example, when PACKER1 and PACKER2 have established a session, PACKER2 accesses information through PACKER1. In this configuration, automatic failover to the local node occurs if the remote node session is lost. Once the local node is active, only a manual failover will make the remote node active. Refer to the Working with the Network Status Server section for information on initiating a manual failover.
28
Mastering iFIX
and backup SCADA server names is referred to as the primary and backup grouping. You configure the primary and backup grouping in the SCU of the iClient and of each SCADA server. For all figures included in this section, the Local Node Names and Local Logical Names are configured in the Local Startup Definition dialog box of the SCU. The primary and backup groupings are configured in the Configured Remote Nodes section of the Network Configuration dialog box of the SCU. The Partner SCADA name, used for alarm acknowledgement synchronization, is configured in the SCADA Name text box in the Partner SCADA section of the SCADA Configuration dialog box in the SCU. NOTE: Ensure that the local logical node names are defined on the primary and backup SCADA nodes before configuring the primary and backup grouping. Define local logical node names in the Local Startup Definition dialog box of each SCADA nodes SCU. Configuration Example 1 The following figure provides an example of a primary and backup grouping.
29
Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2
Local Node Name: PACKER1 Local Logical Name: LGCL_ND1 Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 Partner SCADA: PACKER2
iClient
Local Node Name: PACKER2 Local Logical Name: LGCL_ND1 Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 Partner SCADA: PACKER 1
Primary SCADA
Backup SCADA
PLC
Figure 2-4: Typical Configuration of an iClient with a Primary and Backup SCADA Configuration Example 2 The following figure shows a configuration that involves two SCADA servers that also serve the iClient function.
30
Mastering iFIX
Primary and Backup Grouping Logical Name: LGCL_ND2 Primary SCADA: PACKER3 Backup SCADA: PACKER4 Partner SCADA: PACKER 4 Local Node Name: PACKER3 Local Logical Name: LGCL_ND2
Primary and Backup Grouping Logical Name: LGCL_ND2 Primary SCADA: PACKER3 Backup SCADA: PACKER4 Partner SCADA: PACKER 3 Local Node Name: PACKER4 Local Logical Name: LGCL_ND2
Primary SCADA
Backup SCADA
PLC
Figure 2-5: SCADA Server Configuration with a Backup SCADA Invalid Configuration Example 1 A SCADA server can only be used in one primary and backup grouping. For example, PACKER2 cannot be part of the primary and backup groupings of both LGCL_ND1 and LGCL_ND2, as illustrated in the next figure. The primary and backup grouping must be used by all iClients that communicate with the SCADA server. In addition, if a SCADA server is part of a primary and backup grouping, it can only be accessed by iFIX iClients, and only as a pair. The nodes in the pair cannot be accessed individually. The following figure shows invalid primary and backup grouping configuration:
31
Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2
Primary and Backup Grouping Logical Name: LGCL_ND2 Primary SCADA: PACKER2 Backup SCADA: PACKER3
iClient
iClient
Primary SCADA
Backup SCADA
Local Node Name: PACKER1 Local Logical Name: LGCL_ND1 Primary and Backup Grouping
Local Node Name: PACKER2 Local Logical Name: LGCL_ND1 Primary and Backup Grouping L i lN LGCL ND1
Figure 2-6: Invalid Primary and Backup Grouping Configuration To work correctly, the second iClient can be connected in either of the following ways: Configured with the logical node name LGCL_ND1 and connected to PACKER1 and PACKER2 Configured with a different logical node name, such as LGCL_ND2, and connected to two SCADA servers other than PACKER1 and PACKER2, such as PACKER3 and PACKER4
32
Mastering iFIX
Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2
Primary and Backup Grouping Logical Name: LGCL_ND2 Primary SCADA: PACKER3 Backup SCADA: PACKER4
iClient
iClient
Primary SCADA
Backup SCADA
Primary SCADA
Backup SCADA
Local Node Name: PACKER1 Local Logical Name: LGCL_ND1 Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 Partner SCADA: PACKER 2
Local Node Name: PACKER2 Local Logical Name: LGCL_ND1 Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 Partner SCADA: PACKER 1
Local Node Name: PACKER3 Local Logical Name: LGCL_ND2 Primary and Backup Grouping Logical Name: LGCL_ND2 Primary SCADA: PACKER3 Backup SCADA: PACKER4 Partner SCADA: PACKER 4
Local Node Name: PACKER4 Local Logical Name: LGCL_ND2 Primary and Backup Grouping Logical Name: LGCL_ND2 Primary SCADA: PACKER3 Backup SCADA: PACKER4 Partner SCADA: PACKER 3
Figure 2-7: Correct Primary and Backup Grouping Configuration Invalid Configuration Example 2 A SCADA server with a logical node name should only be accessed by clients using the correct logical node name, primary SCADA, and backup SCADA configuration. It is unsupported to access a single SCADA in a SCADA server pair. The following figure shows invalid SCADA configuration in a SCADA server pair:
33
Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2
iClient
iClient
Primary SCADA
Backup SCADA
Local Node Name: PACKER1 Local Logical Name: LGCL_ND1 Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 Partner SCADA: PACKER2
Local Node Name: PACKER2 Local Logical Name: LGCL_ND1 Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 Partner SCADA: PACKER 1
Figure 2-8: Invalid SCADA Configuration in a SCADA Server Pair Invalid Configuration Example 3 Only iFIX SCADA servers can be accessed as part of a primary and backup grouping. It is unsupported to access an iFIX SCADA server and a SCADA server using any version of FIX. The following figure shows an invalid SCADA server configuration that involves an iFIX SCADA server and a FIX version 7.x SCADA server:
34
Mastering iFIX
Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2
iClient
Local Node Name: PACKER1 Local Logical Name: LGCL_ND1 Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 Partner SCADA: PACKER2
Local Node Name: PACKER2 Local Logical Name: LGCL_ND1 Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 Partner SCADA: PACKER 1
35
If you are using SCADA server failover, you need entries for the node names of the primary and backup SCADA servers. For example, if the physical name of the primary SCADA server is PACKER1 and the backup SCADA server is PACKER2, you need entries for both in your HOSTS file, as shown in the following example:
198.212.170.4 198.212.170.6 PACKER1 PACKER2
You must configure the logical node names for the primary and backup SCADA pair in the SCU of each iClient using SCADA server failover.
36
Mastering iFIX
37
TCP/IP If you are communicating from an iClient named STATION1 over TCP/IP address 1.1.1.2 to a SCADA node named PACKER1, and the session is lost and re-established over TCP/IP address 198.212.170.4, the message on the iClient is:
19:24:00.0 [STATION1] Connection to [PACKER1] switched to 1.1.1.2 - 1.1.1.5 to 198.212.170.4 - 198.421.103.6
38
Mastering iFIX
If you are using NetBIOS, the data and alarm sessions may be on separate LANs. If you are using TCP/IP, the data and alarm sessions will always be over the same LAN because they are using the same socket.
Network Path 1
Network Path 2
iClient
SCADA Node
Figure 2-10: Typical LAN Redundancy Configuration The following figure illustrates an iClient using LAN redundancy with an excluded card. The SCADA server has two network cards and an I/O driver Ethernet card that is excluded from LAN redundancy.
39
iClient
SCADA Node
PLC
40
Mastering iFIX
After you enable LAN redundancy in the SCU of each computer, you must edit the HOSTS file on each computer to add entries for each network path. The HOSTS file is typically located in the WINNT\System32\drivers\etc directory. You need an entry for each network card. The names assigned to the second LAN must be the same as the names assigned the first LAN followed by a dash and the letter R (-R). For example, if the network cards on one LAN are STATION1 and PACKER1, the names on the second LAN must be STATION1-R and PACKER1-R, as shown in the following example:
198.212.170.4 198.421.103.6 1.1.1.2 1.1.1.5 STATION1 PACKER1 STATION1-R PACKER1-R
NOTE: If you are using LAN redundancy in addition to SCADA server failover, you must update the HOSTS file on the iClient and on each partner SCADA server. Refer to the Setting Up the Environment manual for more information on TCP/IP and hosts files.
You may want to disable (or exclude) network paths from LAN redundancy to eliminate a slow or expensive path, or a path that you want to dedicate to a particular function (such as an I/O driver).
41
Disabling Network Paths In addition to enabling LAN redundancy, you may also want to disable certain network paths that you do not want to use. If you do this, you must ensure that the configurations are the same on both nodes. For example, you may want to disable network path 1 on both nodes. Re-Enabling Previously Disabled Network Paths All paths are enabled by default. However, if you have previously disabled a network path, you can re-enable it. Balancing Network Timers and Failover Time While multiple LAN support has one managed connection, LAN redundancy has two managed connections. LAN failover time from the active path to another available path on the same SCADA includes the time required to: Detect a connection loss Establish or switch low level connections Send an iFIX connection establishment message
Because re-establishment of a lost connection occurs over all paths in parallel using the first successful connection, LAN failover after the detection of a lost session takes normal session establishment time. With LAN redundancy enabled, iFIX establishes and maintains two managed connections. Rebroadcast is unnecessary, allowing faster failover to the good connection in the event of connection loss. The total downtime when using NetBIOS is the time for the send timer plus the normal session establishment time. The total downtime when using TCP/IP is the greater of the send or receive timer plus the normal session establishment time. Configuring network session timers reduces the time it takes to detect a connection loss and, consequently, reduces downtime. Refer to the Setting Up the Environment manual for information on customizing network session timers.
42
Mastering iFIX
CAUTION: Do not change the session timers unless you fully understand how they work and the consequences of what you are doing. If you make the timers too low, you could lose sessions. If you make them too high, it may take too long to fail over.
Monitoring Network Status You can monitor the status of the network using the NSS diagnostic fields. This feature allows you to monitor sessions on your network, determine which nodes are active, and display the name of the local node. In the event that a SCADA server becomes unavailable, you can also display an error code and text describing the current state of the connection with each SCADA server. iFIX provides the NSD tag that you can use when designing displays for monitoring and controlling SCADA server failover and LAN redundancy. This tag is not a database block. It is a special tag residing on each networked node that displays diagnostic, failover, and network information. Refer to the table of available Network Status Server fields in the Network Status Server Fields section.
Chapter 2. Failover and Redundancy
43
To access the fields, use the server.node.NSD.field syntax. In the following example, PACKER1 is the local physical name. NSD is always the tag.
FIX32.PACKER1.NSD.A_PRIMARYSCADA_0
Refer to Table 2-1 for more information on the Network Status Server fields. Initiating Manual Failover to the Non-active SCADA In addition to automatic SCADA failover, you can also manually force a SCADA failover to occur at any time. For example, you can manually switch to the non-active node when the active node needs to be shut down for maintenance. If you are using a SCADA server that also functions as an iClient and the local node is active, you must initiate a manual failover to make the remote node active. To perform a manual failover, write to the A_CURACTIVENODE or F_CURACTIVENODE Network Status Server field. A 0 in this field indicates that the primary node is the active node; a 1 indicates that the backup node is the active node. Refer to Table 2-1 for more information on the Network Status Server fields. Temporarily Disabling Automatic Failover You may want to temporarily disable automatic failover when network connections are unreliable. To temporarily disable automatic failover to the non-active SCADA, write to the A_FAILDISABLE or F_FAILDISABLE Network Status Server field. A 0 in this field indicates that automatic SCADA failover is enabled if it is configured; a 1 disables automatic SCADA failover. Manual failover is still possible. To temporarily disable automatic LAN failover on a per connection basis, write to the A_LANFAILDSABL or F_LANFAILDSABL Network Status Server field. For F_LANFAILDSABL, 0 indicates that automatic LAN failover is enabled if it is configured; a 1 disables automatic LAN failover. For A_LANFAILDSABL, Enabled indicates that automatic LAN failover is enabled if it is configured; Disabled indicates automatic LAN failover is disabled. Refer to Table 2-1 for more information on the Network Status Server fields.
44
Mastering iFIX
Triggering an Event on Failover You may want to trigger an event when a failover occurs. For example, you may want to display a message informing the operator of the failover, and once the operator acknowledges the message, close a valve or sound an alarm. Use the Scheduler to create schedules to do this. Refer to the Creating and Editing Schedules and Entries section for more information. To trigger an event on SCADA failover, write to the A_FAILOVER or F_FAILOVER Network Status Server field. This field is set to 1 on automatic or manual failover. You must reset it to 0 to receive notification of subsequent failovers. To see if any connection has had a SCADA failover, read to the F_SCADAANYFAILOVER field. It is set to non-zero if any F_FAILOVER field is set to non-zero. To trigger an event on LAN failover, write to the F_LANFAILOVER or A_LANFAILOVER field. This field is set to 1 on LAN failover. You must reset it to 0. To see if any connection has had a LAN failover, read to the F_LANANYFAILOVER field. It is set to non-zero if any F_LANFAILOVER field is set to non-zero. Refer to Table 2-1 for more information on the Network Status Server fields.
45
Reading Data
Displays with links to tagnames on the logical SCADA always attempt to show data from the active SCADA, regardless of whether it is the primary or backup SCADA. This is done without requiring the picture to be opened, closed, or replaced. When an iClient establishes a connection to an active SCADA server node, it starts to read data from that node. When the active SCADA server node becomes unavailable, the iClient loses its session with that node, causing a message box to appear with following message:
Node.Tag.Field Connection Not Established With Node
To disable this message, you can edit the FilteredErrors.ini file, which is located in the Dynamics\Local directory, to include error number 1914. Once you have edited this file you must restart the Intellution iFIX WorkSpace for the change to take effect. When the iClient switches to the non-active node, the following events occur: [1] The links in the open pictures on the iClient display @ symbols (as the default) to indicate that the session with the active node has been lost. The non-active node becomes the active node and the failed node becomes the non-active node. The pictures resolve automatically using the information from the new active node. This ensures data integrity. The @ signs are replaced with process data from the new active node. The node name referenced by these links does not change; it continues to display the name of the logical node.
[2]
[3]
[4]
46
Mastering iFIX
[5]
An event message indicating that a failover has occurred is sent to all alarm destinations configured for the iClient when failover occurs.
NOTE: You can change the default @ signs using the Comm Error setting on the Animations Data Error Defaults tab in the Users Preference dialog box of the Intellution WorkSpace.
47
Zero-based NSD Fields In the table, _0 through _100 appended to field names indicates that information is available on a per-connection basis. When _0 is appended to a field name, the information pertains to the local node. Since there can be up to 100 node names in the SCU, _1 through _100 typically correspond to the ordering of the names in the SCU. However, any primary and backup grouping in the SCU that contains the local node name is always located at index _0. One-based NSD Fields If the field is 1-based, when _1 is appended to a field name, the information pertains to the local node. _2 through _100 typically correspond to the ordering of the names in the SCU. Any primary and backup grouping in the SCU that contains the local node name is located at index _1. Table 2-1: Network Status Server (NSS) Fields Field Name A_ACONNREASON_0 through A_ACONNREASON_100 A_ACTIVEPATH_0 through A_ACTIVEPATH_100 F_ACTIVEPATH_0 through F_ACTIVEPATH_100 A_ACTIVESCADA_1 through A_ACTIVESCADA_100 A_ACTIVESTATUS_0 through A_ACTIVESTATUS_100 F_ACTIVESTATUS_0 through F_ACTIVESTATUS_100 A_ALOCALADDR_0 through A_ALOCALADDR_100 Description The current state of the connection to the active node. This is either Established or text describing the current state. Indicates if the active path is the primary or backup path. A 0 in this field indicates that the primary path is the active path; a 1 indicates that the backup path is the active path. Active SCADA server name, which can be either the primary or backup node name. Status of the connection to the active SCADA (OK or an error code). It will be one of the primary, logical, or backup statuses.
This is for the active network connection. For TCP/ IP, displays the local IP address used to reach the remote node. For NetBIOS, it is the LANA number.
48
Mastering iFIX
Table 2-1: Network Status Server (NSS) Fields (continued) Field Name A_APATHSTATUS_0 through A_APARTHSTATUS_100 F_APATHSTATUS_0 through F_APATHSTATUS_100 A_AREMOTEADDR_0 through A_AREMOTEADDR_100 A_BACKUPPATH_0 through A_BACKUPPATH_100 This is for the active network connection. For TCP/ IP, displays the IP address of the remote node. For NetBIOS, this field is empty. Backup network path. When using LAN redundancy, it shows the paths per connection. When iFIX is using NetBIOS, it is the LANA number. For TCP/IP it is the IP address. Backup SCADA server name for this connection. Status of the connection to the backup SCADA (OK or an error code). Description Status of the connection over the active path. This is either the primary or backup status.
A_BACKUPSCADA_0 through A_BACKUPSCADA_100 A_BACKUPSTATUS_0 through A_BACKUPSTATUS_100 F_BACKUPSTATUS_0 through F_BACKUPSTATUS_100 A_BCONNREASON_0 through A_BCONNREASON_100 A_BLOCALADDR_0 through A_BLOCALADDR_100 A_BPATHSTATUS_0 through A_BPATHSTATUS_100 F_BPATHSTATUS_0 through F_BPATHSTATUS_100 A_BREMOTEADDR_0 through A_BREMOTEADDR_100
The current state of the connection to the backup node. This is either Established or text describing the current state. This is for the backup network connection. For TCP/ IP, displays the local IP address used to reach the remote node. For NetBIOS, it is the LANA number. Status of the connection to the backup network path.
This is for the backup network connection. For TCP/ IP, displays the IP address of the remote node. For NetBIOS, this field is empty.
49
Table 2-1: Network Status Server (NSS) Fields (continued) Field Name A_CONNDIRECTION Description Indicates whether the connection is incoming or outgoing. > if outgoing. < if incoming. <> if both outgoing and incoming. A_LANFAILDSABL_0 through A_LANFAILDSABL_100 Enabled in this field indicates that LAN redundancy is enabled if it is configured; Disabled indicates LAN redundancy is disabled. Use this field to disable LAN redundancy on a per connection basis. A_LOCALNAME A_LOGICALNAME_0 through A_LOGICALNAME_100 A_LOGICALSCADA_0 through A_LOGICALSCADA_100 A_LOGICALSTATUS_0 through A_LOGICALSTATUS_100 F_LOGICALSTATUS_0 through F_LOGICALSTATUS_100 A_NETNAME_0 through A_NETNAME_100 Name used to connect to the remote node. For TCP/ IP it is the remote node name. For NetBIOS, _FIX, _SRV, or _DMACS may be appended to the remote node name. The current state of the connection to the primary node. This is either Established or text describing the current state. This is for the active network connection. For TCP/ IP, displays the local IP address used to reach the remote node. For NetBIOS, it is the LANA number. Displays the local physical node name. Logical SCADA server name for this connection. (Same as A_LOGICALSCADA and retained for backwards compatibility.) Logical SCADA server name for this connection. Status of the connection to the logical SCADA (OK or an error code).
50
Mastering iFIX
Table 2-1: Network Status Server (NSS) Fields (continued) Field Name A_PPATHSTATUS_0 through A_PPATHSTATUS_100 F_PPATHSTATUS_0 through F_PPATHSTATUS_100 A_PREMOTEADDR_0 through A_PREMOTEADDR_100 A_PRIMARYPATH_0 through A_PRIMARYPATH_100 This is for the active network connection. For TCP/ IP, displays the IP address of the remote node. For NetBIOS, this field is empty. Primary network path. When using LAN redundancy, it shows the paths per connection. When iFIX is using NetBIOS, it is the LANA number. For TCP/IP it is the IP address. Primary SCADA server name for this connection. Status of the connection to the primary SCADA (OK or an error code). Description Status of the connection over the primary network path.
A_PRIMARYSCADA_0 through A_PRIMARYSCADA_100 A_PRIMARYSTATUS_0 through A_PRIMARYSTATUS_100 F_PRIMARYSTATUS_0 through F_PRIMARYSTATUS_100 A_PROTOCOL F_ALLOWREMOTEWRITES
Displays the current protocol (NetBIOS or TCP/IP) that iFIX is using for networking. This field is 1 if remote nodes are allowed to write to the NSD fields on this node, or 0 if writes are not allowed. Indicates if the active node is the primary or backup SCADA. A 0 in this field indicates that the primary SCADA is the active node; a 1 indicates that the backup SCADA is the active node. You can write to this field to perform a manual failover.
51
Table 2-1: Network Status Server (NSS) Fields (continued) Field Name F_FAILDISABLE_0 through F_FAILDISABLE_100 A_FAILDISABLE_0 through A_FAILDISABLE_100 Description SCADA server failover state. A 0 in this field indicates that SCADA server failover is enabled if it is configured; a 1 disables SCADA server failover. Manual failover will still be possible. You can write to this field to disable automatic failover to the non-active SCADA on a perconnection basis. F_FAILOVER_0 through F_FAILOVER_100 A_FAILOVER_0 through A_FAILOVER_100 F_FAILOVERMANL_0 through F_FAILOVERMANL_100 F_FAILOVERTOTAL_0 through F_FAILOVERTOTAL_100 F_LANANYFAILOVER This field is set to 1 on automatic or manual SCADA failover. You must reset it to 0 to receive notification of subsequent failovers. You can read to this field to trigger an event on SCADA failover. Total number of manual failovers to this node since iFIX startup. Total number of failovers (automatic and manual) to this node name since iFIX startup. Use this field to see if any connection has had a LAN failover. It is set to non-zero if any F_LANFAILOVER_# field is set to non-zero. A 0 in this field indicates that LAN redundancy is enabled if it is configured; A 1 indicates LAN redundancy is disabled. Use this field to disable LAN redundancy on a per connection basis. F_LANFAILOVER_0 through F_LANFAILOVER_100 A_LANFAILOVER_0 through A_LANFAILOVER_100 F_LANFLOVRTOTAL_0 through F_LANFLOVRTOTAL_100 Total number of automatic failovers to this path since iFIX startup. Session losses that are re-established over the same network path are not included. This field is set to 1 on LAN failover. You must reset it to 0.
52
Mastering iFIX
Table 2-1: Network Status Server (NSS) Fields (continued) Field Name F_SCADAANYFAILOVER Description Use this field to see if any connection has had a SCADA failover. It is set to non-zero if any F_FAILOVER_# field is set to non-zero. Indicates the amount of time, in milliseconds, that it took this iClient to get data from the SCADA server the last time data transfer occurred.
Troubleshooting
This section provides information for troubleshooting problems that you may encounter when you are implementing iFIX failover and redundancy. Problem Nodes are not connecting for LAN redundancy. Check the SCU configuration and ensure that both nodes have the same network paths enabled. Refer to the Setting Up the Environment manual for more information. Check the hosts file and ensure that the name assigned to the second LAN is the same as the names assigned to the first LAN followed by a dash and the letter R (-R). Refer to the Updating the HOSTS File for LAN Redundancy section for more information.
Problem Alarms are being lost during failover periods. Make sure that the Alarm Startup Queue is enabled and that the queue size is large enough to handle the alarms. Refer to the Implementing Alarms and Messages manual for more information on this service.
53
Problem Alarms are missing from the summary link or alarms appear and disappear in the alarm summary link. Make sure that the Alarm Summary Queue on the node is twice big as it would normally be if the node were not part of a SCADA server failover pair. For example, if you are generating 500 alarms, the Alarm Summary Queue must be set to 1000. Refer to the Implementing Alarms and Messages manual for more information on queue sizes. Problem Alarms that were acknowledged need to be re-acknowledged after failover. Ensure that the Partner SCADA field has been checked in the SCADA server's SCU. Refer to the Setting Up the Environment manual for information on configuring the SCU. Problem The iClient using logical node names cannot connect to a partner SCADA. Make sure that the iClient is using the correct logical, primary, and backup names. Refer to the Configuring SCADA Server Failover section. Problem Alarm acknowledgement synchronization is not occurring. Make sure that alarm acknowledgement synchronization is enabled in the SCU. Once alarm acknowledgement synchronization is enabled, you can confirm that it is working using Mission Control. Refer to the Setting Up the Environment manual for more information. Problem Failover takes a long time.
54
Mastering iFIX
Adjust the session timers. Refer to the Setting Up the Environment manual for more information.
55
56
Mastering iFIX
57
Picture Example
Assume that you have a Data link in a picture that is configured with the tagname FIX32.THISNODE.AI-1.F_CV, and your local SCADA node name is CANLINE1. When you open the picture, the Data link behaves as if it were configured as FIX32.CANLINE1.AI-1.F_CV. If you open the same picture on a different computer whose local SCADA node name is CANLINE2, the Data links tagname resolves to FIX32.CANLINE2.AI-1.F_CV.
Recipe Example
Assume that you have two SCADA nodes: FERMENTER1 and FERMENTER2. The recipes Beer1 and Beer2 are used to make beer and download to FERMENTER1 and FERMENTER2, respectively. The Beer1 recipe defines the following items:
58
Mastering iFIX
In this implementation, both recipes are required because each recipe has hard-coded node name references. The local node alias feature eliminates the need for two recipes. Instead, you can create one recipe for both SCADA nodes, as shown in the following example:
After you create this recipe, share the directory that it resides in and map the recipe paths of both SCADA servers to the shared directory. For information on changing the recipe paths, refer to the Creating Recipes manual.
59
When you define the pens for the chart, use the following data sources: FIX32.THISNODE.AI_LEVEL.F_CV and FIX32.THISNODE.AI_TEMP.F_CV. If you open the chart on FERMENTER1, the tagnames resolve to FIX32.FERMENTER1.AI_LEVEL. F_CV and FIX32.FERMENTER1.AI_TEMP.F_CV. If you open it on FERMENTER2, the tagnames resolve to FIX32.FERMENTER2.AI_LEVEL. F_CV and FIX32.FERMENTER2.AI_TEMP.F_CV.
60
Mastering iFIX
4. Reporting
Detailed reports are important tools for reviewing the performance of a process. They allow you to quickly grasp the relationships between specific pieces of manufacturing process data so that you can make effective decisions. Using any third-party reporting application that supports ODBC queries, you can create customized reports based on iFIX real-time and historical data. When you use iFIX real-time data, you generate the report with current data extracted from a FIX database. When you create a report using iFIX historical data, you generate the report based on data gathered over a period of time. Once generated, reports can be printed or displayed in the Intellution WorkSpace. The ability to display reports directly in the Intellution WorkSpace allows you to quickly view a report from any number of nodes in your system, greatly reducing the time it takes for you to make informed decisions about your process. For your reporting solution, we recommend using Crystal Reports Professional Version 8.5. This reporting application uses ODBC to access iFIX data sources, allowing you to create professional, customized reports. The Report Experts included in Crystal Reports make the process of defining your query and designing the layout of your report quick and easy. This application provides unlimited sorting capability and lets you insert informative graphs that help you to effectively analyze your process data. Once created, your queries can be saved so you can quickly generate future reports based on these predefined queries. Crystal Reports v8.5 run-time DLL installation is included on the iFIX CD. These DLLs allow you to enable the target system to execute Crystal Reports without requiring a development copy to reside on each node. For complete information on using Crystal Reports, refer to the Crystal Reports documentation.
Chapter 4. Reporting
61
also create a new toolbar with the Report Experts on it. For more information on toolbars, refer to the Understanding Toolbars section of the Understanding iFIX manual.
[4]
62
Mastering iFIX
Displaying the Print Crystal Report Button If It Appears Missing If you want to display the Print Crystal Report button in the toolbar, if it is not already displayed, use the Customize Toolbars dialog box. To display the Print Crystal Report button, follow these steps: [1] [2] [3] [4] [5] [6] Select Toolbars from the WorkSpace menu. The Toolbars dialog box appears. Select WorkSpace from the Owners list. Click the Customize button. The Customize Toolbars dialog box appears. Click the Buttons tab. Select Report Tasks from the list of Categories. Drag and drop the button with the printer icon from the Buttons area of this dialog box to the iFIX toolbox. Click Close.
[7]
[4]
Chapter 4. Reporting
63
You can also use the Print Crystal Report Expert to write the PrintReport script to an entry in a schedule. Refer to the Script Authoring Experts section for more information on using Script Authoring Experts in a schedule. NOTE: The Crystal Reports run-time file (provided with iFIX) must be installed if you want to print a report from a schedule, since the Crystal Reports Professional edition does not provide VBA scripting support.
Sample Report
The following is an example of a Crystal Report that was created using iFIX historical data. This report could be either printed or viewed directly in the Intellution WorkSpace.
64
Mastering iFIX
Thursday 3/19/2003
Color:Blue Finish Time Mixer Quantity Batch ID
6 5 2 3
Color:Green
Finish Time
Mixer
Quantity
Batch ID
10:57:42AM
MIXER1
1,000
Chapter 4. Reporting
65
10:49:14AM
873 1,873
1 2
Color:Red
Finish Time
Mixer
Quantity
Batch ID
10:56:46AM
800 800
3 1
Grand Total:
4,622
66
Mastering iFIX
67
You can create three types of searches using the Cross Reference Tool: All Tags One Tag Text
For detailed information regarding the report results of each search, refer to Viewing the Report Results. For information on displaying the results of a search that includes VBA scripts or that resolves tag substitutions with Tag Group files, refer to the Viewing a Search that Includes VBA Scripts and Viewing a Search that Resolves Tags Using All Tag Group Files sections.
68
Mastering iFIX
TIP: You can also search using a partial tag name. For example, entering AI would find AI1 and TANKAI. The One Tag search also allows you to perform a find on an object in an object to object connection. Using the Cross Reference Tool report results, you could then determine which object required modification and make the change manually. This search returns the name of the object that references the tag (Object column), the property type (Property column), and the tag name (Current Value column). For example, Figure 5-2 displays a One Tag search on the partial tag name ACTIVESTATUS.
69
The Text search returns the object name, property, and property value in the Report Results section. If the Cross Reference Tool finds the text string in the object name, all of the object properties are listed in the Property column. For example, Figure 53 displays a Text search on the Text string FOREGROUNDCOLOR:
70
Mastering iFIX
Quick Report Features The Quick Report dialog box allows you to do the following: Search for all tags, one tag, or a text string in the selected picture, schedule, user global page, or object. Display the search results in the Report Results screen. Once the search completes, you can manually print out the results or choose to save the search results to a .CSV, .HTM, .XLS, or .TB2 file. Resolve tags during a search using all tag group files. Search through VBA scripts. Include a summary of the report at the end of the report. Automatically resize report columns. Append results to the Status Trail.
71
Cross Reference Report Wizard Features The Cross Reference Report Wizard allows you to do the following: Search for all tags, one tag, or a text string in the selected picture, schedule, user global page, or object. Select multiple files to search through and arrange them in a specific order. Resolve tags during a search using all tag group files. Search through VBA scripts. Configure report settings options, including: Automatically save report to file. Automatically save a status trail as a file. Automatically print the report upon generation.
Include a summary of the report at the end of the report. Automatically resize report columns.
For more information, refer to Creating Reports Using the Cross Reference Report Wizard.
Figure 5-4: Cross Reference Tool Toolbar Button The Cross Reference Tool interface includes the following sections: 72
Mastering iFIX
Object Tree Displays pictures, schedules, and User Globals that are currently opened in the iFIX WorkSpace. You can select a file or select an object within that file. NOTE: If you have opened new files in the WorkSpace since opening the Cross Reference Tool, you will need to refresh the tree in order to see them displayed. To do this, click the Refresh button in the Cross Reference Tool Toolbar. Report Results Area Displays the results of the search. Refer to Viewing the Report Results for more information. Status Trail Displays the detailed status of the report, including error messages. Refer to Viewing the Status Trail for more information. Figure 5-5 displays the Cross Reference Tool interface.
73
74
Mastering iFIX
Open the Quick Report dialog box. For more information, refer to Creating Quick Reports. Save the currently displayed report. Available files types include *.CSV, *.HTM, *.XLS, or *.TB2. NOTE: Microsoft Excel enforces a maximum row limit of 65536. If you try to save a report that exceeds this row limitation in Excel, you will be prompted to continue or cancel. Please be aware that rows exceeding that limitation may be lost if you select either option. Open the Print dialog box to configure print settings and print the currently displayed report. For more information, refer to Selecting Print Options and Printing a Report. Refresh the Object Tree. If you have opened new files in the WorkSpace since opening the Cross Reference tool, you will need to refresh the tree in order to see them. Open the Font dialog box. This dialog box allows you to specify font type, size, and style.
75
Table 5-1: Cross Reference Tool Toolbar Buttons (continued) Use this button... To... Open the Report Wizard dialog box. For more information, refer to Creating Reports Using the Cross Reference Report Wizard. Open the Cross Reference Tool Help.
76
Mastering iFIX
Append to Status Trail If enabled, the status trail adds any new tracking information to the existing status trail. If disabled, each time the Report runs, all previous tracking information is overwritten by the new status trail.
Figure 5-6: The Quick Report Dialog Box To create a report using the Quick Report dialog box, perform the following steps: [1] [2] Select a file or object in the Object Tree. Select the desired search settings in the Quick Report dialog box.
77
[3]
Click the Search button. NOTE: You cannot access the iFIX WorkSpace while the Cross Reference Tool generates a report. Once the report completes, you will be able to access the iFIX WorkSpace again.
You can also double-click an object or file in the Object Tree to run a Quick Report. This runs the Quick Report using the default settings or the settings of your last report. The results of the Quick Report display in the Report Results section of the Cross Reference Tool. You can save or print the report manually using the appropriate toolbar buttons.
[3]
[4]
Resolve Tags using All Tag Group Files If the selected file or object contains Tag Group symbols, this option resolves those symbols by attempting to match symbols with all Tag Group Definition files and finding all substitutions. This option is available for all search types. Include VBA Scripts in Search Allows the Cross Reference Tool to search through scripts within the selected files for the tag(s). Figure 5-7 displays the Search Settings tab of the Cross Reference Report Wizard.
79
Figure 5-8: Cross Reference Report Wizard - Files Tab The Select Files list displays all pictures and User Global files in the Dynamics/PIC folder, all schedules in the Dynamics/PDB folder, the User.fxg file, and any .EVS files. If any of the selected files are not opened in the WorkSpace, the Cross Reference Tool opens these files during report generation. Once the report finishes, these files are closed. NOTE: Clicking the Select All button will select all files listed in the Files tab except: ChartGroupDemo.grf, LocalAsBackup.grf, LocalAsPrimary.grf, NetworkStatusDisplay.grf, and NetworkStatusRedundancyDisplay.grf. The Cross Reference Tool processes files from top to bottom in the list. You can rearrange the order in which the files are processed by selecting a file and clicking the up or down arrow button to move a selected file up or down in the list.
80
Mastering iFIX
81
Figure 5-9: Cross Reference Report Wizard - Report Settings Tab Additionally, the Report Settings tab also allows you to set the following report and view options: Include Summary Adds a summary report to the end of the report that details the number of objects and tags searched. Automatically Resize Report Columns Automatically resizes the columns in the Report Results section to accommodate the text.
82
Mastering iFIX
Figure 5-10: Cross Reference Wizard - Apply and Go Tab Review your choices and if they are correct, click the OK button. If you need to modify any of the options, click the Back button to return to the appropriate tab. NOTE: You cannot access the iFIX WorkSpace while the Cross Reference Tool generates a report. Once the report completes, you will be able to access the iFIX WorkSpace again.
83
The information that appears in the Report Results columns depends upon which type of search you selected. Table 5-2 describes the search type and display results. Table 5-2: Search Results Type of Search All Tags Displays Returns a list that displays the name of the object that references the tag (Object column), the property of that tag (Property column), and the tag itself (Current Value column), as shown in Figure 5-1. Returns the name of the object that references the tag (Object column), the property type (Property column), and the tag name (Current Value column). For example, Figure 5-2 shows a One Tag search on the partial tag name ACTIVESTATUS. Text Returns the object name, property, and property values. If the Cross Reference Tool finds the text string in the object name, all of the object properties are listed in the Property Column. For example, Figure 5-3 shows a Text search on the string FOREGROUNDCOLOR.
One Tag
Additionally, if you selected the Save Report to File or Print Report options in the Cross Reference Report Wizard, those are automatically completed when the results display. Once the Report Results display, you can also save or print the report manually using the appropriate toolbar buttons.
84
Mastering iFIX
Figure 5-11: Status Trail To automatically save the Status Trail to a .TXT file when the report generates, select the Save Status Trail option in the Report Settings tab of the Cross Reference Report Wizard. You can also modify the name and default location of the Status Trail file in the Report Settings tab.
Viewing a Search that Resolves Tags Using All Tag Group Files
If you select the Resolve Tags Using All Tag Group Files option in either the Quick Report dialog box or the Cross Reference Report Wizard, the Cross Reference Tool attempts to resolve any tag substitutions found in the selected files with all Tag Group Files that you have on your computer during the All Tags, One Tag, or Text search. Figure 5-12 displays the results of an All Tags search with the Resolve Tags using All Tag Group Files option.
85
Figure 5-12: Search Results of Resolving Tags using All Tag Group Files The Report Results section displays the object that references the tag, the property type of that tag, the tag substitution in the Current Value column, the resolved data source in the Resolved column, and the Tag Group File name that the substitution was found in. The Cross Reference Tool attempts to resolve the substitution in all Tag Group files. Therefore, if the substitution does not exist in a Tag Group file, the Resolved column displays Unresolved, as shown in Figure 5-12.
86
Mastering iFIX
Figure 5-13: Search Results of Including VBA Scripts in Search If the Cross Reference Tool finds a tag in a script (or the tag or text string that you searched for), the Object column displays the object associated with that script, the Property column displays ScriptSource, and the Current Value column displays the line number and line text of the script that the tag appears in. NOTE: If the scripts contained in the files that you are searching include variables and those variable names are either custom alarm areas or tag names, the Cross Reference Tool displays the variable as a source.
87
Figure 5-14: Cross Reference Tool Print Dialog Box To select print options and print a report, follow these steps: [1] [2] [3] Select a Print Range. Click the Page Setup button to configure page settings. How? Select any of the following Print Options: Column Headers Prints column headers at the top of each page. Row Headers Prints row headers on the left side of each page. Grid Lines Prints spreadsheet grid lines. Border Prints the spreadsheet border. Data Cells Only Does not print empty cells beyond the last column and row containing data. Color Prints colors in the spreadsheet as they appear on the screen. Shadows Prints the shadow effect in the column and row headers. [4] [5] Click the Printer Setup button to modify the current printer and printer options. Optionally, click the Print Preview button to view how the Report will appear when printed. Select Close from the Print Preview screen to return to the Print dialog box.
88
Mastering iFIX
[6]
Click OK. If you accessed the Print dialog box from the print toolbar button, clicking OK prints the report. If you accessed the Print dialog box from the Cross Reference Report Wizard, clicking OK returns you to the wizard.
89
Enter any desired changes to the Page Setup dialog box and click OK to return to the Print dialog box.
Figure 5-16: Change Header and Footer Attributes Dialog Box To add a header or footer to your printed report, select either the Header Text or Footer text option from the Apply to section and enter your text in the appropriate column. For example, if you want your text to be centered, enter the text in the Center column. The Cross Reference Tool also provides some pre-configured common header and footer options, including: <Default Header> Inserts the Report Title including the file name, date, and time.
90
Mastering iFIX
<Time> Inserts a time stamp (date and time). <Page Number> Inserts the current page number. To select from these pre-configured strings, select a cell in the table and right-click it. The display toggles through the options.
Option /r
Syntax crossreference.exe /r
Description Creates a report with the CrossReference.ini settings. This runs the CrossReference.ini settings which were automatically saved when you last closed the Cross Reference Tool. If no CrossReference.ini is found, the report runs with the defaults. NOTE: You must use the Cross Reference Report Wizard once before using the /r command. The Cross Reference Tool writes to the CrossReference.ini file when you create reports using the Cross Reference Report Wizard. Reports created using the Quick Report do not get written to the CrossReference.ini file. The /r parameter allows you to set up an entire search in the Cross Reference Report Wizard, navigate to the Apply and Go tab, and then click the Cancel button to cancel the search. After exiting the Cross Reference Tool, you could then run the crossreference.exe /r command at any point to generate the report with the settings you had entered.
/?
crossreference.exe /?
91
92
Mastering iFIX
In general, if you develop pictures that need to provide operators with equipmentspecific information or sets of instructions, you should consider creating picturespecific Help files. For example, let's say you are developing a picture that contains a pump. You can design the picture so that when operators click the pump and press <Shift><F1>, they receive a pop-up with information about the pump's manufacturer, voltage, amp rating, and horsepower. Similarly, you can use picture-specific Help to develop training screens for new operators. If you were developing a training screen for the pump picture in the previous example, you could display Help pop-up windows containing such basic information as how to know when the pump is on or off, and when it is operating properly.
93
While in What's This? Help mode, operators can click any object in the picture (or even the picture itself) for a Help pop-up window on that object.
94
Mastering iFIX
95
[2]
[3]
Next, assign a unique number, called a Help context ID, to each object in your picture that you want the operator to be able to get Help on. To do this: [1] Right-click each object in your picture (including the picture itself) for which you want to write a Help topic and select the Property Window command. The Properties window appears with the name of the selected object as the active object. Set the HelpContextID property to the desired number. Remember that all context IDs within the same Help file must be unique. These values are used by the WinHelp application to correctly display the Help topic that is associated with the control. If two controls have the same context ID, the WinHelp compiler will display an error message.
[2]
Finally, you need to make any object that you want an operator to be able to get Help on selectable. To do this: [1] Right-click each object in your picture (including the picture itself) for which you want to write a Help topic and select the Property Window command. The Properties window appears with the name of the selected object as the active object. Set the IsSelectable property to True.
[2]
96
Mastering iFIX
Requirements
The requirements for creating a picture-specific Help file are: Microsoft Word or any other word processor that can save Rich Text Format (RTF) and text files. Microsoft Help Workshop. The Help Workshop is included with iFIX and is installed in the iFIX Base path (usually C:\Dynamics\HCW.EXE).
To create a Help topic file in Microsoft Word: [1] [2] Create a new document and select Footnote from the Insert menu. Select the Custom Mark option button, enter a pound sign (#) in the adjacent field, and click OK. The document window splits so you can see the footnote area.
97
[3]
In the footnote pane, enter a unique context string to the right of the pound sign. Do not include spaces in the context string. One common method is to use underscores for more descriptive context strings, such as:
water_pump_onoff_btn
[4]
Click the Close button on the footnote pane to close the footnote area and return to a full-screen document window. (To view the footnote text again, double-click the footnote at the top of the topic.) To the right of the footnote symbol, enter the information that you want to appear in the Help pop-up window. Save the document as an RTF file.
[5]
[6]
For example, if you defined the HelpContextID property of the pump in the previous example as 1000, it would appear in the header file as:
water_pump_onoff_btn = 1000
[2]
Continue to add these define statements, one per line, until all of your Context IDs have been added to the header file. Save the file as a text-only file and provide it with an .h file name extension.
[3]
98
Mastering iFIX
[4]
[5]
[6]
[7] [8]
[9]
[3]
[4]
99
In Microsoft Word
[1] [2] Open a new document and select Footnote from the Insert menu. Click the Custom Mark option button and enter a pound sign (#) in the adjacent field. Click OK. In the footnote pane at the bottom half of the window, enter the following text directly to the right of the footnote symbol:
my_square
[3]
[4]
In the document pane at the top half of the window, type the following text directly to the right of the footnote symbol:
This is the Help topic for my square.
[5]
[4] [5]
Click the Rectangle button from the Toolbox and draw a rectangle. Right-click the rectangle and select the Property Window command.
100
Mastering iFIX
[6]
[7]
[3] [4]
[5] [6]
[7]
[8]
Click OK, and then click the Save and Compile button.
[3]
[4]
101
102
Mastering iFIX
103
remaining attributes have Entry and Value fields. The Entry field holds the name of the attribute and the Value field defines the corresponding attribute value. The attributes for folders and files are defined in Table 7-1 and Table 7-2. NOTE: Although not all of the attributes in this file need to be defined, it is important to note that if the Entry field is completed for an attribute, the corresponding Value field must also be completed. When you are ready to customize the SystemTree.CSV file, refer to the following figure for an overview of the required steps.
Open the SystemTree.CSV file. This file resides in the Local path.
Select Run from the Windows NT Start menu and enter the command: WorkSpace /unregserver
104
Mastering iFIX
For the attribute Description Folders Extension Entry Extension of the files for this folder AutoFind Entry Used to find, create, and populate this folder on startup Fix Path Entry Default path for files in this folder
[4] [5]
Save the file in the Local path with a .CSV extension. Close the Intellution WorkSpace.
105
[6]
Select Run from the Windows menu and enter WorkSpace / unregserver in the Open field. Click OK. Restart the Intellution WorkSpace.
[7] [8]
Folder definitions include the attributes in the following table. Table 7-1: Folder Attributes The attribute Description Defines The names of the folders in the system tree. By adding a new name, you add a new folder to the system tree. If you want the folder to appear inside another folder enter the complete path. For example, to add a folder called Drawings to the Pictures folder you would enter: Pictures\Drawings Folders AppKey Vendor of Folder ProgID of files in this folder Extension of the files for this folder Each entry as a folder and always has the value FOLDER. An entry that is reserved for future use and should be left blank. A company name. When you add a folder, enter the name of your company. Completing this attribute is optional. The program identification from the registry of the ActiveX documents residing in the folder. If the folder does not contain ActiveX documents, leave the ProgID blank. The file extension you want to associate with the folder. Completing this attribute is optional. If Used to find create and populate this folder on startup is set to TRUE, this attribute must be completed.
106
Mastering iFIX
Table 7-1: Folder Attributes (continued) The attribute Used to find create and populate this folder on startup Defines Whether the Intellution WorkSpace automatically displays the files with the specified extension. Setting Used to find create and populate this folder on startup to TRUE displays the files; entering FALSE or leaving the extension undefined creates an empty folder. Typically, this attribute is set to TRUE. If set to TRUE, the Extension attribute must be completed. The path to each folder. When you add a folder, enter the complete path to it. This must be a FIX path. Whether the New command on the folders right mouse menu is grayed out or enabled. Entering TRUE grays out the command; setting the attribute to FALSE or leaving it undefined enables the command. Typically, this attribute is set to FALSE. How the documents in the folder are opened. Entering TRUE opens the files exclusively for use in the Intellution WorkSpace; no other applications can read or write to these files. Setting the attribute to FALSE opens documents in a non-exclusive manner so that other applications can read or write the file. Typically, this attribute is set to FALSE.
OpenExclusive
[3]
107
[4]
Enter the information for the file in the attribute fields. For example, to add a text file called Text File within the Events folder enter the following (leave unused fields blank):
For the attribute Description Files Fix Path Entry Path of this file AutoLoad Entry Used to determine if this file should be opened on startup by the WorkSpace
[5] [6]
Save the file in the Local path with a .CSV extension. Using Notepad, create a text file named Test.txt and save it in your Dynamics\Alm folder. Close the Intellution WorkSpace. Select Run from the Windows menu and enter WorkSpace / unregserver in the Open field. Click OK. Restart the Intellution WorkSpace.
[7] [8]
[9] [10]
108
Mastering iFIX
Folder definitions include the attributes in the following table. Table 7-2: File Attributes The attribute Description Defines The names of the files that appear directly off the system tree root. By adding a new name, you add a new file to the system tree. If you want the file to appear inside a folder, enter the complete path. For example, to add a globals file called OEMGlobals to the Globals folder you would enter: Globals\OEMGlobals Files AppKey Vendor of File Path of this File Each entry as a file and always has the value FILE. An entry that is reserved for future use and can be left blank. A company name. When you add a file, enter the name of your company. Completing this attribute is optional. The complete path to each file. This must be a FIX path and the file name. If the file resides in an iFIX path, you can specify the path with a predefined alias, such as PDB_PATH or BASE_PATH. For example, if you are adding a globals file, enter PIC_PATH since all global files reside in the iFIX Picture path. Used to determine if this file should be opened on startup by the WorkSpace Hidden In Tree Entry Whether the Intellution WorkSpace automatically opens the file on start-up. This attribute is set to TRUE for globals files only. Typically, this attribute is set to FALSE. Whether the file is visible or hidden in the system tree. In general, you only want to set this attribute to TRUE for any non-modifiable globals file you add to the system tree. Typically, this attribute is set to FALSE.
109
Table 7-2: File Attributes (continued) The attribute Not In Collection Entry Defines Whether the file should be included in a collection. A collection is one or more open ActiveX documents. Typically, you want to include all files except nonmodifiable (system) globals files in collections. Consequently, you enter TRUE for system globals files and FALSE for any other file. Typically, this attribute is set to FALSE. Whether the Close command on the files right mouse menu is grayed out or enabled. Entering TRUE grays out the command; entering FALSE or leaving it undefined enables the command. Typically, this attribute is set to FALSE. Whether the Show command on the files right mouse menu is grayed out or enabled. Entering TRUE grays out the command; entering FALSE or leaving it undefined enables the command. Typically, this attribute is set to FALSE. Whether the Save command on the files right mouse menu is grayed out or enabled. Entering TRUE grays out the command; entering FALSE or leaving it undefined enables the command. Typically, this attribute is set to FALSE. Whether the file is a globals file. If it is not a globals file, enter DEFAULT. If it is, enter USER for userdefined globals files or SYSTEM for non-modifiable globals files. Typically, you supply system globals to prevent these value from being changed. The program identification for your system and user globals files. This attribute is left blank or set to FIXGLOBALSSERVER.FIXGLOBALSSERVER.1 Whether the Rename and Delete commands on the files right mouse menu is grayed out or enabled. Entering TRUE grays out the command; entering FALSE or leaving it undefined enables the command. This attribute is set according to user preference.
110
Mastering iFIX
[6] [7]
111
112
Mastering iFIX
8. Validating an Application
The Application Validator is a utility you use to verify the versions of an applications files, and to ensure that the files associated with the application have not changed. You can run the Application Validator with or without iFIX running. To use the Application Validator, you first specify the Windows folders that you want to work with. After you specify the folders, you take an initial snapshot of the content. This snapshot is called a baseline. You can later compare this baseline snapshot to the same folder(s) at another date, or on a regular basis, to see if the contents of each folder have changed. You will find the Application Validator utility most helpful, for instance, when you finish configuring your iFIX system. Once you configure iFIX, you can create a baseline of the iFIX folders and other ones associated with your process. You can monitor which files were changed since you created the baseline. So, if you ever run into problems, or want to go back to an original configuration, you can determine which files were changed or added, and you can manually rollback to that configuration. You can view these changes, as a summary or detailed report, in online or printed format.
113
Command Line
114
Mastering iFIX
If you use iFIX Security, you can modify your iFIX groups to allow the users in the designated groups to create baselines and/or have runtime access to the Application Validator. The iFIX application features name for these privileges are as follows: Application Validator - Creation of Baselines Application Validator - Run-time Access
For more information on iFIX security setup, refer to the Defining and Assigning Security Privileges in the Implementing Security manual.
If you do not have an iFIX software license, you can only use the Application Validator when iFIX runs in Demo mode. The command line mode for the Application Validator is not available while iFIX is in Demo mode.
115
116
Mastering iFIX
Open the Print dialog box to print the current screen. Select all folders displayed in the main window.
Clear the check boxes for all folders selected in the main window. Create a baseline file for each folder selected in the main window.
117
Table 8-2: Application Validator Toolbar Buttons (continued) Use this... To... Create a baseline for a single folder.
Generate summary information indicating which folders contain changes. This information appears in the third column of the main window. Generate a detailed summary report. This information appears in another window. Open the Application Validator Options dialog box. Show or hide the activity log window in the bottom half of the main window. View information about the Application Validator version. Click this button and then an area of the screen or dialog box for Help. Ctrl+A Ctrl+B Ctrl+D Select all folders displayed in the main window. Create baseline files for each folder selected in the main window. Open the Select Directories dialog box from the main window, or if you are in the Comparison Detail Report window, this key combination allows you to display differences only. Create a baseline for a single folder. To create a baseline for one folder, only select the check box for that folder.
Ctrl+G
118
Mastering iFIX
Table 8-2: Application Validator Toolbar Buttons (continued) Use this... Ctrl+L Ctrl+M To... Open the Open dialog box to load predefined settings. Generate summary information indicating which folders contain changes. This information appears in the third column of the main window. Open the Application Validator Options dialog box. Open the Print dialog box to print the current screen. Open the Save As dialog box to save the application settings or detailed report. Generate a detailed summary report. This information appears in another window. Clear the check boxes for all folders selected in the main window.
119
Summary Report
When you run a Summary Report, it displays in the main window of the Application Validator. A status for each folder appears in the third column of the main window, indicating if differences were found or if the files in the folder were identical to the original baseline. For instance, the Compare Status field for the folder could be identified as Identical, Differences Found, or Missing a Baseline. Figure 8-1 shows an example of a Summary Report as it appears in the main window of the Application Validator. Notice the Compare Status column of the far right of the window that includes the Summary Report information.
Figure 8-1: Example of the Summary Report from the Main Window
120
Mastering iFIX
121
Viewing Only the Files that Changed In the Comparison Detail Report, you can reduce the number of files included in the list by ignoring identical files. If you want to view only the files that changed, select the Differences Only option from the View menu in the Comparison Detail Report window. Saving the Comparison Detail Report In addition, you can save the Comparison Detail Report to a .CSV or .TXT file. Select Save from the File menu in the main window to open the Save dialog box, from which you can select a comma-delimited format (.CSV) or text format (.TXT) from the drop-down list.
122
Mastering iFIX
Notes on the Syntax The brackets ( [ ] ) indicate that a parameter is optional. The brackets are not part of a command; if a bracketed option is desired, only type the text that is inside the brackets, and not the brackets themselves. The pipe bar ( | ) indicates separate items in a group that you can choose from. For instance you can use the /CreateBaseline or the /CB argument with the AppValidator command, and, in this case, both perform the same task. Italics are used to represent the information that the user must supply to run the command. The information in italics is not typed exactly as it appears. Instead, the user enters the information specific to the italicized expression.
123
Descriptions of Optional Arguments The following table outlines the optional arguments. If an abbreviation is available, that is listed instead of the full argument name. For instance, the /CB argument is listed instead of the /CreateBaseline argument, but either could be used. Table 8-3: Application Validator Command Line Options Argument /CB /OverWrite /PSB /PCS /PCD /SCD:Full Path Output File Description Creates baseline files for the specified directories and folders. Overwrites any existing baseline files. (Used with the /CB argument only.) Prints the existing baseline for the specified folder. Prints the Summary Report for the specified folders. Prints the Comparison Detail Report for the specified folders. Saves a copy of the Comparison Detail Report for the specified folders. If you do not use the /CSV argument, the file is saved as a .TXT file. Specifies that the Comparison Detail Report be saved in Comma Separated Value (CSV) format. (Used with the /SCD option only.) Specifies that you only want to display the files with changes in the Comparison Detail Report. (Used with the /SCD option only.) Displays the Help for the command line options.
/CSV
/DO
/?
124
Mastering iFIX
Command Line Options You Can Define in the GUI In addition to the options that you can specify on the command line, some options must be set from within the Application Validator user interface (non-command line version). These options include: Using an automatic report naming convention when running the Application Validator from the command line. Define an application to run if differences are found when running the Application Validator from the command line.
Command Line Errors You may encounter errors caused when an invalid command line parameter is passed to the Application Validator. Errors are logged to the AppValidator.log file in the Dynamics folder.
[2]
Enable the Alarm ODBC Service and configure your relational database to store the audit messages in the ODBC alarm table.
125
For more information on the AppValConfig.ini, refer to the Understanding the AppValConfig.ini File and Auditing section in this chapter. For more information on enabling and configuring the Alarm ODBC Service, refer to Configuring the Alarm ODBC Service section in the Implementing Alarms and Messages manual.
NOTE: If you set EnabledSecurityIsRequired to Yes, then the Application Validator only runs when Security is Enabled within iFIX. If you set EnabledSecurityIsRequired to No, then iFIX Security does not have to be enabled in order to run the Application Validator. [3] Save the file into the Dynamics folder (the same location where you installed iFIX). Restart the Application Validator.
[4]
126
Mastering iFIX
iFIX alarm destinations such as the Alarm File and Alarm Printer also get these audit messages. For information on configuring these alarm locations, refer to the Configuring Alarms chapter in the Implementing Alarms and Messages manual. NOTE: The Alarm History window only displays the most recent 500 messages; it is not a complete list of messages, and therefore, not an audit trail.
Timestamp
Audit Message
Name of the currently logged-in iFIX user on the node where the action occurred
127
128
Mastering iFIX
Application Validator Report Comparison Summary Application Validator Report Printed Application Validator Report Saved Application Validator Report Single Baseline Application Validator Security not enabled Application Validator User not logged in
NOTE: The %s in these messages is replaced with the actual the directory name when the message appears.
129
Best Practices
Some best practices to keep in mind when using the Application Validator include the following: Specify that iFIX be running in order to start the Application Validator and that iFIX security be enabled in the AppValConfig.ini file, if you want to use auditing. If using iFIX security, limit the creation of baselines to a specified set of users. For each designated user in the Security Configuration tool, select the Application Validator - Creation of Baselines feature from the Application Feature Selection dialog box.
130
Mastering iFIX
NOTE: Depending upon your security requirements, you probably can allow runtime access to the Application Validator (Application Validator - Run-time Access feature) more liberally. For more information on iFIX security setup, refer to the Defining and Assigning Security Privileges in the Implementing Security manual.
131
132
Mastering iFIX
Index
Automatically Resize Report Columns 82
A
active network path 37 active server 21 Activity Log main window 129 alarm handling LAN redundancy 38 SCADA server failover 25 Alarm Startup Queue Service enabling 43 All Tags search in the Cross Reference Tool 68 Application Validator 113 audit messages 128 auditing 125 basics 113 command line options 123 general configuration 116 overview steps 122 report types 119 running 114 toolbar 117 Apply and Go tab 82 AppValConfig.ini file 126 arguments, Application Validator command line audit messages list 128 sample format 127 viewing 126 auditing AppValConfig.ini file 126 understanding 125 automatic failover temporarily disabling 44
B
background schedules 4 background task startup list 8 backup node in a SCADA server pair 24 backup SCADA servers See SCADA server failover basics, Application Validator 113 best practices Application Validator 130 buttons toolbar buttons for the Application Validator 117 toolbar buttons for the Cross Reference Tool 75
C
changes only in Compare Detail Report 122 command line (Application Validator) errors 125 from GUI 125 options 123 command-line (Cross Reference Tool) 91 Comparison Detail Report overview 121 saving 122 compiling a project file 99 configuration for the Application Validator 116 configurations LAN redundancy 39 SCADA server failover 27 SCADA server failover and LAN redundancy configuring LAN redundancy 40 network session timers 42 SCADA server failover 35
Index
124
22
133
SCADA server pair 36 continuous entry 11 creating a map file 98 a project file 99 picture-specific help files 93 reports 78 the help file 97 topic file 97 Cross Reference Report Wizard 78 Cross Reference Tool 67 All Tags search 68 Apply and Go tab 82 automatically saving the report file 81 button 72 creating Quick Reports 76 customizing header and footers 90 including the summary report 76 introduction 67 introduction to 67 Object Tree 73 One Tag search 68 opening 72 Page Setup dialog box 89 printing a report 87 printing report automatically 81 Quick Report and Report Wizard 70 refreshing 75 Report Results 73 Report Settings tab 81 Report Wizard 72, 78 resizing columns 76 resolving tags 76 running from command-line 91 search settings 78 search types 68, 69 searching for text 69 searching through scripts 76 selecting multiple files 79 selecting print options 87 Status Trail 73 toolbars 75 types of searches 67 viewing files open in the WorkSpace 73 viewing results 83 viewing searches through scripts 86 viewing status trail 84 Crystal Reports sample report 64 using with iFIX 61 custom scripts writing for Scheduler 15
103
D
daily entry 11 debugging VBA scripts in a schedule 8 defining Application Validator command line options (GUI) 125 Demo Mode, Application Validator 115 descriptions optional arguments in Application Validator command line 124 Detail Report, Comparison 121 diagnostic displays 45 diagnostics entry 15 disabling automatic failover 44 LAN redundancy 41 network paths 42 SCADA server failover 36 displaying the search results of a report 73
E
enabling Alarm Startup Queue Service 43 disabled network paths 42 LAN redundancy 40 SCADA server failover 36 entries continuous 11 creating 13 daily 11 diagnostics 15 editing 13 event-based 10 monthly 11 one-shot 11 time-based 11 errors, command line (Application Validator) event types 10 event-based entries 10 Experts Script Authoring 12, 15
125
F
failover triggering an event 45
134
Mastering iFIX
understanding 21 failover messages LAN 38 SCADA server failover 25 file attributes SystemTree.CSV file 109 files adding to the system tree 107 deleting from the system tree 111 selecting multiple 79 Files tab 79 files that changed 122 finding tags in files 71 finding tags in the Cross Reference Tool 76 FixBackgroundServer task as a Windows service 8 folder attributes SystemTree.CSV file 106 folders adding to the system tree 105 deleting from the system tree 111 foreground schedules 4
76, 86
L
LAN failover messages 38 LAN redundancy alarm handling 38 configurations 39 configurations with SCADA server failover 22 configuring 40 disabling 41 enabling 40 overview checklist 24 understanding 21, 37 updating the HOSTS file 40 list audit messages from the Application Validator 128 local node alias enabling 57 examples 57 overview 57 THISNODE 57 using 57 Log window from the Application Validator 129 logical node name creating displays 47 described 28
G
general configuration for the Application Validator 116 GUI, Application Validator command line options 125
H
Headers and Footers customizing 90 help adding to an iFIX picture 96 creating the file 97 designing Whats This ? 95 understanding Whats This ? 94 HOSTS file updating for LAN redundancy 40 updating for SCADA server failover
M
main window, Activity Log 129 manual failover assigning privileges 37 initiating to non-active SCADA 44 map file creating 98 messages from the Application Validator auditing 126, 128 mode, Demo 115 monthly entry 11 multiple files searching through 79
35
I
iFIX, running with or without (Application Validator)
N
network paths disabling 42 enabling disabled paths 42
Index
135
network session timers configuring 42 Network Status Server fields 47 working with 43 non-active network path 37 non-active server 21 notes on the syntax (Application Validator) NSS fields 47 working with 43
R
123 refresh Object Tree 75 Report displaying search results 73 report including a summary 76 reviewing settings 82 saving to a file 81 specifying output options 81 viewing report results 83 viewing search results that resolve tags 85 Report Experts overview 61 Print Crystal Report 62 Print Crystal Report Expert 63 using 62 Report Results 83 Cross Reference Tool 73 Report Settings Tab Save Status Trail 81 Report Settings tab 81 automatically print report 81 Report Wizard All Tags 68 automatically saving status trail 81 creating reports 78 differences between Quick Report and 70 feature list 72 One Tag 68 output options 81 resolving tags 79 search settings 78 searching through scripts 79 selecting multiple files 79 reporting overview 61 using iFIX Report Experts 61 Reports overview 119 saving 122 Summary 120 reports automatically printing 81 Comparison Detail 121 creating 77, 78 displaying status trail 73 printing 87, 90 resizing columns 76
O
Object Tree Cross Reference Tool 73 refreshing 75 One Tag searching for in Cross Reference Tool 68 one-shot entry 11 opening Cross Reference Tool 72 optional arguments, Application Validator command line 124 overview Application Validator steps for using 122
P
physical node names creating displays 47 picture-specific help files creating 93 primary and backup groupings 28 primary node in a SCADA server pair print Crystal Report 62 Print Crystal Report Expert 63 printing reports 87, 88 reports automatically 81 project file creating and compiling 99
24
Q
Quick Report 76 All Tags 68 differences between Report Wizard and feature list 71 One Tag 68 70
136
Mastering iFIX
selecting page options 89 viewing search through script results resizing columns 76 Resolve Tags using All Tag Group Files 76 Resolve Tags using All Tag Group Files viewing results 85 resolving schedules 6 resolving tags using the Cross Reference Tool 76 using the Report Wizard 79 results of tag search 84 of text search 84 running Application Validator 114 Demo Mode 115 with or without iFIX 114
86
S
sample audit message from the Application Validator 127 Save Status Trail 81 saving Comparison Detail Report 122 SCADA server failover alarm handling 25 backup node 24 configurations 27 configurations with LAN redundancy 22 configuring 35 disabling 36 enabling 36 failover messages 25 primary node 24 synchronizing clocks 36 understanding 24 updating Hosts file 35 SCADA server pair configuring 36 understanding 21 Scheduler introduction 1 overview 1 running as a background task 5 running as a foreground task 5 script execution 5 using the VBE 4 using with iFIX 4 schedules adding to background task startup list 8
debugging VBA scripts 8 designing 9 resolving 6 running in the background 7 running in the foreground 7 securing 6 sorting 14 Script Authoring Experts 12, 15 scripts searching through 76, 79 viewing reports 86 Search Settings tab 78 searching for tags 67 for text 68 for text strings 69 through scripts 79 types of searches for tags 67 searching for one tag 68 searching for tags resolving tags 79 securing schedules 6 selecting print options 88 settings working with 116 sorting a schedule 14 Status Trail 84 automatically saving 81 Cross Reference Tool 73 viewing 84 steps using the Application Validator 122 Summary Report 120 summary report 76 synchronizing SCADA server clocks 36 syntax, Application Validator command line system performance optimizing during failover 41 system tree adding files 107 adding folders 105 customizing 103 deleting folders and files 111 SystemTree.CSV file 103 SystemTree.CSV file 103
123
T
tag name searching for a partial name tags searching for all tags 68 69
Index
137
68
V
validating an application 113 VBA scripts to access the Intellution WorkSpace 12 writing custom scripts for Scheduler 15 VBE using with Scheduler 4 viewing audited messages (Application Validator) changed files 122 119
finding in files 69 Text search 69 THISNODE 57 time-based entries 11 toolbar, Application Validator 117 toolbars Cross Reference Tool 75 topic file creating 97 true links 46 types of reports (Application Validator)
126
U
understanding auditing for the Application Validator using Application Validator 122 Application Validator toolbar 117 125
W
Whats This ? help designing 95 overview 94 wizards feature list for Cross Reference Tool Report Wizard 72 working with settings 116
70
138
Mastering iFIX