show the entry list

PROFIBUS general -- Configuring and programming communication -- Using communication blocks 
Transfer of analog values from and to the PROFIBUS DP slave 
Which entries deal with consistent data in conjunction with distributed I/O? 
How can you access consistent data without SFC14/15 as part of the process image? 
Why does my new CPU 315-2DP (Order No: 6ES7 315-2AG10-0AB0) not process the SFC13 correctly? 
How do you receive an alarm with the SFB 54 "RALRM" in compliance with DPV1? 
DP slave lifelist using SFC51 "RDSYSST" instead of SFC12 "D_ACT_DP" 
Can you use the "Signal System Error" function, the FB126 function block and the SFC13 "DPNRM_DG" system function simultaneously? 
Notes for the use of the system function SFC12 "D_ACT_DP" 
What is consistent data? 
How do you read data consistently from a DP standard slave/PROFINET IO device and write it consistently to a DP standard slave/PROFINET IO device? 
Disabling DP slaves after startup of the CPU 
Diagnostics information of the FB125 with disabled DP slave 
Enabling a disabled DP slave with SFC 12 "D_ACT_DP" 
Parameter assignment of SFC 103 / SFC 59 required for identifying and reading out topology data 
What are the requirements for using the "Prepare cable diagnostics" function? 

Transfer of analog values from and to the PROFIBUS DP slaveGo to beginning
Part number:

QUESTION:
The analog values are transferred only in part or not at all. How can I clear this problem?

ANSWER:
If none or only part of the analog values are transferred, or the transferred values are incorrect, then this might have something to do with the length of the consistent data of the slave (affects S7-300/400 CPUs).
If more than 4 bytes (or exactly 3 bytes) are consistent over the entire length, then you must access the analog values of the slave with the SFCs 14 "DPRD_DAT" and 15 "DPWR_DAT". A description of the SFCs is given in the manual "System Software for S7-300/400 System and Standard Functions". The information on consistent data lengths of the PROFIBUS DP slave are given in the HW Config.
Procedure:

  1. In the HW Config you mark the PROFIBUS slave.

  1. Double-click the module from which you want to know which consistent areas it has. In the "Address/ID" tab of the "Properties - DP slave" window you can see the length over which the data is consistent.

Which entries deal with consistent data in conjunction with distributed I/O?Go to beginning
Part number:

Consistent data, overview and application in distributed I/O.
In the following is a description of how to deal with consistent data in STEP 7.

28991143_Consistent_Data_e.pdf ( 766 KB )  

The entries dealing with the topic of consistent data are listed below.
 

Topic

Entry ID

Definition of terms.

5116353
How do you read data consistently from a DP standard slave/PROFINET IO device and write it consistently to a DP standard slave/PROFINET IO device?

21848242

Consistent data in S7-400 11646774
How can you access consistent data without SFC14/15 as part of the process image? 8751062
How is consistent data of the distributed I/O processed in S7 masters? 245111
Rules for the CPU 315-2 DP accessing the distributed I/O 42413
CP 342-5 -- How can you read and write consistent data of a DP slave via the CP 342-5? 21627748
What should you watch out for when configuring consistent data in COM PROFIBUS with IM 308-C as DP slave? 22566679
What are the options for address assignment of consistent data in IM 308-C? 21459883

Keywords:
SFC 14, SFC 15, Consistency

How can you access consistent data without SFC14/15 as part of the process image?Go to beginning
Part number:

Description:
Consistent data access > 4 bytes is now possible without the system functions SFC14/15. This option of being able to consistently access data > 4 bytes using download/transfer commands provides a particularly convenient and high-performance method of access (low runtime load).
The data area of a DP slave or IO device that is to be transferred consistently is transferred to a process image or process image partition. The data in this area is then always consistent. Afterwards you can use download/transfer commands (e.g. L IW 1) to access the process image or process image partition. There is no limitation of the area with respect to addressing.

  • The operating system automatically controls updating of the process image.
  • Updating of the process image partition is done either on the user side using SFCs or automatically on the system side through a link to an OB.
  • When you make a direct access (e.g. L PEW or T PAW) then there is no I/O access error.

Note:
Refer to the technical data to see whether your CPU supports process image partitions.

Overview:
You can use the following CPUs for configuring without "SFC14/15":
 

MLFB

S7 CPU 

Minimum firmware version

