Distributed I/O and Parameter Assignment: Simatic Net

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 27

PROFIBUS

Distributed I/O and Parameter Assignment

C P U 4 1 4 -2

Error LEDs
X 2
3 4

Error LEDs
414 - 2XG 00 - 0AB 0

INTF DP INTF
EXTF EXTF
of the integral
for general BUSF

CPU errors DP interface


FRCE
CRST

RUN
STOP

Startup type selector


CRST
WRST

RUN-P
RUN

Mode selector STOP


CMRES

Integral
Slot for memory card PROFIBUS-DP
X3
interface

MPI interface
X1

External battery supply EXT.-BATT.

5...15V DC

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.1
PROFIBUS

Structure of a PROFIBUS-DP System


 Masters

PS S7 S7 S7
10A 400 PS S7-300 S7-300 S7
S7-400 S7-300
CPU CPU CP
414- 314 342-
2 DP 5 DP

PROFIBUS -DP

ET 200M
SIMATIC S7-300
PS S7- S7 S7 S7 S7 PS IM S7 S7 S7 S7
 Slaves 300 STAND.
153
CPU CP DP
315- 342- SLAVE
2 DP 5 DP
Compact slaves
Intelligent slave Modular slave

STAND.
DP
SLAVE

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.2
PROFIBUS

PROFIBUS Communication Methods

Logical token ring


between masters

PG 720

PROFIBUS

FM

SV

Polling between masters


and slaves

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.3
PROFIBUS

Bus Cycle Time of a PROFIBUS-DP Mono-Master


Bus cycle time
System
[ms]

18

500 Kbit/s
14

10

6 1,5 Mbit/s

DP slaves
2 12 Mbit/s

5 10 20 30
Conditions: Each slave has 2 bytes of input data and 2 bytes of output data.
The minimum slave interval time is 200 microseconds
Tsdi= 37 bit times, Tsdr= 11 bit times

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.4
PROFIBUS

PROFIBUS Masters in SIMATIC S7


DP MASTER DP MASTER

PS S7 S7 S7 PS S7 S7 S7
10A 400 10A 400

CPU CPU CP
414- 414- 443-
2 DP 1 5DP

DP MASTER DP MASTER
PS S7-300 S7 S7 PS S7-300 S7-300 S7

CPU CPU CP
315- 314 342-
2 DP 5 DP

PROFIBUS -DP

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.5
PROFIBUS

Available DP Slaves
Modular slaves consisting of an interface module
and modules from the S7-300 spectrum (ET 200M)
or S5 spectrum (ET 200U).
ET 200M ET 200U
Small, compact I/O stations (degree of protection IP 20)
with integrated input and output channels
ET 200B ET 200L
Interface module plus input/output modules, load
feeders, etc.
Degree of protection: ET 200X: IP 65/67, ET 200S: IP 20
ET 200X ET 200S

Intelligent DP slaves from the S7-200 and S7-300


spectrum for data preprocessing
CPU 215 CPU 315-2 DP

CPU 316-2 DP CPU 318-2 DP CP 342-5


SIMATIC NET Information and Training Center
Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.6
PROFIBUS

PROFIBUS-DP Terminating Resistor


CPU with Profibus-DP
interface

Terminating resistor
required

N N
N= Profibus-DP
N N
node

CPU with Profibus-DP


interface
Terminating resistor
Terminating resistor required
required

N N
N= Profibus-DP
N N N
node

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.7
PROFIBUS

Configuring a DP Master System

DP master system

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.8
PROFIBUS

Configuring Compact and Modular DP Slaves

DP master system

DP slave

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.9
PROFIBUS

Activating the PROFIBUS-DP Application

Status and
fault LEDs

Memory card
receptacle

Mode selector

Compartment for
battery/recharge-able Multipoint
battery Interface (MPI)

Jumper
(removable)
PROFIBUS-DP interface
Terminals for power
supply and functional
ground

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.10
PROFIBUS

Indicator Elements for PROFIBUS

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.11
PROFIBUS

Configuring Intelligent DP Slaves (e.g. CPU 315-2)

DP slave

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.12
PROFIBUS

Inserting Intelligent DP Slaves in a Master System

DP master

Double-click

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.13
PROFIBUS

Exercise 1: Output to a DP Slave

Step Procedure Result


1 Assign the master system parameters to suit
the hardware configuration.
2 Assign parameters for the clock memory
byte in the CPU.
3 Write the sequence of instructions to place Hopefully the LEDs flash and you are
the clock memory byte in an output byte of pleased with yourself.
the ET 200M in OB1.

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.14
PROFIBUS

Error/Fault Analysis in OB 86 when Slave Failure


Occurs

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.15
PROFIBUS

Slave Diagnosis with SFC 13 (DPNRM_DG)


"DPNRM_DG"
EN ENO

REQ RET_VAL ??.?

??.? LADDR RECORD ??.?

BUSY ??.?

Parameter Declaration Data type Memory area Description


