User Manual: Controller Board Driver Software For Siemens SIMATIC S7-300

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

User Manual

Controller Board Driver Software for


Siemens SIMATIC S7-300

Designation: IBS S7 300 BC SWD UM E


Order No.: 27 45 30 5
Controller Board Driver Software for Siemens SIMATIC
S7-300

Designation: IBS S7 300 BC SWD UM E

Revision: B

Order No.: 27 45 30 5

This manual is valid for:


IBS S7 300 BC-T Order No.: 27 21 94 7

© Phoenix Contact 01/2002

5454B
Please Observe the Following Notes:

In order to guarantee the safe use of your device, we recommend that you
read this manual carefully. The following notes give you information on
how to use this manual.

Qualifications of the User Group


The products described in this manual should be installed/operated/main-
tained only by electricians or persons instructed by them, who are familiar
with applicable national standards. Phoenix Contact assumes no liability
for damage to any products resulting from disregard of information con-
tained in this manual.

Explanation of Symbols Used


The attention symbol refers to an operating procedure which, if not care-
fully followed, could result in damage to equipment or personal injury.

The note symbol informs you of conditions that must strictly be observed
to achieve error-free operation. It also gives you tips and advice on hard-
ware and software optimization to save you extra work.
The text symbol refers you to detailed sources of information (manuals,
data sheets, literature, etc.) on the subject matter, product, etc. This text
also provides helpful information for the orientation in the manual.

We Are Interested in Your Opinion


We are constantly striving to improve the quality of our documents.
Should you have any suggestions or recommendations for improving the
contents and layout of our documents, please send us your comments.
Please use the fax form at the end of the manual for this purpose.

5454B
IBS S7 300 BC SWD UM E

Statement of Legal Authority


This manual, including all illustrations contained herein, is copyright pro-
tected. Use of this manual by any third party in departure from the copy-
right provision is forbidden. Reproduction, translation and electronic or
photographic archiving or alteration requires the express written consent
of Phoenix Contact. Violators are liable for damages.
Phoenix Contact reserves the right to make any technical changes that
serve the purpose of technical progress.
Phoenix Contact reserves all rights in the case of patent award or listing of
a registered design. External products are always named without refer-
ence to patent rights. The existence of such rights shall not be excluded.

Internet
Up-to-date information on products from Phoenix Contact can be found on
the Internet at www.phoenixcontact.com.

5454B
Table of Contents

1 Driver Software Tasks.......................................................................................1-3


2 Description of the Function Blocks....................................................................2-3
2.1 Driver Software Disk .................................................................. 2-4
2.2 Structure of the Description.........................................................2-6
2.3 Call Structure of the Function Blocks ..........................................2-6
2.3.1 FC 20 IB_INI ................................................................2-8
2.3.2 FB 21 IB_READ .........................................................2-11
2.3.3 FB 22 IB_WRITE .......................................................2-14
2.3.4 FB 24 IB_DIAG ..........................................................2-17

3 Technical Data for the Driver Functions............................................................3-3

5454B i
IBS S7 300 BC SWD UM E

ii 5454B
Chapter 1
This section informs you about
– The advantages of using INTERBUS system functions
– The three types of INTERBUS driver blocks
– The option of controlling INTERBUS via these blocks

Driver Software Tasks ..........................................................................................1-3

5454B 1-1
1-2 5454B
Driver Software Tasks

1 Driver Software Tasks


