1 Software RedundancyWithin WinCC, the software redundancy feature makes it possible to monitorcritical sections of a plant by using a redundant connection to several PLCs.Software redundancy considerably improves reliability when critical plantsections are to be monitored. For example, a redundant connection to twoPLCs means that one PLC takes over if the other PLC fails. Using softwareredundancy does not mean that you can only establish redundant connectionsto the PLCs configured. It is still possible to connect any PLC in a non-redundant layout. The switchover between redundant PLCs is performedautomatically in the event of a malfunction. However, a manual switchover isalso possible by specifying a tag (@ForceConnectionState).NoteEstablishing a redundant connection requires two PLCs.Setting up software redundancy:In order to use software redundancy under WinCC, the following settings are required in the Control Center:Step 1The computer properties must be set to the following values:Step 2Within the Alarm Logging system, the "short-term archive" must beactivated:If the "short-term archive" has not yet been activated, proceed as follows: In the navigation window, open the pop-up menu of the "Archives" object and select the "Add/Remove" menu item. Within the "Assign StorageParameters" dialog box, activate the "Short-Term Archive Active" check box.Step 3Within the Alarm Logging, the system messages must be retrieved; select the "Options" and "WinCC System Messages" menu items for thispurpose. In the "WinCC system messages" dialog box, activate the "Create New System Messages Only" option and press the "Create" button. This procedure retrieves the system messages associated with softwareredundancy.Step 4By means of the "DynWizEdit.exe" program, integrate the DynamicWizard for software redundancy into the WinCC system (GraphicsDesigner). This integration procedure requires the following steps: In the Windows Explorer, start the "C:\Siemens\WinCC\bin\DynWizEdit.exe"program. Select the "German" language in the toolbar. Retrieve the"C:\Siemens\WinCC\wscripts\wscripts.deu\SW_Redundanz.wnf" script by selecting the "Dynamic Wizard" and "Retrieve Wizard Script" menuitems. The compilation progress is shown in the output window. After the compilation has been completed successfully, the new entry "EstablishRedundant Connection" appears in the "Dynamic Wizard" window.Step 5Integrate the "SIMATIC S7 PROTOCOL SUITE" communications driver within the tag management.Step 6Within the required bus type (e.g. MPI), create a logical connection in the "SIMATIC S7 PROTOCOL SUITE" communications driver. Give anexpressive name to this connection.Step 7Open an existing picture in the Graphics Designer. Within the Dynamic-Wizard (in the "System Functions" tab), start the "Establish RedundantConnection" program by double-clicking.Step 8Press the "More" button in the welcome screen.Step 9Select the main connection in the "Set Options" dialog box. Then press the "More" button.Step 10Edit the settings for the back-up connection in the "Set Options" dialog box. Then press the "More" button. The "Automatic Switchover" check box must be active (default setting).The settings for the back-up connection (S7 network address) can be found in the "Connection" tab. Access this tab via the connection propertiesdialog box for the connection.Step 11The settings you specified are displayed in the final "Finished" dialog box.By pressing the "Finish" button, connection-specific internal tags arecreated in a tag group. This tag group is stored within the tag management under "SIMATIC S7 PROTOCOL SUITE" and the associated channelunit.NoteBy pressing the "Back"u button, you can go back one step and make any necessary changes.1.1 Connection-specific Internal TagsConnection control is accomplished by means of connection-specific internaltags. The connection-specific internal tags are created by a wizard. The nameof a connection-specific internal tag is composed of the name of the associatedconnection and an identifier. The connection name is provided with a '@'prefix to identify it as a system tag. Example: "@connectionname@identifier". All connection-specific internal tags are assembled to forma "@connection name" tag group.NoteOnly if the associated connection is ready for operation does the WinCC datamanager permit access to connection-specific tags. However, it is possible tohave read and write access to connection-specific internal tags independentlyof the connection status.The following system tags are available for SIMATIC S7 PROTOCOL SUITEsoftware redundancy:@ConnectionStateMeaning:connection statusType:DWORDAccess:readDefault:0 = "faulty"The current connection status can be determined by means of the'ConnectionState' tag.0 = connection faulty1 = connection ready for operation@ConnectionErrorMeaning:error causeType:DWORDAccess:readDefault:0 = "no error"The tag contains an error cause describing the reason why theconnection was interrupted. Default = 0, i.e. connection not yetestablished or without error. When establishing a connection, the tag isloaded with 0 (no error) again. The error code is interpreted in achannel-specific manner. The S7 channel stores the S7 DOS error codehere.0 = no error<> 0 = S7 DOS error code@ConnectionErrorStringMeaning:error cause as stringType:TEXT8 [128]Access:readDefault:"" = "no error"The tag contains the error cause in the format of a string describing the reason why the connection was interrupted. The string is put out in the language currently selected. Default = "", i.e. connection not yetestablished or without error. The following texts are entered in the S7channel in English, without regard to the selected language."No Error"= No error"Error hhhh"= hhhh error occurred(hhhh = S7 DOS hexadecimal error code)@ConnectionErrorCountMeaning:communication error counterType:DWORDAccess:readDefault:0 = "no error"The value of this tag is incremented by 1 each time a connection isinterrupted.In the event of an overflow the count starts again with 0.@ConnectionEstablishModeMeaning:connect modeType:DWORDAccess:writeDefault: 1 = "automatic"This tag enables you to specify a connection to be establishedautomatically. The S7 channel then attempts to reestablish a failedconnection at intervals of approx. 4 seconds. If a value = 0 is enteredin this tag, the connection will not be reestablished automatically atintervals of 4 seconds, but remains interrupted.Writing the @ConnectionEstablishMode tag takes the following effect:0 = manual connecting mode-> deactivate automatic connecting<> 0 = automatic connect mode-> activate automatic connecting@ForceConnectionStateMeaning:preferred connection statusType:DOWRDAccess:writeDefault: 1 = "established"This tag can be used to notify the channel of the preferred connection status. Usually this tag has the value 1, i.e. the channel attempts toestablish the connection (at regular intervals of approx. 4 seconds, ifapplicable). If the value 0 is written to this tag, the channel interrupts the connection.Writing to this tag takes the following effect:0 = preferred connection status: connection interrupted-> if connection established-> cause connection to be interrupted1 = preferred connection status: connection established-> if connection interrupted-> cause connection to be established@ForceConnectionAdressMeaning:selecting the connection addressType:DWORDAccess:writeDefault:0 = "configured"This tag specifies which of the connection addresses is to be used for establishing the connection.Writing to this tag takes the following effect:0 = connection via configured connection parameters-> if @ForceConnectionAddress previously 1-> cause connection to be interrupted1 = connection via alternative connection parameters-> if @ForceConnectionAddress previously 0-> cause connection to be interrupted->If connect mode is set to "automatic", the connection isautomatically established with the corresponding address.@AlternateConnectionAdressMeaning:Alternative connection addressType:TEXT8 [255]Access:writeDefault:"..." = "configured"The alternative connection address string can be entered in this tag.This is the same string as the one which is displayed as connectionparameter in the WinCC Control Center. The string is channel-specific. On system start-up (runtime), the configured address isentered here as default for the S7 channel. If an address has not beenconfigured yet, the text "Illegal Address" is entered for the S7 channel.Example of an address specified for an S7 PLC with station address 3via MPI: “MPI,3 0,,0,0,02“Writing to this tag takes the following effect:->If the address is changed by the write process, the "Connection via alternative connection parameters" setting causes the connection to be interrupted.->If the "automatic" connect mode has been set, the connection isestablished automatically, using the address just previously written.1-112 Master-Reserve Change-over on the S7When the Dynamics Wizard has finished setting up the redundant-backup link, you canextend the script by adding the …Master-Reserve Change-over“ option.To do so, you open the script under …Global Script -> Actions -> Global Actions“. If yourselected connection is called …CPU_3“ as in the illustrations above, open @CPU_3.pas.Control Center- (Projekt.MCP)ProjektVariablenhaushaltEditorenGlobal ScriptAktionenGlobale Aktionen CPU_3.pas CPU_4.pas CPU_5.pasHaving opened it, you then insert the sequence printed in bold type and highlighted ingray. Here too it is assumed that your connection is called …CPU_3“. If you have used adifferent name, replace each occurrence of …CPU_3“ with the name you have used. The bitvariable …SWR.Standby“ is the bit …Reserve“ from the status word (DW 9.1) from theinstance DB of the call for FB101 …SWR_ZYK“. If you have used a different name forthis, replace the name accordingly............{MSRTStopMsgService ( ServiceID, &Error );}If ( GetTagDWordWait( "@CPU_3@ConnectionState" ) == 0 ){SetTagDWord( "@CPU_3@ForceConnectionState", 1 );}else{if ( GetTagBitWait( "SWR.Standby" ) == TRUE ){SetTagDWord( "@CPU_3@ForceConnectionState", 0 );}}return 1;}}2-12Note: you can add the …Standby bit“ to the structure for the redundant software backup screen block (see section 7.2.2 in the user documentation for the redundant-backup software blocks) as follows:Name Data type Offset BitWORD Status WORD00BIT MasterSwitch BIT20BIT RedTurnOn BIT29BIT RedTurnOff BIT28BIT Standby BIT092-13。