Professional Documents
Culture Documents
98
Software Redundancy
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.
WinCC (Tag Management)
Tag 1
Tag
2
.
Redundant
Tags
Tag n
T1
Non-redundant
Connection to PLC 1
T2
T3
Redundant
Connection
Logical
Connections
Non-redundant
Connection to PLC 2
PLC 1
PLC 2
Redundant
PLC Section
1-1
Software Redundancy
03.98
Step 2
Within the Alarm Logging system, the "short-term archive" must be
activated:
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 Storage
Parameters" dialog box, activate the "Short-Term Archive Active" check
box.
1-2
03.98
Software Redundancy
Step 3
Within the Alarm Logging, the system messages must be retrieved; select
the "Options" and "WinCC System Messages" menu items for this
purpose. 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 software
redundancy.
1-3
Software Redundancy
03.98
Step 4
By means of the "DynWizEdit.exe" program, integrate the Dynamic
Wizard for software redundancy into the WinCC system (Graphics
Designer). 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" menu
items. The compilation progress is shown in the output window. After the
compilation has been completed successfully, the new entry "Establish
Redundant Connection" appears in the "Dynamic Wizard" window.
Step 5
Integrate the "SIMATIC S7 PROTOCOL SUITE" communications driver
within the tag management.
Step 6
Within the required bus type (e.g. MPI), create a logical connection in the
"SIMATIC S7 PROTOCOL SUITE" communications driver. Give an
expressive name to this connection.
Step 7
Open an existing picture in the Graphics Designer. Within the DynamicWizard (in the "System Functions" tab), start the "Establish Redundant
Connection" program by double-clicking.
1-4
03.98
Software Redundancy
Step 8
Press the "More" button in the welcome screen.
Step 9
Select the main connection in the "Set Options" dialog box. Then press the
"More" button.
1-5
Software Redundancy
03.98
Step 10
Edit 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 properties
dialog box for the connection.
1-6
03.98
Software Redundancy
Step 11
The settings you specified are displayed in the final "Finished" dialog box.
By pressing the "Finish" button, connection-specific internal tags are
created in a tag group. This tag group is stored within the tag management
under "SIMATIC S7 PROTOCOL SUITE" and the associated channel
unit.
Note
By pressing the "Back"u button, you can go back one step and make any
necessary changes.
1-7
Software Redundancy
03.98
The following system tags are available for SIMATIC S7PROTOCOL SUITE
software redundancy:
@ConnectionState
Meaning:
Type:
Access:
Default:
connection status
DWORD
read
0 = "faulty"
error cause
DWORD
read
0 = "no error"
The tag contains an error cause describing the reason why the
connection was interrupted. Default = 0, i.e. connection not yet
established or without error. When establishing a connection, the tag is
loaded with 0 (no error) again. The error code is interpreted in a
channel-specific manner. The S7 channel stores the S7 DOS error code
here.
0 = no error
<> 0 = S7 DOS error code
1-8
03.98
Software Redundancy
@ConnectionErrorString
Meaning:
Type:
Access:
Default:
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 yet
established or without error. The following texts are entered in the S7
channel in English, without regard to the selected language.
"No Error"
"Error hhhh"
@ConnectionErrorCount
Meaning:
Type:
Access:
Default:
= No error
= hhhh error occurred
(hhhh = S7 DOS hexadecimal error code)
1-9
Software Redundancy
03.98
@ForceConnectionState
Meaning: preferred connection status
Type:
DOWRD
Access:
write
Default: 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 to
establish the connection (at regular intervals of approx. 4 seconds, if
applicable). 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 interrupted
1 = preferred connection status: connection established
-> if connection interrupted
-> cause connection to be established
@ForceConnectionAdress
Meaning: selecting the connection address
Type:
DWORD
Access:
write
Default: 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 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 is
automatically established with the corresponding address.
1-10
03.98
Software Redundancy
@AlternateConnectionAdress
Meaning:
Alternative connection address
Type:
TEXT8 [255]
Access:
write
Default:
"..." = "configured"
The alternative connection address string can be entered in this tag.
This is the same string as the one which is displayed as connection
parameter in the WinCC Control Center. The string is channelspecific. On system start-up (runtime), the configured address is
entered here as default for the S7 channel. If an address has not been
configured yet, the text "Illegal Address" is entered for the S7 channel.
Example of an address specified for an S7 PLC with station address 3
via 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 is
established automatically, using the address just previously written.
1-11
Software Redundancy
03.98
CPU_3.pas
CPU_4.pas
CPU_5.pas
Having opened it, you then insert the sequence printed in bold type and highlighted in
gray. Here too it is assumed that your connection is called CPU_3. If you have used a
different name, replace each occurrence of CPU_3 with the name you have used. The bit
variable SWR.Standby is the bit Reserve from the status word (DW 9.1) from the
instance DB of the call for FB101 SWR_ZYK. If you have used a different name for
this, 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-12
03.98
Software Redundancy
Note: 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
WORD Status
BIT MasterSwitch
BIT RedTurnOn
BIT RedTurnOff
BIT Standby
Data type
WORD
BIT
BIT
BIT
BIT
Offset
0
2
2
2
0
Bit
0
0
9
8
9
2-13