6ES7 31..

CPU 31x

2.5

6ES7 41.. CPU 41x 3.0
6ES7671-0RC03-0YA0 WinAC1 V4.0
1Only possible when using Hardnet CPs (CP 5613 / CP 5603 / CP 5623) and not Softnet CPs (CP 5611 / CP 5621).

Limits:
Transfer of consistent user data to a DP slave:

Upper limits for the transfer of consistent data to a DP slave are defined by the PROFIBUS DP standard. This is why only a maximum of 64 words = 128 bytes of user data can be transferred consistently in one block to a DP standard slave.

When configuring, you define the size of the consistent area. For this, in the special identification format (SKF) you can set a maximum length of 64 words = 128 bytes for the consistent data (128 bytes for inputs and 128 bytes for outputs); anything beyond that is not possible.

This upper limit applies only for pure user data. Diagnostics and parameter data is grouped into whole data records and is therefore always transferred consistently.

For this, in the general identification format (AKF) you can set a maximum length of 16 words = 32 bytes for the consistent data (32 bytes for inputs and 32 bytes for outputs); anything beyond that is not possible.

Please also note here that a CPU 41x as DP slave must be able to be configured on a third-party master (connection via GSD) via the general identification format (AKF). For this reason the transfer memory per virtual slot of a CPU 41x as DP slave to the PROFIBUS DP has a maximum size of 16 words = 32 bytes. You can configure up to 32 such virtual slots in the i-slave. The highest slot number is 35.

Transfer of consistent user data to an IO device:
The upper limit for the transfer of consistent data to an IO device is 255 bytes (254 bytes user data + 1 byte associated value). Even if more than 255 bytes can be transferred to an IO device, the upper limit is 255 bytes of consistent user data.

Important:
Do not use the system functions and the process image simultaneously. The consistency between process image values and the values of system function SFC14 is not guaranteed, because the process image is not tracked when reading with system function SFC14. In principle the process image is tracked when writing with system function SFC15, but not when reading. This means that the consistency between process image values and the values of system function SFC14 is not guaranteed.

Example:
The following example (for the process image partition 3 "TPA 3" of an S7-400 CPU) shows one possible configuration in the HW Config:

Requirements: The image process partition has already been updated via the SFC 26/27 or the process image updating has been linked to an OB.

  • TPA 3 under Output: These 50 bytes are consistent in the process image partition 3 and can thus be read with normal "load input xy" commands.
  • "---" under Input means: no storage in a process image. Only handling with system functions SFC14/15 is possible.

Keywords:
Hardware configuration, Consistency, Updating

Why does my new CPU 315-2DP (Order No: 6ES7 315-2AG10-0AB0) not process the SFC13 correctly?Go to beginning
Part number:

Description:
If you use an older CPU 315-2DP and change to CPU 315-2DP (6ES7 315-2AG10-0AB0), then please observe the following behaviour when calling the SFC13.

Some SFCs that work asynchronously have been processed already after the first call on older CPUs ("quasi synchronous").
On the new CPUs, these SFCs run asynchronously. The asynchrone processing can last several OB 1 cycles. A waiting loop within an OB can possibly exceed the period of the cycle..

On older CPUs, the SFC 13 always operates "quasi synchronously" after it was called in the OB 82, on the new CPUs in contrast, the SFC 13 operates generally asynchronously.
Thus, in the application the triggering of the job should be made in the OB 82. The evaluation of the data by considering the BUSY bits and the feed back in RET_VAL should be made in the cyclical program.

Tip:
In case you use the new CPU 315-2DP (order no: 6ES7 315-2AG10-0AB0), we recommend the use of the SFB 54 "RALRM" instead of the SFC 13 "DPNRM_DG". A comprehensive example of how to use SFB 54 is available in Entry ID: 21445066

Note:
Further information you find in the manual "SIMATIC CPU 31xC and CPU 31x, Technical Data" in Chapter A.1 in Entry-ID: 12996906.


How do you receive an alarm with the SFB 54 "RALRM" in compliance with DPV1?Go to beginning
Part number:

Guidance:
The following example shows how you can use the SFB 54 "RALRM" to receive and evaluate an alarm that has been issued by distributed I/O device. It includes the most important points for module parameterizing, programming and evaluating the data received.
In the example an S7-CPU 315-2DP (MLFB: 6ES7 315-2AG10-0AB0) is used as DPV1 master that operates an ET 200M with IM 153-2 HighFeature (MLFB: 6ES7 153-2BA00-0XB0) as distributed PROFIBUS interface. The power supply is interrupted on the analog I/O module (AI 2x12 bits) so that the DP slave reports an alarm to the DP master.

In order to be able to receive an alarm with the SFB 54 "RALRM", all the components involved must support the DPV1 standard. This means that both the master and the slave used must support the DPV1 standard and thus also alarm handling.

Once the HW Config has been established you must enable the alarm handling. For the ET 200M to be able to issue diagnostics alarms, these must be enabled in the parameters of the modules. Diagnostics alarms are disabled by default.


Fig. 01

Then call the SFB 54 directly in the required alarm OB. In the example it is called directly in the diagnostics alarm OB (OB 82). If the SFB 54 is called in multiple alarm OBs, it must be called with different instance DBs to ensure error-free running of the block.


Fig. 02

Take the content for parameter F_ID on SFB 54 from the HW Config (see Fig. T1-03). Here you need the I/O address of the module from which alarms are to be received. Note that the decimal value from the HW Config has to be converted into a hexadecimal format for the SFB 54. If you use Mode 1 just as in the example, the parameter F_ID is irrelevant.


Fig. 03

Once a diagnostics alarm has been issued in the running project the SFB 54 fills the two data areas specified with administration information (DB1) on the one hand and on the other with all the alarm information received (DB2 - see Fig. 04).


Fig. 04

This alarm information can now be evaluated as follows:

  • You evaluate the first 3 bytes of standard alarm information with the Online Help of SFB 54.
  • The additional alarm information (as from byte 4) can be evaluated using the manual for the distributed system concerned in each case. In the manual the Diagnostics chapter has a separate section on the topic of alarms.

Note
If you are using the SFB 54 on a DPV0 slave, in the alarm information you receive the complete contents of the diagnostics message from the slave. This is described in detail in the Online Help of STEP 7 (keyword: "SFB 54").

Download

DP_Diagnose_SFB54.zip ( 262 KB )

DP slave lifelist using SFC51 "RDSYSST" instead of SFC12 "D_ACT_DP"Go to beginning
Part number:

QUESTION:
Using the system function SFC12 "D_ACT_DP" how can I obtain an overview of all the enabled and disabled DP slaves?

ANSWER:
Using the system function SFC12 "D_ACT_DP" you can determine the status of a DP slave by specifying a logical address for the "LADDR" parameter and job ID 0 for the "MODE" parameter. In order to monitor all the DP slaves of the master system you have to execute this system function for each DP slave.

It is better to use the system function SFC51 "RDSYSST" for this task. Using this system function you can determine the status of all the slaves of a DP master in one call. The following table shows the parameters to be assigned in SFC51 for this task.

I/O type Parameter Value Type Meaning
I REQ True BOOL Trigger processing with TRUE
I SZL_ID W#16#0692 WORD OK status of all the DP slaves
I INDEX B#16#1 WORD Number of the master system, e.g. 1
O RET_VAL
INT Return value
O BUSY
BOOL Processing still in progress
O SZL_HEADER
STRUCT
O DR
ANY Target area for data determined

Table 1: Parameters of system function SFC51

Notes on the parameters in Table 1:

REQ:
System function SFC51 is an asynchronous function, i.e. processing can take several cycles. Therefore, before calling the function again you should evaluate the BUSY parameter. Only if this is not set can you start a new job.

SZL_ID:
The value specified in Table 1 is valid only for master systems on integrated DP interface modules. For external DP interface modules (e.g. CP443-5 Ext.) you have to use the value W#16#4692.

INDEX:
You get the value for this parameter from the Hardware Configuration (PROFIBUS(x); DP master system(1)).

SZL_HEADER:
You do not need this parameter, but you must declare it. The STRUCT variable to be transferred to this parameter consists of two WORD variables.

DR:
For this parameter you specify the variable for the data determined. In this application case the variable must be an ARRAY OF BYTES [1...16]. There is a bit reserved in this ARRAY for each DP slave (16 x 8 = 128). The status of the DP slave with Address 1 is in Bit 0 of the first byte. If this bit is set, then that DP slave is either defective or disabled. 