The driver software for the IBS S7 300 BC-T controller board provides a
wide range of function blocks (INTERBUS system functions) that can be
used to control the INTERBUS system via the PLC.
These function blocks are tailored to the IBS S7 300 BC-T controller
board, and are optimized and structured by the program. Specific bits are
set to operate the driver functions.
There are three types of function blocks:
1. Initialization block
2. Receive/send blocks (interface drivers)
3. Function blocks (e.g., diagnostic block)
In addition to the FB IB_INI initialization block, which must only be called
on control system startup, there are two function blocks that are called cy-
clically. These are the FB IB_READ receive block and the FB IB_WRITE
send block. These driver blocks create a process image that reads the in-
puts prior to the application program and writes the outputs to the controller
board after processing by the application program. The receive and send
blocks cannot be accessed for the application program.
The third block type is application-oriented and should be linked by the
user.
The INTERBUS system functions include application-oriented processes
such as:
– Error handling
– Startup, etc.
The receive and send blocks IB_READ and IB_WRITE establish the con-
nection between the PLC (i.e., the blocks activated in the application pro-
gram) and the controller board. They transfer input/output data between
the INTERBUS buffer in the controller board and the process image in the
control system, the bit memory area or the data block area.
It is important that the base address of the controller board and the hard-
ware address (slot) are the same. Please refer to "Transferring the Startup
OB to the Control System" in the Quick Start Guide
IBS S7 300 BC QS UM E.
For additional information on the specific use of function blocks, please
refer to "Driver Block Configuration" and "Automatic Diagnostic Functions"
in the Quick Start Guide IBS S7 300 BC QS UM E.

5454B 1-3
IBS S7 300 BC SWD UM E

1-4 5454B
Chapter 2
This section informs you about
– INTERBUS system functions, which can be used to start up and control
INTERBUS
– Parameter information, which is required to use function blocks
successfully within a specific call structure

Description of the Function Blocks .......................................................................2-3


2.1 Driver Software Disk ...................................................................2-4
2.2 Structure of the Description.........................................................2-6
2.3 Call Structure of the Function Blocks ..........................................2-6
2.3.1 FC 20 IB_INI .................................................................2-8
2.3.2 FB 21 IB_READ ..........................................................2-11
2.3.3 FB 22 IB_WRITE ........................................................2-14
2.3.4 FB 24 IB_DIAG ...........................................................2-17

5454B 2-1
2-2 5454B
Description of the Function Blocks

2 Description of the Function Blocks


Function blocks in STEP 7 programming language are supplied on a disk
together with the IBS S7 300 BC UM E User Manual (Order No.
27 47 51 0). In addition to the driver blocks for the operation of the control-
ler board, the disk contains an example program, which can be directly
linked to your application program. The controller board functions are de-
scribed using this example program in preprogrammed format. A descrip-
tion of the driver blocks can be found in the following documentation and
as a text file on the disk.

Up-to-date information on driver software can be found in the InfoService


at www.phoenixcontact.com.

5454B 2-3
IBS S7 300 BC SWD UM E

2.1 Driver Software Disk

Files on the disk (Drive:) \IB_S7SWD.EXE Self-extracting file


\LIESMICH.TXT Function block description (German)
\README.TXT Function block description (English)

Installing the Driver Blocks on the Hard Disk of Your PC


1. Insert the IBS S7 300 SWD driver disk.
2. Copy the IB_S7SWD.EXE and README.TXT files from the driver disk
to the main directory of the selected target drive.
3. Under Windows 95/98/NT, open the README.TXT file by double
clicking on it. This file contains additional information on the function
blocks.
Read the README.TXT file carefully.
4. Under Windows 95/98/NT, run the IB_S7SWD.EXE file by double
clicking on it. The driver blocks are automatically extracted. The file
structure shown on the following page is created in the target drive.

Notes for Users of IBS S7... SWD Software


Ensure that the directory structure shown on the following page is installed
on your target drive using the EXE file.
If INTERBUS driver software for S7 is already installed on your target drive,
the EXE file adds additional directories and files to this existing structure.

2-4 5454B
Description of the Function Blocks

File structure in the (Drive:) \INTERBUS.S7 \S7_300 \ENGLISH


target drive
The following folders and files can be found in the ENGLISH
directory:

\ENGLISH \IBSWD010 \IBSWD010.S7P


\...
\Text files for the
blocks (...TXT)
\README.TXT

The IBSWD010 directory includes all driver blocks for the controller board
and a STEP 7 project file (IBSWD010.S7P).
Open the text files for the blocks (…TXT) and the README.TXT file by
double clicking on them.

Calling the Project File Under STEP 7


