Você está na página 1de 44

Automation and Drives

PROFIBUS DP diagnostics

PROFIBUS DP

PROFIBUS diagnostics (PC RunTime)

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 1 03/2007
Siemens AG 2007 - Subject to change without prior notice

Contents Page
PROFIBUS DP diagnostics ................................................................................................................ 2
Fault analysis options with STEP7 .................................................................................................... 3
Reactions of bus fault LEDs (DP master) ......................................................................................... 4
Reactions of bus fault LEDs (DP slave) ............................................................................................. 5
Fault analysis with OB86 .................................................................................................................... 6
OB86 : Evaluating the cause of the call and responding ................................................................... 7
Exercise 1: Visualize a slave failure (OB 86) ................................................................................... 8
Exercise 2: Determine the slave downtime ...................................................................................... 9
Exercise 3: "Diagnose hardware online" ........................................................................................... 10
Customer support (download area) ................................................................................................... 11
Exercise 4: Integrate WinCC flexible "PC RT" .................................................................................. 12
Exercise 5: Assign the Runtime interface parameters ..................................................................... 13
Exercise 6: Assign the connection parameters .............................................................................. 14
Exercise 7: Integrate FB125 into the S7 program ............................................................................ 15
Exercise 8: Diagnostic test WinCC flexible RT ................................................................................. 16
Exercise 9: Failure history of DP slaves .......................................................................................... 17
"Report system error" function ...................................................................................................... 18
Operating principle: Alarm_S/SQ ..................................................................................................... 19
Configure the "Report system error" function (1) ............................................................................. 20
Configure the "Report system error" function (2) ............................................................................. 21
OB configuration + CPU response in STOP state ........................................................................... 22
Messages + User block tab .............................................................................................................. 23
Diagnostic support + User block ......................................................................................................... 24
Result check using "CPU messages" ................................................................................................ 25

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 1 PROFIBUS Diagnostics
Automation and Drives

PROFIBUS DP diagnostics

PROFIBUS DP

PROFIBUS diagnostics (PC RunTime)

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 2 03/2007
Siemens AG 2007 - Subject to change without prior notice

Contents Page
Exercise 10: Configure "Report system error" .................................................................................. 26
Enable Alarm_S messaging (WinCC flexible) ............................................................................... 27
Exercise 11: Display Alarm_S messages ....................................................................................... 28
Deactivate and activate slaves with SFC12 ....................................................................................... 29
Sample program for slave deactivation ............................................................................................ 30
Exercise 12: Activate and deactivate slaves ...................................................................................... 31
If you want to know more .................................................................................................................. 32
Diagnosis of a specific DP slave with SFC13 .................................................................................. 33
S7 program with an SFC13 call in OB1 ............................................................................................ 34
Parameters of the SFC13 (standard diagnostics) ............................................................................. 35
Diagnostics data format ................................................................................................................... 36
Exercise 13: Slave analysis with SFC13 .......................................................................................... 37
SFC11: "Freezing" of DP input signals ....................................................................................... 38
Group assignment for SYNC and FREEZE ....................................................................................... 39
S7 program for freezing DP input signals ......................................................................................... 40
Evaluation with active FREEZE mode ............................................................................................. 41
Synchronization, i.e. output and freezing of digital outputs on DP slaves ....................................... 42
S7 program for synchronizing DP output signals ............................................................................. 43
Copying the original outputs to the ET200S (SYNC group) .............................................................. 44

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 2 PROFIBUS Diagnostics
Automation and Drives

Fault analysis options with STEP7

Diagnostic features

Visual inspection of the LEDs STEP 7 software User program

LEDs on master LEDs on slave

Read out Diagnose Start inf. Call Diagnosis


diagnostics buffer hardware error OB SFC 13 FB 125

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 3 03/2007
Siemens AG 2007 - Subject to change without prior notice

LEDs There are LEDs on the slaves for troubleshooting which either light up or flash in
the event of a fault. The meaning of the individual LEDs is explained in the
manual for the corresponding slave.
On the CPU with an integral DP interface, only bus faults are signaled with LED
"BUSF".

STEP 7 software In the event of a fault, read out the diagnostic buffer or call up the tool "Diagnose
hardware".

Program If a slave fails and restarts, the error OB 86 is output. The start information then
contains the diagnostic address of the faulty slave.
By calling the system function SFC 13 you can view additional diagnostic data for
the slave as defined by standard EN 50 170.
Detailed information down to the individual channel is supplied by the standard
block FB 125. This is offered on the Internet as a diagnostic package together
with standard HMI screens.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 3 PROFIBUS Diagnostics
Automation and Drives

Reactions of bus fault LEDs (DP master)

Possible faults
Scenario 1: Bus fault (hardware fault)
Scenario 2: DP interface fault
Scenario 3: Different transmission rates in multiple DP master mode
Scenario 4: If the DP slave / master interface is active:
Short-circuit on the bus.
Scenario 5: With passive DP slave interface: Transmission rate search,
i.e. there are currently no other active nodes on the bus
(a master, for example) Bus fault LEDs

Response of the CPU, possible remedies


Call of OB 86 (when CPU is in RUN mode). CPU switches
to STOP if OB 86 is not loaded.

Possible remedies
Check the bus cable for short circuit or breaks.
Evaluate the diagnostics. Create a new configuration
or edit the existing one.

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 4 03/2007
Siemens AG 2007 - Subject to change without prior notice

BUSF LED flashes on the DP master CPU

Faults - Scenario 1: Failure of a connected station


- Scenario 2: At least one of the assigned slaves cannot be accessed
- Scenario 3: Configuring error

