PROFIBUS-DP-Slave Software: Operating Manual - Item No. 19 419-06
PROFIBUS-DP-Slave Software: Operating Manual - Item No. 19 419-06
PROFIBUS-DP-Slave Software: Operating Manual - Item No. 19 419-06
Software
All rights to this documentation are reserved by Pilz GmbH & Co. KG. Copies may be made
for internal purposes.
Suggestions and comments for improving this documentation will be gratefully received.
The names of products, goods and technologies used in this documentation are registered
trademarks of the respective companies. Automation Workbench, Pilz, PIT, PMI,
PNOZ, Primo, PSS, SafetyBUS p are registered trademarks of Pilz GmbH & Co. KG.
Contents
Introduction
Overview of manual
Terminology
Definition of symbols
Overview
Software package
Functions
Range
Intended Use
Standard function block SB 230
Setting Parameters
Diagnostics
Internal system diagnostics
External diagnostics
Device-related diagnostics
Commissioning
Configuration
Commissioning sequence
1-1
1-1
1-2
1-3
2-1
2-1
2-2
2-2
3-1
3-2
4-1
4-2
4-2
4-3
4-3
4-6
4-11
4-13
5-1
5-1
5-1
Contents
Appendix
Example
Changes in the documentation
6-1
6-1
7-1
7-1
7-6
Introduction
Overview of manual
1
Introduction
The introduction is designed to familiarise you with the contents,
structure and specific order of this manual.
Overview
This chapter provides information on the most important features of
the software package and briefly outlines the application area.
Intended use
You must read this chapter, as it contains important information on
safety regulations and intended use.
1-1
Introduction
Setting parameters
This chapter describes the parameters, diagnostics and the
configuration of input and output data.
Commissioning
This chapter describes the commissioning procedure.
Appendix
The example is designed to provide support when linking standard
function block SB 230 into a user program.
Terminology
The term "safety system", "system" or "PSS" will be used in this manual
to refer to the programmable control systems PSS. If the description is
only valid for a particular device, the specific product name will be used
(e.g. PSS SB 3006 DP-S, PSS(1) DP-S).
In this manual, data transfer is always regarded as viewed from the PSS:
input data / receive data is sent from a PROFIBUS subscriber to the
PSS. Output data / send data is sent from the PSS to a PROFIBUS
subscriber.
1-2
Definition of symbols
Information in this manual that is of particular importance can be identified
as follows:
DANGER!
This warning must be heeded! It warns of a hazardous situation which
poses an immediate threat of serious injury and death, and indicates
preventive measures that can be taken.
WARNING!
This warning must be heeded! It warns of a hazardous situation that
could lead to serious injury and death, and indicates preventive
measures that can be taken.
CAUTION!
This refers to a hazard that can lead to a less serious or minor injury plus
material damage, and also provides information on preventive measures
that can be taken.
NOTICE
This describes a situation in which the unit(s) could be damaged and also
provides information on preventive measures that can be taken.
INFORMATION
This gives advice on applications and provides information on special
features, as well as highlighting areas within the text that are of particular
importance.
1-3
Introduction
Notes
1-4
Overview
Software package
Data exchange via PROFIBUS is a Master-Slave communication. The
maximum length of data to be exchanged is defined in the master data file
(see file PILZ2500.GSD on the disk supplied). Parameters must be set for
the Slave prior to communication. For example, parameters describe
configuration data, the length of input/output data, station address, etc.
Data cannot be exchanged until the Master has received the parameter
data record.
The setting of parameters on the PROFIBUS-DP-Slave is supported by
standard function blocks. All the required parameters are entered in one
data block.
The programmable control systems PSS have been designed for use in
plant and machinery safety circuits. They consist of a failsafe (FS) section
and a standard (ST) section.
PSS
Fail-safeFailsafe
Section
Teil
StandardStandard
Section
Teil
Steuerung
Control of und
Regelung
von
non-safety-related
nicht
tasks sicherheitsgerichteten
Aufgaben
e.g.: diagnostics etc.
z. B.: Diagnose usw.
2-1
Overview
Functions
The PROFIBUS-DP-Slave supports the following functions:
Internal system diagnostics
Device-related diagnostics
Transfer of max. 488 bytes of user data
INFORMATION
In this manual, data transfer is always regarded as viewed from the PSS:
Input data is sent from the Master to the PSS, output data is sent from the
PSS to the Master.
Range
The software package consists of:
one disk and
one operating manual: PROFIBUS-DP-Slave Software
The disk contains:
Standard function blocks SB 230, SB 231, SB 232
Master data files:
PILZ2500.GSD (German)
PILZ2500.GSE (English)
PILZ2500.GSF (French)
One sample program
2-2
Intended Use
3-1
Intended Use
3-2
Setting Parameters
Before operating the PSS(1) DP-S and PSS SB 3006 DP-S, a number of
parameters must be established and then entered in a data block. You can
use any free data block or amend the data block supplied (DB 050).
Contents
DW 0000
...
DW 0127
DW 0128
...
DW 0255
DW 0256
...
DW 0383
Diagnostic data
DW 0384
...
DW 0511
Configuration data
DW 0512
...
DW 0767
Reserved
DW 0768
...
DW 1023
4-1
Setting Parameters
Diagnostics
The diagnostics function provides information about the PSS / Slave to the
Master. The standard divides diagnostic information into two areas:
Internal system diagnostic data
External diagnostic data
- device-specific diagnostic data
- user-specific diagnostic data
Internal system and device-specific diagnostic data is transferred
automatically. If the PSS(1) DP-S or PSS SB 3006 DP-S receives a
diagnostic message, it will inform the Master that it is present. The Slave
cannot send the diagnostic data until the Master requests it. During
transmission, I/O data traffic (transfer of usable data) is interrupted.
It is also possible to transfer user-specific messages (diagnostic data).
The time of transfer for user-specific messages can be set individually.
The user establishes the event which will trigger the transfer of diagnostic
data.
Application example: a machine's operating status is to be transmitted
constantly (e.g. 10 Bytes). If a certain temperature is exceeded, additional
data will be required (e.g. 40 Bytes). The 10 Bytes for operating status will
be transferred within the usable data; the 40 Bytes of additional data will
be transferred in diagnostics mode. This means that in normal operation,
only small amounts of data are transferred and the communication speed
will be high. In exceptional cases (when the temperature is exceeded),
larger amounts of data must be transferred and the communication speed
will be reduced.
4-2
Prm_Fault
Ext_Diag
Station_Not_Ready
Setting Parameters
Byte 2 Bit 1:
Byte 2 Bit 0:
Byte 3 Bit 7:
Stat_Diag
Prm_Req
Ext_Diag_Overflow
External diagnostics
On the PSS(1) DP-S and PSS SB 3006 DP-S, external diagnostics are
limited to device-related diagnostics. ID and channel-related diagnostics
are only sensible if more than 61 Bytes of user-specific diagnostic data are
to be transferred. These diagnostic types are not described in this manual.
Please refer to EN 50170 and note also that these applications may not be
possible with all Master-Slave configurations.
Device-related diagnostics
Device-related diagnostics automatically detect whether the PSS is in a
RUN or STOP condition. A maximum of 61 Bytes of memory is available
for additional user-specific messages.
Device-related diagnostics without user-specific messages:
Only 2 data bytes are required for this type of diagnostics: one data byte
for the coding and one for the contents. The two data bytes correspond to
Bytes 7 and 8.
Enter the following values in the data block:
..
.
DW 0259
...
DW 0812 KF
..
.
PROFIBUS-DP-Slave Operating Manual
DL
Byte 8
DR
Byte 7
04
4-3
Setting Parameters
Contents of data word DW 0259 DR: Header byte 7:
Bit No.
7
0
6
0
5
0
4
0
3
0
2
0
Code for
Device-related diagnostics
1
1
0
0
INFORMATION
In the case of device-related diagnostics without user-specific messages,
DW 0259 DR will always contain 02.
7
x
6
x
5
x
Not used
4
x
3
x
2
x
1
x
0
0/1
The PSS(1) DP-S or PSS SB 3006 DP-S uses a hardware signal to detect
whether the PSS standard section is in a RUN or STOP condition.
INFORMATION
This type of diagnostics is only possible if the slave has been fully
initialised by the PSS and has been recognised by the Master.
The length of the diagnostic data must be entered in DW 0812. Diagnostic
data has a length of at least 4 words:
3 words of internal diagnostic data in DW 0256, 0257 and 0258
+
1 word in DW 0259 (as described).
4-4
Setting Parameters
Device-related diagnostics with user-specific messages:
Device-related diagnostics can be extended by a maximum of 61 Bytes
with user-specific messages. These messages are entered in the data
block from DW 0260.
Enter the following values in the data block:
..
.
DW 0259
DL
Byte 8
DR
Byte 7
DW 0260
...
User-specific messages
DW 0383
..
.
DW 0812 KF Length of diagnostic data
..
.
Contents of data word DW 0259 DR: Header byte 7:
Bit No.
MSB
7
6
0
0
5
x
4
x
3
x
2
x
Code for
device-related diagnostics
1
x
LSB
0
x
If the length entered in DW 0259 is greater than 2, the user messages will
follow on from DW 0260 (Byte 9). If the length entered is less than 2,
device-specific diagnostics will not be possible.
Contents of data word DW 0259 DL: Byte 8:
In DW 0259 DL the PSS(1) DP-S or PSS SB 3006 DP-S registers whether
the PSS standard section is in a RUN or STOP condition (see page 4-4).
The length of the diagnostic data must be entered in DW 0812. This is
composed of:
3 words of internal diagnostic data (DW 0256+DW 0257+DW 0258)
+
1 word of device-specific diagnostic data (DW 0259)
+
x words user-specific data.
4-5
Setting Parameters
DL
DR
00
ID-Byte
4-6
Setting Parameters
Contents of ID-Byte:
Bit No.
7
x
6
1
5
x
4
x
3
x
2
x
1
x
0
x
1101 0000B
D0H
DW 0384
00
D0
16 words output
1101 1111B
DFH
00
DF
1 word input
1110 0000B
E0H
00
E0
16 words input
1110 1111B
EFH
00
EF
1111 0000B
F0H
00
F0
FBH
00
FB
1101 0000B
1110 0001B
D0H
E0H
E0
D0
1101 1110B
1110 1111B
DEH
EFH
EF
DE
4-7
Setting Parameters
Special ID-Format
The ID-format occupies a maximum of three data words. Enter the
following values in the data block:
When only output or input data is to be transferred:
..
DL
DR
.
DW 0384
Length-Byte
ID-Byte
..
.
DW 0813
KF 2
;Length of the configuration data in Bytes
..
.
When input and output data is to be transferred simultaneously:
.
..
DL
DR
DW 0384
Length-Byte E
ID-Byte
..
.
DW 0813
..
.
00
KF
Length-Byte A
When more than 64 Bytes of input and output data are to be transferred
simultaneously. Data must be transferred consecutively: first the 64
Bytes and then the remaining Bytes:
.
..
DW 0384
..
.
DW 0813
..
.
4-8
DL
Length-Byte E
KF
DR
ID-Byte
ID-Byte
Length-Byte A
Length-Byte A
Length-Byte E
Setting Parameters
ID-Byte:
Bit No.
7
x
6
x
5
0
4
0
3
x
2
x
1
x
0
x
= Reserved
= 1 length byte for PSS output data follows
= 1 length byte for PSS input data follows
= 1 length byte for PSS input data and one length byte for
PSS output data follow
INFORMATION
Manufacturer-specific data is not pre-assigned by Pilz. Users may enter
their own data - please refer to the standard.
If no data is to be entered, enter the value 0 in Bits 0 ... 3 .
Length-Byte:
Bit No.
7
x
6
1
5
x
4
x
3
x
2
x
1
x
0
x
4-9
Setting Parameters
Examples: Consistency always over the whole data length
4-10
DL
CO
DR
40
40H
CFH
CF
40
1000 0000B
1100 0000B
80H
C0H
C0
80
64 words input
1000 0000B
1111 1111B
80H
FFH
FF
80
1100 0000B
1100 0001B
1100 0001B
C0H
C1H
C1H
C1
00
C0
C1
1100 0000B
1100 1111B
1100 1111B
C0H
CFH
CFH
CF
00
C0
CF
1100 0000B
1111 1111B
1111 1111B
C0H
FFH
FFH
FF
00
C0
FF
1100 0000B
1100 0001B
1100 0010B
C0H
C1H
C2H
C1
00
C0
C2
1100 0000B
1100 1111B
1100 0011B
C0H
CFH
C3H
CF
00
C0
C3
1 word output
0100 0000B
1100 0000B
40H
C0H
16 words output
0100 0000B
1100 1111B
1 word input
Setting Parameters
122 words input and 2 words output
1st ID-Byte for input data
1000 0000B
Length-Byte for input data (64 words)
1111 1111B
2nd ID-Byte for output data
0100 0000B
Length-Byte for output data
1100 0001B
3rd ID-Byte for input data
1000 0000B
Length-Byte for input data (58 words)
1111 1001B
80H
FFH
40H
C1H
FF
C1
F9
80
40
80
80H
F9H
4-11
Setting Parameters
Enter the length of the input data in data word DW 0810 and the length of
the output data in data word DW 0811.
Always enter 0 in data words DW 0814 and DW 0815.
Data block configuration:
NOTICE
Only edit data words and output data that are shaded grey.
Data words 256, 257, 512 ... 782, 784 ... 794, 796 ... 799, 802 ... 809 and
816 ... 1023 cannot be amended!
Data word
Type Contents
DW 0000...DW 0127
Input data Master --> PSS
DW 0128...DW 0255
Output data PSS --> Master
DW 0256
Reserved for internal diagnostic data
DW 0257
Reserved for internal diagnostic data
DW 0258
KH ID number: 2500 hex
DW 0259
KH Device-specific diagnostic data [Byte]
1 Byte Header (DR 0259)
+ 1 Byte Pilz diagnostics (DL 0259)
+ x Byte user diagnostics (DR 0260ff)
DW 0260...DW 0383 KH User-specific diagnostic data
DW 0384...DW 0511 KH Configuration data
DW 0512...DW 0782
Reserved
DW 0783
KF max_diag_len
[Byte] (>2 x DW 0812)
DW 0784...DW 0794
Reserved
DW 0795
KH Only F5 hex is permitted
DW 0796...DW 0799
Reserved
DW 0800
KF Slave address 0 ... 126
Equals coding switch on the module
DW 0801
KF Transmission sequence of Bytes 0 or 1
DW 0802...DW 0809
Reserved
DW 0810
KF Length of input data 0 - 122 [Words]
DW 0811
KF Length of output data 0 - 122 [Words]
DW 0812
KF Length of diagnostic data 4 - 35 [Words]
3 words internal diagnostics (DW 0256 ...
DW 0258)
x words device-specific diagnostics
(= DW 0259 / 2)
4-12
Setting Parameters
Data word
DW 0813
Type Contents
KF Amount of configuration data 1- 244 [Byte]
(DW 0384ff)
DW 0814
KF Only 0 is permitted
DW 0815
KF Only 0 is permitted
DW 0816...DW 1023
Reserved
NOTICE
The data length may be a maximum of 1472 Bytes. The maximum data
length is calculated as follows:
3 x length of the input data
+
3 x length of the output data
+
2 x length of the diagnostic data
+
4 x length of the configuration data
+
120 Byte
Examples
Example 1:
12 words input and output: configuration byte FBH ;
Length of configuration data: 1 Byte
Diagnostics: 3 words of internal diagnostic data
1 word of device-related diagnostic data
Data word
DW 0000 - DW 0011
DW 0128 - DW 0139
DW 0258
DW 0259
DW 0384
DW 0783
DW 0795
DW 0800
DW 0801
DW 0810
DW 0811
DW 0812
DW 0813
DW 0814
DW 0815
Contents
...
...
KH 2500
KH 0002
KH 00FB
KF 10
KH F5
KF 1
KF 0
KF 12
KF 12
KF 4
KF 1
KF 0
KF 0
Description
Input data
Output data
ID-number
Device-related diagnostics
Configuration data
max_diag_len [Byte]
Pre-assigned
Slave address [0-126]
Transmission sequence
Length of input data in words
Length of output data in words
Length of diagnostic data in words
Amount of configuration data in bytes
Pre-assigned
Pre-assigned
4-13
Setting Parameters
Example 2:
64 words output, special configuration byte: 40, Length byte: FF
Diagnostics: 3 words of internal diagnostic data
1 word of device-related diagnostic data
Data word
DW 0128 - DW 0191
DW 0258
DW 0259
DW 0384
DW 0783
DW 0795
DW 0801
DW 0800
DW 0810
DW 0811
DW 0812
DW 0813
DW 0814
DW 0815
4-14
Contents
...
KH 2500
KH 0002
KH FF40
KF 10
KH F5
KF 0
KF 1
KF 0
KF 64
KF 4
KF 2
KF 0
KF 0
Description
Output data
ID-Number
Device-related diagnostics
Configuration data
max_diag_len [Byte]
Pre-assigned
Transmission sequence
Slave address [0-126]
Length of input data in words
Length of output data in words
Length of diagnostic data in words
Amount of configuration data in bytes
Pre-assigned
Pre-assigned
Setting Parameters
Example 3:
2 words input and 1 word output,
Special configuration byte: C0,
Length byte input: C1
Length byte output: C0
Diagnostics:
3 words of internal diagnostic data
1 word of device-related diagnostic data
Data word
DW 0000 - DW0001
DW 0128
DW 0258
DW 0259
DW 0384
DW 0385
DW 0783
DW 0795
DW 0800
DW 0801
DW 0810
DW 0811
DW 0812
DW 0813
DW 0814
DW 0815
Contents
...
...
KH 2500
KH 0002
KH C1C0
KH 00C0
KF 10
KH F5
KF 1
KF 0
KF 2
KF 1
KF 4
KF 3
KF 0
KF 0
Description
Input data
Output data
ID-Number
Device-related diagnostics
Configuration data
max_diag_len [Byte]
Pre-assigned
Slave address [0-126]
Transmission sequence
Length of input data in words
Length of output data in words
Length of diagnostic data in words
Amount of configuration data in bytes
Pre-assigned
Pre-assigned
4-15
Setting Parameters
Example 4 :
100 words input and output
Configuration byte: C0
Length byte input (64 words): FF
Length byte output (64 words): FF
Configuration byte: C0
Length byte input (36 words): E3
Length byte output (36 words): E3
Diagnostics:
Data word
DW 0000 - DW 0099
DW 0128 - DW 0227
DW 0258
DW 0259
DW 0384
DW 0385
DW 0386
DW 0783
DW 0795
DW 0800
DW 0801
DW 0810
DW 0811
DW 0812
DW 0813
DW 0814
DW 0815
4-16
Contents
...
...
KH 2500
KH 0052
KH FFC0
KH C0FF
KH E3E3
KF 58
KH F5
KF 1
KF 0
KF 100
KF 100
KF 29
KF 6
KF 0
KF 0
Description
Input data
Output data
ID-number
Device-related diagnostics
Configuration data
max_diag_len [Byte]
Pre-assigned
Slave address [0-126]
Transmission sequence
Length of input data in words
Length of output data in words
Length of diagnostic data in words
Amount of configuration data in bytes
Pre-assigned
Pre-assigned
Setting Parameters
Example 5:
2 words input and 1 word output
Configuration byte: C0
Length byte input: C1
Length byte output: C0
Diagnostics:
3 words of internal diagnostic data
1 word of device-related diagnostic data
2 bytes of user-specific diagnostic data
Data word
DW 0000 - DW 0001
DW 0128
DW 0258
DW 0259
DW 0260
Contents
...
...
KH 2500
KH 0004
KH xxxx
Description
Input data
Output data
ID-number
Device-related diagnostics
User-specific diagnostic data
DW 0384
DW 0385
DW 0783
DW 0795
DW 0800
DW 0801
DW 0810
DW 0811
DW 0812
DW 0813
DW 0814
DW 0815
KH C1C0
KH 00C0
KF 10
KH F5
KF 1
KF 0
KF 2
KF 1
KF 5
KF 3
KF 0
KF 0
Configuration data
max_diag_len [Byte]
Pre-assigned
Slave address [0-126]
Transmission sequence
Length of input data in words
Length of output data in words
Length of diagnostic data in words
Amount of configuration data in bytes
Pre-assigned
Pre-assigned
4-17
Setting Parameters
Notes
4-18
Commissioning
Configuration
Before commissioning, the following values need to be established:
The number of inputs and outputs in words
The amount of diagnostic data in words
Station address (see PROFIBUS-DP-Slave Hardware Manual or PSS SB
3006 DP-S Shortform).
The Master can be configured using the configuration data and the data
from the unit's master data file.
Commissioning Sequence
Requirement
The module must have been installed in accordance with the instructions
provided in the PROFIBUS-DP-Slave Hardware Manual or PSS SB 3006
DP-S Shortform. Master and Slave must be ready for operation.
Create a cold-start organisation block, OB 020, and state the necessary
parameters in a data block; enter the slave module under hardware
registry in DB 004; an example for OB 020 can be found in the Appendix.
Establish the parameters for standard function block SB 230 (see
Chapter 6 for further details).
SB 230 must be called up in each PSS cycle.
Transfer the following blocks to the PSS:
- OB 001 and OB 020
- SB 230, SB 231 and SB 232
- DB 4, DB 5 and the data block containing the parameters
- any additional blocks required by the user.
After configuration, output parameter ERR on standard function block SB
230 can no longer register an error. It should display: ERR = KH 2000.
Any other value indicates an error. For further information please refer to
Chapter 6, Standard Function Blocks.
5-1
Commissioning
Notes
5-2
Parameters
Input parameters
- BASE: Module's start address (Offset)
The module occupies 1024 words after the start address.
These words may not be accessed.
- MODE: = 01:
Static diagnostics
= 02:
Reset:
All other values:
Data exchange (Data_exchange):
- DB:
Data block
Output parameters
ERR:
Error message (see table below)
Cause/Remedy
Total length calculated for diagnostic,
parameter, input and output data is too
high; reduce the data length!
0002
DP_SL_ERR_DPS2_INIT
6-1
Cause/Remedy
0003
DP_SL_ERR_SSA_IND
0004
DP_SL_ERR_DIAG_LEN
0005
DP_SL_ERR_CFG_LEN
0006
DP_SL_ERR_PRM_LEN
0007
DP_SL_ERR_IO_LEN
0008
0009
000A
DP_SL_ERR_IDENT_NR_P
000B
DP_SL_ERR_WRONG_DB_NR
000C
DP_SL_ERR_IO_NULL_PTR
1000
DP_SL_ERR_SLAVE_NOT_
READY
1001
DP_SL_ERR_WRONG_SLAVE_
STATE
1002
DP_SL_ERR_DIAG_DATA_
AREA_NOT_READY
1003
DP_SL_ERR_CFG_DATA_
AREA_NOT_READY
00FA
00FB
DP_SL_ERR_SET_PRM
00FC
DP_SL_ERR_MASTER_NOT_
READY
6-2
Cause/Remedy
00FD
DP_SL_ERR_CHK_CFG
00FE
DP_SL_ERR_BUS_FAULT
00FF
DP_SL_ERR_FATAL
2000
DP_SL_NO_ERROR
No error detected
2001
DP_SL_ERR_SLAVE_NOT_
READY
2002
DP_SL_ERR_DIAG_DATA_
AREA_NOT_READY
2003
DP_SL_ERR_ IN_DATA_
AREA_NOT_READY
2004
DP_SL_ERR_ OUT_DATA_
AREA_NOT_READY
2005
DP_SL_RESET_MODE
2006
DP_SL_ERR_ILLEGAL_MODE
2007
DP_SL_ERR_ILLEGAL_
SLAVE_STATE
INFORMATION
Standard function blocks SB 231 and SB 232 must also be transmitted to
the controller in addition to SB 230. However, parameters do not need to
be set for them, nor do they need to be called up.
NOTICE
The flag range MW 059.00 ... MW 063.16 is reserved for temporary flags.
This range may not be used for global parameters, nor for SB input or
output parameters, otherwise the flags used in the SB will be overwritten.
PROFIBUS-DP-Slave Operating Manual
6-3
Example
Configuration
DP
Master
Contents
PSS
(DP Slave) Type Value
Input
data
[Words]
DW 0813
KH
06
DL 0830
DR 0384
KH
C0
DR 0831
DL 0384
KH
CD
DL 0831
DR 0385
KH
CF
DR 0832
DL 0385
KH
C0
DL 0832
DR 0386
KH
41
DR 0833
DL 0386
KH
40
...
...
...
...
...
DW 0810
KF
16
16
DW 0811
KF
17
...
6-4
Output
data
[Words]
14
16
2
1
...
17
Appendix
Example
Data block DB 050 is selected for setting the parameters. The data block
is configured in OB 020. The configuration corresponds to Example 5 in
Chapter 4. SB 230 is called up in OB 001.
OB 020 Cold start ST
:A DB 004
:L
KH B220
:T DW 0027
:
:A DB 005
:L
KH 0000
:T DW 0007
:
:L
KH 0000
:T MB 000.00
:T MW 030.00
:T MW 010.00
:
:A DB 050
:L
:T
:
:L
:T
:
:L
:T
:L
:T
KH 2500
DW 0258
KH 0004
DW 0259
KH C1C0
DW 0384
KH 00C0
DW 0385
;Configuration data
;
;
;
:L
:T
KF 0010
DW 0783
;Reserved
;
:L
:T
:
:L
:T
KH 00F5
DW 0795
;Reserved
;
KF 0001
DW 0800
7-1
Appendix
7-2
:L
:T
KF 0000
DW 0801
;Reserved
;
:L
:T
KF 000002
DW 0810 ;
:L
:T
KF 000001
DW 0811 :
:L
:T
KF 000005
DW 0812 ;
:L
:T
:
:L
:T
:L
:T
KF 000003
DW 0813
KF 000000
DW 0814 ;
KF 000000
DW 0815
;Reserved
;Reserved
Appendix
OB 001
Comment: Segment 00
************************************************************************************
*
Sample program *********************************************************
************************************************************************************
*
*
*
2 Words input data
*
*
1 Word output data
*
*
1 Word diagnostic data
*
*
*
* Key to
inputs / outputs:
*
*
E 02.00 triggers a module reset
*
*
E 02.01 Slave goes to a static diagnostic condition
*
*
*
* Cyclical data transfer
:
*
* PSS -> Master(output data):
*
*
AW 0.0 -> DW 0128 -> Master
*
*
*
* PSS <- Master(input data):
*
*
EW 1.0 <- DW 0000 <- Master
*
*
EW 1.16 <- DW 0001 <- Master
*
*
*
* If an error occurs in the FS Section of the PSS (M113.01 = 1),
*
* the slave module will go to a static diagnostic condition.
*
* In the example, the value KH FFFF is sent to the Master as diagnostic *
* data.
*
*************************************************************************************
reset:
:L
E 02.00
:SPB = reset
:L
E 02.01
:SPB = stat.diag
:L
KF 000000
:T MB 000.00
:SPA = start
Segment 01
:L
KB 002
:T MB 000.00
:SPA = start
7-3
Appendix
stat.diag: Segment 02
:L
KB 001
:T MB 000.00
start:
Segment 03
:A DB 050
:L
DW 0000
:T EW 01.00
:L
DW 0001
:T EW 01.16
:
:L
AW 00.00
:T DW 0128
:
:LN M 113.01 .FS_no_ERR/ERR status FS, 0 = no error, 1 = err
:SPB = no_err
:L
KH FFFF
:T DW 0260
:L
KH 0000
:L
KB 001
:T MB 000.00
no_err: Segment 05
:
**********************************************************************************
*
Input parameters:
*
* -Base: Module's XW-Offset
*
* -Mode: KB001 -stat.Diagnostics
*
*
KB002 -Module reset
*
*
KB000 -Data-Exchange
*
* -DB: Data block KB 011-KB 127 or -KB 255
*
(from operating system version 9)
*
*
*
* Output parameters:
*
* -Fehl: Error evaluation
*
*
KH 2000: No errors
*
*
see chapter entitled Standard function blocks
*
**********************************************************************************
7-4
Appendix
:
:CAL SB 230
SB230
DP-Slave
KF 00000
MB 000.00
KB 050
-W- BASE
-B- MODE ERR -W - MW 030.00
-B- DB
end:
-X- DISP
-W- ERR
Segment xx
:BE
7-5
Appendix
Changes in the documentation
Changes from Version II to Version III
Master data file was amended.
New
page
Change
5-2
6-2
5-3
6-3
New
page
Change
6-2
6-3
7-6
Old
page
New
page
Change
3-2
3-2
4-13
4-13
www
www.pilz.com
Technical support
+49 711 3409-444
...