1. In the SIMATIC Manager, select "Open File".
2. Click "Browse" and select the drive on which your example project
(INTERBUS.S7 \S7_300 \ENGLISH\ IBSWD010) is stored.
3. Double click the IBSWD010.S7P file.

5454B 2-5
IBS S7 300 BC SWD UM E

2.2 Structure of the Description

The function blocks are described according to the following pattern:


1. Tasks of the block and its parameters and connections to other function
blocks, if applicable.
2. Requirements, for example, for calling the block.
3. Call structure of the function block in STEP 7 syntax.
4. Description of the parameters used.
5. Marginal conditions to be noted, if applicable.
6. Description/listing of data blocks used, if applicable.
7. Graphical representation of the block time response.

2.3 Call Structure of the Function Blocks

The INTERBUS system functions are designed as function blocks. The


user calls these system functions during control system startup and in the
cyclic program with conditional or absolute jumps. The function blocks are
written in STEP 7.
The IB_INI initialization block is called when starting up the control system
(OB 100). This driver function synchronizes the controller board with the
control system and checks the number of connected input and output bytes
as well as the bus configuration.
The write/read blocks transfer the INTERBUS data into the input area of
the control system (IB_READ) at the beginning of the program cycle and
copy the data into the output area of INTERBUS (IB_WRITE) at the end of
the program cycle. In the meantime the application program continues to
run.
In the event of an error, the IB_DIAG driver evaluates the diagnostic result
in the cyclic program (OB 1), acknowledges error messages, and starts the
INTERBUS system.
The user can link all driver blocks to the program cycle (OB 1) where they
are processed automatically.

2-6 5454B
Description of the Function Blocks

Call structure
O B 1 0 0 F C 2 0
IB _ IN I IB D B

O B 1 F B 2 1
IB _ R E A D IB D B

IB D B
F B 2 4
IB _ D IA G

D ID B

A p p lic a tio n
p r o g r a m

F B 2 2
IB _ W R IT E IB D B

5 4 5 4 A 0 0 1

Figure 2-1 Call structure of the blocks in OB 100 and OB 1

Key:
IBDB = INTERBUS data block
DIDB = Diagnostic data block

5454B 2-7
IBS S7 300 BC SWD UM E

2.3.1 FC 20 IB_INI

Task The initialization function IB_INI (FC 20) is called during control system
startup (OB 100) and synchronizes the control system with the controller
board. FC 20 waits until the controller board is ready to operate (READY &
RUN).
READY = Controller board is ready to operate
RUN = Data transmission is active
The CPU checks whether the number of connected input bytes
(IN_BYTES) and output bytes (OUT_BYTES) corresponds to the number
entered.
FC IB_INI transfers the data required by other function blocks to the IBDB
INTERBUS data block.
If an error occurs, the function is exited. The ERR parameter indicates an
error code <> 0. In the example program, the control system is set to the
STOP state.
If INTERBUS is started without any errors, ERR = 0.

Preconditions FC IB_INI must be called in the startup sequence.

Call structure CALL FC 20


IB_ADR := 288 Controller board slot address
IBDB := DB20 Global INTERBUS data block
TIME := T1 Timer used
IN_BYTES := 14 Number of connected input bytes
OUT_BYTES := 14 Number of connected output bytes
ERR := MB9 Error code

Parameter descrip- IB_ADR Slot address of the controller board (in the example row 0,
tions slot 6, slot address 288)
Valid entries: see table "Slot addresses in the control
system (PLC)" on page 2-9, and entry in the hardware
configuration under STEP 7.
IBDB Global INTERBUS data block to be set by the user with a
length of 12 data words. (In the example DB 20)
Valid entries: can be freely selected depending on the
CPU

2-8 5454B
Description of the Function Blocks

TIME Number of the timer used by FC. (In the example T1)
Valid entries: can be freely selected depending on the
CPU
IN_BYTES Number of connected input bytes. (In the example 14)
Valid entries: 0 to 240
OUT_BYTES Number of connected output bytes. (In the example 14)
Valid entries: 0 to 240
ERR The output of the driver block returns the error code of the
function.