Response Call OB 86 (when CPU is in RUN state). CPU switches to STOP if OB 86 is not
loaded.
Remedy
- Verify that the bus cable is connected to the CPU and that the bus is not
interrupted.
- Wait until the CPU has booted. If the LED does not stop flashing, check the DP
slaves or evaluate the diagnostic data for the DP slaves.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 4 PROFIBUS Diagnostics
Automation and Drives

Reactions of bus fault LEDs (DP slave)

LED states SF = off + BF = off + ON = off


Meaning No power is connected to the interface module or
interface module hardware is defective.
Remedy Switch on the 24 V DC supply voltage on the
interface module.
Group fault (SF)
LED states SF = on + BF = on + ON = on
Meaning Power is connected to the interface module.
Bus fault LEDs
LED states SF flashing + BF flashing + ON = on
Meaning Interface is not configured or is incorrectly configured -
No data are being exchanged between the DP master
and the interface module.
Causes: PROFIBUS address is wrong, configuration error
or parameter error
Remedy Check the interface module.
Check the configuration and parameters.
Check the PROFIBUS address.

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 5 03/2007
Siemens AG 2007 - Subject to change without prior notice

Other LED status combinations:

Status 1 SF flashing + BF on + ON on means the following:


- Baud rate search, illegal PROFIBUS address or bottom DIL-Switch
(PROFIBUS address) is not set to OFF.
- A response monitoring timeout has occurred or
- Bus communication to the interface module via PROFIBUS DP has been
interrupted
Remedy: Set a valid PROFIBUS address (1 to
125) on the interface module, or check the bus setup:
- Verify that the bus connector is properly inserted.
- Check for breaks in the bus cable to the DP master.
- Switch the 24 V DC supply voltage to the interface module off and on again.
Status 2 SF on + BF flashing + ON on means the following:
- Programmed ET 200S configuration does not match the actual ET 200S
configuration or I/O module is faulted or the interface module is defective.
Remedy - Check the setup of the ET 200S: Check whether a module is missing or
defective or whether an unconfigured module is inserted.
- Check the configuration and eliminate the parameterization error.
- Replace the interface module, or get in touch with your Siemens contact
person.
Status 3 SF off + BF off + ON flashing means the following:
- Data are being exchanged between the DP master and the ET 200S.
- The target and actual configurations of the ET 200S are identical.
- The slave is working correctly.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 5 PROFIBUS Diagnostics
Automation and Drives

Fault analysis with OB86

Event class

Incoming fault

Outgoing fault

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 6 03/2007
Siemens AG 2007 - Subject to change without prior notice

General The operating system of the CPU calls OB86 if a PROFIBUS DP error is
identified by the system. OB86 is called by the system when the DP error
appears (incoming event) and disappears (outgoing event).
If the OB86 has not been programmed and such a fault occurs, the CPU
switches to STOP mode.

Note Evaluation of OB86 in the program: Evaluate reason for call:


The local variable #OB86_EV_CLASS contains the "direction" of the cause of the
OB86 call with the event classes and identifiers:
- B#16#38: Outgoing event
- B#16#39: Incoming event

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 6 PROFIBUS Diagnostics
Automation and Drives

OB86 : Evaluating the cause of the call and


responding

Fault class (fault ID)

B#16#C3 :
Distributed I/O:
Failure of a DP master system

B#16#C4 :
Failure of a DP station

B#16#C5:
Fault in a DP station

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 7 03/2007
Siemens AG 2007 - Subject to change without prior notice

Note Evaluation of OB86 in the program: Evaluate reason for call:


The local variable #OB86_FLT_ID contains the temporary variable "Fault
identification" of the OB86 call with identifiers:
- B#16#C3: Distributed I/O devices: Failure of a DP master system
- B#16#C4: Failure of a DP station
- B#16#C5: DP station fault

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 7 PROFIBUS Diagnostics
Automation and Drives

Exercise 1 : Visualize a slave failure (OB 86)

Slave failure

Alarm view

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 8 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description In the event of a slave failure, the CPU must not switch to STOP. The slave
failure must be displayed with the DP address of the failed slave in the previously
configured "Message" screen on the touch panel.

Procedure 1.Insert the error organization block OB 86 into your S7 program.


2.Change the declaration section of the block as illustrated in the above figure:
Change name of variable "OB86_RACKS_FLTD" to "OB86_Z23"
(not an essential measure, but done here simply to follow the
procedure described in the STEP7 online help)
Change data type from "Array[0..31] Of Bool" to "DWORD"
(essential because variables of data type "Array" cannot be scanned
with the load instruction)
3. To make sure that the right messages are displayed on the touch panel,
program OB 86 in such a way that
flag "M_SlaveFailure" (M 86.0) is set when the slave fails
and reset when the slave recovers
( evaluation of variable "OB86_EV_CLASS")
the DP address of the failed slave is stored in MB87
"MB_SlaveAddress"
Solution tip: (see also OB 86 in online help)

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 8 PROFIBUS Diagnostics
Automation and Drives

Exercise 2 : Determine the slave downtime

Slave failure

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 9 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description The purpose of this exercise is to determine the DP slave downtime and store it in
flag double word "MD_Slave_Downtime" (MD 88).

Procedure Extend the OB 86 program in such a way that the above functions are
implemented.
Solution tip:
To calculate the slave downtime, use block FC8 "DT_TOD" from the standard
library IEC Funktion Blocks.
Using a time stamp of data type "DT" (Date and Time), this block extracts time
information of data type "TOD" (Time of Day).
The time of day is stored as a time period (0:00 hours to the specified time) in
milliseconds (whole numbers) in a variable of data type "TOD" which means that
it can be used for other calculations like a "DINT" variable.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 9 PROFIBUS Diagnostics
Automation and Drives

Exercise 3 : "Diagnose hardware online"

