software redundant

13
 03.98 Software Redundancy  1-1 1 Software Redundancy Within WinCC, the software redundancy feature makes it possible to monitor critical sections of a plant by using a redundant connection to several PLCs. PL C 1 PLC n a g a n a g e m e n t Tag 1 Tag 2 Tag n . . T 1 T 2 T 3 Redundant PLC Section Redundant Connection Redundant  T a g s Logical Connections Non-redundant Connection to PLC 1 Non-redunda nt Connection to PLC 2 Software redundancy considerably improves reliability when critical plant sections are to be monitored. For example, a redundant connection to two PLCs means that one PLC takes over if the other PLC fails. Using software redundancy does not mean that you can only establish redundant connections to the PLCs configured. It is still possible to connect any PLC in a non- redundant layout. The switchover between redundant PLCs is performed automatically in the event of a malfunction. However, a manual switchover is also possible by specifying a tag (@ForceConnectionState). Note Establishing a redundant connection requires two PLCs.

Upload: arunagiriarun

Post on 04-Nov-2015

277 views

Category:

Documents


1 download

DESCRIPTION

Software Redundancy Manual

TRANSCRIPT

  • 03.98 Software Redundancy

    1-1

    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.

    PLC 1 PLC 2

    WinCC (Tag Management)

    Tag 1Tag 2

    Tag n

    .

    .

    T 1 T 2 T 3

    RedundantPLC Section

    RedundantConnection

    RedundantTags

    LogicalConnections

    Non-redundantConnection to PLC 1

    Non-redundantConnection to PLC 2

    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).

    Note

    Establishing a redundant connection requires two PLCs.

  • Software Redundancy 03.98

    1-2

    Setting up software redundancy:

    In order to use software redundancy under WinCC, the following settings arerequired 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" objectand select the "Add/Remove" menu item. Within the "Assign StorageParameters" dialog box, activate the "Short-Term Archive Active" checkbox.

  • 03.98 Software Redundancy

    1-3

    Step 3Within the Alarm Logging, the system messages must be retrieved; selectthe "Options" and "WinCC System Messages" menu items for thispurpose. In the "WinCC system messages" dialog box, activate the "CreateNew System Messages Only" option and press the "Create" button. Thisprocedure retrieves the system messages associated with softwareredundancy.

  • Software Redundancy 03.98

    1-4

    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 theWindows 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 byselecting the "Dynamic Wizard" and "Retrieve Wizard Script" menuitems. The compilation progress is shown in the output window. After thecompilation has been completed successfully, the new entry "EstablishRedundant Connection" appears in the "Dynamic Wizard" window.

    Step 5Integrate the "SIMATIC S7 PROTOCOL SUITE" communications driverwithin 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.

  • 03.98 Software Redundancy

    1-5

    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.

  • Software Redundancy 03.98

    1-6

    Step 10Edit the settings for the back-up connection in the "Set Options" dialogbox. Then press the "More" button. The "Automatic Switchover" checkbox must be active (default setting).

    The settings for the back-up connection (S7 network address) can be foundin the "Connection" tab. Access this tab via the connection propertiesdialog box for the connection.

  • 03.98 Software Redundancy

    1-7

    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 managementunder "SIMATIC S7 PROTOCOL SUITE" and the associated channelunit.

    Note

    By pressing the "Back"u button, you can go back one step and make anynecessary changes.

  • Software Redundancy 03.98

    1-8

    1.1 Connection-specific Internal Tags

    Connection 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.

    Note

    Only 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

  • 03.98 Software Redundancy

    1-9

    @ConnectionErrorStringMeaning: error cause as stringType: TEXT8 [128]Access: readDefault: "" = "no error"

    The tag contains the error cause in the format of a string describing thereason why the connection was interrupted. The string is put out in thelanguage 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

  • Software Redundancy 03.98

    1-10

    @ForceConnectionStateMeaning: preferred connection statusType: DOWRDAccess: writeDefault: 1 = "established"

    This tag can be used to notify the channel of the preferred connectionstatus. 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 interruptsthe connection.

    Writing to this tag takes the following effect:

    0 = preferred connection status: connection interrupted-> if connection established-> cause connection to be interrupted

    1 = 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 forestablishing the connection.

    Writing to this tag takes the following effect:

    0 = connection via configured connection parameters-> if @ForceConnectionAddress previously 1-> cause connection to be interrupted

    1 = 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.

  • 03.98 Software Redundancy

    1-11

    @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 viaalternative connection parameters" setting causes the connection to beinterrupted.-> If the "automatic" connect mode has been set, the connection isestablished automatically, using the address just previously written.

  • Software Redundancy 03.98

    2-12

    2 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)ProjektVariablenhaushaltEditoren

    Global ScriptAktionen

    Globale Aktionen

    CPU_3.pasCPU_4.pasCPU_5.pas

    Having 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;}}

  • 03.98 Software Redundancy

    2-13

    Note: you can add the Standby bit to the structure for the redundant software backupscreen block (see section 7.2.2 in the user documentation for the redundant-backupsoftware blocks) as follows:

    Name Data type Offset BitWORD Status WORD 0 0BIT MasterSwitch BIT 2 0BIT RedTurnOn BIT 2 9BIT RedTurnOff BIT 2 8BIT Standby BIT 0 9