Enter the slot address of the board in the IB_ADR parameter and the num-
ber of IN_BYTES and OUT_BYTES in the corresponding parameters.
For the number of IN_BYTES and OUT_BYTES, please refer to the
IBS SWT G4 E software or the information register of the controller board.
For additional information, please refer to the Quick Start Guide
IBS S7 300 BC QS UM E.

Slot assignment The following table describes the valid addresses for the IB_ADR parame-
ter. The addresses depend on the controller board slot in a S7-300 control
system.

Table 2-1 Slot addresses in the control system (PLC)

Slot Slot
Address
4 5 6 7 8 9 10 11
Row 3 640 656 672 688 704 720 736 752
Row 2 512 528 544 560 576 592 608 624
Row 1 384 400 416 432 448 464 480 496
Row 0 256 272 288 304 320 336 352 368

5454B 2-9
IBS S7 300 BC SWD UM E

ERR parameter The following table describes the error codes of the ERR parameter in the
(error code) MB 9 bit memory byte.

Table 2-2 ERR parameter error codes

Value Short Des- Description/Remedy


ignation
0 OK ---
1 TIMEOUT Controller board does not respond.
– Check the parameterization of the IB_ADR
parameter.
– Replace the board.
2 IN error The number of connected input bytes does not
correspond with the number of input bytes found
on INTERBUS.
– Check the parameterization of the
IN_BYTES in the "IBDB".
– Check the current number via IBS CMD or
the board information register.
3 OUT error The number of connected output bytes does not
correspond with the number of output bytes
found on INTERBUS.
– Check the parameterization of the
OUT_BYTES in the "IBDB".
– Check the current number via IBS CMD or
the board information register.
4 BUS error INTERBUS cannot be started.
– The diagnostic register contains a more de-
tailed error description.
Additional information can be found in the
Quick Start Guide IBS S7 300 BC QS UM E.
– Check the bus configuration.

2-10 5454B
Description of the Function Blocks

2.3.2 FB 21 IB_READ

Task The IB_READ function block reads the controller board input data at the
beginning of a program cycle (OB 1). The destination area of the data can
be specified by the user with the DEST parameter.
The SFC 59 "RD_REC" system block is called in this block and the ERROR
parameter displays its error code. A Phoenix Contact error code in the low
byte of this parameter (MB 13) is indicated by "FF" in the high byte (MB 12).
The error code is described in the table "Error Codes in Bit Memory Word
12 (MW 12)" on page 2-13 .

Call structure CALL FB 21, DB 21 Input driver, instance DB

IBDB := DB20 INTERBUS data block


COPY_OK := M10.0 Data OK
ERROR := MW12 Error during data
transmission
DEST := P#I 10.0 BYTE 10 Data destination

Parameter descrip- IBDB Global INTERBUS data block to be set with a length of 12
tions data words.
COPY_OK With the value "1", the read data is declared as valid.
(This parameter is written by FB.)
ERROR The output of the driver returns the error code.
(See table "Error Codes in Bit Memory Word 12 (MW 12)"
on page 2-13.)
DEST Pointer to the memory area to be written.
(I 10.0 corresponds to the start address, BYTE 10
corresponds to the data length.)

The data length entry for the DEST parameter must be four when
"IN_BYTES < 4". When "IN_BYTES = 4" or higher, the entry should be in-
creased accordingly.
Examples: IN_BYTES = 2 => BYTE 4
IN_BYTES = 5 => BYTE 5
IN_BYTES = 14 => BYTE 14

5454B 2-11
IBS S7 300 BC SWD UM E

In addition to the process image you can also specify bit memories and
data blocks as memory areas.
Example: 10 bytes from address 10.0 are to be transferred to different ad-
dress areas.
The following table describes the syntax of entries for the DEST parameter.

Table 2-3 DEST parameter address syntax

Pointer to Start Address Data


Length
I area P# I 10.0 BYTE 10
Bit memory P# M 10.0 BYTE 10
Data block P# DB (No. of the DB).DBX 10.0 BYTE 10