Module status
(diagnostic buffer)

Online diagnosis of hardware

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 10 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description Your task is to analyze DP slave failures using the "Diagnose hardware" online
function.
Procedure 1.Remove the module from slot 5 on the ET 200S.
2.In the menu Options Customize View, select the quick view.
3.Now select menu commands PLC Diagnosis/Settings
Diagnose hardware.
4.Select the line of the failed DP slave and then click on the module status button.
5.Analyze the messages in the Module status DP slave window:

Messages ..........................................................................................................................

..........................................................................................................................

..........................................................................................................................

..........................................................................................................................

6.Now re-insert the module in the ET 200S.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 10 PROFIBUS Diagnostics
Automation and Drives

Customer support (download area)

Download ID

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 11 03/2007
Siemens AG 2007 - Subject to change without prior notice

Notes FB125 is provided for the diagnostic evaluation of a distributed configuration with
PROFIBUS DP and SIMATIC S7 in cases where detailed information about faults
or bus node failures is required in addition to the general diagnosis.

Download S7 diagnostic block FB125 V4.9 and WinCC flexible diagnostic displays as an
archived STEP 7 project for WinCC flexible 2005 and description of the DP
diagnostic blocks for SIMATIC S7:
- Dp_op_21 zip (51.772 KB)
Description of DP diagnostic blocks for SIMATIC S7 and diagnostic displays for
ProTool and WinCC flexible:
- Onlinehilfe_FB125.EXE (2.258KB)

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 11 PROFIBUS Diagnostics
Automation and Drives

Exercise 4 : Integrate WinCC flexible "PC RT"

Copy S7 blocks

Copy WinCC flexible


PC Runtime

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 12 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description Your task is to copy the WinCC flexible station "PC RT" and the relevant S7
blocks from the PROFIBUS diagnostic package supplied by Siemens customer
support into your project.

Procedure 1.Delete - if stored - the project


"DP_OP_21_WinCC_flexible

2.Extract project "DP_OP_21.zip" from directory <drive>\:S7_Courses\Archives

3.Copy the station "PC RT" from project "DP_OP_21_WinCC_flexible" into your
own project.

4.Copy all the blocks (except the OBs and the system data) from the S7 block
container in project "DP_OP_21_WinCC_flexible" to your own project

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 12 PROFIBUS Diagnostics
Automation and Drives

Exercise 5 : Assign the Runtime interface


parameters

CP 5611 (SW V6.0 SP5)

PROFIBUS address
Runtime interface

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 13 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description In order to ensure that the S7 program symbols are available in the WinCC
flexible project, the Runtime interface must be configured and parameterized with
the "HW Config" tool.

Procedure 1.Open the hardware configuration for the WinCC flexible station "RT PC"
2.Configure and parameterize the CP5611 module as shown above
(set PROFIBUS address to 0 so that the PC configuration does not alter the
default settings for the PC interface)
3.Save and compile the HW configuration of the PC station
4.Download the configuration to your local PC system (PC Runtime)

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 13 PROFIBUS Diagnostics
Automation and Drives

Exercise 6 : Assign the connection parameters

Connection parameters

Connections

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 14 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description Set up a connection so that the panel Runtime application can communicate with
your trainer PLC.

Procedure 1.Launch WinCC flexible by opening the WinCC flexible station in the SIMATIC
Manager (see figure on left) and double click on "Connections" in this screen
2.Check whether your S7 station has been set up as a connection partner
and whether the copy operation might delete or deactivate (Exercise 4)
existing connections.
3.Connect the WinCC flexible variables to the PLC variables by
selecting Options Re-connect select dialog options as illustrated
below ok (select all variables in the variable editor)

4.Generate the whole project again by selecting


Project Generator Regenerate all

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 14 PROFIBUS Diagnostics
Automation and Drives

Exercise 7 : Integrate FB125 into the S7 program


OB 1, OB 82, OB 86

Call in all OB runtime


classes:
OB1,OB82, OB86

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 15 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description To ensure that the diagnostic data for a failed slave are stored in the instance
data block DB 125, FB 125 must be called in organization blocks
OB 1, OB 82 and OB 86 with instance data block DB 125 in each case.
In this case, it is not necessary to parameterize or transfer actual operands to the
formal operands of FB 125.

Procedure 1.Program the call of FB 125 with instance DB 125 in OB 1


2.Program the call of FB 125 with instance DB 125 in OB 82
3.Program the call of FB 125 with instance DB 125 in OB 86
4.Download FB 125, DB 125 and the modified OBs to the CPU

Notes The sequence and the contents of the 20-byte long temporary local data of the
organization blocks OB1, OB82 and OB86 must not be changed, but can be
extended at any time.
The following SFCs are used internally in the FB125: SFC13 and SFC51 with
SZL 0C91 (with an internal DP interface to the master CPU) or SZL 4C91 (with
an external DP interface to the CP/IM). It is not permissible to call SFC13 and/or
SFC51 with SZL OC91/4C91 in the OB1 in addition to the FB125 call for a
faulty slave.
Evaluation of the information in the block output parameters is meaningful only in
the cyclic program section (OB1).
If the FB125 block is processed correctly, the BIE bit is set to "1".
The BIE bit is reset if FB125 has been incorrectly processed.
When the CPU is booting (first OB1 cycle) and during a RESET, the whole DP
system is detected in the FB125 by an initialization routine. The diagnosis
process is interrupt-driven, i.e. if a diagnostic event or station failure occurs,
the evaluations are performed in the corresponding error OBs.
No call condition must therefore be generated in the block (see above).

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 15 PROFIBUS Diagnostics
Automation and Drives

Exercise 8 : Diagnostic test WinCC flexible RT

