You are on page 1of 36

Automation and Drives

Field Data Link connections (FDL)

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

Contents Page
Field Data Link connections (FDL) ................................................................................................... 2
Basic procedure ................................................................................................................................. 3
Configured FDL connections ............................................................................................................. 4
Operating principle: AG-SEND and AG-RECEIVE ............................................................................. 5
Send block: AG-SEND ....................................................................................................................... 6
Receive block: AG-RECEIVE ............................................................................................................ 7
DONE, ERROR and STATUS parameters ......................................................................................... 8
Network/project Variant: One subnet - multiple projects .................................................................... 9
What does "unspecified connection" mean? ...................................................................................... 10
Unspecified FDL connection, properties ............................................................................................ 11
Unspecified connection (in every station) ........................................................................................... 12
Load connection configuration (general) ........................................................................................... 13
Properties of the FDL connection ..................................................................................................... 14
Configuration results ......................................................................................................................... 15
User programs: AG-SEND and AG-RECEIVE (for both CPUs) ........................................................ 16
Exercise 1: FDL connection .............................................................................................................. 17
Properties of the Free Layer 2 connection ....................................................................................... 18
Free Layer 2 connection in stations 1 and 2 ..................................................................................... 19
Reservation of job header (send mailbox) .......................................................................................... 20
Program in station AS1 with AG-SEND ............................................................................................ 21
Reservation of job header (receive mailbox) ...................................................................................... 22
Program in station AS2 with AG-RECEIVE ....................................................................................... 23
Exercise 2: FDL connection of type "Free Layer 2" ............................................................................ 24

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 1 FDL Connections
Automation and Drives

Field Data Link connections (FDL)

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

Contents Page
If you want to know more ................................................................................................................... 25
FDL connection with broadcast, definition ......................................................................................... 26
Broadcast connection ....................................................................................................................... 27
User program in the send station ....................................................................................................... 28
Receive program in the broadcast stations ...................................................................................... 29
Exercise 3: FDL connection of type broadcast ................................................................................. 30
FDL connection with multicast, definition ........................................................................................... 31
Multicast connection ......................................................................................................................... 32
User program in the send station ..................................................................................................... 33
Receive program in the multicast station ........................................................................................ 34
Exercise 4: FDL connection of type multicast ................................................................................... 35
Connections to partners in other projects ......................................................................................... 36

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 2 FDL Connections
Automation and Drives

Basic procedure

Configuring
CP 342-5 DP
Use of
library blocks

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

Configuration 1. Configure the DP master system, i.e. specify the DP master and
associated DP slaves in the configuration table.
2. Assign the DP master system parameters (IO addresses, groups, etc).

S7 program You program the user program in the S7-CPU :


1. Exchange of data between the DP master and CPU. Blocks FC1
FC1 "DP_SEND" and FC2 "DP_RECV" are used for this purpose.
2. Functional processing of IO data from DP slaves in the S7 program.
3. Detection of slave faults by programmed diagnostic routines, i.e.
in contrast to the integrated interface, faults are not automatically detected
(OB86) if a slave fails.
For this purpose, another block FC3 "DP_DIAG" in the S7 program
must be used.

Library The functions described here (blocks of type FC) plus the STEP 7 basic package
and the loadable option NCM S7 for PROFIBUS are all supplied as a library.
Instructions on how to use these blocks can be found below.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 3 FDL Connections
Automation and Drives

Configured FDL connections

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

Application Data communication via a configured FDL connection is suitable for


transferring related data blocks between two or
more PROFIBUS nodes. FDL connections are categorized as follows:

Specified FDL connection


The communicating nodes are uniquely defined by the connection configuration.
The connection partner can be located inside or outside the STEP 7 project
(multiprojects).

Unspecified FDL connection (Free Layer 2 access)


The address of the connection partner is not specifically configured.
The communicating nodes are determined by address data in the communication
job in the user program. This means that up to 126 nodes can be accessed by
means of an "unspecified" FDL connection provided that they are nodes which
support FDL connections.
The connection partner can be located inside or outside the STEP 7 project.

