Copyright
Proprietary NoticeThe 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.
Contents iii
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
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 ... 23
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 ... 34
Updating the HOSTS File for SCADA Server Failover ... 34
Configuring the SCADA Server Pair ... 35
Enabling SCADA Server Failover ... 35
Disabling SCADA Server Failover ... 35
Synchronizing the Clocks on the SCADA Servers ... 35
Contents v
Understanding LAN Redundancy ... 36
LAN Failover Messages ... 37
Reading and Writing Data ... 37
Alarm Handling for LAN Redundancy ... 37
LAN Redundancy Configuration ... 38
Configuring LAN Redundancy ... 39
Enabling LAN Redundancy ... 39
Updating the HOSTS File for LAN Redundancy ... 39
Disabling LAN Redundancy ... 40
Optimizing System Performance ... 40
Enabling the Alarm Startup Queue Service ... 42
Working with the Network Status Server ... 42
Using the iFIX Diagnostic Display ... 44
Accessing SCADA Servers Using True Links ... 45
Reading Data... 45
Creating Displays Using Logical and Physical Node Names ... 46
Network Status Server Fields ... 46
Troubleshooting ... 52
3. Local Node Alias ... 55
Enabling Local Node Alias ... 55
Using Local Node Alias ... 55
Local Node Alias Examples ... 55
Picture Example ... 56
Recipe Example ... 56
4. Reporting ... 59
iFIX Report Experts ... 59
Using the Report Experts ... 60
Print Crystal Report ... 60
Print Crystal Report Expert ... 60
Sample Report ... 61
5. The Cross Reference Tool ... 65
Understanding the Cross Reference Tool ... 65
Searching for All Tags ... 66
Searching for One Tag ... 66
Searching for Text ... 67
Using the Report Wizard or the Quick Report ... 68
Exploring the Cross Reference Tool Interface... 70
Using the Cross Reference Tool Toolbar ... 73
Creating Quick Reports ... 74
Creating Reports Using the Cross Reference Report Wizard ... 76
Specifying Search Settings... 76
Specifying Multiple Files for the Report ... 77
Specifying Report Settings Options ... 79
Reviewing the Report Settings ... 80
Viewing the Report Results ... 81
Viewing the Status Trail ... 82
Viewing a Search that Resolves Tags Using All Tag Group Files ... 83
Contents vii
Selecting Print Options and Printing a Report ... 85
Selecting Page Options for Printing... 87
Customizing Header or Footer Text... 88
Creating a Cross Reference Tool Report from the Command-Line ... 89
6. Creating Picture-specific Help Files ... 91
Why Create Picture-specific Help Files? ... 91
What's This? Help ... 92
What's This? Help Design ... 93
Adding Help to an iFIX Picture ... 94
Creating the Help File ... 95
Requirements ... 95
Creating a Topic File ... 95
Creating a Map File ... 96
Creating and Compiling a Project File ... 97
Testing Your Help File ... 97
Example: Creating a Picture-Specific Help File ... 98
In Microsoft Word ... 98
In the Intellution WorkSpace... 98
In Microsoft Help Workshop ... 99
Testing the Sample Help File ... 99
7. Customizing the System Tree ... 101
Adding Folders to the System Tree ... 103
Adding Files to the System Tree ... 105
Deleting Folders and Files from the System Tree ... 109
Figures ix
Figure 1-1: Scheduler in the Configuration Environment... 2
Figure 1-2: Scheduler in the Run-time Environment ... 3
Figure 2-1: SCADA Backup Node and LAN Redundancy Configuration... 23
Figure 2-2: SCADA Server Failover Configuration from an iClient... 27
Figure 2-3: SCADA Server Failover Configuration from a SCADA Server... 28
Figure 2-4: Typical Configuration of an iClient with a Primary and Backup SCADA ... 29
Figure 2-5: SCADA Server Configuration with a Backup SCADA ... 30
Figure 2-6: Invalid Primary and Backup Grouping Configuration ... 31
Figure 2-7: Correct Primary and Backup Grouping Configuration... 32
Figure 2-8: Invalid SCADA Configuration in a SCADA Server Pair... 33
Figure 2-9: Invalid Version Configuration in a SCADA Server Pair ... 34
Figure 2-10: Typical LAN Redundancy Configuration ... 38
Figure 2-11: LAN Redundancy Configuration with an Excluded Card... 39
Figure 4-1: Sample Crystal Report ... 63
Figure 5-1: Report Results of a Search for All Tags... 66
Figure 5-2: Report Results for a One Tag Search... 67
Figure 5-3: Report Results of a Text Search ... 68
Figure 5-4: Cross Reference Tool Toolbar Button... 70
Figure 5-5: The Cross Reference Tool Window ... 72
Figure 5-6: The Quick Report Dialog Box... 75
Figure 5-7: Cross Reference Report Wizard - Search Settings Tab ... 77
Figure 5-8: Cross Reference Report Wizard - Files Tab ... 78
Figure 5-9: Cross Reference Report Wizard - Report Settings Tab ... 80
Figure 5-10: Cross Reference Wizard - Apply and Go Tab... 81
Figure 5-11: Status Trail ... 83
Figure 5-12: Search Results of Resolving Tags using All Tag Group Files... 84
Figure 5-13: Search Results of Including VBA Scripts in Search ... 85
Figure 5-14: Cross Reference Tool Print Dialog Box ... 86
Figure 5-15: Page Setup Dialog Box ... 87
Figure 5-16: Change Header and Footer Attributes Dialog Box... 88
Figure 7-1: System Tree Customization Overview ... 102
Tables xi
Table 2-1: Network Status Server (NSS) Fields... 47
Table 5-1: Cross Reference Tool Toolbar Buttons... 73
Table 5-2: Search Results... 82
Table 7-1: Folder Attributes... 104
Table 7-2: File Attributes ... 107
xiii The Mastering iFIX manual is intended for system integrators, OEMs, and process control engineers responsible for implementing a software automation solution using iFIX®. This manual assumes that you are familiar with Microsoft Windows NT or Windows 2000, Microsoft Visual Basic, the Intellution® WorkSpace, and your plant's network.
Reference Documents
For related information about iFIX, refer to the following manuals: • Understanding iFIX
• Writing Scripts • Creating Pictures
• Setting Up the Environment
Chapter 1. Scheduler 1
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.
Figure 1-1: Scheduler in the Configuration Environment
In the run-time environment, you can view the status and statistics of the entries in
Indicates if the schedule will run in the foreground (F) or background (B) Schedule Entry tabs Scheduled entries Schedules folder Schedules Scheduled entries
Chapter 1. Scheduler 3 Figure 1-2: Scheduler in the Run-time Environment
Schedule
Indicates if the schedule runs in the foreground (F) or background (B) Scheduled entries
Entry status, name,statistics, description, and controls Entry tabs
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 Windows NT or Windows 2000. • 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.
Using the Scheduler with iFIX
Individual schedules can be run as a foreground or the background task. When you run a schedule in the foreground, you can easily test and debug scripts in the run-time environment. When an error occurs, VBA launches the Visual Basic Editor (VBE) debugger, where you can edit and save changes to a script. You cannot run scripts in the configuration environment.
When you run schedules as background tasks, they run regardless of whether the Intellution WorkSpace is in the run-time or configuration environment, and regardless of whether the Intellution WorkSpace is running. If you modify a scheduled entry, it automatically restarts. When the Intellution WorkSpace is in the run-time
environment, you can view Scheduler statistics and diagnostic information about each entry in the schedule, including the number of times each entry has been fired and the last time it was fired.
You can also run the Scheduler in the background as a service under Windows NT or Windows 2000. Because the Scheduler runs as a service, operators can log in and out of an NT or 2000 node without affecting scheduled entries, and entries are triggered regardless of whether or not the Intellution WorkSpace is running.
Chapter 1. Scheduler 5 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.
Getting Started with the Scheduler
Before you start scheduling entries, you should understand how the Scheduler executes scripts. The Scheduler can run as a foreground or background task. When you run a schedule in the foreground, it runs on the same thread as the scripts in the Intellution WorkSpace, allowing you to quickly test and debug scripts in the run-time environment. When you run a schedule in the background, it runs on a separate thread from the scripts in the Intellution WorkSpace, monitoring the system and triggering scheduled events.
The Scheduler does not loop; it waits for events to occur. When a selected event occurs, the script is triggered from a schedule running in the background, it is added to the queue, and it executes after the scripts in front of it have finished executing. For this reason, when a schedule is run as a background task it is ideal for monitoring tasks. This is exactly the same as scripts triggered from schedules running as foreground tasks in the Intellution WorkSpace.
Generally, schedules created to run in the foreground are used for testing and debugging. Once a schedule created to run in the foreground has been tested and debugged, we suggest that you set it to run in the background. Refer to the Running Foreground and Background Schedules section for more information.
Refer to the Writing Scripts manual for an explanation of how scripts are implemented in the Intellution WorkSpace.
Using the Scheduler
Schedules are spreadsheets with separate tabs for event-based entries and time-based entries. Double-clicking an empty row in a schedule displays a dialog box for adding an entry. Once you have created an entry, you can edit individual cells in the spreadsheet without using the dialog box.
Time-based entries create a timer object while event-based entries create an event object. These iFIX objects have associated properties, methods, and events that you can use in VBA scripts. They are displayed in the system tree and are the objects to which scheduled scripts are tied.
Securing Schedules
iFIX’s 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:
Chapter 1. Scheduler 7
Running Foreground and Background Schedules
You can select whether you want your schedules to run as foreground or background tasks. When you create a new schedule, the default is for it to run in the foreground. To run a schedule in the foreground, the Intellution WorkSpace must be running in the run-time environment. Running a schedule in the foreground is useful for testing and debugging VBA scripts.
To run a schedule in the background, the FixBackgroundServer task must be running. If the FixBackgroundServer task is not running, it is automatically started when a schedule is added to the background task. To create a schedule that runs in the background you must change the default setting in the Scheduler Properties dialog box, which is available by right-clicking a schedule and selecting Scheduler Properties from the pop-up menu. You can use this dialog box to change the default setting for a new schedule or for an existing schedule that is set to run in the foreground. Also, you can select whether you want a schedule to run in the
foreground or the background, set the window properties, and set the statistics refresh rates.
NOTE: An unsigned write occurs when a database tag is configured for electronic
signature, but you write a value directly to that tag without capturing a signature. If you are working in a secure environment with the Electronic Signature option enabled, you must be aware of the impact of unsigned writes to the process database. Unsigned writes can originate from schedules. Refer to the Implications of Database Writes With Electronic Signature section of the Using Electronic Signatures manual for detailed information.
Opening Pictures From Background Schedules
If a picture opens from a background schedule while you are editing a picture or schedule in the WorkSpace, you may experience unexpected behavior. In some instances, the picture may open over a modal dialog box and you will not be able to get back to the dialog box.
To avoid this problem, we recommend that when adding an entry to a background schedule, you configure the schedule to check whether the WorkSpace is in the run-time or configuration environment before opening a picture.
NOTE: Schedules that are configured to run in the background cannot reference
pictures. When FixBackgroundServer opens a schedule that references a picture, it also tries to open that picture. Since FixBackgroundServer cannot open pictures, an error message appears.
For more information on creating new schedules and using the Scheduler Properties dialog box, refer to the Creating and Editing Schedules and Entries section.
Debugging VBA Scripts
If a scripting error occurs while a schedule is running, the VBE debugger
automatically launches to allow you to quickly edit and save the changes made to the script. If the schedule is running in the foreground when the VBE launches, any changes made to the script are automatically saved in the schedule. If the schedule is running in the background when the VBE launches, close the VBE editor, re-open it in Intellution WorkSpace, and make the necessary changes to the script. Any changes made to the script are automatically saved in the schedule.
NOTE: In order for scripting changes to be saved in a schedule, the VBE must be
started in the Intellution WorkSpace. Any scripting changes made in the VBE launched from the FixBackgroundServer task will not be saved in a schedule.
Starting the FixBackgroundServer Task
The FixBackgroundServer task can run on its own or as a Windows service.
Refer to the Setting Up the Environment manual for more information on configuring startup tasks.
Adding Schedules to the Background Task Startup List
Normally, you want your schedules to start automatically when iFIX is started. To do this, you must add the schedules to the background task startup list. If you are adding entries to a schedule that is already running in the background, you can choose whether or not to start monitoring the entry immediately.Chapter 1. Scheduler 9
Foreground Schedule Checklist
The following is an overview of the steps necessary to successfully implement a foreground schedule:
[1] Create a foreground schedule in the configuration environment of the Intellution WorkSpace.
[2] Monitor entries as necessary from the run-time environment of the Intellution WorkSpace.
Background Schedule Checklist
When creating a schedule that runs in the background, you can create it directly as a background schedule or create a foreground schedule and convert it to a background schedule. The following is an overview of the steps necessary to successfully implement a background schedule:
[1] Create a background schedule in the configuration environment of the Intellution WorkSpace.
[2] Add the schedule to the background task startup list, using the Background Startup tab in the User Preferences dialog box.
[3] Monitor entries as necessary from the run-time environment in the Intellution WorkSpace.
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.
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:
The event type... Triggers...
OnDataChange When the expression changes.
OnTrue When the expression resolves to a non-zero value. OnFalse When the expression resolves to zero.
WhileTrue At the specified interval as long as the expression evaluates to a non-zero value.
WhileFalse At the specified interval as long as the expression evaluates to zero.
Chapter 1. Scheduler 11
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:
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. The time type... Triggers...
One Shot 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.
Continuous 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.
Monthly 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.
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.
Script Authoring Experts
When you select an action in the Operation field of either the Add Timer Entry or Add Event Entry dialog box, iFIX asks you whether or not you want to run the Script Authoring Expert now. If you select Yes, it automatically runs the Script Authoring Expert associated with that action. If you want to run the Script Authoring Expert at a later time, you can modify the entry and click the Run Expert button. After you have provided the Expert with the required information, the Expert generates a VBA script tied to the appropriate event.
For example, the Replace Picture Script Authoring Expert asks which picture you want to display and, once you have provided it with a picture name, generates a script to replace the picture. Once the script is generated, you can edit it by re-entering the Expert or by accessing it directly using the VBE.
In addition to the Script Authoring Experts provided in iFIX, you can write your own custom scripts for frequently-performed tasks. Refer to the Writing Custom Scripts for the Scheduler section for information on how to create your own custom scripts for the Scheduler.
Writing VBA Scripts that Access the Intellution WorkSpace
When you write a scheduled script that opens, closes, replaces, or accesses a propertyChapter 1. Scheduler 13 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 now check to see if the picture is open:
If UCase(AppObj.ActiveDocument.Name) = UCase("MyPicture") Then
<perform a task or open the picture>
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.
Creating and Editing Schedules and Entries
The Scheduler allows you to create multiple schedules which help you to easily organize and maintain events. When you create a new schedule, you can control its properties from the Scheduler Properties dialog box.The following table lists the tabs on the Scheduler Properties dialog box and the properties that can be controlled from each:
Tabs Properties
Run Time State Run in Foreground Run in Background Window Properties Window Height
Window Width Window Styles
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 node’s 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.
Sorting the Spreadsheet
You can sort Scheduler entries in ascending or descending order by clicking the heading of the column you want to sort. For example, if you want to sort entries alphabetically by name, click the Name column's heading. The entries will appear in ascending order. To sort them in descending order, click the Name column's heading again.
NOTE: Sorting is only available in the configuration environment. In the run-time
environment, entries appear in the order they were added to the schedule. Stats Refresh 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.
Chapter 1. Scheduler 15
Viewing and Controlling Entry Diagnostics
The Scheduler allows you to view and control entry diagnostics in the run-time environment. If you open a schedule in the run-time environment, you can view the status of entries, the number of times they have been fired, and the time when they were last fired. You can also:
• Start or stop an entry from executing.
• Reset the statistics (number of times it has been fired and time when it was last fired) of the entry.
• Trigger an entry to fire on demand.
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.
Writing Custom Scripts for the Scheduler
The Scheduler provides Script Authoring Experts that generate a script that is executed when an entry triggers. These Experts are available for common tasks such as toggling a digital point or generating a report. You can also create custom scripts for tasks that you need to perform.
This section shows sample code that may be helpful when writing custom scripts for use with the Scheduler. For additional examples, use the VBE to view the code for the Experts, buttons, and forms supplied with iFIX. Refer to the Writing Scripts manual for detailed information on writing VBA scripts.
Script Authoring Expert Sample Code
The following properties store information that is passed between a Script Authoring Expert, the Scheduler, and the Intellution WorkSpace:
• ProcedureObject. • EventProcedure.
• Property1 through Property10.
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
Chapter 1. Scheduler 17
‘Pass the timer or event object’s 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
‘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 object’s 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
Chapter 1. Scheduler 19
Form Script Sample Code
The following example shows code that collects the name of the picture the user wants to display when the event is triggered, generates the script, and creates the event. The Procedures object is a collection of scripts. Before you generate the script, you need to get the index number for the next script using the
GetEventHandlerIndex method. Once you generate the string that will become the script, use the AddEventHandler method to add the event.
Private CurrentObject As Object Private EventName As String
Public Sub GetCurrentObjectValues(obj, Str) Set CurrentObject = obj
EventName = Str End Sub
Private Sub CommandButton1_Click() 'get file name entered by user Dim FileName As String
FileName = TextBox1.Value Dim WorkingObj As Object
Set WorkingObj = CurrentObject.Procedures 'Get the index for the procedure
Dim Index As Long Dim Found As Long
WorkingObj.GetEventHandlerIndex EventName, Index, Found 'Generate code
Dim StringCode As String
StringCode = "Dim doc As Object" & Chr(13) _
& "Dim PicturePath As String" & Chr(13) _
& "PicturePath = ""c:\fix32\pic\"" & FileName" & _ Chr(13) & "Set doc = _
Application.Documents.Open(PicturePath)" & Chr(13) 'Add the event
WorkingObj.AddEventHandler EventName, StringCode, Index 'Close the form
End End Sub
Button Script Sample Code
The following example shows code for a button object called MyExpert that gets the timer or event object, the event trigger name, and picture name, if any, from the Add Event dialog box. It passes this information in to the form using the
GetCurrentObjectValues procedure, and then displays the form.
Private Sub MyExpert_Click() Dim CurrentObj As Object Dim EventName As String
'Set procedure object, event name, and file name Set CurrentObj = MyExpert.ProcedureObject
EventName = MyExpert.EventProcedure
MyExpert.Property1 = frmOpenPicture.TextBox1.Value 'Pass the object and event name into the form
Call frmOpenPicture.GetCurrentObjectValues(CurrentObj,_ EventName)
frmOpenPicture.Show frmOpenPicture.Hide End Sub
Generated Script Sample Code
The following example shows the script that would be generated if you ran this Expert on the Timer7 object, using the OnTimeOut event.
Private Sub Timer7_OnTimeOut(ByVal lTimerId As Long) Dim doc As Object
Dim PicturePath As String
PicturePath = "c:\fix32\pic\" & FileName
Set doc = Application.Documents.Open(PicturePath) End Sub
Chapter 2. Failover and Redundancy 21
2.
Failover and Redundancy
This section describes iFIX SCADA server failover and LAN redundancy. Also included is information on monitoring and controlling your network using the Network Status Server and iFIX diagnostic displays.
Understanding Failover and LAN Redundancy
Operators view process data received from a SCADA server using an iFIX iClient. Should the SCADA server or LAN connection become unavailable, process data can become unavailable to the operator at the iClient. iFIX SCADA server failover and LAN redundancy increase the availability of data to the iClient and minimize the amount of time that data is unavailable. It does this by allowing the iClient to connect to a primary and backup SCADA server and to use more than one LAN connection to the SCADA server.By recognizing multiple paths to the data, iFIX can switch from one path to another automatically, improving overall system availability for critical operations. Switching from one connection to another is known as failover.
SCADA server failover allows you to connect an iClient to both the primary and backup SCADA servers, the SCADA partners, that are connected to the same PLC. This feature provides two paths to the same process data instead of just one. The iClient establishes and maintains the connections to both the primary and backup SCADA servers, either of which can be the active server—the SCADA node with which the iClient is currently communicating—or the non-active SCADA server. When the connection to the active SCADA server is lost, iFIX automatically fails over to the non-active SCADA server.
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.
SCADA Server Failover and LAN Redundancy Configuration
Example
If you enable both SCADA server failover and LAN redundancy, SCADA server failover takes precedence over LAN redundancy. For example, in the following figure an iClient configured with the logical node name LGCL_ND1 is
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.
Chapter 2. Failover and Redundancy 23 Figure 2-1: SCADA Backup Node and LAN Redundancy Configuration
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. [2] Configure SCADA server failover:
[a] Define a Logical Name.
[b] Configure primary and backup SCADA servers in the SCU. [c] Configure the SCADA partners.
Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2
iClient PLC Backup SCADA Node Primary SCADA Node Network Path 2 Network Path 1
Local Node Name: PACKER1 Local Logical Name: LGCL_ND1
Local Node Name: PACKER2 Local Logical Name: LGCL_ND1
[d] Configure alarm acknowledgement synchronization. [e] Synchronize the clocks on the SCADA servers.
[f] Assign manual failover privileges if security is enabled. [3] Configure LAN redundancy:
[a] Configure network paths for LAN redundancy in the SCU. [b] Update the hosts file if you are using TCP/IP.
[c] 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.
Understanding SCADA Server Failover
When iFIX starts, the iClient attempts to establish communication with its primary and backup SCADA servers. The primary node is the SCADA node you want the iClient to communicate with at startup. The backup node is the SCADA node you want the iClient to communicate with if the primary node becomes unavailable. 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.
Chapter 2. Failover and Redundancy 25
SCADA Server Failover Messages
You can identify when a SCADA server failover has occurred using a Network Status Server tagname, or through the alarm messages. Refer to the Working with the Network Status Server section for more information.
iFIX sends an alarm message whenever SCADA server failover occurs. This alarm message never appears at the remote nodes.
For example, if you are communicating from an iClient named LN1_VIEW to a primary SCADA node named PACKER1, and the iClient fails over to the backup SCADA node named PACKER2, the message on the iClient is:
06/07/2002 16:35:22.5 Connection Failover: connection to PACKER1 has been switched to PACKER2
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.
Alarm Handling for SCADA Servers
When you configure networking and SCADA options in the SCU for both partner SCADA servers, the Alarm Startup Queue Service is automatically enabled. This service ensures that alarms are not lost during session loss and reconnection.
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] In Local Startup, define your logical node name.
[2] In the SCU of SCADA1, select SCADA from the Configure menu. [3] In the SCADA Name field in the Partner SCADA section of the SCADA
Configuration dialog box, enter SCADA2.
[4] In the SCU of SCADA2, select SCADA from the Configure menu. [5] In the SCADA Name field in the Partner SCADA section of the SCADA
Configuration dialog box, enter SCADA1.
[6] 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 computer’s 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.
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.
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.
Chapter 2. Failover and Redundancy 27
SCADA Server Failover Configurations
You can configure SCADA server failover from an iClient or from a SCADA server that also functions as an iClient.
The following figure illustrates a SCADA server failover configuration from an iClient.
Figure 2-2: SCADA Server Failover Configuration from an iClient
The following figure illustrates a SCADA server failover configuration that involves two SCADA servers.
iClient PLC Backup SCADA Node Primary SCADA Node Alarm Acknowledgement Synchronization
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.
Primary and Backup Groupings
SCADA server failover uses a logical node name to represent the physical names of the primary and backup SCADA nodes. The primary node is the SCADA server you want the iClient to communicate with at startup. The backup node is the SCADA server you want the iClient to communicate with if the primary node becomes unavailable. The applications on the iClient communicate to the logical node name, and iFIX substitutes the physical node name at run time based on which SCADA server is available. The combination of the logical node name and physical primary 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
PLC Backup SCADA Node Alarm Acknowledgement Synchronization Local Node Name: PACKER1
Primary SCADA Node
Chapter 2. Failover and Redundancy 29 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 node’s SCU.
Configuration Example 1
The following figure provides an example of a primary and backup grouping.
Figure 2-4: Typical Configuration of an iClient with a Primary and 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
PLC
Backup SCADA Primary
SCADA
Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup 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
Configuration Example 2
The following figure shows a configuration that involves two SCADA servers that also serve the iClient function.
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.
Primary and Backup Grouping Logical Name: LGCL_ND2 Primary SCADA: PACKER3 Backup SCADA: PACKER4 Partner SCADA: PACKER 3 Primary and Backup Grouping
Logical Name: LGCL_ND2 Primary SCADA: PACKER3 Backup SCADA: PACKER4 Partner SCADA: PACKER 4
PLC
Backup SCADA Primary
SCADA Local Node Name: PACKER3 Local Logical Name: LGCL_ND2
Local Node Name: PACKER4 Local Logical Name: LGCL_ND2
Chapter 2. Failover and Redundancy 31 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
The following figure illustrates the second case.
Primary and Backup Grouping
Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2
Primary SCADA
Primary and Backup Grouping
Logical Name: LGCL_ND2 Primary SCADA: PACKER2 Backup SCADA: PACKER3
iClient
Backup SCADA iClient
Local Node Name: PACKER2 Local Logical Name: LGCL_ND1
Primary and Backup Grouping
Logical Name: LGCL_ND1 Local Node Name: PACKER1
Local Logical Name: LGCL_ND1
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: Primary and Backup Grouping
Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2
Backup SCADA Primary SCADA Backup SCADA Primary SCADA
Primary and Backup Grouping
Logical Name: LGCL_ND2 Primary SCADA: PACKER3 Backup SCADA: PACKER4
iClient 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: 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
Chapter 2. Failover and Redundancy 33 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:
Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2
Primary SCADA
Primary and Backup Grouping Remote SCADA: PACKER1
iClient
Backup SCADA 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
Figure 2-9: Invalid Version Configuration in a SCADA Server Pair
Configuring SCADA Server Failover
This section provides detailed information on configuring SCADA server failover.
IMPORTANT: iFIX does not synchronize the process databases on the SCADA
servers. You must ensure that both databases are identical. If you are using a System Extension Toolkit (STK), make sure the block type and index of each tag referenced on the iClient are identical on both SCADA servers.
Updating the HOSTS File for SCADA Server Failover
Primary and BackupGrouping
Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2
Primary SCADA (iFIX)
iClient
Backup SCADA (FIX version 6.x)
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
Chapter 2. Failover and Redundancy 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 PACKER1 198.212.170.6 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.
Configuring the SCADA Server Pair
Use the SCU to configure both SCADA servers in the pair.Enabling SCADA Server Failover
You can enable SCADA server failover on the iClient by entering a primary and backup grouping in the SCU. By default, SCADA server failover is not enabled.
Disabling SCADA Server Failover
You can disable SCADA server failover by deleting the primary and backup grouping in the SCU and clearing the partner SCADA in the SCADA Configuration dialog box of each SCADA server.
Synchronizing the Clocks on the SCADA Servers
To ensure that all iClients see the same data and alarms, synchronize the clocks on both the primary and backup SCADA servers. If the clocks are not synchronized and failover occurs, alarms received from the primary and backup nodes could have significantly different timestamps, even if both alarms were generated at the same instant. You can synchronize the SCADA clocks using the NET TIME command. Refer to the Windows Help system for more information.
Assigning Manual Failover Privileges
The Manual Failover feature allows you to manually initiate failover from the active SCADA server to the non-active SCADA server if security is enabled. Manual Failover privileges are assigned to users or groups who are allowed to manually initiate SCADA failover.
IMPORTANT: LAN redundancy is neither affected by the Manual Failover feature
nor controllable by iFIX security.
Refer to the Implementing Security manual for more information on configuring iFIX security.
Understanding LAN Redundancy
When LAN redundancy is enabled, an iFIX iClient establishes and maintains two network paths to the SCADA server. These managed connections are referred to as the active and non-active network paths. iFIX monitors the non-active network path by periodically sending messages to ensure that it remains available.
When the active network path becomes unavailable, iFIX automatically fails over to the non-active network path. You can add links to your pictures to monitor the availability of the non-active path. For more information, refer to the Working with the Network Status Server section.
Multiple LAN support is always enabled when you have more than one available network path. This means that if you have several available and enabled network paths and LAN redundancy is not enabled, iFIX attempts to connect to all available paths and keeps the first successful connection. Any other successful connections are closed.
However, LAN redundancy is not automatically enabled. You must enable this feature on all the nodes on which you want to use LAN redundancy. If LAN redundancy is enabled, iFIX establishes connections on each of the two paths and manages them both. LAN redundancy is only supported on iFIX iClients and SCADA servers, not on nodes running any version of FIX.
Chapter 2. Failover and Redundancy 37
LAN Failover Messages
You can use a Network Status Server tag or the messages to identify when a LAN failover has occurred. Refer to the Working with the Network Status Server section for more information.
iFIX sends a message whenever LAN failover occurs. This message never appears at the remote nodes. The following are examples of LAN failover messages for each protocol.
NetBIOS – If you are communicating from an iClient named STATION1 over LANA 3 to a SCADA node named PACKER1, and the session is lost and re-established over LANA 2, the message on the iClient is:
19:24:00.0 [STATION1] Switched network path to node PACKER1 from lana 3 to lana 2
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
Reading and Writing Data
After a LAN failover occurs, displays continue to update. However, the applications treat LAN failover as a session loss and send application messages to report this condition. You can suppress these application messages.
Historical Collect continues to collect data after session loss and re-establishment. However, you may see a gap in the data for the length of time that it took the LAN failover to occur.
Alarm Handling for LAN Redundancy
The Alarm Startup Queue Service is automatically enabled. This service ensures that alarms are not lost during session loss and reconnection.
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.
LAN Redundancy Configuration
The typical LAN redundancy configuration consists of two network adapter cards in an iClient and two in a SCADA server. This creates two independent network paths, as illustrated in the following figure.
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.
iClient SCADA
Node Network Path 1
Chapter 2. Failover and Redundancy 39 Figure 2-11: LAN Redundancy Configuration with an Excluded Card
Configuring LAN Redundancy
This section provides detailed information on configuring LAN redundancy.
Enabling LAN Redundancy
On each computer that uses LAN redundancy, use the SCU to enable both network paths and then to select the Enable LAN Redundancy check box.
Once you enable LAN redundancy in the SCU, you must also update the HOSTS file on each computer for LAN redundancy to work properly.
NOTE: If you are using LAN redundancy in addition to SCADA server failover, you
must enable LAN redundancy on the iClient and on each partner SCADA server.
Updating the HOSTS File for LAN Redundancy
NOTE: You only need to update the HOSTS file on your iClient and your SCADA
nodes if you are using TCP/IP.
SCADA Node iClient PLC I/O Driver Network Card
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 STATION1 198.421.103.6 PACKER1 1.1.1.2 STATION1-R 1.1.1.5 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.
Disabling LAN Redundancy
Use the SCU to disable LAN redundancy on both nodes.
Optimizing System Performance
To increase efficiency and reduce downtime during failover: • Disable unnecessary network paths
• Balance network timers and failover time
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).
Chapter 2. Failover and Redundancy 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.
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.
Enabling the Alarm Startup Queue Service
The Alarm Startup Queue Service is enabled by default when you enable networking and SCADA. This ensures that the iClient receives all alarms after a failover occurs. The Alarm Startup Queue Service provides the iClient with a list of alarms that occurred on the SCADA server prior to the time the iClient started. Refer to the Implementing Alarms and Messages manual for more information about this service.
Working with the Network Status Server
The Network Status Server (NSS) allows you to write application programs and create displays that monitor and control iFIX networking. This section explains how to use the Network Status Server on the iClient to:
• Monitor network status
• Manually initiate failover to the non-active SCADA • Temporarily disable automatic SCADA or LAN failover • Trigger an event on failover to the non-active SCADA or LAN
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.