Next fault

"Manual"
single diagnosis

Next slave General


diagnosis
Detailed Transfer to Exit
diagnosis master system diagnostics

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 16 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description Your task is to perform a function test on the PROFIBUS diagnostic package.

Procedure 1.Open the WinCC flexible station "RT PC"


2.Generate and start the Runtime application of WinCC flexible
3.Provoke an ET 200S failure
4.Check the data shown in displays "General diagnosis" and "Detailed diagnosis"

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 16 PROFIBUS Diagnostics
Automation and Drives

Exercise 9 : Failure history of DP slaves

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 17 03/2007
Siemens AG 2007 - Subject to change without prior notice

General You want to record the individual slave failures statistically. You can use the
supplied source for this purpose from which theFB126 block is generated. It is
called in OB 86 and generates a history of slave failures in a ring buffer. The
structure of the instance DB for FB126 is as follows:
Bytes 0..3 Reserved
Bytes 4..129 Statistics for each slave (each slave has a reserved
byte which is incremented by 1 if the slave fails.)
Bytes 130..3201 Ring buffer with:ID / slave number incoming /
outgoing result / time stamp
FB126 does not need any transfer parameters. The number of failures can be
read directly in the instance DB for each slave.

Procedure 1.Copy file OB86Diag.exe to a separate directory and launch the application with
a double click.
2.Open the SIMATIC Manager and select the source container in your project.

3.Import the source file with the menu item "Insert External Source".

4.Open the inserted source with a double click and then compile. You will now
find the generated blocks in the block container of your project.

Note Article ID: 2289283


Date: Unchanged since 28.04.2000

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 17 PROFIBUS Diagnostics
Automation and Drives

"Report system error" function


All the blocks required are automatically generated
The PLC automatically signals system errors to the HMI
SIMATIC HMI
PG/PC STEP 7
HMI
HMI data

Automatic
S7 data message
Result is automatically trans- display
ferred to the HMI as a message
PLC

PROFIBUS DP

Slave
Slave diagnostics

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 18 03/2007
Siemens AG 2007 - Subject to change without prior notice

Definition The STEP 7 "Report system error" function provides a convenient way to display
diagnostic information provided by the component in the form of messages.
STEP 7 automatically generates the necessary blocks and message texts. The
user must simply download the generated blocks into the CPU and transfer the
texts to the connected HMI devices.

Settings In the hardware configuration, select the CPU for which you wish to configure
system error reporting. Then select menu commands Options Report system
error and assign parameters on the following tab sheets.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 18 PROFIBUS Diagnostics
Automation and Drives

Operating principle: Alarm_S/SQ

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 19 03/2007
Siemens AG 2007 - Subject to change without prior notice

Alarm_S/SQ The Alarm_S process is organized according to message numbers which are
automatically assigned when the function is configured in STEP 7. These
numbers are used to uniquely assign alarm messages. When a fault occurs, the
HMI system is notified via the message number with assigned message text.
When a fault occurs, the CPU stores the time of day plus any relevant process
parameters in addition to the message status (incoming, outgoing,
acknowledged). This information makes it easier to diagnose the fault cause.
The message information is stored in the PLC and not discarded immediately the
messages are sent. This means that individual network components (e.g. HMI
systems) can log on later and receive updated information.

Advantages ALARM_S offers the following advantages over the message bit procedure:
ALARM_S is an active messaging procedure. If a message is generated, the
CPU actively notifies all logged-on network nodes (polling is not used).
The process values are always identical to the values stored at the instant
the message is generated. This advantage is not guaranteed with the message
bit procedure.
The time stamp exactly specifies the time at which an event occurred, even if
the HMI system was not connected until later.

Message types Two types of ALARM_S message can be configured in STEP 7. They differ in
terms of their acknowledgement requirements:
Messages which require an acknowledgement. These messages are always
treated like fault messages.
Messages which do not require an acknowledgement. These messages can
be either fault or operational messages.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 19 PROFIBUS Diagnostics
Automation and Drives

Configure the "Report system error" function (1)


Signaling of system errors

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 20 03/2007
Siemens AG 2007 - Subject to change without prior notice

Configuration window tab for "Report system error"

General Use the "General" tab (Report system error) to specify which function block is to
be used as a diagnostic block. In addition, you can specify the response of
"Report system error" during generation.

OB configuration Use the "OB configuration" tab (Report system error) to specify which OBs are to
be supported, which OBs are to be created and in which OBs the "Report system
error" function is to be called.

CPU in STOP mode Use the "CPU in STOP mode" tab (Report system error) to specify which error
classes cause the CPU to switch to STOP mode.

Messages Use the "Messages" tab (Report system error) to specify which information is to
be output in which sequence as message texts.

User block Use the "User block" tab (Report system error) to specify whether a separate user
block is to be called from the diagnostic block and configure its interface.

Generate Click on this button to generate the selected blocks, messages and error text
libraries.

Delete Click this button to delete the diagnostic block including its reference data as well
as all messages and error texts.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 20 PROFIBUS Diagnostics
Automation and Drives

Configure the "Report system error" function (2)

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 21 03/2007
Siemens AG 2007 - Subject to change without prior notice

Report a system S7 components and "standard DP slaves" (slaves with properties defined
error by their GSD file) can trigger organization block calls when a system error occurs
(e.g. OB 82 is called when a diagnostic alarm is triggered on an analog input
module).
S7 components capable of diagnosis supply information about the active system
error. The start information or the local data of the assigned OBs provide general
information about the error location (e.g. logical address of module) and type (e.g.
channel error or buffering failure).
In addition, supplementary diagnostic information can be read out (with SFC 13)
to specify the error more precisely (e.g. channel 0, wire break).