REQ INPUT BOOL I, Q, M, D, L, Const. REQ = 1: Request to read
LADDR INPUT WORD I, Q, M, D, L, Const. Configured diagnostics address of the DP slave
RET_VAL OUTPUT INT I, Q, M, D, L If an error occurs during processing of the function,
the return value contains an error code.
If no error occurred, RET_VAL contains the length
of the data actually transmitted.
RECORD OUTPUT ANY I, Q, M, D, L Destination area for the diagnostic data read. Only
data type BYTE is allowed. The minimum length of
the data record to be read and of the destination
area is 6.
BUSY OUTPUT BOOL I, Q, M, D, L BUSY = 1:
Reading is not yet completed.

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.16
PROFIBUS

On-Line Diagnostics

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.17
PROFIBUS

DP Diagnostics Blocks (1)

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.18
PROFIBUS

DP Diagnostics Blocks (2)

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.19
PROFIBUS

Exercise 2: Slave Error/Fault Analysis

Step Procedure Result


1 Copy OB 86 into your program file and load
the variables relevant for the slave
diagnostics.

Caution: In OB86, you must change the


data type for the variable
OB86_RACKS_FLTD to DWORD to be able
to evaluate the error codes.
2 Simulate failure of a slave by unplugging it. The LED 'SF DP' on the CPU
comes on.
3 Evaluate the variables.
4 Program SFC 13 and evaluate the indicators
as far as possible.
5 Test the DP diagnostics blocks. You are pleased again.

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.20
PROFIBUS

Exercise 3

Intelligent slave

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.21
PROFIBUS

Reading Consistent Data from Standard DP Slaves with


SFC 14
 You need SFC 14 "DPRD_DAT" to read out more than four consecutive
bytes of data (consistent data).

"DPRD_DAT"
EN ENO

??.? LADDR RET_VAL ??.?

RECORD ??.?

Parameter Declaration Data type Memory area Description


LADDR INPUT WORD I, Q, M, D, L, Const. Configured starting address in the input area of
the module from which data is to be read.
RET_VAL OUTPUT INT I, Q, M, D, L If an error occurs during processing of the function,
The return value contains an error code.
RECORD OUTPUT ANY I, Q, M, D, L Destination area for the user data read. It must be
exactly the same length as the area you have
configured for the selected module with STEP7.
Only data type BYTE is allowed.

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.22
PROFIBUS

Writing Consistent Data to Standard DP Slaves with


SFC 15
 You need SFC 15 "DPWR_DAT" to write more than four
consecutive bytes of data (consistent data).

"DPWR_DAT"
EN ENO

??.? LADDR RET_VAL ??.?

??.? RECORD

Parameter Declaration Data type Memory area Description


LADDR INPUT WORD I, Q, M, D, L, Const. Configured starting address in the output area of
the module to which the data is to be written.
RECORD INPUT ANY I, Q, M, D, L Source area for the user data to be written. It must
be exactly the same length as the area you have
configured for the selected module with STEP7.
Only data type BYTE is allowed.
RET_VAL OUTPUT INT I, Q, M, D, L If an error occurs during processing of the function,
The return value contains an error code.

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.23
PROFIBUS

Synchronizing DP Slaves with SFC 11 (DPSYC_FR)


EN "DPSYC_FR" ENO
REQ RET_VAL ??.?
??.? LADDR BUSY ??.?
??.? GROUP
??.? MODE

Parameter Declaration Data type Memory area Description


REQ INPUT BOOL I, Q, M, D, L, Const. Level-triggered control parameter
REQ=1: Trigger for SYNC/FREEZE job
LADDR INPUT WORD I, Q, M, D, L, Const. Logical address of the DP master
GROUP INPUT BYTE I, Q, M, D, L, Const. Group selection, Bit 0 = 1: Group 1 selected
Bit 1 = 1: Group 2 selected ...
Bit 7 = 1: Group 8 selected
You can select several groups for one job.
MODE INPUT BYTE I, Q, M, D, L, Const. Job identifier (coded according to EN 50 170 V 3)
Bit 0, 1, 6, 7:Reserved (value 0)
Bit 2 = 1: UNFREEZE is executed
Bit 3 = 1: FREEZE is executed
Bit 4 = 1: UNSYNC is executed
Bit 5 = 1: SYNC is executed
RET_VAL OUTPUT INT I, Q, M, D, L Error code. You must evaluate RET_VAL after every
execution of the block.
BUSY OUTPUT BOOL I, Q, M, D, L BUSY=1: The job is not yet completed.

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.24
PROFIBUS

Later Installation of PROFIBUS-DP Slaves

Example of a type file

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.25
PROFIBUS

Constant Bus Cycle Time

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.26
PROFIBUS

Direct Communication

Double-click

SIMATIC NET Information and Training Center


Knowledge for Automation
Date: 01.08.21
Siemens AG 1998. All rights reserved File No.: 7ProInt.27

You might also like