Note:
More detailed information on system function SFC51 is available in the STEP 7 Online Help or by going to Start > SIMATIC > DOCUMENTATION and selecting the manual "System Software for S7-300/400 System and Standard Functions", which is also available in Entry ID: 1214574.


Can you use the "Signal System Error" function, the FB126 function block and the SFC13 "DPNRM_DG" system function simultaneously?Go to beginning
Part number:

The "Signal System Error" function and the FB126 "PNIODiag" function block use the SFC13 "DPNRM_DG" system function to determine slave-specific diagnostics data.

The SFC13 system function works asynchronously, which means that the processing of the function can extend over several SFC calls and, thus, it may also span several CPU cycles. The effect of this, in turn, is that there may be several SFC13 jobs active per CPU at the same time. However, the number of SFC13 calls active simultaneously may not exceed a CPU-specific limit. The table below shows the number of jobs that may be active simultaneously.
 
CPU Number of calls
S7-300 4
S7-318 8
S7-400 8
Table 01: Number of SFC13 calls active simultaneously

Consequently, you can use the functions mentioned above simultaneously. However, you must ensure that the maximum number of SFC13 calls active at any one time does not exceed the values specified in Table 1.

The download of FB126 "PNIODiag" is available in Entry ID: 26996747.

Note
More information about system function SFC13 "DPNRM_DG" is available in the manual "System and Standard Functions for S7-300/400 Volume 1 and Volume 2" in Entry ID: 44240604 and in the STEP 7 Online Help.

Notes for the use of the system function SFC12 "D_ACT_DP"Go to beginning
Part number:

QUESTION:
How often can I call the system function SFC12 "D_ACT_DP" at the same time?

ANSWER:
SFC12 "D_ACT_DP" works asynchronously, i.e. this system function executes a task spanning over several cycles. In order to enable the execution of all necessary cycles, the parameter "REQ" has to be set as long as the task is active. The parameter "REQ" needs to stay on "TRUE", until the parameter "BUSY" has reached the "FALSE" level again.

using the S7 300 CPUs with an internal DP interface; the SFC12 can be called up to four times at the same time. The SFC12 can be called up to four times per DP rope (internal and external) at the same time at the S7-400 CPUs.

Note:
When using the CP342-5 as a DP master, SFC12 cannot be used for the activation/deactivation.

Activating a DP-Slave might be costly in time. If you want to abandon a running activation order, start the system function with the same value for LADDR and MODE = 2. Repeat the call with MODE = 2 till the successful abort of the activation task is displayed with RET_VAL. This procedure is only possible with the CPUs of the S7-300 line. You cannot abandon the task with S7 400 CPUs.

Note:
More information about the SFC12 can be found in the manual "SIMATIC System software for S7-300/400 System and Standard functions" at EntryID: 1214574" and in the STEP 7 ONLINE Help (Mark SFC block in the block container and press the F1 key).


What is consistent data?Go to beginning
Part number:

Description:
The size of the data area that cannot be changed simultaneously by concurrent processes is called a consistent data area. A data area that is larger than the consistent data area can be completely corrupted.

Definition:
Data that belongs together with regard to content and describes a process state at a specific time is called consistent data. For data to be consistent, it must not be changed or updated during processing or transfer.

Example:
You want to determine the mean value of a series of numbers. The following conditions hold for this example:

  • The elements of the series of numbers are determined at the beginning of the calculation.
  • The source data is made available in a buffer and has to be stored in a second buffer.
  • Transfer of the source data between the buffers is serial.
  • This takes different amounts of time.

If you do the calculation in a constant cycle, then not all of the elements include the latest value and you get a false mean value. If the series of numbers is handled as one unit or structure, the calculation is made only when all the elements of the series of numbers include a valid value. Here it is irrelevant in which order the determination of the elements is made or how much time is required. This series of numbers is then consistent.

Practical example:


Fig. 1

Packets with a data matrix code are scanned on a conveyor belt. The scanner feeds the data to a CPU via PROFIBUS. The data matrix code has a length of 8 bytes. Data transfer is not consistent, but in two steps of 4 bytes each.
If the next packet is scanned during data transfer of the first 4 bytes, the data in the CPU consists of the first 4 bytes of the first packet and the second 4 bytes of data of the second packet. The data is corrupted.
You must ensure that the 8 bytes are transferred as a whole. Consistency is required over the complete length of 8 bytes.