Alarm_S The STEP 7 "Report system error" function provides a convenient way to display
diagnostic information provided by the component in the form of messages.
The blocks required for this function (FB 49 in the figure above) work internally
with the Alarm_S or Alarm_SQ procedure and are automatically generated or
edited by STEP7. The user need only download the generated or edited blocks to
the CPU and transfer the standard texts to the connected HMI devices.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 21 PROFIBUS Diagnostics
Automation and Drives

OB configuration + CPU response in STOP state

OB configuration

CPU at stop

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 22 03/2007
Siemens AG 2007 - Subject to change without prior notice

General Use the "General" tab (Report system error) to specify which function block is to
be used as a diagnostic block (FB 49 in the figure). In addition, you can specify
the response of "Report system error" during generation.

OB configuration Use the "OB configuration" tab (Report system error) to specify which OBs are to
be supported, which OBs are to be created or which OBs need to be added to call
the "Report system error" function (FB 49).

CPU at STOP On the "CPU in Stop mode" tab, specify the errors which will allow the CPU to
remain in the RUN state and which will cause it to switch to STOP.

Messages Use the "Messages" tab (Report system error) to specify which information is to
be output in which sequence as message texts.

User block Use the "User block" tab to specify whether a separate user block must be called
from the diagnostic block (FB 49) and configure its interface.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 22 PROFIBUS Diagnostics
Automation and Drives

Messages + User block tab

Reporting component

Message preview

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 23 03/2007
Siemens AG 2007 - Subject to change without prior notice

Messages You can select the information to be displayed in the message window on this
tab. You can select from the information displayed on the left in the "Available
message information" field. The selected information is displayed on the right in
blue in the Message Text field.

Preview A preview of the message you have configured is displayed as an example.

Default The original texts are restored.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 23 PROFIBUS Diagnostics
Automation and Drives

Diagnostic support + User block

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 24 03/2007
Siemens AG 2007 - Subject to change without prior notice

Diagnosis With version V5.4 of STEP 7, the instance DB "Detail_Diag_DB" can be specified
to directly supply data to the HMI diagnostic displays.
You can enter diagnostic support settings in this tab. The diagnostic support
system enables a PROFINET IO or PROFIBUS DP system to supply diagnostic
data from the "Report system error" FB 49 for graphic display on an HMI device.

Diagnostic displays Check the "PROFIBUS DP DB" box if you want diagnostic events to be displayed
graphically on an HMI device.
Check the "PROFINET IO DB" box if you want diagnostic events to be displayed
graphically on an HMI device.
Specify the block to be called. In the default setting, DB 125 is generated for
PROFIBUS DP and DB 126 for PROFINET IO. Both data blocks are supplied with
the required data. You can enter the block names absolutely or in symbolic form.
If you want to change the symbols, click on the "Edit symbols" button.

HMI export data The storage path for the HMI export data is displayed here. If you want to select
another storage path, click on the button on the right to select another directory.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 24 PROFIBUS Diagnostics
Automation and Drives

Result check using "CPU messages"

Logon for Alarm_S

CPU messages

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 25 03/2007
Siemens AG 2007 - Subject to change without prior notice

Generate To generate the required blocks (FB and DB; and depending on the settings also
OBs which do not yet exist), proceed as follows:
In the dialog box "Report system error" click
"Generate: The following blocks will be generated:
The error OBs for which the box "Generate OB" was checked in the "Report
system error" dialog box on the "OB Configuration" tab sheet.
Diagnostic FB (default: FB 49).
Instance DB for the diagnostic FB (default: DB 49).
Optional user block which is called from the diagnostic FB.

Evaluate 1.With an active PG on the CPU, you can monitor system errors by selecting
menu options
"PLC CPU messages".
2.In the window which then appears, select option "A" for user messages. Now,
as soon as a configured system message is activated, it will now appear in
plain text in this window as illustrated above.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 25 PROFIBUS Diagnostics
Automation and Drives

Exercise 10 : Configure "Report system error"


Report system error

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 26 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description: Errors occurring on the DP master CPU must be displayed as error messages by
the "Report system error" function.

Procedure 1.If any blocks are open in your S7 program, close them now.

2.Open the hardware configuration of the master station.

3.Select the line containing the CPU module in the module subrack and
select menu commands Options Report system error ....

4.Change the entries on the "General" tab if the entered block numbers have
already been assigned in your program.

5.On the OB Configuration tab, check the boxes for


"Call report system error" for blocks OB86, OB82 and OB1.

6.You can retain the settings on the other tabs.


Click on the Generate button.

7.Download blocks OB1, OB82, OB86, FB49 and DB49 to the master CPU.

8.Select your S7 program in the SIMATIC Manager and select menu commands
PLC CPU Messages ... .

9.Check box "A" for the master CPU and minimize the message window (do not
close it!). Create a slave failure and look at the message displayed in the
message window which opens automatically.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 26 PROFIBUS Diagnostics
Automation and Drives

Enable Alarm_S messaging (WinCC flexible)

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 27 03/2007
Siemens AG 2007 - Subject to change without prior notice

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 27 PROFIBUS Diagnostics
Automation and Drives

Exercise 11 : Display Alarm_S messages

Alarm view
(Enhanced Objects)

Activate S7 Alarm

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 28 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description Message block FB 49 and its calls have been generated in different OBs with the
"Report system error" function. To ensure that the Alarm_S messages output by
this message block actually appear on the touch panel, the display of "S7
messages" must be activated in the message view of the displays "Template" and
"Messages".

