Professional Documents
Culture Documents
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
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
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).
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
IK-PBSYS / FDL Connections Page 4 03/2007
Siemens AG 2007 - Subject to change without prior notice
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
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.
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.
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).
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
IK-PBSYS / FDL Connections Page 10 03/2007
Siemens AG 2007 - Subject to change without prior notice
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
IK-PBSYS / FDL Connections Page 11 03/2007
Siemens AG 2007 - Subject to change without prior notice
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
IK-PBSYS / FDL Connections Page 12 03/2007
Siemens AG 2007 - Subject to change without prior notice
Notes
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
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
Overview tab Displays an overview of all configured FDL connections of the selected S7 station
with relevant parameters (local and remote LSAPs).
Configuration results
SITRAIN
IK-PBSYS / FDL Connections Page 15 03/2007
Siemens AG 2007 - Subject to change without prior notice
Notes
SITRAIN
IK-PBSYS / FDL Connections Page 16 03/2007
Siemens AG 2007 - Subject to change without prior notice
Notes
MPI=2
CPU
CP
Station2 PROFIBUS=3
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
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.
SITRAIN
IK-PBSYS / FDL Connections Page 19 03/2007
Siemens AG 2007 - Subject to change without prior notice
Notes
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
IK-PBSYS / FDL Connections Page 21 03/2007
Siemens AG 2007 - Subject to change without prior notice
Notes
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
IK-PBSYS / FDL Connections Page 23 03/2007
Siemens AG 2007 - Subject to change without prior notice
Notes
MPI=2
CPU
CP
Station2 PROFIBUS=3
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
IK-PBSYS / FDL Connections Page 25 03/2007
Siemens AG 2007 - Subject to change without prior notice
SITRAIN
IK-PBSYS / FDL Connections Page 26 03/2007
Siemens AG 2007 - Subject to change without prior notice
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.
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
IK-PBSYS / FDL Connections Page 28 03/2007
Siemens AG 2007 - Subject to change without prior notice
Notes
SITRAIN
IK-PBSYS / FDL Connections Page 29
Notes
CP CPU CP CPU CP
CPU
PROFIBUS
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
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.
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
IK-PBSYS / FDL Connections Page 33 03/2007
Siemens AG 2007 - Subject to change without prior notice
Notes
SITRAIN
IK-PBSYS / FDL Connections Page 34 03/2007
Siemens AG 2007 - Subject to change without prior notice
Notes
CP CPU CP CPU CP
CPU
PROFIBUS
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.
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