Other topics concerning consistent data are available in Entry ID 28991143.

How do you read data consistently from a DP standard slave/PROFINET IO device and write it consistently to a DP standard slave/PROFINET IO device?Go to beginning
Part number:

Description

SFC14 "DPRD_DAT"
Using the system function SFC 14 "DPRD_DAT" (read consistent data of a DP standard slave) you read out the data of a DP standard slave/PROFINET IO device. If no errors occurred during the data transfer, the data read is entered into the target area set up by RECORD. The target area must have the same length as you configured with STEP 7 for the selected module. With a DP standard slave with modular structure and with multiple DP identifications, with an SFC 14 call you can only ever access the data of one module / DP identification under the start address configured.

SFC15 "DPWR_DAT"
Using the system function SFC 15 "DPWR_DAT" (write consistent data to a DP standard slave) you transfer the data in RECORD consistently to the addressed DP standard slave/PROFINET IO device. The source area must have the same length as you configured with STEP 7 for the selected module.
With a DP standard slave with modular structure you can only access one module of the DP slave.

Maximum length and addressing of consistent user data areas on the PROFIBUS DP
In the manuals listed below you will find more information about the maximum length and addressing of consistent user data areas on the PROFIBUS DP.
 
Manual Chapter / Section Entry ID
SIMATIC S7-300 CPU 31xC and CPU 31x: Configure Addressing 13008499
SIMATIC Distributed IO ET 200S Interface Module IM151-7 CPU Addressing 56046285
SIMATIC Distributed IO ET 200S Interface Module IM151-8 PN/DP CPU Addressing 47409312
SIMATIC ET 200pro Interface Module IM 154-8 PN/DP CPU Addressing 44251850
SIMATIC Basic Module BM 147/CPU Addressing 1142364
Automation System SIMATIC S7-400 CPU Specifications Consistent Data 53385241
Table 01

Maximum length and addressing of consistent user data areas on the PROFIBUS IO
In the manuals listed below you will find more information about the maximum length and addressing of consistent user data areas on the PROFIBUS IO.
 
Manual Chapter / Section Entry ID
SIMATIC S7-300 CPU 31xC and CPU 31x: Configure Addressing 13008499
SIMATIC Distributed IO ET 200S Interface Module IM151-8 PN/DP CPU Addressing 47409312
SIMATIC ET 200pro Interface Module IM 154-8 PN/DP CPU Addressing 44251850
Automation System SIMATIC S7-400 CPU Specifications Consistent Data 53385241
Table 02

For communication processors (CPs) the size of the consistent area for a submodule is defined as follows.
 
CP MLFB Upper limit
CP 443-1 6GK7443-1EX20-0XE0 240 bytes
CP 443-1 6GK7443-1EX30-0XE0 240 bytes
CP 443-1 Advanced 6GK7443-1EX40-0XE0 128 bytes
CP 443-1 Advanced 6GK7443-1EX41-0XE0 240 bytes
CP 443-1 Advanced 6GK7443-1GX20-0XE0 240 bytes
CP 443-1 Advanced 6GK7443-1GX30-0XE0 240 bytes
CP 343-1 6GK7343-1EX21-0XE0 128 bytes
CP 343-1 6GK7343-1EX30-0XE0 240 bytes
CP 343-1 Advanced 6GK7343-1GX21-0XE0 128 bytes
CP 343-1 Advanced 6GK7343-1GX30-0XE0 240 bytes
CP 343-1 Advanced 6GK7343-1GX31-0XE0 240 bytes
Table 03

Notes
The PROFIBUS DP standard defines upper limits for the transfer of consistent user data. Current DP standard slaves keep to these upper limits. Older CPUs (<1999) have CPU-specific restrictions for the transfer of consistent user data.
The maximum length of data that these CPUs can read consistently from a DP standard slave or write consistently to a DP standard slave is given in the technical data under "DP master – user data per DP slave". With the value, more recent CPUs exceed the length of the data that a DP standard slave provides or receives.

Important
Distributed reading and writing of consistent data (<4 bytes) is also possible without system functions SFC14 and SFC15. Which modules you can use for this is described in Entry ID 8751062.

The table below shows the access to consistent data outside the process image.
 