Procedure 1.Open the WinCC flexible station "RT PC" (PC Runtime)
2.Create a new "Messages" display and insert a message view (additional
objects in the toolbox). Organize the screen jumps to suit your own
requirements (into or out of the start screen)
3.Open the "Messages" screen and activate the display of S7 messages (for
message view properties, see figure)
4.Check whether ALARM_S messaging is enabled in WinCC flexible (message
settings)
5.Open the "Template" screen and activate the display of S7 messages
6.Display the PROFIBUS address of the failed station in an output field
(information (MB87) is supplied by OB86)
7.Save the edited station and start the PC Runtime
8.Check the new function by provoking
a DP slave failure
or a measuring-range violation by setting an excessively
high voltage (> 12V) on the simulator potentiometer on systems with an analog
card.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 28 PROFIBUS Diagnostics
Automation and Drives

Deactivating and activating slaves with SFC12

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 29 03/2007
Siemens AG 2007 - Subject to change without prior notice

Description You can use the SFC 12 "D_ACT_DP" to selectively activate and deactivate
configured DP slaves. Furthermore, you can determine for each DP slave used
whether it is currently activated or deactivated.
The SFC 12 cannot be used for PROFIBUS PA field devices which are connected
to a DP master system through a DP/PA link.

Purpose If you configure DP slaves in a CPU which do not exist or which are currently not
required, the CPU will still regularly address them. If they are deactivated they are
no longer addressed by the CPU. In this way, the fastest possible DP bus cycle
can be achieved and the corresponding error events do not occur.

Deactivate When you deactivate a DP slave with SFC 12, its process outputs are set to the
configured substitute values or to 0 (safe state).
The corresponding DP master will then no longer access this DP slave.
Deactivated DP slaves are not indicated to be faulty or missing on the fault LEDs
of the DP master or the CPU.
The process image of the inputs of deactivated DP slaves is refreshed with 0, i.e.
it is treated in the same way as DP slaves which have failed.
Please consult the online help files for the function block for more information.

Note Don't forget the error OBs that still have to be programmed in relation to any
signals in the S7 program that are no longer supplied (DI, DO).

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 29 PROFIBUS Diagnostics
Automation and Drives

Sample program for slave deactivation

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 30 03/2007
Siemens AG 2007 - Subject to change without prior notice

Activate When you reactivate a DP slave using SFC 12, the DP master configures it and
assigns the parameters (as is the case when a failed DP station recovers).
Activation is complete when the slave can transfer useful data.
Activation of a DP slave does not initiate the program execution error OB (OB 85)
even if its inputs or outputs are part of the process image which is updated by the
system. Nor is an entry made in the diagnostic buffer.
Activation of the DP slave does not initiate the rack failure OB (OB 86) and the
operating system does not enter anything in the diagnostic buffer.

Note If you try to activate a deactivated slave which is physically separated from the
DP bus using SFC 12, the "DP-BUSF" LED on the CPU will flash for one minute.
When this monitoring time has elapsed, the SFC will output the error code
W#16#80A2, the LED stops flashing and the slave remains deactivated. If it is
reconnected to the DP bus at a later stage, you must reactivate the slave using
SFC 12.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 30 PROFIBUS Diagnostics
Automation and Drives

Exercise 12 : Activate and deactivate slaves

Diagnostic address:
3FC(hex) = 1020(dec)

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 31 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description It is your task to create an option for temporarily separating the ET 200S from the
master system which will not cause an error response by the DP master. The
purpose of the option is to facilitate commissioning.
You will use system function SFC12 to deactivate and activate a DP slave for this
purpose. The system signal is at input I1.7. As long as a 1 signal is applied, the
ET 200S must remain deactivated.

Procedure 1. Program an FC12 as shown in the figure (add your own functions, e.g.
interrogation of the current slave status) if necessary)
2.Also call block FC12 in OB1.
3.Open the HW configuration of the master station and select menu commands
View Address overview.
4.Load all the blocks.
5.Enable input I1.7 on the simulator and monitor the reaction of the slave.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 31 PROFIBUS Diagnostics
Automation and Drives

If you want to know more

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 32 03/2007
Siemens AG 2007 - Subject to change without prior notice

Note The following pages provide additional information for reference.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 32 PROFIBUS Diagnostics
Automation and Drives

Diagnosis of a specific DP slave with SFC13

Slave fault

OB86
Incoming/outgoing event
Master address

.
Slave diagnostic address/ master system

.
. Diagnostic address:
7FD(hex) = 2044(dec)
sfc13
EN ENO
REQ RET_VAL ??.?
W#16#7FC
??.? LADDR RECORD ??.?
BUSY ??.?

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 33 03/2007
Siemens AG 2007 - Subject to change without prior notice

Slave diagnostics Use the SFC 13 "DPNRM_DG" to read the diagnostic data of a DP slave as
defined by EN 50 170.
After the data have been transmitted correctly they are entered in the destination
area specified by RECORD (OUT 2).
The read action is started by assigning a logical "1" to the input parameter REQ
(INO) when calling SFC 13.

Structure of the slave diagnostic data

The basic structure of the diagnostic data for the slave are shown in the following
table. More detailed information on the DP slaves can be found in the manuals
(error numbers, for example, in the NCM S7 manual).
Basic structure of the slave diagnostic data
Byte: Meaning:
0 Station status 1
1 Station status 2
2 Station status 3
3 Master station number
5 Manufacturer's ID (low byte)
6... Other slave-specific diagnostics

Note For standard slaves which have more standard diagnostic data than 240 bytes
but less than 244 bytes, the first 240 bytes are entered in the destination area and
the corresponding overflow bit is set in the data.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 33 PROFIBUS Diagnostics
Automation and Drives

S7 program with an SFC13 call in OB1

Pointer to the
addressed data area

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 34 03/2007
Siemens AG 2007 - Subject to change without prior notice