The following table describes the valid destination areas for the input data
in the control system (PLC).

Table 2-4 Destination areas

Start Address Data Length


I area From I 0.0 From 4 bytes
Bit memory From M 0.0 From 4 bytes
Data block From DB1.DBX 0.0 From 4 bytes

The size of the address areas and the maximum data length depends on
the CPU used.

2-12 5454B
Description of the Function Blocks

ERROR parameter The following table describes the error codes of the ERROR parameter,
(error codes) which are indicated in the MW 12 bit memory word.

Table 2-5 Error codes of the ERROR parameter in MW 12 (FB 21)

Error Codes in Bit Memory Word 12 (MW 12)


Bit memory Bit memory
byte 12 byte 13
high-byte low-byte
80 XX XX = Siemens error code
(see STEP 7 user manual, error
code of SFC 59 "RD_REC")
FF YY YY = Phoenix Contact error code
FF 01 Timeout for consistent access

Time response R u n tim e /m s


of the block 3 .8

2 .4

1 .4

1 0 0 2 4 0 IN _ B y te s
5 4 5 4 B 0 0 4
Figure 2-2 FB 21 IB_READ time response

5454B 2-13
IBS S7 300 BC SWD UM E

2.3.3 FB 22 IB_WRITE

Task At the end of a program cycle (OB 1), the IB_WRITE function block trans-
fers the output data to the controller board. The source of the data can be
specified by the user with the SOURCE parameter.
The SFC 58 "WR_REC" system block is called in this block and the
ERROR parameter displays its error code. A Phoenix Contact error code
in the low byte of this parameter (MB 15) is indicated by "FF" in the high
byte (MB 14). The error code is described in the table "Error Codes in Bit
Memory Word 14 (MW 14)" on page 2-16 .

Call structure CALL FB 22, DB 22 Output driver, instance DB

IBDB := DB20 INTERBUS data block


CONS := M10.1 Data consistency (ON)
COPY_OK := M10.2 Data OK
ERROR := MW14 Error during data
transmission
SOURCE := P#Q 10.0 BYTE 10 Data source

Parameter descrip- IBDB Global INTERBUS data block to be set with a length of 12
tions data words.
CONS With the value "1", the output and input data is consistently
written or read in an INTERBUS cycle. This also applies to
FB IB_READ.
With the value "0", output and input data is transferred with
byte consistency. In the current cycle, a byte from the
previous cycle can still be transmitted.
Consistency should only be set if your application requires
it because it increases the response time of the
application.
COPY_OK With the value "1" the data is transmitted. (This parameter
is written by FB.)
ERROR The output of the driver returns the error code. (See table
"Error Codes in Bit Memory Word 14 (MW 14)" on
page 2-16.)

2-14 5454B
Description of the Function Blocks

SOURCE Pointer to the memory area to be read (Q 10.0


corresponds to the start address, BYTE 10 corresponds to
the data length).

The data length entry for the SOURCE parameter must be four when
"OUT_BYTES < 4". When "OUT_BYTES = 4" or higher, the entry should
be increased accordingly.
Example: OUT_BYTES = 2 => BYTE 4
OUT_BYTES = 5 => BYTE 5
OUT_BYTES = 14 => BYTE 14

In addition to the process image you can also specify bit memories and
data blocks as memory areas.
Example: 10 bytes from address 10.0 are to be transferred to different ad-
dress areas.
The following table describes the syntax of entries for the SOURCE param-
eter.

Table 2-6 SOURCE parameter address syntax

Pointer Start Address Data


to Length
Q area P# Q 10.0 BYTE 10
Bit memory P# M 10.0 BYTE 10
Data block P# DB (No. of the DB).DBX 10.0 BYTE 10

The following table describes the valid source areas for the output data in
the control system (PLC).

Table 2-7 Source areas

Start Address Data Length


Q area From Q 0.0 From 4 bytes
Bit memory From M 0.0 From 4 bytes
Data block From DB1.DBX 0.0 From 4 bytes