Length of data area Read/write access Consistency of data
1 byte Load / Transfer Consistency over unit
2 bytes Word Load / Word Transfer Consistency over total length
3 bytes SFC14 / SFC15 Consistency over total length
4 bytes Double-word Load / Double-word Transfer Consistency over total length
5 bytes SFC14 / SFC15 Consistency over total length
Table 04

Example
In the example below an S7-400 CPU is used as DP master and a CP342-5 as DP slave.

The consistency area below is defined for the inputs and outputs of the DP slave:

  • For the outputs, 50 bytes are transferred consistently over the total length. These 50 bytes are available consistently in the process image partition 3 (PIP 3) of the S7-400 CPU and can therefore be read using load/transfer commands.
  • For the inputs, 20 bytes are transferred consistently over the total length. These 20 bytes are not stored in the process image or in process image partition and can only be written with the system function SFC14/15.


Fig. 01

The operating system of the CPU transfers the data consistently during process image updating. You can access this data in the process image using the load and transfer commands.
Alternatively, with S7-400 CPUs you can use system function SFC 26 "UPDAT_PI" or SFC 27 "UPDAT_PO" at any point in the program to update the process images. However, in this case the relevant PIP may not be updated by the system. If you do not or cannot place the data in a process image, then you should use the system functions SFC14 and SFC15 for data communications.

More information about this is available in the following entries:

  • "Consistent data in S7-400, summary of mechanisms" - Entry ID: 11646774
  • "Use of Process Image Partitions in Organization Blocks" - Entry ID:18325216

Disabling DP slaves after startup of the CPUGo to beginning
Part number:

QUESTION:  
Can I disable a DP slave during startup of the CPU?

ANSWER:  
No, it is not possible to disable a DP slave during startup because you must not call SFC12 in the startup OBs of an S7 CPU (with S7-300 OB100 and with S7-400 OB100, 101, 102).

However, there is one possibility of disabling a DP slave immediately after startup of the CPU using SFC12 "D_ACT_DP". This means that the disabling job is started in the first OB1 cycle.
In the disabling procedure it is irrelevant whether the DP slave is connected to the PROFIBUS during the job or is not on the bus.

More information on SFC12 is available in the Online Help of STEP 7 or in the manual "System Software for S7-300/400 System and Standard Functions" in Entry ID 1214574.  A complete sample application for using SFC12 "D_ACT_DP" is available in Entry ID 5608020.

The following download includes a block that can disable/enable multiple DP slaves with one call. Thus, for example, at the beginning of cyclic processing you can disable a series of DP slaves. The block is based on SFC12.

FB12_D_ACT_DYN.exe ( 84 KB )  

A detailed description on how to handle and parameterize FB12 "D_ACT_DYN" is available in the following PDF document.

FB12_D_ACT_DYN_e.pdf ( 39 KB )  

Copy the FB12_D_ACT_DYN.exe file into a separate directory and then start the file with a double-click. The library created with STEP 7 V5.3 SP1 then unpacks with all the associated subdirectories. You can then use the SIMATIC Manager to open the unpacked library and implement the blocks contained in it.

Diagnostics information of the FB125 with disabled DP slaveGo to beginning
Part number:

QUESTION:  
Which diagnostics information does FB125 provide if I have disabled a DP slave using SFC 12?

ANSWER:  
You are using FB125 as a convenient diagnostics option to monitor the PROFIBUS DP - see Entry ID: 387257.
Now you disable a configured DP slave using SFC 12.

Since FB125 only checks the actual presence of all the polled DP slaves on the PROFIBUS DP, it now reports any disabled DP slaves as defective nodes.

If you want to read out the enabled status of the stations of a DP master system, you can use SFC 15 to evaluate the system status list with SZL-ID W#16#0192 on the integrated DP interface..
In the case of an external DP interface you read out the enabled status of the individual DP slaves using SFC 12.

More information on how to use SFC 12 and SFC 51 is available in the manual "System Software for S7-300/400 System and Standard Functions" in Entry ID: 1214574 or in the Online Help of STEP 7.


Enabling a disabled DP slave with SFC 12 "D_ACT_DP"Go to beginning
Part number:

QUESTION:  
What happens when with SFC 12 I enable a disabled DP slave that is physically separated from the DP bus?

