P-CIM Redundancy Setup: User Guide
P-CIM Redundancy Setup: User Guide
P-CIM Redundancy Setup: User Guide
Contents
Overview........................................................................................................................ 1 Requirements ............................................................................................................... 3 Associating Alarm and History File Directories ...........................................................3 Defining Redundancy Parameters .............................................................................. 4 Defining Primary/Secondary Server Settings ........................................................6 Defining Secondary server settings............................................................................. 8 Replication tab......................................................................................................... 9 Redundancy Agent Icons ............................................................................................11 Redundancy Taskbar Options.................................................................................... 12 Client Services in a Redundant System ....................................................................14 Client Setup............................................................................................................ 14 Sending Messages ............................................................................................... 14 Updating Global Messages ................................................................................... 15 History Trends ............................................................................................................. 16 PingRetry ................................................................................................................ 16 Debugging, Resolving Conflicting IP Addresses ................................................. 16 Appendix 1 Removing Auto Logon Settings........................................................... 18 Appendix 2 - Troubleshooting and Maintenance...................................................... 19 Global Messages ...................................................................................................21 PingRetry ................................................................................................................21
Overview
The P-CIM Redundancy module is used in a P-CIM network to define a backup (secondary) server that automatically runs when the P-CIM (primary) server fails. In a standard P-CIM client/server network, the P-CIM server is designated as the master node. Its purpose is to: Store the alarm and historical data generated by the PLCs connected to it, and to then distribute this information to clients on the network Collect and store data generated by the PLCs connected to the clients
Secondary server
P-CIM Secondary IP
P-CIM
P-CIM
P-CIM client
P-CIM client
Clients on the P-CIM network recognize the server by its node number that has a virtual IP address configured. In a redundant network, both the primary and secondary servers must have a unique IP address. When the primary server fails, the secondary server does the following: Takes control of the virtual IP Acts as if it were the primary server, that is, performs all the primary servers functions
Since clients on the redundant network must believe that there is only one server in use, P-CIM Redundancy faces two main problems: Each computer is a separate node with a unique IP address Clients can be configured to send data to one address only
The solution is to create a third (assumable) virtual IP address shared by both servers. When the primary server is operational, it assumes this virtual IP address. During failure, the primary server releases the virtual IP address, whereby the secondary server immediately assumes it. Since only one station is functional at a given time, both stations can now be designated with an identical node number. Clients are all configured to only send data to this virtual IP address by referencing the shared node number.
Afcon Software and Electronics Ltd New data is always sent to the active server regardless of which computer is currently active. Immediately after the primary server becomes operational, it first replicates the data from the secondary server. It then assumes the virtual IP address and reclaims its status as the active server. In a redundant network, only one instance of a P-CIM project can run at the same time. Therefore, when the primary server is active, P-CIM is inactive on the secondary server. When the primary server fails, the Redundancy module automatically starts up P-CIM on the redundant (secondary) server. After the primary server is restored, and reassumes the virtual IP address, the secondary server automatically shuts down P-CIM.
Requirements
Operating systems: Windows 2000,Windows XP Profesional or Windows 2003 Server. For both the Primary and Secondary server stations: P-CIM SEK version 7.50 and up. Security Enabled Key (SEK) version 7.50 When using Progate an Unlimited I/O Prograte SEK is required for both the Primary and Secondary server stations.
The Redundancy Editor opens displaying the General tab. This dialog box has the following fields:
This field defines the number of minutes that connection is retried after Windows starts and communication fails. Connection will be attempted every xxx minutes until it is eventually made. This field defines whether the Redundancy module (PFWREDUN.exe) automatically runs when Windows is restarted.
When checked defines that redundancy activity is recorded in the Redundancy Log. There are two redundancy logs, one for the primary server, and another for the secondary server. A new log file is created daily. Both logs are saved in the P-CIM project Alarms folder as: YYMMDD_Redun.Log. For example: the log file of 1th June 2005 will be 050601_Redun.Log
Delay on startup
Check to enable. Type in the time period for delaying the redundancy runtime module during Windows startup. A new file was added to the P-CIM program folder, named PfwDelay.exe that delays the redundancy module. Copy the file to the Windows Startup folder. This section defines the criteria to be met for the Primary server to release control. Release control when one of the selected P-CIM servers is closed List of P-CIM servers Wait for response until timeout Number of wait attempts Release control when physical memory is below limit Disable P-CIM when the disk space is below limit Disk space limit When checked the redundancy agent scans all the selected servers in the servers list to check which servers are alive. If a server does not answer, the virtual IP is released. This section holds a list of all available servers in the P-CIM project. Indicating the number of seconds waited for the server to return an answer before timeout is declared. Indicating the number of communication attempts to the server before timeout is declared. Indicating the minimal physical RAM memory level required before releasing control of the server. Indicating the minimal physical memory of the hard disk before P-CIM is shutdown. Indicating the minimal physical memory of the hard disk before P-CIM is shutdown.
Defining the General tab 1. In the IP Address field enter the virtual IP. 2. Optional: check the following fields: Auto start when Windows starts Log enabled
3. Relevant server from the List of P-CIM servers 4. We suggest leaving the remaining fields in the default settings.
Primary scan time Before primary resumes control wait Wait for Secondary to complete loading __ Scans Replicate data every Auto windows logon Work area
Defining Primary server settings When defining Primary server settings the following can be configured: 1. In the Primary Server IP Address field, either type in the relevant IP number or click the Browse button and search for it. 2. Check the Auto Windows Logon checkbox to enable the Logon fields and then define the Login Username and Password. 3. In the P-CIM (virtual address) fields, define the IP address and subnet mask. We recommend leaving the other settings as default.
The fields in this tab are described in the Primary tab on page 6. 2. In the Server IP Address field either type in the relevant number or click the Browse button and search for it. 3. Check the Auto Windows Logon checkbox to enable the Logon fields and then define the Login Username and Password. 4. In the P-CIM (virtual address) fields, define the IP address and subnet mask. We recommend leaving the other settings as default.
Replication tab
In the Redundancy Editor click the Replication tab to define which information is backed up to the primary server and to the secondary server if it is active.
When defining the Replicate Project option, if you have files that are not saved in the P-CIM project folder, select the file name and then its path. For example, for history files select *.HIS and then click the Browse button to locate the relevant path. P-CIM path to replicate Replicate files of type Secondary path Add/update path Indicating the folder from which data is replicated into/from. To replicate files that are out of the P-CIM folder, scroll the list and select Other Folder. Indicating the types of files that are replicated. Indicating the folder from which data is replicated into/from. This field has a Browse button which can be used to locate the relevant folder. This button when clicked enters the replication parameters into the work area. Note: Parameters that are not displayed in the work area will not be replicated. Remove path List Enable HST Transactions Replication To Work area This button when clicked removes the replication parameters from the work area. This section holds a list of all available servers in the P-CIM project. This option enables HST files replication. Select the location to copy the replicated files to. This field displays the updated actions of the Redundancy save action.
Defining the Replication tab 1. In the Project Share Name field scroll or type in the name of the relevant folder. 2. Optional: check the Replicate Complete Project checkbox and then define the individual files to backup. 3. Click the Save button and then click the Exit button.
10
Positioning the mouse over the Redundancy icon in the taskbar displays a tool tip indicating that the server that is currently running.
11
Field Close
Description Closes the redundancy line on this computer (see page 13). Note: The redundancy line can only be closed when the virtual IP address is detached.
Show Status Help Enable auto start when Windows opens P-CIM Enable Edit Configurations Release Control
When selected displays the present status of the redundancy server. When selected displays P-CIM Help. When checked automatically runs the Redundancy module when Windows starts. When checked this computer (the current computer) can take control. When selected jumps to the Redundancy Editor. When selected releases this servers virtual IP address and shuts down P-CIM. This option is only displayed on the currently active server.
Manually shutting down the active server The active server can be shutdown manually by either Right clicking the Redundancy icon in the taskbar and selecting Detach Virtual IP. Right clicking the Redundancy icon in the taskbar and checking P-CIM enable.
After the server releases the Virtual IP address, P-CIM automatically shuts down. However, if the Enabled P-CIM field is not checked the server cannot take control.
12
Afcon Software and Electronics Ltd Viewing server status The Status window displays the current status of the redundancy servers. To view this dialog box, right click on the Redundancy icon in the taskbar and select Show Status.
Current status can be either: Active server Passive server, in which case P-CIM enabled or P-CIM displayed is also displayed
Checking IP settings The Settings window displays the identity of the server that is currently active. Right click on the Redundancy icon in the taskbar and select Settings.
If this is the primary server, the name of the local network card and IP address followed by the virtual IP address are displayed. An asterisk before the IP address indicates that this server is active and is using the virtual IP address When this computer is the secondary server, the virtual IP address is followed by the fixed IP address of the primary server
Closing redundancy on a server 1. Check that this server is not currently active. If it is, manually shut it down. 2. Right click on the Redundancy icon 3. Select the Close option. in the taskbar.
13
Sending Messages
Redundancy can be configured to send messages to clients relating to the status of the servers and the replication line. To do so, four $GlobalMessage variables must be reserved in the redundant system for specific messages. By default, the PFWREDUN.INI is set for the last four $GlobalMessage variables in the default range: $GlobalMessage29, indicates whether the primary server is active or not $GlobalMessage30, indicates whether the secondary server is active or not $GlobalMessage31, indicates whether replication communication is connected or not $GlobalMessage32, indicating if the secondary servers is available or not
Designating $GlobalMessage variables Any four $GlobalMessage variables can be designated. To do this, on each server: 1. In the INI File Editor navigate to: File: PfwRedun.INI Section: [StatusNotification]. The token values for primary, secondary, and replicator represent the $GlobalMessage variables that report their respective status. 2. Change the value to the required $GlobalMessage number in the range configured in: File: Pcim.IN Section: [PcimDbsr] Token: MaxGlobalMessage: Maximum 99 The instructions in this section are based on the default configuration. $GlobalMessage29: 0 = Not active; 1=Active $GlobalMessage30: 0 = Not active; 1=Active $GlobalMessage31: 0 = Connected; 1= Not connected $GlobalMessage32: 1 = Available; 0= Unavailable
Sending messages to a client station 1. Create digital value blocks that target the specific $GlobalMessage variables. 2. Configure the required Text = 0 and Text = 1 properties. 1. Create a display on the client station with output text fields. 2. Update the output text fields to reference the relevant $GlobalMessage variable. You can use these variables to send status messages to any other media, such as email.
14
If a client station is not online when a message is sent, it is not updated. When the station goes online, the holding variables may have incorrect values. Therefore, the values for the $GMSG variables must be set to the current $GlobalMessage values at startup. Updating global messages Configure a startup action on each client station using the following command in the action line: Set |!$GMSG29 7:1:|!$GlobalMessage29; Set |!$GMSG30 7:1:|!$GlobalMessage30; Set |!$GMSG31 7:1:|!$GlobalMessage31 In the above example, the Network port is 7,the shared node number is 1 and the $GlobalMessage variables are set to 29, 30, and 31. Only use the values that apply to your project in an actual application.
15
History Trends
P-CIM Redundancy continuously acquires data at minimal data loss. During failure and recovery between the servers, if a client station is currently running a historical trend, the down time of data flow can cause the trend to stop. When the Operator Workstation display has input/output text fields, their values are not automatically refreshed which can prevent the trend from restarting. Either: Open the File menu (Alt+F) and select Revert to Saved Do not use output text fields in the Trend display. Create a separate display with the required output text fields
PingRetry
The secondary server continuously polls (pings) the primary server to check that it is active. By default, it does not assume the virtual IP address after one failed ping only. It repeats the ping for a set number of retries. If the full number of retries fails, it then assumes the virtual IP address and becomes the active server. The value of the ping retry count is saved in: File: PFWREDUN.INI Token: PingRetry Default: PingRetry= 4 To modify this setting access the PFWREDUN.INI file and change its value. It is strongly recommended to maintain a value of >1 for PingRetry.
3. Set the value to 2. 4. Select Save and then Close. If the Redundancy system functions normally, you can assume that the conflict was spontaneous. Proceed to step Access the PFWREDUN.INI file.7. When the conflict recurs, the following message indicating the time and date of the subsequent failed ping opens:
16
5. Open an MSDos window and retry the ping manually. If the ping succeeds, it could be the software configuration in the secondary server. When the ping fails, there may be hardware or software problems in either server.
6. Try to solve the problem using the information in the Troubleshooting section or contact Technical Support at: support@afcon-inc.com 7. Access the PFWREDUN.INI file. 8. Reset the value of Debug to 0 (or entirely delete the token Debug=2).
Even under normal conditions, the secondary server does not respond to one failed ping. Therefore, retry the ping for the full count (default: 4) to verify that the secondary server receives an accurate failure report.
17
3. Change the Value Data to 0. 4. Click OK to save the new settings and to exit this dialog box. Removing the auto start PFWredun.exe 1. Select the following: Start/Run/Regedit to open the Registry Editor. 2. Select the following: HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENT VERSION\RUN. 3. Delete the following: prwredun.exe. 4. Delete the following: red_rest.exe.
18
No IP addresses in PFWREDUN.INI. Enter the IP addresses and restart the program Not enough memory available Cannot create timer for polling
The fixed IP address for this computer is absent in the PFWREDUN.INI file.
Adapter card listed in PFWREDUN.INI file does not match the one in the computer. This usually indicates that an adapter card was replaced. Miscellaneous crucial settings are absent in the PFWREDUN.INI file.
19
There is no communication between the servers on the replication line. Replication cannot proceed.
Connection on replication line reset Type of computer (Primary or Secondary) has not been assigned
Communication between the servers is restored. Replication proceeds normally. The designation for this computer is absent in the PFWREDUN.INI file.
This computer is not equipped with the proper SEK or Registration key. Contact your P-CIM vendor This computer is running a P-CIM version older than 6.60.
P-CIM Redundancy can run only on computers equipped with the correct SEK (Software Enable Key). P-CIM Redundancy requires P-CIM revision 6.60 or higher.
Verify that you have the correct P-CIM version running on all computers.
20
Global Messages
Message $GlobalMessage29
$GlobalMessage30
$GlobalMessage31
0 replication line OK 1 replication line not OK Replication is through the primary server only.
$GlobalMessage32
PingRetry
The secondary server continuously polls (pings) the primary checking that it is active. By default, the secondary server does not assume the virtual IP after failed pings. It repeats the ping for a set count of retries. If the full count of retries fails, it then assumes the virtual IP address and becomes the active server. The ping retry count value is saved in the PFWREDUN.INI file under the token PingRetry. Default: PingRetry= 4. To change this setting, access the PFWREDUN.INI file and update the value. We strongly recommend that PingRetry value = >1.
21