Example The figure above shows an example of how to use SFC 13 to read out the
slave diagnostic data for a DP slave in the STEP 7 user program.

Assumptions The following are assumed to apply to this STEP 7 user program:
The diagnostic address of the ET 200S is 1022 (3FEh).
Slave diagnostic data must be stored in DB82: from address 0.0, length 64
bytes.
The slave diagnostic data can be up to 64 bytes long.

STEP 7 The SFC13 must be called in OB1 "cyclic mode since only this ensures that the
result data are completely written.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 34 PROFIBUS Diagnostics
Automation and Drives

Parameters of the SFC13 (standard diagnostics)

"DPNRM_DG"
EN ENO

REQ RET_VAL ??.?

??.? LADDR RECORD ??.?

BUSY ??.?

Parameters Declaration Data type Memory area Description


REQ INPUT BOOL I, Q, M, D, L, constant REQ = 1: Request to read
LADDR INPUT WORD I, Q, M, D, L, constant Configured diagnostic address of the DP slave
RET_VAL OUTPUT INT I, Q, M, D, L If an error occurs while the function is being processed,
the return value contains an error code.
If no error occurred, RET_VAL contains the
length of the data actually transmitted.
RECORD OUTPUT ANY I, Q, M, D, L Destination for the read diagnostic data. Only data
type BYTE is permissible. The minimum length of the
dataset to be read or of the destination area is 6.
BUSY OUTPUT BOOL I, Q, M, D, L BUSY = 1:
The read job is not yet completed.

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 35 03/2007
Siemens AG 2007 - Subject to change without prior notice

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 35 PROFIBUS Diagnostics
Automation and Drives

Diagnostics data format


Station status 1 Station status 2
Byte 0 Station status 1 Bit Significance Significance
Byte 1 Station status 2 The DP slave cannot be DP slave must be
0
Byte 2 Station status 3 accessed reparameterized
Byte 3 PROFIBUS master addr. The DP slave is not Diagnostic message
1
Byte 4 Manufacturer ID yet ready active
Byte 5 Manufacturer ID Configuration does Bit = "1", if DP slave
2
not correspond with setup available
Byte 6 Identifier-related External diagnostics Response monitoring
Byte 7 : 3
available activated
: :
Function not supported Control command
Byte 14 Diagnosis 4
by DP slave "FREEZE" received
Master cannot interpret Control command
Byte 15 Module status 5
slave response "SYNC" received
:
: : Slave type does not
6 Bit is always "0"
match configuration
Byte 34 :
DP slave configured by
7 DP slave deactivated
different master
Channel-specific
diagnosis
:
:

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 36 03/2007
Siemens AG 2007 - Subject to change without prior notice

Diagnostic data The system function SFC 13 supplies the diagnostic data as shown in the figure
on the left. Set up an array with 64 bytes in a data block. This data area is entered
in the "RECORD" parameter of the SFC 13.

Station status Station statuses 1 to 3 provide an overview of the status of a DP slave. The
assignment of station status 1 and 2 can be seen in the figure on the right.
Only bit 7 of station status 3 is relevant. When bit 7 = "1", there are more
diagnostic messages than can be stored by the DP slave.

Master PB address The diagnostic byte "Master PROFIBUS address" contains the PROFIBUS
address of the DP master which configured the DP slave and which has read and
write access to the DP slave.

Manufacturer ID The manufacturer's ID contains a code which describes the type of DP slave e.g.
806A(hex) for ET 200S with IM 151.

ID-specific The ID-specific diagnostics indicate whether or not modules of the ET 200S have
diagnosis errors. Identifier-related diagnostics start at byte 6 and are 9 bytes long. From
byte 7, a bit is set for each defective module. Bit 0 ="1 from byte 7 is assigned to
Module 1 etc.

Module status This indicates the status of the configured modules and expands on the ID-
specific diagnosis. The module status, for example, lists whether a module is
missing or incorrect.

Channel-specific Channel-specific diagnostics provides information about channel errors in


diagnosis modules and expands the ID-specific diagnostics. Channel-specific diagnostics,
for example, signal a break in a channel. The maximum length is limited by the
maximum total length of slave diagnostics, i.e. 64 bytes.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 36 PROFIBUS Diagnostics
Automation and Drives

Exercise 13 : Slave analysis with SFC13

Activated with incoming event

Activated with outgoing event

From OB 86

From OB 86

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 37 03/2007
Siemens AG 2007 - Subject to change without prior notice

Task description You will use system function SFC13 for extended slave diagnostics. The
diagnostic data for the slave which is currently failed will be stored in DB13.

Procedure 1. Program an FC13 function with the characteristics illustrated in the figure
above
2.Call FC13 in OB1 as well and load the relevant blocks
3.Open DB13 and switch the data view
4.Provoke a fault on the ET200S and monitor the entries in DB13
5.Interpret the entries in DB13 using the electronic equipment manual for the
ET200S: <Drive>:\IKPBSYS\ARCHIVES).
Chapter 6 also includes a description of the structure of standard diagnostic
data.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 37 PROFIBUS Diagnostics
Automation and Drives

SFC11: "Freezing" of DP input signals

EN "DPSYC_FR"
ENO

REQ RET_VAL ??.?


??.? LADDR BUSY ??.?
??.? GROUP
??.? MODE

Parameters Declaration Data type Memory area Description