FDL connection with broadcast


All nodes on PROFIBUS ready to receive with broadcast can be
accessed.
FDL connection with multicast
All nodes on PROFIBUS ready to receive with multicast can be accessed.
.

Application The following diagram illustrates the application of FC blocks


AG_SEND / AG_LSEND and AG_RECV / AG_LRECV for bidirectional
data transfers via one configured FDL connection.
A job header must be provided in the user data area for certain types
of connection.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 4 FDL Connections
Automation and Drives

Operating principle:
AG-SEND and AG-RECEIVE

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

Operating principle of SEND


The flowchart above shows the normal chronological sequence for a data
transmission initiated with AG_SEND in the user program.
The send job is executed as soon as parameter ACT = 1 is
passed. Parameter ACT = 0 must then be transferred in at least one further call.
The status display in output parameters DONE, ERROR and STATUS is updated
in every block call and can be evaluated. To update the status display again
without executing another send job, therefore, another block call containing
parameter ACT = 0 must be issued in each case.

Operating principle of RECV


The flowchart above shows the normal chronological sequence for data reception
initiated with AG_RECV in the user program.
Every AG_RECV job in the user program is acknowledged by the PROFIBUS CP
with a display in output parameters NDR, ERROR and STATUS.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 5 FDL Connections
Automation and Drives

Send block: AG-SEND

Library
SIMATIC_NET_CP

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

FC2 AG-SEND The FC block AG_SEND / AG_LSEND passes data to the PROFIBUS CP for
transfer via a configured FDL connection. The data area specified can be a
process image area, a memory area or a data block area.
Execution without errors is indicated when the complete user data area has been
successfully transferred via PROFIBUS.

Call interface Call FC 5


ACT := M 20.0 // Task activation with memory bit
ID := MW 22 // Connection ID (as configured)
LADDR := W#16#0100 // Log. address (hardware config.)
SEND := P#DB99.dbx10.0 Byte 240 // Buffer containing send data
LEN := MW 24 // Length data for send data
DONE := M 20.1 // Indication of completion
ERROR := M 20.2 // Error indication
STATUS := MW 26 // Status display

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 6 FDL Connections
Automation and Drives

Receive block: AG-RECEIVE

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

FC6 AG_RECV The FC block AG_RECV accepts data from the PROFIBUS CP which have been
transferred via a configured FDL connection.
The data area specified for data transfer can be a process image area, a memory
area or a data block area.
Execution without errors is indicated when the data from the PROFIBUS CP have
been successfully transferred.

Call interface Call FC 6


ID := MW 30 // Connection ID (as configured)
LADDR := W#16#0100 // Log. address (hardware config.)
RECV := P#DB99.dbx10.0 Byte 240 // Buffer containing receive data
NDR := M 26.0 // New incoming data ?
ERROR := M 26.1 // Error indication, see ONLINE help
STATUS := MW 28 // Status indication, see ONLINE help
LEN := MW 30 // Number of bytes that were accepted

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 7 FDL Connections
Automation and Drives

DONE, ERROR and STATUS parameters


Job

Job executed Job runs Job done


no error with = with =
8302H Job runs 8302H No receive resources on the
8181H no receive destination station; the receiving
data available station cannot process received data
quickly enough or has not prepared
any receive resources.
8311H The destination station cannot be
obtained at the specified PROFIBUS
address or the service used is not
possible for the specified PROFIBUS
address.
80C3H Resources (memory) occupied.
80D2H Module start address incorrect.

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

Status information The following parameters must be evaluated for job status information in the user
program:
- DONE or NDR
These parameters (DONE for send jobs and NDR for receive jobs)
signal the (successful) execution of a job.
- ERROR
Indicates that a job has not been successfully executed.
- STATUS
This parameter supplies detailed information on job execution. Status
displays can be supplied while a job is being executed (DONE= 1 and
ERROR=0).

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 8 FDL Connections
Automation and Drives

Network/project variant:
One subnet - multiple projects

Part 1 Part 2

PROFIBUS Subnet 1

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