The size of the address areas and the maximum data length depends on
the CPU used.

5454B 2-15
IBS S7 300 BC SWD UM E

ERROR parameter The following table describes the error codes of the ERROR parameter,
(error codes) which are indicated in the MW 14 bit memory word.

Table 2-8 Error codes of the ERROR parameter in MW 14 (FB 22)

Error Codes in Bit Memory Word 14 (MW 14)


Bit memory Bit memory
byte 14 byte 15
high-byte low-byte
80 XX XX = Siemens error code
(see STEP 7 user manual, error
code of SFC 58 "WR_REC")
FF YY YY = Phoenix Contact error code
FF 02 Timeout for consistent access

Time response R u n tim e /m s


of the block 3 .8

2 .4

1 .4

1 0 0 2 4 0 O U T _ B y te s
5 4 5 4 A 0 1 0
Figure 2-3 FB 22 IB_WRITE time response

2-16 5454B
Description of the Function Blocks

2.3.4 FB 24 IB_DIAG

Task The IB_DIAG function block processes INTERBUS error messages


together with the internal functions of the controller board. The diagnostic
result is evaluated in the cyclic program and indicated by the diagnostic
status register. In the event of errors, error messages are acknowledged
either automatically or by pressing an external button and the bus is re-
started.
The function block evaluates the diagnostic status register bits PF (periph-
eral fault), USER (user error), BUS (bus error), and CTRL (controller board
error).
After a BUS or CTRL error, the function of bit 0 in the standard function start
register is initiated using the "StartUp", "Activate" or "AutoStart" parame-
ters. If the diagnostic status register indicates a PF or USER error, the
same parameters initiate the function of bit 2.
Bit 0 = Start INTERBUS system
Bit 2 = Confirm diagnostics
If the entire system is switched on via the main switch it may be that de-
vices are supplied with voltage later than the controller board. This results
in an error in the controller board. If the PLC enters its cyclic program, the
IB_DIAG function block waits for the time parameterized in the IBDB
(DW2). After this time has elapsed, FB 24 starts the bus once provided that
the StartUp parameter is set.
If the specified waiting time is too short, a bus error occurs. Therefore the
waiting time should be adapted to the entire system.

M a in s w itc h S ta rtu p A tte m p t b u s D e te c t P L C in W a itin g B u s W a itin g B u s


O N O B 1 s ta rtu p b u s e rro r c y c lic tim e s ta rtu p tim e s ta rtu p
p ro g ra m e la p s e d a tte m p te d e la p s e d a tte m p te d

S e t V o lta g e D e v ic e n o t B u s e rro r V o lta g e R e s e t S ta rtU p t


S ta rtU p a v a ila b le a t y e t re a d y to a v a ila b le a t
th e c o n tr o lle r o p e ra te th e d e v ic e s
b o a rd
5 4 5 4 A 0 0 8

Figure 2-4 Switching on the entire system

5454B 2-17
IBS S7 300 BC SWD UM E

Call structure CALL FB 24, DB 24 Diagnostic driver, instance DB

IBDB := DB20 INTERBUS data block


DIDB := DB25 Diagnostic data block
Activate := I4.0 Acknowledgment button
AutoStart := M100.0 Automatic restart (OFF)
RUN := M100.1 Message: INTERBUS active
PF := M100.2 Peripheral fault
BusQuality := M100.3 Transmission quality
Detection := M100.4 Searching for bus
error
StartUp := M100.5 INTERBUS start after control
system startup (OB 100)