REQ INPUT BOOL I, Q, M, D, L, constant Level-triggered control parameter
REQ=1: Activate the SYNC job
LADDR INPUT WORD I, Q, M, D, L, constant Diagnostic address of DP master in hex. format
GROUP INPUT BYTE I, Q, M, D, L, constant Group selection Bit 0 = 1: Group 1 selected
Bit 1 = 1: Group 2 selected ...
Bit 7 = 1: Group 8 selected
You can select more than one group per job.
MODE INPUT BYTE I, Q, M, D, L, constant Job ID (coded acc. to EN 50 170 V 3)
Bit 0, 1, 6, 7: reserved (value 0)
Bit 4 = 1: UNSYNC is performed
Bit 5 = 1: SYNC is performed
RET_VAL OUTPUT INT I, Q, M, D, L Error code. You must evaluate RET_VAL after
every function block execution.
BUSY OUTPUT BOOL I, Q, M, D, L BUSY=1: The job has not yet been completed.

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 38 03/2007
Siemens AG 2007 - Subject to change without prior notice

Description You can use SFC 11 (DPSYC_FR) to freeze one or more groups of
DP slaves. This is done by sending one of the following control commands or a
combination of them to the groups concerned:
FREEZE (freezes the input states for the DP slaves and reads in the frozen
inputs)
UNFREEZE (resets the FREEZE command)

Prerequisites Before you issue the control commands listed above, you must use the "HW
Config" tool of STEP 7 to organize the DP slaves into FREEZE groups.

FREEZE The control command FREEZE switches the relevant DP slaves into Freeze
mode. With each FREEZE command, the DP master causes the relevant DP
slaves to save the current status of the inputs simultaneously. The DP master
then transfers the saved data to the input data area of the CPU.
The inputs or outputs are not updated until the control command UNSYNC or
UNFREEZE is issued.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 38 PROFIBUS Diagnostics
Automation and Drives

Group assignment for SYNC and FREEZE

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 39 03/2007
Siemens AG 2007 - Subject to change without prior notice

Assign a DP slave to a SYNC/FREEZE group


A DP master with the appropriate functionality can send the SYNC and/or
FREEZE command simultaneously to a group of different DP slaves for the
purpose of synchronizing them. You have to assign the DP slaves to SYNC and
FREEZE groups for this purpose.

Prerequisite You must have created a DP master system.

Procedure Mark the symbol for the DP master system which contains the DP slave
that you want to assign to a group. Select menu commands
Edit Object Properties.
The "Group assignment" tab sheet is displayed complete with a table in which you
can assign the DP slave to SYNC/FREEZE groups.

Note You can assign each slave to a maximum of one SYNC and one FREEZE
group. Exception: When you use a CP 342-5 as a DP master, you can assign up
to 8 groups (SYNC and/or FREEZE groups) to each assigned DP slave (see
documentation for the CP 342-5).

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 39 PROFIBUS Diagnostics
Automation and Drives

S7 program for freezing DP input signals

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 40 03/2007
Siemens AG 2007 - Subject to change without prior notice

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 40 PROFIBUS Diagnostics
Automation and Drives

Evaluation with active FREEZE mode

PB address = 35 PB address = 6
with active FREEZE
signal

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 41 03/2007
Siemens AG 2007 - Subject to change without prior notice

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 41 PROFIBUS Diagnostics
Automation and Drives

Synchronization, i.e. output and freezing of


digital outputs on DP slaves

EN "DPSYC_FR" ENO
REQ RET_VAL ??.?
??.? LADDR BUSY ??.?
??.? GROUP
??.? MODE
Parameters Declaration Data type Memory area Description
REQ INPUT BOOL I, Q, M, D, L, constant Level-triggered control parameter
REQ=1: Activate the SYNC job
LADDR INPUT WORD I, Q, M, D, L, constant Diagnostic address of DP master in hex. format
GROUP INPUT BYTE I, Q, M, D, L, constant Group selection Bit 0 = 1: Group 1 selected
Bit 1 = 1: Group 2 selected ...
Bit 7 = 1: Group 8 selected
You can select more than one group per job.
MODE INPUT BYTE I, Q, M, D, L, constant Job ID (coded acc. to EN 50 170 V 3)
Bit 0, 1, 6, 7: reserved (value 0)
Bit 4 = 1: UNSYNC is performed
Bit 5 = 1: SYNC is performed
RET_VAL OUTPUT INT I, Q, M, D, L Error code. You must evaluate RET_VAL after
every function block execution.
BUSY OUTPUT BOOL I, Q, M, D, L BUSY=1: The job has not yet been completed.

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 42 03/2007
Siemens AG 2007 - Subject to change without prior notice

Description You can use SFC 11 (DPSYC_FR) to synchronizeone or more groups of DP


slaves. This is done by sending one of the following control commands or a
combination of them to the groups concerned:

SYNC (simultaneous output and freezing of output states


for the DP slaves)

UNSYNC (resets the SYNC command)

Prerequisites Before you issue the control commands listed above, you must use STEP 7 to
organize the DP slaves in SYNC or FREEZE groups.

What is the effect of SYNC?


The control command SYNC switches the DP slaves of the named groups to
Sync mode, i.e. the DP master transfers the current output data and causes the
affected DP slaves to freeze the outputs. For the subsequent output message
frames, the DP slaves simply save the output data in an internal buffer, the state
of the outputs remains unchanged at first.
After every SYNC control command, the DP slaves of the selected group apply
the output data in their buffer simultaneously to the I/O outputs to the process
(simultaneous output of control signals).

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 42 PROFIBUS Diagnostics
Automation and Drives

S7 program for synchronizing DP output signals

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 43 03/2007
Siemens AG 2007 - Subject to change without prior notice

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 43 PROFIBUS Diagnostics
Automation and Drives

Copying the original outputs to the ET200S


(SYNC group)

SITRAIN
IK-PBSYS / PROFIBUS Diagnostics Page 44 03/2007
Siemens AG 2007 - Subject to change without prior notice

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 44 PROFIBUS Diagnostics

Você também pode gostar