Configuration For plants in a complex network, it can be practical in order to achieve a more
efficient division of work to manage plant sections in different (sub)projects.
In such a setup, data may need to be exchanged via a cross-project subnet and
for this reason, cross-project connections must be set up.

Organization The resulting requirements for user-friendly, consistent ways of configuring the
communication are supported additionally in STEP 7 V5.2 or later with
multiproject feature.
The multiproject functions in STEP 7 enable management of multiple projects in
one multiproject with distributed authoring, splitting and merging of projects.

Options The new multiproject functionality has added the following new options:
Connection to a partner in an unknown project using Multiproject
Specified connections with proxy objects
Unspecified connections (with / without Layer 2)

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 9 FDL Connections
Automation and Drives

What does "unspecified connection" mean?

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

Unspecified FDL connection (Free Layer 2 access)


The address of the connection partner is not specifically configured. The
communicating nodes are determined by address data in the communication job
in the user program.
This means that up to 126 nodes can be accessed by means of an "unspecified"
FDL connection provided that they are nodes which support FDL connections.
The connection partner can be located inside or outside the STEP 7 project.

Jobs When data are transferred via an unspecified FDL connection, the
PROFIBUS CP performs the following tasks:
- For receiving data:
Enters the sender and the FDL service in the job header.
- For sending data:
Evaluates the job header and addresses the partner,
executes the selected FDL service.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 10 FDL Connections
Automation and Drives

Unspecified FDL connection, properties

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

Properties of an unspecified FDL connection (Free Layer 2 access)


An unspecified FDL connection with open Layer 2 access allows program-
controlled
addressing of the communication partner and data exchange between
two nodes on PROFIBUS. The key features of this connection type
are:
Data transfer is bidirectional, in other words, it is possible to send and
receive on the FDL connection at the same time.
The local node is fixed in the configuration. The remote node is entered in
the job header of the job buffer by the user program when AG_SEND is
called. This means that every node on PROFIBUS (PROFIBUS addresses
0 to 126) can be reached.
The PB address, LSAP and the sender service can be read from the job
header of AB_RECV.

Data volume
To find out how many FDL connections the relevant PROFIBUS CP can support,
please refer to the product information supplied with the PROFIBUS CP. You can
increase the number of connections per station by adding more CPs.
Up to 236 bytes of user data can be transferred per job buffer. The job header
occupies a further 4 bytes.

Options The new multiproject functionality has added the following new options:
Connection to a partner in an unknown project using Multiproject
Specified connections with proxy objects
Unspecified connections (with / without Layer 2)

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 11 FDL Connections
Automation and Drives

Unspecified connection (in every station)

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

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 12 FDL Connections
Automation and Drives

Load connection configuration (general)

Selected stations and


partners can be loaded

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

General principle In general, all connections etc. configured in the NetPro tool must be compiled
and loaded. Analogous to the hardware configuration process, compilation
generates additional system data blocks which must be loaded to the selected
stations and/or partners.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 13 FDL Connections
Automation and Drives

Properties of the FDL connection

"Free Layer 2 access"

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

Tabs The properties dialog is implemented as a tab dialog which displays related
parameter groups on individual tab sheets. The following tabs are provided for
FDL connections:

General tab Displays the global parameters of the connection and the local connection
name of the FDL connection

Addresses tab Displays the local and remote address information.

Overview tab Displays an overview of all configured FDL connections of the selected S7 station
with relevant parameters (local and remote LSAPs).

Local SAPs Local LSAP (Link ServiceAccessPoint):


The local LSAP controls the readiness of the PROFIBUS CP to receive.
The receive resources for the LSAP are provided in the PROFIBUS CP for
receiving data on the FDL connection.

Remote LSAP (Link ServiceAccessPoint):


The remote LSAP controls transmission in the PROFIBUS CP. Over the
LSAP, the PROFIBUS CP sends data to the node on the FDL connection.
The destination node must be ready to receive for this service access point.

Unspecified FDL connection