Parameter descrip- IBDB Global INTERBUS data block to be set by the user with a
tions length of 12 data words.
DIDB Number of a diagnostic data block, to be set by the user.
Activate This parameter is controlled by a button, which must be
connected externally and acknowledges an existing error.
In the event of a bus error, the INTERBUS system is
restarted. In the event of a peripheral fault or user error,
the diagnostic display is updated.
AutoStart = 1: In the event of an error, the function of bit 0 or 2 of the
standard function start register is automatically activated.
If the error cannot be removed, bits 0 or 2 are re-activated
at preset intervals (DW 2, see "Description of the "DIDB"
Data Block:" on page 2-20).
= 0: Only the "Activate" parameter can be used to activate
the function of bits 0 or 2.
RUN = 1: INTERBUS is in the "RUN" state.
= 0: INTERBUS is in the "STOP" state.
PF = 1: INTERBUS is indicating a peripheral fault. The error
location (device number) is stored in the diagnostic
parameter register.
= 0: INTERBUS is not indicating a peripheral fault.

2-18 5454B
Description of the Function Blocks

BusQuality Evaluation of transmission quality


= 1: Quality is not achieved.
= 0: Quality is achieved.
The "BusQuality" bit provides additional service
information for the user, thus increasing system
availability. When this bit is set (BUS_QUALITY = 1),
transmission errors have occurred. Check the
transmission paths with the IBS CMD diagnostic software
(evaluation of the transmission statistics) to avoid system
errors in the long term.
Example:
Use the "BusQuality" bit to detect aging effects in your
system at an early stage (e.g., increased optical fiber cable
attenuation or wear of trailing cables and slip rings).
Appropriate measures can then be implemented in good
time.
Detection After a bus error, the "RUN" bit is deactivated in the
diagnostic status register and the "DETECT" bit
(diagnostic routine active) is activated. After error
localization, the bit is reset and the error is displayed.
StartUp This parameter activates and starts the INTERBUS
system once. In the event of an error, the INTERBUS
system is started automatically after a cold or warm restart
of the control system. Prerequisite: The bit memory bit
must be set during control system startup.
The "RUN" and "PF" parameters are set according to the RUN (data trans-
mission active) and PF (peripheral fault) bits of the diagnostic status regis-
ter.
Additional information can be found in the Quick Start Guide
IBS S7 300 BC QS UM E and an error description can be found in the Di-
agnostics Guide IBS SYS DIAG DSC UM E.

5454B 2-19
IBS S7 300 BC SWD UM E

Description of the "DIDB" Data Block:


Specify the values of data words 0, 2, and 12.
Data words 8 and 10 should be set to zero during control system startup to
delete any offset that may be present.

Table 2-9 Data word assignment in the DIDB

Data Word Type Contents


DW0 INT Number of the timer used
DW2 S5TIME Value of the timer
DW4 WORD Last content of the diagnostic status register
DW6 WORD Last content of the diagnostic parameter regis-
ter
DW8 WORD Internal
DW10 WORD Internal
DW12 WORD DBX 13.0 (DB bit 13.0):
= 1: The function of bits 0 or 2 of the standard
function start register are executed via the "Ac-
tivate" parameter. The "AutoStart" parameter
starts the function of bit 0 of the standard func-
tion start register.
= 0: The "Activate" or "AutoStart" parameters
start the function of bits 0 or 2 of the standard
function start register.

2-20 5454B
Chapter 3
This section informs you about
– The technical data for the driver blocks

Technical Data for the Driver Functions ...............................................................3-1

5454B 3-1
3-2 5454B
Technical Data for the Driver Functions

3 Technical Data for the Driver Functions


Block Name IB_INI IB_DIAG
Block number FC 20 FB 24
Block length (in bytes) 498 642
MC7 code length (in bytes) 362 504
Local data length (in bytes) 26 30
Bit memory bits, times, and Timer, depending Local word 0
counters used on the parameters (LW0)
Data block used IBDB DB 24, IBDB,
DIDB
Blocks called/functions None DB 24
Version 1.0 1.0

Block Name IB_READ IB_WRITE


Block number FB 21 FB 22
Block length (in bytes) 454 574
MC7 code length (in bytes) 338 448
Local data length (in bytes) 46 46
Bit memory bits, times, and None None
counters used
Data block used IBDB IBDB
Blocks called/functions DB 21, DB 22,
SFC 59 RD_REC SFC 58 WR_REC
Version 1.0 1.0
Processing time 1.4 ms + 10 µs/byte *
* The "byte" value corresponds to the data length entered in the
DEST (FB 21)/SOURCE (FB 22) parameters. The specified number of
bytes is always transferred irrespective of the number of IN_BYTES/
OUT_BYTES in the connected INTERBUS system.

5454B 3-3
IBS S7 300 BC SWD UM E

3-4 5454B
Appendix A

A 1 Table of Figures

Figure 2-1: Call structure of the blocks in OB 100 and OB 1 .........2-7


Figure 2-2: FB 21 IB_READ time response .................................2-13
Figure 2-3: FB 22 IB_WRITE time response ................................2-16
Figure 2-4: Switching on the entire system ..................................2-17

5454B A-1
Table of Figures

A-2 5454B
Appendix A

A 2 List of Tables

Table 2-1: Slot addresses in the control system (PLC)..................2-9


Table 2-2: ERR parameter error codes........................................2-10
Table 2-3: DEST parameter address syntax................................2-12
Table 2-4: Destination areas ........................................................2-12
Table 2-5: Error codes of the ERROR parameter in MW 12
(FB 21) ........................................................................2-13
Table 2-6: SOURCE parameter address syntax ..........................2-15
Table 2-7: Source areas ..............................................................2-15
Table 2-8: Error codes of the ERROR parameter in MW 14
(FB 22) ........................................................................2-16
Table 2-9: Data word assignment in the DIDB.............................2-20

5454B A-3
List of Tables

A-4 5454B
Appendix A

A 3 Index

B Description......................................... 2-3
FB 21 IB_READ............................... 2-11
Base address
FB 22 IB_WRITE ............................. 2-14
Slot assignment ................................. 2-9
FB 24 IB_DIAG................................ 2-17
D FC 20 IB_INI...................................... 2-8

DIDB
I
Data word assignment ..................... 2-20
Driver software Input data

Calling in STEP 7............................... 2-5 Destination areas............................. 2-12

Disk contents ..................................... 2-4


Installation.......................................... 2-4
O
Technical data ................................... 3-3 Output data
Source areas ................................... 2-15
E
Error codes
S
FB 21 IB_READ............................... 2-13 Slot address
FB 22 IB_WRITE ............................. 2-16 Slot assignment ................................. 2-9
FC 20 IB_INI .................................... 2-10
T
F Time response
Function blocks FB 21 IB_READ............................... 2-13
Call structure...................................... 2-6 FB 22 IB_WRITE ............................. 2-16
Call structure, graphical ..................... 2-7 Transmission quality
BusQuality parameter...................... 2-19

5454B A-5
Index

A-6 5454B
We Are Interested in Your Opinion!
We would like to hear your comments and suggestions concerning this
document.

We review and consider all comments for inclusion in future documen-


tation.

Please fill out the form on the following page and fax it to us or send your
comments, suggestions for improvement, etc. to the following address:

Phoenix Contact GmbH & Co. KG


Marketing Services
Dokumentation INTERBUS
32823 Blomberg
GERMANY

Phone +49 - (0) 52 35 - 3-00


Telefax +49 - (0) 52 35 - 3-4 20 66
E-Mail tecdoc@phoenixcontact.com

5050df17
FAX Reply
Phoenix Contact GmbH & Co. KG Date:
Marketing Services
Dokumentation INTERBUS Fax No: +49 - (0) 52 35 - 3-4 20 66

From:
Company: Name:
Department:
Address: Job function:
City, ZIP Phone:
code:
Country: Fax:

Document:
Designation: Revision: Order No.:

My Opinion on the Document


Form Yes In part No
Is the table of contents clearly arranged?
Are the figures/diagrams easy to understand/helpful?
Are the written explanations of the figures adequate?
Does the quality of the figures meet your expectations/needs?
Does the layout of the document allow you to find information
easily?
Contents Yes In part No
Is the phraseology/terminology easy to understand?
Are the index entries easy to understand/helpful?
Are the examples practice-oriented?
Is the document easy to handle?
Is any important information missing? If yes, what?

Other Comments:

5050df17

You might also like