ANSWER:  
If you attempt to use SFC 12 "D_ACT_DP" to enable a disabled DP slave that is physically separated from the DP bus, for about 1 minute SFC 12 delivers the error code W#16#7002 with BUSY bit 1, to indicate that the enable job is still being processed. After about 1 minute RET_VAL delivers the value W#16#80A2 for about one CPU cycle. This indicates that the DP slave addressed is not responding. The DP slave remains disabled after this procedure. The BF LED of the associated DP master remains off during this procedure.

Note:
If the DP slave is later connected to the DP bus and is to be enabled, you must trigger SFC 12 again.

More information on the behavior of SFC 12 is available in the Online Help of STEP 7 or in the manual "System Software for S7-300/400 System and Standard Functions" in Entry ID: 1214574.


Parameter assignment of SFC 103 / SFC 59 required for identifying and reading out topology dataGo to beginning
Part number:

QUESTION:
Which parameters do I have to assign to the system functions SFC103 "DP_TOPOL" and SFC59 "RD_REC" to be able to identify and read out the topology data of a diagnostics repeater (DR)?

ANSWER:
The system function SFC103 "DP_TOPOL" triggers identifying of the topology for a selected DP master system. In order to be able to use this system function your CPU has to meet certain requirements. These are given in detail in Entry ID: 17452619.

An SFC103 call addresses all diagnostics repeaters on a DP master system.

Parameter

Meaning

Data type

I/O

REQ

Trigger identifying of topology

BOOL

I

R

Abort identifying of topology

BOOL

I

DP_ID

ID of the DP master system whose topology is to be identified (see Fig. 1)

INT

I

RET_VAL

Return value of the job status

INT

O

BUSY

Identifying of topology not yet finished

BOOL

O

DPR

PROFIBUS address of the diagnostics repeater reporting the error

BYTE

O

DPRI

Measuring segment of the diagnostics repeater reporting the error

BYTE

O

Table 1: Calling parameters of the SFC103 "DP_TOPOL" - identifying of topology

When SFC59 "RD_REC" is called, the data stored in a diagnostics repeater is read out. The volume of the data that can be read out by a SFC59 call is limited to 240 bytes. The diagnostics repeater however provides 675 bytes of data only for the topology. The topology data in the diagnostics repeater is therefore stored in 4 different data records which are only 170 or 165 bytes in size. Thus with four calls of the SFC59 all the topology data of a diagnostics repeater can be read out.

Parameter

Meaning

Data type

I/O

REQ

Request to read a data record

BOOL

I

IOID