An unspecified FDL connection can be used in 2 different ways:
Connection to an "Other station" in a different project
You can specify the remote PROFIBUS address and the LSAP for any
destination station.
The destination station can be either inside or outside the current STEP 7
project.
Until the remote address is specified, no data can be exchanged via the
FDL connection.
Another option is to use a "Free Layer 2 connection".

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 14 FDL Connections
Automation and Drives

Configuration results

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

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 15 FDL Connections
Automation and Drives

User programs: AG-SEND and AG-RECEIVE


(for both CPUs)

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

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 16 FDL Connections
Automation and Drives

Exercise 1 : FDL connection


"AS2"
Unspecified
Log. FDL connection connection
"AS1" configured
Unspecified
Station1 connection
configured CPU CP

MPI=2
CPU
CP
Station2 PROFIBUS=3

MPI=2 Physical connection


via PROFIBUS

PROFIBUS=2

"AG_SEND" "AG_RECEIVE"

"AG_RECEIVE" "AG_SEND"

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

Task description Your task is to configure a data exchange via an FDL connection between two S7
controls which are located in different S7 projects.

Procedure 1. Use PROFIBUS and the CP342-5 modules to network your training
case with your neighboring group. Agree which bus addresses are
to be used with your neighboring group.
2. Create a new S7 project Station1.
3. Engineer the HW configuration to match your station.
4. Follow the procedure outlined in the theory section to set up an unspecified
FDL connection in your station.
Discuss which connection addresses to use
with your partner group so that the address settings match.
5. Transfer the hardware and the connection to your CPU
6. Write an S7 program for this CPU with which you can SEND and RECEIVE
data to and from the other station.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 17 FDL Connections
Automation and Drives

Properties of the Free Layer 2 connection

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

Free Layer 2 To configure a Free Layer 2 access, click on the appropriate button. You cannot
then make entries in the input fields for the remote PROFIBUS address or remote
LSAP because the destination addresses will be defined by the user program in
this case.
The alternative is to make a connection to an "Other station" in a
different project.

Block parameter attributes


- ID: This value must be entered as the block call parameter ID to
identify the connection in the user program.
- LAADR: This value must also be programmed as the actual parameter for
FC SEND / FC RCV in the user program.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 18 FDL Connections
Automation and Drives

Free Layer 2 connection in stations 1 and 2

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

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 19 FDL Connections
Automation and Drives

Reservation of job header (send mailbox)

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

Job header The following connection types require a job header in the FDL user data area:
Unspecified FDL connection with Free Layer 2 access
FDL connection with broadcast
FDL connection with multicast
The diagram above shows the structure of the job buffer and the
meaning and location of the parameters in the job header.
The user data area can be up to 240 bytes in length. Up to 236 bytes of
user data can be transferred. 4 bytes are reserved for the job
header. Please note that the data length specified in the block call (LEN
parameter) must include the header and the user data!

Call Please refer to the table for the types of connection and job which require
parameter assignments in the job header.
The job header is located in the FDL (user) data area. It occupies the
first 4 bytes in this data area and must be included in the length specification in
parameter LEN. The maximum user data length is therefore reduced to 236 bytes
in jobs with a job header.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 20 FDL Connections
Automation and Drives

Program in station AS1 with AG-SEND

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

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 21 FDL Connections
Automation and Drives

Reservation of job header (receive mailbox)

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

Call Please refer to the table below for the types of connection and job which require
parameter assignments in the job header.
The job header is located in the FDL (user) data area. It occupies the
first 4 bytes in this data area and must be included in the length specification in
parameter LEN. The maximum user data length is therefore reduced to 236 bytes
in jobs with a job header.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 22 FDL Connections
Automation and Drives

Program in station AS2 with AG-RECEIVE

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

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 23 FDL Connections
Automation and Drives

Exercise 2 : FDL connection of type


"Free Layer 2"
"AS2"
Unspecified
Log. FDL connection connection
"AS1" configured
Unspecified
Station1 connection
configured CPU CP

MPI=2
CPU
CP
Station2 PROFIBUS=3

MPI=2 Physical connection


via PROFIBUS

PROFIBUS=2

"AG_SEND" "AG_RECEIVE"

"AG_RECEIVE" "AG_SEND"

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

Task description Your task is to configure a data exchange via an FDL connection between two S7
controls which are located in different S7 projects.
You must use a type "Free Layer 2" connection to that you can choose the
connection partner in the S7 program.

Procedure 1. Use PROFIBUS and the CP342-5 modules to network your training
case with your neighboring group. Agree which bus addresses are to be
used with your neighboring group.
2. Create a new S7 project Station1
3. Engineer the HW configuration to match your station.
4. Create an unspecified FDL connection of type "Free Layer " in your station
according to the procedure described in the theory section.
To obtain the correct settings for the connection addresses,
discuss and coordinate the address settings with your partner group.
5. Transfer the hardware and the connection to your CPU
6. Write an S7 program for this CPU with which you will SEND / RECEIVE
data to / from the other station.
7. Evaluate the data in the receive header of your station.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 24 FDL Connections
Automation and Drives

If you want to know more

SITRAIN
IK-PBSYS / FDL Connections Page 25 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 25 FDL Connections
Automation and Drives

FDL connection with broadcast, definition

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

Properties A broadcast connection allows a message to be transmitted to several


receivers with one job. A node can therefore receive messages on the same
broadcast connection at the same time as other nodes are receiving them on
PROFIBUS:
Data transfer is bidirectional, i.e. data can be transmitted and received
simultaneously on the broadcast connection.
Data are sent and received with the FDL service SDN (Send Data
with No Acknowledge).
A job buffer must be specified with the AG_SEND call for send jobs.
The job header area must be reserved, but the content is not
relevant.
The PB address, LSAP and the broadcast sender service can be read from
the job header of AG_RECV.
The LSAP area from 1 to 56 is used for send jobs. LSAP 63
is reserved for all broadcast nodes for receive jobs.

Broadcast Select "All broadcast nodes" as the connection partner/station when you
set up the FDL connection.

Data volume Each PROFIBUS CP can support one broadcast connection. Up to 236 bytes of
user data can be transferred per job buffer.
The job header occupies a further 4 bytes. If you use an FDL connection with
broadcast, you cannot receive messages on any other broadcast connection
on the same CP.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 26 FDL Connections
Automation and Drives

Broadcast connection

"Broadcast partner"

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

Broadcast The remote address parameters are predefined for FDL connections with
broadcast. All broadcast nodes can be reached via PROFIBUS address 127.
Receive data from all broadcast nodes are received via LSAP 63.
The local address parameters are entered in the job header of the message for
send jobs and supplied to the receiver node. The user program on the remote
partner can thus identify the sender of the broadcast message frame.

Note If you are using an FDL connection with broadcast, you cannot use any other
broadcast connection on the same CP, e.g. any PROFIBUS FMS connections
with broadcast.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 27 FDL Connections
Automation and Drives

User program in the send station

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

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 28 FDL Connections
Automation and Dri

SITRAIN
IK-PBSYS / FDL Connections Page 29

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 29 FDL Connections
Automation and Drives

Exercise 3 : FDL connection of type broadcast


Your station Other station 1 Other station 2

CP CPU CP CPU CP
CPU

MPI=2 MPI=2 MPI=2

PROFIBUS

Unspecified Unspecified Unspecified


connection connection connection
configured configured configured

"AG_SEND" "AG_RECEIVE" "AG_RECEIVE"


broadcast

"AG_RECEIVE" "AG_RECEIVE" "AG_SEND"


broadcast

"AG_RECEIVE" "AG_SEND" "AG_RECEIVE"


broadcast

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

Task description Your task is to configure a data exchange via an FDL connection between
several S7 controls which are located in different S7 projects.
One station in each case must send a broadcast message to all other stations in
the network.

Procedure 1. Use PROFIBUS and the CP342-5 modules to network the training cases of
all training groups. Discuss and agree the bus addresses to be used with
your neighboring group.
2. Create a new S7 project Station1.
3. Engineer the HW configuration to match your station.
4. Create an unspecified FDL connection of type "Free Layer " in your station
according to the procedure described in the theory section.
To obtain the correct settings for the connection addresses, agree which
ones to use with the other groups.
5. Transfer the hardware and the connection to your CPU
6. Write an S7 program for this CPU with which you can broadcast data to all
other stations in the network.
7. Evaluate the data in the receive header of your station.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 30 FDL Connections
Automation and Drives