ID of the address area - the DR is configured as peripheral input (PI) (B#16#54)

BYTE

I

LADDR

Logical address of the module - the diagnostics address is to be used with the DR (see Fig. 1)

WORD

I

RECNUM

Data record number (valid values for the identifying of topology data 32h...35h for the data records 50...53)

BYTE

I

RET_VAL

If an error occurs during processing of the function, the return value contains an error code. In addition: length of the data record actually transferred in bytes (possible values: 165 or 170), if the target area is greater than the data record transferred and if no error occurs during the transfer.

INT

O

BUSY

The read procedure has not yet finished

BOOL

O

RECORD

Target area for the data record read

BYTE

O

Table 2: Parameters of the SFC59 "RD_REC" - read data record

Fig. 1: Parameters from the HW Config required for the SFC103 and SFC59 call ( 56 KB )  

Recommendation for Programming: 
The structure of four data records of the topology table is identical. If you create an UDT, in which the structure is determined uniquely, then you can use this UDT several times when specifying the structure of the required data block. This saves you creating the data structure time and again for every data block. In case of changes only the UDT is to be changed.

Note:
More information on this topic is available in the STEP 7 Online Help or in section 13.7 "Identifying the Bus Topology in a DP Master System with SFC 103 DP_TOPOL" of the manual "SIMATIC System Software for S7-300/S7-400 System and Standard Functions". The manual is available in Entry ID: 1214574.


What are the requirements for using the "Prepare cable diagnostics" function?Go to beginning
Part number:

Configuration Notes:
Below are the requirements for using the STEP 7 function "Prepare cable diagnostics" or the system function SFC103 "DP_TOPOL".

Note:
With the system function SFC103 "DP_TOPOL" you can trigger the "Prepare cable diagnostics" function from a STEP 7 program. A sample program is available in the manual "SIMATIC Diagnostic Repeater for PROFIBUS-DP" in Entry ID: 7915183.

S7 system requirements

The following S7-300 CPUs support system function SFC103:
 
CPUs Ordernumber
313C-2 DP* 6ES7313-6CF03-0AB0
314C-2 DP* 6ES7314-6CG03-0AB0
315-2 DP* 6ES7315-2AG10-0AB0
315-2 PN/DP* 6ES7315-2EH13-0AB0
315F-2 DP* 6ES7315-6FF01-0AB0
315F-2 PN/DP* 6ES7315-2FH13-0AB0
315T-2 DP* 6ES7315-6TH13-0AB0
317-2 DP* 6ES7317-2AJ10-0AB0
317-2 PN/DP* 6ES7317-2EK13-0AB0
317F-2 DP* 6ES7317-6FF03-0AB0
317F-2 PN/DP* 6ES7317-2FK13-0AB0
317T-2 DP* 6ES7317-6TK13-0AB0
CPU 319-3 PN/DP 6ES7318-3EL00-0AB0
* only CPUs with Firmware from V2.5.0

If you do not want to trigger topology diagnostics via the CPU, but want to fetch the diagnostics data exclusively from the diagnostics repeater, you only need system function SFC59 or system function block SFB52. These are also implemented in the other current S7-300 CPUs.

The following S7-400 CPUs support system function SFC103:
 
CPUs Ordernumber
CPU 412-1 6ES7412-1XF03-0AB0
CPU 412-2 6ES7412-2XG00-0AB0
CPU 412-2 PCI 6ES7612-2QH00-0AB4
CPU 414-2 6ES7414-2XG03-0AB0
CPU 414-3 6ES7414-3XJ00-0AB0
CPU 414-4 H 6ES7414-4HJ00-0AB0
CPU 416-2 6ES7416-2XK02-0AB0
CPU 416-2 PCI 6ES7616-2QL00-0AB4
CPU 416-3 6ES7416-3XL00-0AB0
CPU 417-4 6ES7417-4XL00-0AB0
CPU 417-4 H 6ES7417-4HL01-0AB0

You need firmware version 3.1 for the S7-400 CPUs if you want to trigger topology diagnostics using SFC103 via the CPU. This function corresponds to the "Prepare cable diagnostics" in STEP 7. If you want to fetch the diagnostics data exclusively from the diagnostics repeater, you only need system function SFC59. This is already implemented in previous versions. This means that in order to simply read diagnostics data you do not necessarily need a firmware update.
As from firmware version 3.0 of the S7-400 CPUs system function block SFB52 is implemented in addition to SFC59 for reading diagnostics data.

Note:
If you do not connect the PROFIBUS for the diagnostics repeater directly to the CPU interface, but via a CP, then to execute the "Prepare cable diagnostics" function it must be supported not only by the CPU but also by the CP.

The following S7-400 CPs support the "Prepare cable diagnostics" function:
 
CP Ordernumber Firmware
CP 433-5 Extended 6GK7 443-5DX04-0XE0 from 6.1

 PG/PC system requirements

Setting required in "Set PG/PC interface"
With the interface setting "CPxxxx(Auto)" it is not possible to measure the nodes on the PROFIBUS DP. You must the interface to "CPxxxx(PROFIBUS)".

Implementable communication processors
The interfaces Onboard-MPI for PG740, MPI-ISA Card (6ES7 793-2AA..-0AA0) and PC Adapter (USB and serial) do not support the "Prepare cable diagnostics" function.
If you start the function nevertheless in STEP 7, measuring is stopped after the monitoring time expires. In this case the status "Diagnostics stopped" is shown in STEP 7 plus the additional text "Time monitoring addressed".

The following interface cards support the "Prepare cable diagnostics" function on the PROFIBUS DP:

  • CP5511
  • CP5512
  • CP5611

Software requirements:
For triggering the "Prepare cable diagnostics" function that is supported as from 6ES7 972-0AB01-0XA0 you require at least STEP 7 version V5.2 with Service Pack 1. This Service Pack is available in Entry ID 16540057

 Entry ID:22821313   Date:2012-12-20 
I regard this article....as helpfulas not helpful                                 






























related links
What are the requirements for usi ...
SIMATIC S7-400 S7-400 Automation ...
SIMATIC S7-400 S7-400 Automation ...
SIMATIC S7-400 S7-400 Automation ...
SIMATIC Fault-tolerant Systems S7 ...
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Help
Online Help
Guided Tour