FDL connection with multicast, definition

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

Properties With an FDL connection with multicast, it is possible to use one job to send a
message to multiple nodes within a multicast network. The properties of this type
of FDL connection are as follows:
Data transfer is bidirectional, i.e. it is possible to transmit and receive
simultaneously on the FDL connection with multicast.
Data are sent and received with the FDL service SDN (Send Data
with No Acknowledge).
Data are sent via the same LSAP (area 1 to 56) for the entire multicast
network.
A job buffer must be specified with the AG_SEND call for send jobs.
The job header area must be reserved, but the content is not
relevant.
The PROFIBUS address, the LSAP and the multicast sender service
can be read from the job header of the AG_RECV.

Data volume For the number of FDL connections which can be supported by the relevant
PROFIBUS CP, please refer to the product information supplied with the CP.
It is possible to increase the number of connections per station by
adding further CPs.
Up to 236 bytes of user data can be transferred per job buffer. The job header
occupies a further 4 bytes.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 31 FDL Connections
Automation and Drives

Multicast connection

"Multicast partner"

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

Multicast The remote address parameters are predefined for FDL connections with
multicast. All the S7 stations in the relevant multicast network use the same LSAP
(area 1 to 56) to send and receive data. For this reason, the LSAP can only be
selected locally and is automatically transferred to the remote LSAPs.

Exception: You can configure the value of the local LSAP for a PC station independently of
the partner's LSAP value.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 32 FDL Connections
Automation and Drives

User program in the send station

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

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 33 FDL Connections
Automation and Drives

Receive program in the multicast station

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

Notes

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 34 FDL Connections
Automation and Drives

Exercise 4 : FDL connection of type multicast


Your station Other station 1 Other station 2

CP CPU CP CPU CP
CPU

MPI=2 MPI=2 MPI=2

PROFIBUS

Unspecified Unspecified Unspecified


connection connection connection
configured configured configured

"AG_SEND" "AG_RECEIVE" "AG_RECEIVE"


broadcast

"AG_RECEIVE" "AG_RECEIVE" "AG_SEND"


broadcast

"AG_RECEIVE" "AG_SEND" "AG_RECEIVE"


broadcast

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

Task description Your task is to configure a data exchange via an FDL connection between
several S7 controls which are located in different S7 projects.
One station in each case must send a multicast message to a group of other
stations.

Procedure 1. Use PROFIBUS and the CP342-5 modules to network the


training cases of all training groups. Discuss and agree the bus
addresses to be used with your neighboring group.
2. Create a new S7 project Station1.
3. Engineer the HW configuration to match your station.
4. Create an unspecified FDL connection of type "Free Layer " in your station
according to the procedure described in the theory section.
To obtain the correct settings for the connection addresses,
agree which ones to use with the other groups.
5. Transfer the hardware and the connection to your CPU
6. Write an S7 program for this CPU with which you can multicast
data to all other stations in the network.
7. Evaluate the data in the receive header of your station.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 35 FDL Connections
Automation and Drives

Connections to partners in other projects

Proxy object
"Other station"

Interface(s) for
"Other station"

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

Connections to partners in other projects


There are two possible methods for setting up connections to partners which
have been configured in other STEP 7 projects or with different tools outside the
current STEP 7 project:
Connection via proxy objects such as "SIMATIC S5", "PC/PG",
"SIMATIC PC Station" or "Other Station".
Unspecified connections:
Connections to another unknown device (e.g. diagnostics unit)
are configured as "unspecified" connections. Unspecified FDL
connections can be used in 2 different ways
Free Layer 2 access:
The communication partner is addressed via the user program.
Connection to unconfigured partner:
The communication partner which is not configured in the current
STEP 7 project is addressed in the connection properties dialog.

SITRAIN training for IK-PBSYS


Automation and Industrial Solutions Page 36 FDL Connections

You might also like