PROFIBUS-DP Master Unit C200HW-PRM21 Operation Manual

PROFIBUS-DP  Master  Unit C200HW-PRM21 Operation  Manual

C200HW-PRM21

PROFIBUS-DP Master Unit

Operation Manual

Produced September 1998

iv

Notice:

OMRON products are manufactured for use according to proper procedures by a qualified operator and only for the purposes described in this manual.

The following conventions are used to indicate and classify precautions in this manual. Always heed the information provided with them. Failure to heed precautions can result in injury to people or dam- age to the product.

A DANGER!

Indicates information that, if not heeded, is likely to result in loss of life or serious injury.

Indicates information that, if not heeded, could possibly result in loss of life or serious injury.

Indicates information that, if not heeded, could result in relatively serious or minor injury, damage to the product, or faulty operation.

OMRON Product References

All OMRON products are capitalised in this manual. The word “Unit” is also capitalised when it refers to an OMRON product, regardless of whether or not it appears in the proper name of the product.

The abbreviation “Ch,” which appears in some displays and on some OMRON products, often means

“word” and is abbreviated “Wd” in documentation in this sense.

The abbreviation “PLC” means Programmable Logic Controller and is not used as an abbreviation for anything else.

Visual Aids

The following headings appear in the left column of the manual to help you locate different types of information.

Note Indicates information of particular interest for efficient and convenient operation of the product.

1, 2, X..lndicates lists of one sort or another, such as procedures, checklists, etc.

o OMRON, 1998

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of OMRON.

No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is constantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice. Every precaution has been taken in the preparation of this manual. Nevertheless, OMRON assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained in this publication.

V

TABLE OF CONTENTS

PRECAUTIONS

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi

1 Intended Audience.. ....................................................................................................................................................... xii

2 General Precautions.. ..................................................................................................................................................... xii

3 Safety Precautions ......................................................................................................................................................... xii

4 Operating Environment Precautions ............................................................................................................................. xii

5 Application Precautions ............................................................................................................................................... xiii

6 EC Directives.. ............................................................................................................................................................... xiv

1

PROFIBUS-DP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

l-l Introduction.. ................................................................................................................................................................

2

1-2 Protocol architecture ....................................................................................................................................................

2 l-3 Device types ................................................................................................................................................................

.4 l-4 PROFIBUS-DP characteristics ....................................................................................................................................

4 l-5 Device Data Base files.. ...............................................................................................................................................

8 l-6 Profiles ........................................................................................................................................................................

.8

2 INSTALLATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2-l Physical layout of the unit .........................................................................................................................................

2-2 Mounting the C200HWPRM21..

..............................................................................................................................

2-3 Setting up a network.. ................................................................................................................................................

10

13

14

3 SPECIFICATIONS AND PERFORMANCE

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3- 1 Overall Specifications ...............................................................................................................................................

3-2 Performance ...............................................................................................................................................................

.18

20

4 CONFIGURATOR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4-1 General.. .....................................................................................................................................................................

4-2 Setup ..........................................................................................................................................................................

4-3 Operation.. ..................................................................................................................................................................

4-4 Debug mode ...............................................................................................................................................................

30

31

3 1

44

5 PLC INTERFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

5-1 Unit Settings.. .............................................................................................................................................................

5-2 Input / Output Mailbox ..............................................................................................................................................

5-3 Control and status area.. .............................................................................................................................................

5-4 LEDs ..........................................................................................................................................................................

52

59

60

70

6 MESSAGE COMMUNICATION, IOWR / IORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

6-l Message communication.. ..........................................................................................................................................

6-2 IOWR .........................................................................................................................................................................

6-3 IORD.. ........................................................................................................................................................................

6-4 Messages ....................................................................................................................................................................

74

74

76

77

7 TROUBLESHOOTING AND MAINTENANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

7-l Error Indicators ..........................................................................................................................................................

7-2 Troubleshooting

.........................................................................................................................................................

7-3 Maintenance..

.............................................................................................................................................................

Appendices

Appendix A Tips and sample programs.. ..........................................................................................................................

Appendix B GSD file for C200HW-PRM21 .................................................................................................................

84

84

90

93

,101

vii

Revision History ...................................................................................... 107

. . .

Vlll

About this Manual:

This manual describes the installation and operation of the PROFIBUS-DP Master Unit and includes the sections described below.

Please read this manual carefully and be sure you understand the information provided before at- tempting to install and operate the PROFIBUS-DP Master Unit. Be sure to read the precautions

provided in the following section.

Section 1 gives a brief description of PROFIBUS-DP.

Section 2 describes the installation of the C200HW-PRM21.

Section 3 describes the overall specifications and the communication performance of the Unit.

Section 4 describes the software for configuring the PROFIBUS-DP network.

Section 5 describes the interface with the user.

Section 6 describes the message communication.

Section 7 describes the troubleshooting procedures and maintenance operations.

Failure to read and understand the information provided in this manual may result in personal injury or death, damage to the product, or product failure. Please read each section in its entirety and be sure you understand the information provided in the section and related sections before attempting any of the procedures or operations given.

ix

PRECAUTIONS

This section provides general precautions for using the PROFIBUS-DP Master Units, Programmable Controllers, and related devices.

The information contained in this section is important for the safe and reliable application of the PROFIBUS-DP

Master Units. You must read this section and understand the information contained before attempting to set up or operate a PROFIBUS-DP Master Unit and PLC system.

1 Intended Audience.. .......................................................................................................................................................

2 General Precautions.. .....................................................................................................................................................

3 Safety Precautions .........................................................................................................................................................

4 Operating Environment Precautions .............................................................................................................................

5 Application Precautions ...............................................................................................................................................

6 EC Directives.. ............................................................................................................................................................... xii xii xii xii xiii xiv

xi

Operating Environment Precautions

1

2

Intended Audience

Section 4

This manual is intended for the following personnel, who must also have knowledge of electrical systems (an electrical engineer or the equivalent). l

Personnel in charge of installing FA systems. l

Personnel in charge of designing FA systems. l

Personnel in charge of managing FA systems and facilities.

General Precautions

The user must operate the product according to the performance specifications described in the operation manuals.

Before using the product under conditions which are not described in the manual or applying the product to nuclear control systems, railroad systems, aviation systems, vehicles, combustion systems, medical equipment, amusement machines, safety equipment, and other systems, machines, and equipment that may have a serious influence on lives and property if used improperly, consult your OMRON representative.

Make sure that the ratings and performance characteristics of the product are sufficient for the systems, machines, and equipment, and be sure to provide the systems, machines, and equipment with double safety mechanisms.

This manual provides information for installing and operating OMRON

PROFIBUS-DP Master Units. Be sure to read this manual before operation and keep this manual close at hand for reference during operation.

It is extremely important that a PLC and all PLC Units be used for the specified purpose and under the specified conditions, especially in applications that can directly or indirectly affect human life. You must consult with your OMRON representative before applying a PLC system to the above mentioned applications.

3

4

Safety Precautions

Never attempt to disassemble any Units while power is being supplied. Doing so may result in serious electrical shock or electrocution.

A ! WARNING

Never touch any of the terminals while power is being supplied. Doing so may result in serious electrical shock or electrocution.

Operating Environment Precautions

Do not operate the control system in the following places.

A ! Caution l

Where the PLC is exposed to direct sunlight. l

Where the ambient temperature is below 0°C or over 55°C. l

Where the PLC may be affected by condensation temperature changes. l

Where the ambient humidity is below 10% or over 90%. l

Where there is any corrosive or inflammable gas. due to radical l

Where there is excessive dust, saline air, or metal powder. l

Where the PLC is affected by vibration or shock. l

Where any water, oil, or chemical may splash on the PLC.

The operating environment of the PLC System can have a large effect on the

xii

Application Precautions

5

Section 5

longevity and reliability of the system. Improper operating environments can lead to malfunction, failure, and other unforeseeable problems with the PLC

System. Be sure that the operating environment is within the specified conditions at installation and remains within the specified conditions during the life of the system.

Application Precautions

Observe the following precautions when using the PROFIBUS-DP Master

Units or the PLC.

Failure to abide by the following precautions could lead to serious or possibly fatal injury. Always heed these precautions.

A ! Caution l

Always ground the system to 100 Q or less when installing the system to protect against electrical shock. l

Always turn OFF the power supply to the PLC before attempting any of the following. Performing any of the following with the power supply turned ON may lead to electrical shock: l

Mounting or removing any Units (e.g., I/O Units, CPU Unit, etc.) or memory cassettes. l

Assembling any devices or racks. l

Connecting or disconnecting any cables or wiring.

Failure to abide by the following precautions could lead to faulty operation of the PLC or the system or could damage the PLC or PLC Units. Always heed these precautions.

.

Use the Units only with the power supplies and voltages specified in the operation manuals. Other power supplies and voltages may damage the

Units.

.

Take measures to stabilise the power supply to conform to the rated supply if it is not stable.

.

Provide circuit breakers and other safety measures to provide protection against shorts in external wiring.

.

Do not apply voltages exceeding the rated input voltage to Input Units. The

Input Units may be destroyed.

.

Do not apply voltages exceeding the maximum switching capacity to

Output Units. The Output Units may be destroyed.

.

Always disconnect the LG terminal when performing withstand voltage tests.

.

Install all Units according to instructions in the operation manuals. Improper installation may cause faulty operation.

.

Provide proper shielding when installing in the following locations: l

Locations subject to static electricity or other sources of noise. l

Locations subject to strong electromagnetic fields. l

Locations subject to possible exposure to radiation. l

Locations near power supply lines.

.

Be sure to tighten Backplane screws, terminal screws, and cable connector screws securely.

.

Do not attempt to take any Units apart, to repair any Units, or to modify any

Units in any way.

The following precautions are necessary to ensure the general safety of the system. Always heed these precautions. l

Provide double safety mechanisms to handle incorrect signals that can be generated by broken signal lines or momentary power interruptions. l

Provide external interlock circuits, limit circuits, and other safety circuits in

. . .

x111

EC Directives

6

Section 6

addition to any provided within the PLC to ensure safety.

EC Directives

PROFIBUS-DP Master Units that meet EC directives also meet the common emission standard (EN50081 -2). When PROFIBUS-DP Master Units are built into equipment, however, the measures necessary to ensure that the standard is met will vary with the overall configuration, the other devices connected, and other conditions. You must therefore confirm that EC directives are met for the overall machine or device.

xiv

1 PROFIBUS-DP

This section gives a brief description of PROFIBUS-DP. l-l Introduction.. ................................................................................................................................................................ l-2 Protocol architecture .................................................................................................................................................... l-3 Device types

................................................................................................................................................................

l-4 PROFIBUS-DP characteristics ....................................................................................................................................

1-4-l

Bus Access Protocol.. .........................................................................................................................................

I-4-2

Data throughput.. ...............................................................................................................................................

I-4-3 Diagnostics functions.. .......................................................................................................................................

I-4-4 Protection mechanisms ......................................................................................................................................

I-4-5 Network states .................................................................................................................................................... l-5

Device Data Base files.. ............................................................................................................................................... l-6 Profiles

........................................................................................................................................................................

7

8

.8

5

6

6

2

2

.4

4

4

1

Introduction

l-l Introduction

Section l-1

Multi-vendor

Standard

EN 50170

High speed

Process Automation

PROFIBUS is a vendor-independent, open fieldbus standard for a wide range of applications in manufacturing, process and building automation. Vendor independence and openness are guaranteed by the PROFIBUS standard

EN 50170. With PROFIBUS, devices of different manufacturers can communicate without special interface adjustments.

The PROFIBUS family consists of three compatible versions:

PROFIBUS-DP

DP stands for Decentralised Periphery. It is optimised for high speed and low-cost interfacing, especially designed for communication automation control systems and distributed I/O at the device level. between

PROFIBUS-PA

PA stands for Process Automation. It permits sensors and actuators to be connected on one common bus line even in intrinsically-safe areas. It permits data communication and power supply over the bus using 2-wire technology according the international standard IEC 1158-2.

Higher level

PROFIBUS-FMS

FMS stands for Fieldbus Message Specification. This version is the general- purpose solution for communication tasks at a higher level. Powerful services open up a wide range of applications and provide great flexibility. It can also be used for extensive and complex communications tasks.

Uniform bus access protocol

PROFIBUS-DP and PROFIBUS-FMS use the same transmission technology and a uniform bus access protocol. Thus, both versions can be operated simultaneously on the same cable. However, FMS field devices cannot be controlled by DP masters or vice versa.

It is not possible to exchange one of these family members by another family member. This will cause faulty operation.

The rest of this section only describes PROFIBUS-DP.

1-2 Protocol architecture

OSI

The PROFIBUS protocol architecture is oriented on the OSI (Open System

Interconnection) reference model in accordance with the international standard IS0 7498. Layer 1 (physical layer) of this model defines the physical transmission characteristics. Layer 2 (data link layer) defines the bus access protocol. Layer 7 (application layer) defines the application functions.

Protocol architecture

Section l-2

DP-Profiles

DP-Extensions

DP Basic Functions User Interface Layer

(7) Application Layer

(6) Presentation Layer

(5) Session Layer

(4) Transport Layer

(3) Network Layer

(2) Data Link Layer

(1) Physical Layer

NOT DEFINED

Fieldbus Data Link (FDL)

RS-485 / Fibre Optics

Layer 1,2 and user interface

PROFIBUS-DP uses layers 1 and 2, and the user interface. Layers 3 to 7 are not defined. This streamlined architecture ensures fast and efficient data transmission. The application functions which are available to the user, as

Transmission medium

well as the system and device behaviour of the various PROFIBUS-DP device types, are specified in the user interface. FE-485 transmission technology or fibre optics are available for transmission. RS-485 transmission is the most frequently used transmission technology. Its application area

High-speed, inexpensive

includes all areas in which high transmission speed and simple inexpensive installation are required. Twisted pair shielded copper cable with one conductor pair is used.

Easy installation

Cable length

The RS-485 transmission technology is very easy to handle. Installation of the twisted pair cable does not require expert knowledge. The bus structure permits addition and removal of stations or step-by-step commissioning of the system without influencing the other stations. Later expansions have no effect on stations which are already in operation.

Transmission speeds between 9.6 kbit/s and 12 Mbit/s can be selected. One unique transmission speed is selected for all devices on the bus when the system is commissioned.

The maximum cable length depends on the transmission speed (see table below). The specified cable lengths are based on type-A cable (see section 2-3-l). The length can be increased by the use of repeaters. The use of more than 3 repeaters in series is not recommended.

3

Device types

Section l-3

1-3 Device types

Master devices

Active stations

DPMl, DPM2

Slave devices

Passive stations

PROFIBUS distinguishes between master devices and slave devices.

Master devices determine the data communication on the bus. A master can send messages without an external request when it holds the bus access rights (the token). Masters are also called active stations in the PROFIBUS protocol.

There are two types of master devices: DP master class 1 (DPMl) and DP master class 2 (DPM2). A DPMl is a central controller which exchanges information with the decentralised stations (i.e. DP slaves) within a specified message cycle. DPM2 devices are programmers, configuration devices or operator panels. They are used during commissioning for configuration of the

DP system or for operation and monitoring purposes.

Slave devices are peripheral devices. Typical slave devices include input/output devices, valves, drives and measuring transmitters. They do not have bus access rights and they can only acknowledge received messages or send messages to the master when requested to do so. Slaves are also called passive stations.

The C200HW-PRM21 is a DPMl device.

1-4 PROFIBUS-DP characteristics

1-4-1 Bus Access Protocol

Layer 2

Medium Access Control

Token passing

Polling procedure

The bus access protocol is implemented by layer 2. This protocol also includes data security and the handling of the transmission protocols and telegrams.

The Medium Access Control (MAC) specifies the procedure when a station is permitted to transmit data. The token passing procedure is used to handle the bus access between master devices and the polling procedure is used to handle the communication between a master device and its assigned slave device(s).

The token passing procedure guarantees that the bus access right (the token) is assigned to each master within a precisely defined time frame. The token message, a special telegram for passing access rights from one master to the next master must be passed around the logical token ring - once to each master - within a specified target rotation time.

The polling or master-slave procedure permits the master, which currently owns the token, to access the assigned slaves. The picture below shows a possible configuration.

PROFZBUS-DP characteristics

.

DPMI

~--,

Active Stations, Master devices

.

DPMI II

Section l-4

PROFIBUS

Multi-peer communication

Passive Stations, Slave devices

. .

The configuration shows three active stations (masters) and six passive stations (slaves). The three masters form a logical token ring. When an active station receives the token telegram, it can perform its master role for a certain period of time. During this time it can communicate with all assigned slave stations in a master-slave communication relationship and a DPM2 master can communicate with DPMl master stations in a master-master communication relationship.

In addition to logical peer-to-peer data transmission, PROFIBUS-DP provides multi-peer communication (broadcast and multicast).

Broadcast communication: an active station sends an unacknowledged message to all other stations (master and slaves).

Multicast communication: an active station sends an unacknowledged message to a predetermined group of stations

(master and slaves).

1-4-2 Data throughput

Transmission time

At 12 Mbit/s PROFIBUS-DP requires only about 1 ms for the transmission of

512 bits of input data and 512 bits of output data distributed over 32 stations.

The figure below shows the typical PROFIBUS-DP transmission time depending on number of stations and transmission speed. The data throughput will decrease when more than one master is used.

PROFIBUS-DP characteristics

Bus cycle time vs number of slaves

Section l-4

0 4 8 12 16

Slaves

20 24 28 32

Conditions: Each slave has 2 bytes of input data and 2 bytes of output data.

1-4-3 Diagnostics functions

Extensive diagnostics

Device related diagnostics

Module related diagnostics

Channel related diagnostics

The extensive diagnostic functions of PROFIBUS-DP enable fast location of faults. The diagnostic messages are transmitted over the bus and collected at the master. These messages are divided into three levels: l

Device related diagnostics

These messages concern the general operational status of the whole device (i.e. over-temperature or low voltage).

.

Module related diagnostics

These messages indicate that a fault is present in a specific l/O range

(e.g. an 8-bit output module) of a station.

.

Channel related diagnostics

These messages indicate an error at an individual input or output (e.g. short circuit on output 5).

l-4-4 Protection mechanisms

Time monitoring

At the master

At the slave

PROFIBUS-DP provides effective protection functions against parameterisa- tion errors or failure of the transmission equipment. Time monitoring is provided at the DP master and at the DP slaves. The monitoring interval is specified during the configuration. l

Protection mechanism at the master.

The DPMl monitors data transmission of the slaves with the

Data_Control_Timer. A separate control timer is used for each slave. This timer expires when correct data transmission does not occur within the monitoring interval. The user is informed when this happens. If the automatic error reaction (Auto-Clear = TRUE) has been enabled, the

DPMl exits its Operate state, switches the outputs of all assigned slaves to fail-safe status and changes to its Clear status (see also next section). l

Protection mechanism at the slave.

The slave uses the watchdog control to detect failures of the master or the transmission line. If no data communication with the master occurs within the watchdog control interval, the slave automatically switches its outputs to the fail-safe status.

Also, access protection is required for the inputs and outputs of the DP slaves operating in multi-master systems. This ensures that direct access

PROFZBUS-DP characteristics

Section l-4

can only be performed by the authorised master. For all other masters, the slaves offer an image of their inputs and outputs which can be read from any master, even without access rights.

1-4-5 Network states

Off-line stop

Clear

Operate

Auto-clear

Fail-safe state

PROFIBUS-DP distinguishes four different states. l

Off-line

Communication with all DP participants is stopped. l stop

Communication between DPMl and DP slaves is stopped. Only commu- nication between DPMI and DPM2 is possible.

0 Clear

DPMl master tries to set parameters, check the configuration, and perform data exchange with its associated DP-slaves. The data exchange comprises reading the inputs of the DP-slaves and writing zero’s to the outputs of the DP-slaves.

0 Operate

DPMl master exchanges data with its assigned slaves, inputs are read and outputs are written. Beside this, the DPMl cyclically sends its local status to all assigned DP slaves (with a multicast) at a configurable time interval.

When an error occurs during the data transfer phase of the DPMl, the ‘auto- clear’ configuration parameter determines the subsequent actions. If this parameter is set to false, the DPMl remains in the Operate state. If set to true, the DPMl switches the outputs of all assigned DP slaves to the fail-safe state and the network state changes to the Clear state.

7

Device Data Base-files

Section l-5

I-5 Device Data Base files

Plug-and-play

DDB-file, GSD-file

General section

DP-master section

DP-slave section

To achieve simple plug-and-play configuration of the PROFIBUS-DP network, the characteristic features of a device are specified in a file. This file is called a DDB-file (Device Data Base file) or a GSD-file (Geratestammdaten file). The GSD files are prepared individually by the vendor for each type of device according a fixed format. Some parameters are mandatory, some have a default value and some are optional.

The device data base file is divided into three parts: l

General specifications

This section contains vendor and device names, hardware and software release states, station type and identification number, protocol specifica- tion and which baud rates are supported. l

DP master-related specifications

This section contains all parameters which only apply to DP master devices (i.e. maximum memory size for master parameter set, maximum number of entries in the list of active stations or the maximum number of slaves the master can handle). l

DP slave-related specifications

This section contains all specification related to slaves (i.e. minimum time between two slave poll cycles, specification of the inputs and outputs and about consistency of the I/O data).

Configurator

The device data base file of each device is loaded in the configurator and downloaded to the master device. The device data base file for the C200HW-

PRM21, named OC_1656.GSD, is provided with the configuration software.

Section 4 will describe the configurator package SyCon-DP, which is used for configuration of the C200HW-PRM21, in more detail.

1-6 Profiles

Exchanging devices

To enable the exchange of devices from different vendors, the user data has to have the same format. The PROFIBUS-DP protocol does not define user data, it is only responsible for the transmission of this data. The format of user data is defined in so called profiles. Profiles may reduce engineering costs since the meaning of application-related parameters is specified precisely. Profiles have for instance been defined for drive technology, encoders, and for sensors /actuators.

2 Installation

This section describes the installation of the C200HW-PRM21

2-l Physical layout of the unit .........................................................................................................................................

2-l-l LEDs.. ...............................................................................................................................................................

2-l -2 Rotary Switch ...................................................................................................................................................

2-l-3 BUS Connector.. ...............................................................................................................................................

2-l-4 Configurator Connector.. .................................................................................................................................

2-I-5 Termination Switch ..........................................................................................................................................

2-2 Mounting the C2OOHWPRM21

................................................................................................................................

2-3 Setting up a network ..................................................................................................................................................

2-3-l Fieldbus cabling ...............................................................................................................................................

2-3-2 Configuring the fieldbus.. .................................................................................................................................

10

13

13

14

14

10

10

11

12

16

9

Physical layout

sf

the unit

Section 2-1

Physical layout of the unit

The figure below shows the side and front views of the C200HW-PRM21.

The front view shows the indicator LEDs, the ‘Machine No.’ rotary switch, two g-pin female sub-D connectors, and the bus termination switch.

2-l-l LEDs

The C200HW-PRM21 has 6 indicator LEDs. The two LEDs on the left side give a status indication of the unit in general. The four LEDs on the right side are related to the status of the PROFIBUS-DP network Refer to section 5-4 for a detailed (functional) description of the LEDs.

2-l-2 Rotary Switch

The rotary switch is used to set the unit number (or so called “Machine No.“).

MACHINE

No.

The unit number setting determines which words in the Internal Relay and

Data Memory Areas are allocated to the Master Unit.

The allowed unit number setting range depends on the PLC CPU Unit being used, as shown in the following table.

10

Physical layout

sf

the unit

CPU Unit models

C200HS,

C200HE,

C200HGCPU3 -E/CPU4 -E,

C2OOHX-CPU3 -E/CPU4 -E

C200HGCPU5 -E/CPU6 -E,

C200HXCPU5 -E/CPU6 -E

Unit number setting range

0 to 9

Oto F

Section 2-1

Setting method

Single-digit hexadecimal

Any unit number in the setting range is allowed as long as it has not been set on another Special I/O Unit connected to the PLC. If the same unit number is used for the C200HW-PRM21 and another Special I/O Unit, an l/O Unit Over error will occur in the PLC and it will not be possible to start up the

PROFIBUS-DP Network.

Note

Always turn OFF the power to the PLC before changing the unit number setting. The Unit only reads the unit number setting during the initialisation after power-up, so not after a software reset.

Use a small flat-blade screwdriver to turn the rotary switch; be careful not to damage the switch.

2-l-3 BUS Connector

The fieldbus connector is a g-pin female sub-D connector, as recommended by the PROFIBUS standard EN 50170.

BUS

I

Pin No.

8

9

DGND

VP

-

A-line

-

Signal

1 Shield

I

2 -

3 B-line

4 RTS

5

6

7

Description

Shield / protective ground

Data signal

Control signal for repeaters (direction control) (TTL)

Data ground

Supply voltage of the terminator resistance (5V)

Data signal

I

The signals DGND and VP are used internally to power the bus terminator

(see section 2-l -5).

The signal RTS (TTL signal) is meant for the direction control of repeaters if repeaters without self control capability are used.

The PROFIBUS standard defines 24 V remote powering signals for pin 2 and pin 7. These signals are optional and have not been implemented in this unit.

I

11

Physical layout

sf

the unit

2-1-4 Configurator Connector

The configurator connector is a g-pin female sub-D connector.

Section 2-1

CONF

Pin No.

1

2

3

4

5

6

FG

SD

RD

RS cs

I -

Signal

8

9

-

SG

Description

Frame Ground (shield)

Send Data

Receive Data

Request to Send

Clear to Send

Signal Ground

The pin assignment of this connector is the same as the that of the RS-232C pot-l provided on most C200H-series CPUs. This enables the use of the same serial communication cable for both the CPU and the C200HW-PRM21.

The wiring of the RS-232C cable is shown in the picture below.

PRM21

Configurator port

Personal computer shielded cable

12

Mounting the C2OOHW-PRM21

Section 2-2

2-1-5 Termination Switch

The termination switch has two positions. When the switch is set to the right

(as shown below), the termination is disabled. By setting the switch to the left, the termination is enabled.

TERM

Enabling the termination connects the two data lines using a 220 Q resistor which is connected to VP and DGND via two 390 Q resistors (see figure below). The powering of the terminator resistor ensures a defined idle state potential on the data lines.

To ensure proper functioning up to the highest baud rate, the bus cable has to be terminated on both ends of the cable.

VP

B-line

A-line

390 n

/(

/

220 n k

390 n

DGND

2-2 Mounting the C200HW-PRM21

Limitations

The PROFIBUS-DP Master Unit (C200HW-PRM21) can be mounted to the

CPU Rack or Expansion I/O Rack of any C200HX, -HG, -HE, or -HS PLC.

Refer to the PLC’s Installation Guide for details on mounting Units.

There are some limitations on mounting the Master Unit. l

The Master Unit is a Special I/O Unit. It can be mounted in any slot in the

Backplane of a CPU Rack or Expansion I/O Rack as long as its unit number is not the same as the unit number of another Special I/O Unit within the system. l

The current consumption all of units mounted on one backplane should not exceed the maximum output of the power supply. The C200HW-

PRM21 consumes up to 450 mA from the 5V supply. Verify the charac- teristics of all other units on their respective Instruction Sheets. l

The maximum number of Master Units that can be mounted depends on the PLC CPU type.

I

CPU Unit models Max. No. of Master Units

13

Setting up a network

Section 2-3

C200HS-CPU

(all models)

C200HE-CPU1 l/32/42

C200HG-CPU33/43

C200HX-CPU34/44

C200HG-CPU53/63

C200HX-CPU54/64

10

16

2-3 Setting up a network

2-3-l Fieldbus cabling

Bus structure

Cable type

All devices are connected in a bus structure (i.e. line). Up to 32 stations

(master or slaves) can be connected in one segment. The bus must be terminated at the beginning and at the end of each segment. When more than 32 stations are used, repeaters must be used to link the individual bus segments. The maximum number of stations that can be connected to a

C200HW-PRM21 is 124.

The standard EN 50170 specifies to use line type A of shielded twisted pair cables with the following parameters:

Fieldbus connector

Maximum length

Parameter

Impedance

Capacitance per unit length

Loop resistance

Core diameter

Core cross section

Value

135to165Q c 30 pF/m

110Wkm

0.64 mm z

0.34 mm”

I

The connector that must be used to connect to the fieldbus connector on the

C200HW-PRM21 is a g-pin male sub-D connector, preferably with a metal case, conducting screws and a solder lip for connecting the shield of the cable. The cable should at least be connected to pin 3 (B-line) and pin 8

(A-line) of the connector. When connecting, make sure that the data lines are not interchanged. For EMC-reasons, the shield of the cable should be connected to the metal case and pin 1 of the connector. The use of pin 4 depends on whether repeaters are used or not, and on the type of repeaters.

The maximum length of the cable depends on the transmission speed. The cable lengths specified in the table below are based on line type A.

Baud rate

(kbitls)

9.6, 19.2, 93.75

187.5

500

1500

3000,6000, 12000

Distance/segment

1200

1000

400

200

100

(m)

Repeaters

Stub lines

The communication distance can be increased by the use of repeaters. It is not recommended to use more than 3 repeaters in series.

Stub lines should be avoided for data transmission speeds of more than

500 kbit/s. Plug connectors available on the market permit the incoming data cable and the outgoing data cable to be connected directly in the plug connector. This means that stub lines do not have to be used, and the bus

14

Setting up a network

Termina

Section 2-3

plug connector can be connected and disconnected at all times without interrupting data communication with the other stations.

The figure below shows a possible configuration and indicates where the bus must be terminated. Note that the repeater also must be included in the count of the number of stations per segment (so only 31 ‘normal’ devices are possible per segment if a repeater is used). It must also noted that the numbering of the stations does not indicate the station addresses; a repeater does not have a station address but it’s impedance does apply a load on the bus.

CPU unit

E%E

CZOOHG

CZOOHX

PS unit I

Termination

Termination

15

Setting up a network

Section 2-3

2-3-2 Configuring the fieldbus

Configurator

After making the physical connections of the network, the network needs to be configured. For each master and its assigned slaves, a configuration has to be defined using SyCon-LIP, a dedicated PC-based configuration program.

The configurator provides the master with information about: l

The slaves that are connected to the master. l

The assignment of slaves to groups for broadcast / multicast messages. l

The mapping of the slaves into the memory of the master. l

The bus parameters (e.g. baud rate, target rotation time etc.).

For more details about the configurator refer to section 4.

Downloading configuration

After entering the configuration, it must be downloaded to the master unit. A serial COM-port of the PC is to be connected to the C200HW-PRM21 via the prescribed RS-232C cable.

PS unit )

Termination

\

Terminafion

16

3 Specifications and Performance

This section describes the overall specifications and the communication performance of the Unit

3-l Overall Specifications.. ..............................................................................................................................................

3-2 Performance ...............................................................................................................................................................

3-2-l

Fieldbus cycle time.. .........................................................................................................................................

3-2-2 PLC cycle time.. ................................................................................................................................................

3-2-3 I/O response time in asynchronous mode .......................................................................................................

3-2-4 I/O response time in synchronous mode .........................................................................................................

18

20

20

24

.25

.27

17

Overall Spec$ications

3-1 Overall Specifications

Section 3-1

Model code

Maximum. number of Master

Units

(with user defined I/O mapping)

Master Unit mounting position

Settings

Displays

External connectors

Message comr

PROFIBUS-DP

mications

Baud rate

Supported functions

Network configuration

Current consumption

Storage temperature

Operating temperature

Operating humidity

Conformance to EMC- and environmental standards

Weight

CSOOHS C200HEIHGIHX

C200HW-PRM21

10

C200H E-CPU 11/32/42

C200HG-CPU33/43

C200HX-CPU34/44

C200HG-CPU53/63

C200HX-CPU54/64

CPU Rack or Expansion I/O Rack (classified as Special I/O Unit)

Unit cannot be mounted to SYSMAC BUS Slave Racks.

Unit cannot be used on a C200H PLC system.

Rotary switch

Toggle switch

:

Unit number

:

Bus termination

Unit status

Network status

: RUN (green LED), ERR (red LED)

:

READY (green LED), COMM (green LED),

NW-ST (green LED), DP-ERR (red LED) g-pin female sub-D connector (fieldbus connector, RS-485) g-pin female sub-D connector (configurator connector, RS-232C)

2 words of control data out + 3 words of unit status in

18 words of unit setup information

16 words of status + diagnostic bits (location is user definable)

10

16

No. of IR words

No. of DM settings

No. of slave status words

Remote I/O communi- cations

Max. No. of

Slaves per

Master Unit

Max. No. of l/O words per

Master Unit

124

1 With default DM settings:

32 words in, 32 words out

With user defined DM settings:

80 words, in up to 4 areas

1

With default DM settings:

50 words in, 50 words out

With user defined DM settings:

300 words in up to 4 areas; maximum 100 words per area

Not supported via IOWR / IORD instructions

9.6 I 19.2 193.75 I 187.5 I500 kbitls,

1.5 / 3 / 6 / 12 Mbit/s as client as server

:

:

Data-Exchange,

Get_Master_Diag

Slave_Diag, Set_Prm, Chk_Cfg, Global_Control

Configurator program (SyCon-DP) WIN 3.x, WIN 95 and WIN NT

450 mA at 5 V DC (from PLC power supply)

-20 to +75”C

I

0 to +55”C

10% to 90% (non-condensing)

EN 50081-2

EN 61131-2

250 g

18

Overall Specifications

Dimensions

Section 3-1

The following diagram shows the dimensions of the Master Unit. Refer to the

PLC’s Installation Guide for the dimensions of the Unit when it is mounted to the Backplane. (All dimensions are in mm.)

A

M2.6 x 0.45

19

Performance

3-2 Performance

Section 3-2

3-2-l Fieldbus cycle time

This section gives a simplified method of fieldbus cycle time calculations.

Refer to EN 50170 for a more detailed calculation of the fieldbus cycle time.

The fieldbus cycle time with only one master is approximately: where: ns nr t MC tGAP_REQ t TC

= number of slave stations

= number of message retry cycles

= message cycle time

= live list check time

= token cycle time

The calculation of the fieldbus cycle time for multiple master networks is more complex. For simplicity, extra time needed by each additional master can be said to equal the time it holds the token and passes the token to the next station, plus the time to check for live stations. In this case the fieldbus cycle is approximately: t

BC

=

(ns + nr)

x

tMc +

nm x

(tGAP

+

tTc) where: ns nr t MC nm tGAP_REQ t TC

= number of slave stations

= number of message retry cycles

= message cycle time

= number of master stations

= live list check time

= token cycle time

For each master station it is possible to specify the target rotation time using the configurator software. If the actual fieldbus cycle time is less than the target rotation time, all messages will be transmitted. If not, the master stations will retain the low priority messages and transmit them at the next or the following token receptions.

Note The fieldbus cycle time depends on many variables, not only those mentioned in the formulas above. Therefore the formulas above only give an approximation of the fieldbus cycle time.

The minimum possible fieldbus cycle time equals approximately 1 ms

(even if the formula gives a lower value).

The message cycle time, the live list check time, and the token cycle time are explained below.

Message cycle time

A message consists of an action frame (request or send/request frame) and

20

Performance

Section 3-2

a reply frame (acknowledge or response frame). The message cycle time is composed of the frame transmission times, the transmission delay times, the station delay time and the bus idle time.

The station delay time is the time the slave needs for decoding the request and generating an acknowledge or response frame.

The bus idle time is the time between an acknowledgement or response of the slave and a new request from the master. Part of this time is used for synchronisation (tSYN

PROFIBUS has different formats for the action frame and the reply frame.

The frames can have a fixed format (with no data field or with a data field of 8 octets) or a variable format (with a variable data field length).

A general formula for the message cycle time: t

MC

=(9+nl)x11+(9+n2)x11+2xO+30+37t,,,

= (265 + 11 n) t,,, where: nl = number of action data bytes n2 = number of reply data bytes n= nl + n2

The formula is based upon the following assumptions: l

The action frame and response frame have a variable format. l

The transmission delay times are negligible.

(typical value for the ASIC SPC3)

’ tSTATION-DELAY = 3o tS,T l t

IDLE = 37 blT

Live list check time

Each bus cycle the master requests the FDL (Fieldbus Data Link) status of one of the stations connected to the network, except for the master stations that have been entered in the LAS (List of Active Stations). The stations are checked in sequence.

Each master is designated a certain range of slaves that it has to check. This range is determined by the station addresses of the masters connected to the network and the value for the parameter HSA (Highest Station Address).

A master checks the station addresses one higher than his own address up to the next master address. If there is no master with a higher address, the master checks until the value of HSA and starts again with checking from station address 0.

If the station that is being checked is present and functions correctly, the check time is approximately: t IDLE t

GAP_REQ REQ_FRAME

+t

RES_FRAME + 2 x bRANSMIT_DELAY + tSTATION-DELAY +

=6x11 +6x11 +2xO+30+37t,,,

= 200 tB,T

21

Performance

Section 3-2

If the station is not present, the master stops waiting for an answer after the slot-time (one of the bus parameters). The check time in this case is: t

GAP_REQ t

REQ_FRAME

+t

SLOT + bLE

=6x11 +100+37t,,,

= 203 t,,,

The formulas are based upon the following assumptions:

The transmission delay times are negligible. t

IDLE = 37 bT t SLOT = 1 O” b,T

(configurable)

Token cycle time

The token cycle time is the time each master station requires to process and transfer the token. It is composed of the token frame time, the transmission delay time and the bus idle time. tTC = tTOKEN-FRAME + fTRANSMIT_DELAY + bLE

The bus idle time contains the station delay time of the receiver and the synchronisation time.

A general formula for the token cycle time: t

TC

=3x11 +0+37t,,,

= 70 t,,,

The formula is based upon the following assumptions: l

The transmission delay time is negligible. l t

IDLE = 37 bT

Examples

The two figures below give an indication of the fieldbus cycle time. In each figure the bus cycle time is calculated for four different baud rates (500 kbit/s,

1500 kbit/s, 3000 kbit/s, and 12000 kbit/s).

The first figure shows the effect of the number of slaves on the bus cycle time. The values of the parameters are: n ns nr

Baud rate

= 4 (number of data bytes per slave)

= variable on the x-axis

=o

= variable per curve

The fieldbus cycle time is calculated with the formula for a single master system.

The bus cycle time increases when the number of slaves increases due to the fact that the total number of data bytes that needs to be transferred increases.

22

Performance

Section 3-2

Bus cycle time vs number of slaves

25.0

T

‘tii 20.0

!E

E

15.0

'G

!i

; 10.0

+

+500

+1500

I,,;r:r:I:::::::

*12000

J m 5.0

\

X

0.0

+

0 " "

4 8 12

0 16 20 24 28

32

Slaves

The second figure shows the effect of the number of masters on the bus cycle time. The values of the parameters are: n ns nm nr

Baud rate

=4

= nm (each master has one slave)

= variable on the x-axis

=o

= variable per curve

Bus cycle time vs number of masters

0

4 8 12

16

Masters

20 24 28 32

This figure is resembles the first figure. An increase of the number of masters also increases the number of slaves and thus increases the number of data bytes that needs to be transferred. The only difference is the addition of the time to pass the token from one master to the other master and the total time on checking the stations is increased. This is an addition of about 270 t,,, per additional master.

23

Performance

Section 3-2

3-2-2 PLC cycle time

The PLC cycle time mainly depends on the size of the PLC program and the

I/O refresh time of the units.

The size of the PLC program is application specific. Besides optimising the

PLC program, the program execution time can only be decreased by using a faster CPU.

The total I/O refresh time depends on the types of units that are mounted on the Backplane(s). Not all units refresh the same amount of data.

The I/O refresh time of the C200HW-PRM21 depends on the number of data areas and the number of I/O data words that have been mapped.

The I/O refresh time of the C200HW-PRM21 Unit can be calculated with the following formulas.

C200HS:

C200HE, C200HG, C200HX: where: na nw

= number of mapped data areas

= number of mapped l/O words (na 2 1)

Using the default mapping mode, the I/O refresh time is:

C200HS : 6.7 ms (2 areas: 32 words out, 32 words in)

C200HE,

C200HG,

C200HX : 3.6 ms (2 areas: 50 words out, 50 words in)

Refer to the Operation Manual of the CPU for more detailed calculations of the PLC cycle time.

Note

The I/O refresh time is not constant over all PLC cycles. During an I/O refresh, the unit can transfer I/O data, slave status information, and IR words

(control & status). IR data is always transferred. I/O data and slave status data are only transferred under certain conditions:

Input data:

Output data:

Only when there is new input data available. The situation that there is no new input data occurs when the fieldbus cycle time is greater than the PLC cycle time or when the communication is inhibited.

Always transferred after the Unit is initialised, except during a download and in the synchronous mode when the fieldbus cycle time is greater than the PLC cycle time.

Slave Status: Always transferred after the Unit is initialised.

24

Performance

Section 3-2

3-2-3 I/O response time in asynchronous mode

In asynchronous data transfer mode, the fieldbus cycle is not synchronised with the PLC cycle; fieldbus cycles are triggered continuously, independent of the PLC cycle.

Minimum I/O response time

The figure below shows the minimum I/O response time in asynchronous mode. The figure shows the timing at the PLC, the timing at the Master Unit, the timing at the slave input and the timing at the slave output.

PLC cycle time ~

PLC

Master Unit processing

Conditions

Input output

fPE

I/O response time

tw

t IN t OUT t BC t RF t PE

:

:

:

:

:

The Input Slave’s ON (OFF) delay

The Output Slave’s ON (OFF) delay

The fieldbus cycle time

The I/O refresh time

Program Execution time

The minimum response time can be achieved under the following conditions:

1. No other master is connected to the network. More masters will increase the fieldbus cycle time due to the token rotation between masters.

2.

User defined I/O data mapping. Only map the input and output data of the configured slaves. This will minimise the number of words that needs to be transferred per PLC cycle and therefore the I/O refresh time.

3.

The fieldbus baud rate is set to the highest value allowed for the attached slaves and the used cable length.

4.

The IORF instruction can be used to further decrease processing time in the PLC program.

The minimum I/O response time that can be achieved with C200HE, -HG or -

HX is approximately

9 ms + t,, + toUT

25

Performance

Section 3-2

Maximum I/O response time

The figure below shows the maximum I/O response time in asynchronous mode. The figure shows the timing at the PLC, the timing at the Master Unit, the timing at the slave input and the timing at the slave output.

t PLC cycle ti

PLC

t

IN

t

OUT

t

BC

t

PC

t RF t

PE

: The Input Slave’s ON (OFF) delay

:

The Output Slave’s ON (OFF) delay

:

The Fieldbus cycle time

: The Poll cycle time of the respective master

: The I/O refresh time

:

The Program Execution time

The maximum response time can occur under the following conditions.

1.

The slave in question is polled by the respective master at the beginning of the poll cycle.

2.

3.

4.

The Input data is available just after the master polled the respective slave.

The Master Unit finished processing just after the l/O refresh. The Input data is not transferred to the PLC until the next PLC cycle.

A fieldbus cycle just started before the end of the I/O refresh, the output data is not transferred until the next fieldbus cycle.

The I/O response time in the case above is: t

RESPONSE

= t,N +

2 x tBC + tPC + 2 x tRF + 2 x tpE + to”,

Note: With tpc is meant the time the master of the respective slave needs to poll all slaves that have been assigned to this master.

26

Performance

Section 3-2

3-2-4 I/O response time in synchronous mode

In synchronous data transfer mode, the fieldbus cycle is triggered immediately following the I/O refresh of the PLC. If the fieldbus cycle has not finished before the start of the I/O refresh, the fieldbus cycle is not triggered until after the next I/O refresh.

Minimum I/O response time

The figure below shows the minimum I/O response time in synchronous mode. The figure shows the timing at the PLC, the timing at the Master Unit, the timing at the slave input and the timing at the slave output. b PLC cycletime -

Input

Output t IN t

OUT t

BC t RF t

PE

:

The Input Slave’s ON (OFF) delay

:

The Output Slave’s ON (OFF) delay

:

The fieldbus cycle time

:

The I/O refresh time

:

Program Execution time

The minimum response time can be achieved under the following conditions:

1.

No other master is connected to the network. More masters will increase the fieldbus cycle time due to the token rotation between masters.

2.

User defined I/O data mapping. Only map the input and output data of the slave. This will minimise the number of words that needs to be transferred per I/O refresh and therefore minimise the I/O refresh time.

3.

PLC cycle time is greater than the fieldbus cycle time. In this case it is guaranteed that one fieldbus can be triggered per PLC cycle.

4.

The fieldbus baud rate is set to the highest value allowed for the attached slaves and used cable length.

5.

The IORF instruction can be used to further decrease processing time in the PLC program.

The minimum I/O response time that can be achieved with C200HE, -HG or -

HX is approximately

8 mS + tIN + to”T

27

Performance

Section 3-2

Maximum I/O response time

The figure below shows the maximum I/O response time in synchronous mode. The figure shows the timing at the PLC, the timing at the Master Unit, the timing at the slave input and the timing at the slave output.

PLC cycle time

- - t

IN t

OUT t

PC t RF t

PE

: The Input Slave’s ON (OFF) delay

:

The Output Slave’s ON (OFF) delay

:

The Poll cycle time of the respective master

:

The I/O refresh time

:

The Program Execution time

The maximum response time can occur under the following conditions.

1.

The slave in question is polled by the respective master at the beginning of the poll cycle.

2.

The poll cycle time of the respective execution time of the PLC program. master is less than the program

3. The Input data is available just after slave. the master polled the respective

The I/O response time in the case above is: t

RESPONSE

= t,, +

3 x t,, + 3 x t,, + touT

Note: With tpc is meant the time that the master of the respective slave needs to poll all slaves that have been assigned to this master.

28

4 Configurator

This section describes the configuration software package, required to set up a PROFIBUS-DP network

4-l General.. .....................................................................................................................................................................

30

4-l -1 Introduction.. ....................................................................................................................................................

30

4-2

4-l -2 System Requirements.. ......................................................................................................................................

Setup ..........................................................................................................................................................................

4-2-l Installation .......................................................................................................................................................

30

31

31

4-3

4-2-2 Uninstall.. .........................................................................................................................................................

Operation.. ..................................................................................................................................................................

4-3-l PROFIBUS-DP configuration.. .......................................................................................................................

31

3 1

.32

4-3-2 Device database ...............................................................................................................................................

32

4-3-3 Bus configuration.. ...........................................................................................................................................

33

4-3-4 Device configuration.. ......................................................................................................................................

35

4-3-5 Group membership.. .........................................................................................................................................

38

4-3-6 Check configuration.. .......................................................................................................................................

39

4-3-7 Bus parameters.. ...............................................................................................................................................

41

4-4

4-3-8 Download.. .......................................................................................................................................................

Debug mode ...............................................................................................................................................................

4-4-l Master Diagnostics ..........................................................................................................................................

43

44

45

4-4-2 Slave Diagnostics.. ...........................................................................................................................................

46

4-4-3 Extended diagnostics.. ......................................................................................................................................

48

4-4-4 Start/ stop communication.. .............................................................................................................................

49

29

General

4-1 General

Section

4-1

SyCon-DP

To define the network topology and PROFIBUS-DP system characteristics, the C200HW-PRM21 needs to be provided with information about the slave units connected to the network, and basic communication parameters.

This information is entered in the Unit by means of the configuration software package SyCon-DP. It is not possible to use any other (general-purpose)

PROFIBUS-DP configuration software packages available from 3’d parties.

4-l -1 Introduction

The configuration software package for the C200HW-PRM21 PROFIBUS-DP master is used to define: l l

A database of available master and slave units; the Device Database.

The configuration of the bus system connected to the C200HW-PRM21. l

Configuration- and parameter data of all connected slave stations. l

Overall bus communication settings.

All configuration data can be prepared off-line. A serial communication link with the C200HW-PRM21 is only necessary to download the configuration file to the unit, and for debugging purposes.

It is not possible to set up the C200HW-PRM21 without this configuration software. Once the configuration data has been downloaded into the Unit, the software package is no longer required during normal operation.

After the initial configuration has been downloaded, the software package can be used for: l l l

Addition / deletion of slave units or -modules.

Monitoring the PROFIBUS system status.

Troubleshooting communication problems.

4-1-2 System Requirements

The following are the minimum requirements for a PC to install the

PROFIBUS-DP configurator.

Processor:

RAM:

Hard disk space:

Operating System:

Graphics:

Serial port:

Communication cable

486DX50 or higher

16 MB or more

8 MB

Windows 3.1 or higher,

Windows 95 (4.00.950a) or higher

Windows NT 3.51 (build 1057) or higher

640x480~256

800x600~256 or more recommended

RS-232C; COMl, 2,3 or 4 see 2-3-2 ‘Configuring the fieldbus’

30

Setup

4-2 Setup

4-2-l Installation

1, 2, 3...

Section 4-2

The PROFIBUS-DP configurator SyCon-DP is supplied on 3 floppy disks

(3.5”), labelled l/3 through 3/3.

To install, insert disk l/3 into the disk drive and start the program

INSTALL.EXE, located on the disk. You will be prompted to enter a destination directory for the program to be installed in.

After loading disk l/3, you will be prompted to insert disks 2/3 and 3/3.

The installation program will create a new Program Group or Start Menu item as shown (Win95/NT4.0).

4-2-2 Uninstall

1, 2, 3...

To uninstall the PROFIBUS-DP configurator, you need to manually delete:

. the entire directory (folder) in which the software has been installed, l the file PROFIBUS.INI from your Windows directory (folder),

. the appropriate Program Group (Start Menu item)

4-3 Operation

Menu

The operation of the configurator is menu-driven.

The functions located under the main menu items are:

File

l

Create, load and save PROFIBUS-DP configuration files.

.

Print configuration data.

.

Exit the configurator.

Edit

l

Cut, copy and paste items in the configuration.

View 0

List all configured devices, sorted by address or by memory allocation.

Online 0

.

Download the configuration to the Unit.

Enter the online debug mode.

Device Database

l

.

Create, load and save a database of PROFIBUS-DP devices.

Add or delete devices to/from a device database.

Setup 0

.

.

.

.

Set overall bus system and communication parameters.

Define group assignments for global control commands.

Select serial communication port.

Enter general project information.

(Un)Select auto addressing mode.

About .

Display SyCon-DP version information.

31

Operation

Section 4-3

4-3-l PROFIBUS-DP configuration

1, 2, 3...

To build a PROFIBUS-DP configuration in a reliable and efficient way, adhere to the following sequence of actions:

1. Make a Device Database, containing all devices that are to be used in the system, and save it to disk.

2. Define the bus configuration by assigning addresses to the devices to be installed, configuring each device as required.

3. Define the assignment of each slave’s in- and output data to the internal buffers of the Unit (or use the auto-addressing function).

4. Define the overall bus system and communication parameters.

5. Select the serial communication port (set driver).

6. Save the configuration file to disk, then download it into the Unit.

4-3-2 Device database

GSD files

Each PROFIBUS-DP device, master or slave, is characterised by its Device

Database file, also known as GSD file (from German ‘Gerate StammDaten’).

The GSD file contains information about a device’s functionality and characteristics, which need to be known during the configuration of a

PROFIBUS-DP network.

The GSD file for the C200HW-PRM21 is named OC_l656,GSD, and is provided with the configurator software package (see also Appendix B). For each slave that needs to be configured, a specific GSD file must be provided by the manufacturer of the device. Without the GSD file, a slave cannot be configured.

Device Database

Operation

A device database, as generated by the PROFIBUS-DP configurator, contains the data extracted from the GSD files which is required to set up the system.

It is possible to build multiple device databases, which can be reused in different projects. Device databases can be created from scratch, and are filled by adding selected GSD files. The selected GSD files will be copied to the GSD subdirectory of the configurator’s main directory, and should not be removed. Device databases get a file extension .PDP and can be stored anywhere.

Always create or open the required device database before creating or opening a new configuration.

A default Device Database will be loaded initially. To view its contents, select

‘Device data base-Display’:

- Load...

This will present you a list of devices which can be used in a new configuration. Unnecessary devices may be deleted in this view.

32

Operation

Section 4-3

‘Device data base-Add device (*.GSD)’ allows adding new devices to the list.

While importing a new GSD file, the configurator will check the validity of vital data in the file. If a file contains syntax errors, the import will be aborted.

After completing the Device database, select ‘Device data base-save as...’ to save your work in a location of your choice.

4-3-3 Bus configuration

Master selection

After creating a new device database, or opening an existing one, the bus system can be configured. The first step is to define the Master Unit, by clicking on the Master symbol at the left of the screen:

Move the cursor to the top left cell of the PROFIBUS-DP window and click to bring up a list of Master units currently in the Device database.

33

Operation

Section 4-3

Slave selection

Select the C200HW-PRM21 to bring up the dialog box that allows you to enter the station’s bus address.

After setting the Master, the corresponding slaves can be added.

Slaves come in two varieties; simple I/O slaves, and Modular slaves. Simple

I/O slaves have a fixed input / output configuration, whereas modular slaves can be configured to the user’s requirements. The distinction between the two types is indicated in the GSD file.

To add a slave, click the appropriate symbol, and select a position in the leftmost column of the PROFIBUS-DP window. Click on an empty cell to bring up the list of corresponding devices in the Device database. Upon selection of a device, the station address dialog box will appear, and by default present the lowest available address number.

PROFIlMS-DP

1

2

0

evice

OMRON Corporation

C2ililHW-PRM21

Station address 1

OMRON Carparatian

3G3FV PROFIBUS-DP

Station address 2

Station addresses may be assigned in any sequence, and do not need to be consecutive. The sequence displayed on the screen does not have to represent the physical bus layout.

34

Operation

4-3-4 Device configuration

1, 2, 3...

Device configuration comprises the following steps:

- Station address assignment.

- Map the slaves’ I/O data to the Unit’s buffer areas.

- Set the slave’s User Parameter Data.

Auto-addressing

Station Address

Section 4-3

Station addresses will be assigned automatically according to sequence of entry. Any automatically assigned address can be changed manually.

The configurator offers the option to also automatically assign the I/O data of each slave to a location in the Unit’s buffer areas. This feature is turned ON by default, and can be turned OFF via the menu item ‘Setup-Auto addressing’.

To configure a slave, double-click on it’s icon in the PROFIBUS-DP window to bring up the following dialog box (or use ‘Device database-Edit device’):

From this dialog box, all other devices can also be selected by using the arrow buttons:

Slave Configuration Data

I/O slaves

The station address can be changed by typing over the existing one. Slaves supporting remote address setting can be changed on-line via the ‘Set Slave

Address’ button.

Entries in the shaded (yellow) areas are read from the device’s GSD file and cannot be changed.

For further configuration of the slave, two buttons provide access to configuration and parameter data entry panels.

In the Configuration data dialog box, the slave’s data allocation in the Unit’s

I/O buffers (see 5-l-1, ‘I/O Data Mapping’) can be assigned:

Depending on data format definitions in the GSD file, the required input and output areas of a slave will be shown in bytes or words. The location of the

I/O data, relative to the start of the buffer (offset), should always be entered in bytes, and must be even.

35

Operation

Auto-addressing

Modular slaves

Auto-addressing

Section 4-3

A

“ante

a station address

363Fv

1 2

16 Word Ox5F

FWatchdog control

When Auto-addressing is enabled, entering the offsets is not necessary. The allocation will be made automatically before downloading the configuration to the Unit, or when viewing the address list.

When Auto-addressing is disabled, the user must make sure that each slave is allocated a sufficiently large area of the Unit’s buffers. When a slave’s data is found to be overlapping with another slave, an error message will be generated when attempting to download. It is allowed to create gaps in the slave’s allocations to the buffers, to allow a foreseen extension of the network in a later stage. This will however result in a less than optimal data transfer between the Unit and the PLC CPU.

When the ‘Watchdog control’ item is checked, the slave will perform a specific action when bus communication is disrupted (depends on available functionality in the slave, e.g. output hold, output clear).

Modular slaves require one extra step in their I/O configuration. The top half of the configuration data window will list all possible I/O modules of the modular slave. These data are described in the GSD file. After selecting required modules, they can be added to the actual configuration in the bottom half of the window by clicking the ‘Add module’ button. The locations of the modules’ I/O data in the buffers can be adapted by the user, specifying an offset in bytes.

The ‘Type’ indicator of each module denotes the slave module’s data format:

I6 for byte inputs QB for byte outputs

IW for word inputs QW for word outputs

When ‘Auto-addressing’ is ON, the offset can be left at 0 for all modules. The mapping will be updated by the configurator during ‘View-Address list’ and before downloading to the Unit. All modules will be mapped into the buffer areas in the sequence shown in the configuration window.

When ‘Auto-addressing’ is OFF, the offset of each module in the I/O data buffers must be entered manually. The start address is entered in bytes, as an absolute address in the buffer. The addresses are not relative to the start address of the slave.

Only even addresses are allowed. If a module requires an odd number of bytes, the following single byte in the buffer will be reserved, so that the next module starts on an even address.

Manually entered offset assignments are automatically checked before being downloaded into the C200HW-PRM21. See 4-3-8, ‘Download’.

36

Operation

Section 4-3

_“Y”

DA04

,Y

I

““IL, ,

14 Word

I

i

I

Slave Parameter Data

Depending on the type of slave, vendor-specific information may be transferred to the slave at initialisation. The ‘DP Slave parameter data set’ dialog box shows fixed information plus the default ‘User (parameter) data’ from the GSD file.

w OMRON Corporation

363FV PROFIBUS-DP

Version 1.1

Any User data entered will be truncated to the User data length specified.

The function of this data is vendor-specific; check the documentation of the slave device to determine which data must be entered. When in doubt, leave these values at the defaults derived from the GSD file.

Note

The maximum value of User data length in the C200HW-PRM21 is 161 bytes.

37

Operation

Section 4-3

4-3-5 Group membership

Group Definitions

Via the menu item ‘Setup-Group membership’, up to 8 groups of slaves can be defined as targets for PROFIBUS-DP Global Control Commands.

The Group Membership dialog box allows definition of group names, and of supported functions (Freeze / Sync) per group, For more information on the execution of Sync I Freeze functions, see 5-3-1, Control words’.

Group names can be modified for easier identification. This has no effect on the operation of the unit.

The FREEZE and SYNC check-boxes can be used to prevent assignment of slaves which do not support these functions. Unchecking a function for a specific group will not prevent the processing of the global control command for that group.

The ‘Grouping’ button provides access to the ‘Group formation’ dialog box, in which slaves can be assigned to the groups. Each slave may be assigned to any number of groups. If a slave does not support SYNC and/or FREEZE functions, assignment to a group with this function is not possible.

38

Operation

Section 4-3

4-3-6 Check configuration

Device list

After slaves have been configured, it is possible to obtain an overview of all configured devices, and their data allocation in the I/O buffers, by

‘View-Device list’ and ‘View-Address list’.

The Device list shows all configured slaves, in the order in which they were defined. This order is particularly important for the auto-addressing function: offsets in the I/O buffer will be assigned to slaves in the order in which they are presented in this device list. Slave addresses can be assigned and redefined in any sequence, and do not influence the automatic addressing function.

Address list

The address list shows the start address of each slave or module’s data in the input and output buffers. The data location is always given as an offset in bytes, relative to the start of the buffer. The type indication of each slave

(module) shows if it concerns input (I) or output (Q) data, and if the data is byte (B) or word (W) oriented

If auto-addressing is enabled, the address list is recalculated each time it is accessed. This may take some time with large configurations.

The address list has two sorting methods:

1. Sort according to station address. This sorting method is most convenient to find the location of a particular slave (module) in the I/O buffers.

2. Sort according to data address. This sorting method is most convenient to find which slave’s data is available at a given buffer location

39

Operation

Section 4-3

QW 136 nw I18

Sorted by station address.

Sorted by data address

If necessary, both lists can be scrolled with the cursor keys or page-up and page-down keys.

40

Operation

Section 4-3

4-3-7 Bus parameters

The menu item ‘Setup-Bus parameter’ leads to a dialog box where the overall PROFIBUS-DP communication parameters can be set. In most cases, only the baud rate will need to be set to the required value.

Make sure that the selected baud rate is supported by all devices connected to the master. There is no verification by the configurator program.

Baud Rate

Sets the communication speed for the master and all slaves which support auto baudrate detection. All standardised PRO-

FIBUS-DP values from 9.6 kbit/s to 12

Mbit/s are supported by the C200HW-

PRM21. A change of baud rate will update all parameters marked with a * to a value optimised for the actual configuration at the new baud rate.

*Slot Time (TJ

*Station Delay Responder (TSDR) The minimum and maximum allowed times for a slave to generate a reply frame.

*Quiet Time (T,,,)

The maximum time the Master must wait for a transaction response.

The time a transmitting station must wait after the end of a frame before enabling its receiver.

*Setup Time (TSET)

GAP Actualisation Factor

*Max. Retry Limit

The time between an event and the necessary reaction.

GAP is defined as the range between this master and its successor in the logical token ring (i.e. in case more than one active sta- tion operates on the same bus).

The master will periodically check if new active stations have been added between address 0 and HSA (Highest Station Ad- dress). If stations are detected, GAP is up- dated.

The factor defines the checking period in multiples of the Target Rotation Time (TTR).

Allowed values are 1 to 100.

Maximum number of retries by this master,

41

Operation

Section 4-3

if a station does not properly respond to a request

Highest Station Address (HSA) Defines the maximum range of addresses in which this master periodically searches for newly added active stations. If multiple masters are to operate on the same bus, set

HSA at least equal to the highest master address.

Poll Timeout

*Target Rotation Time (TTR)

*Data Control Time

Min. Slave Interval

Watchdog Control / TTR

The maximum time interval that this master station may need for the execution of a master-master function (respond to a DPM2 request).

The anticipated time for one token cycle, including allowances for high and low prior- ity transactions, errors and GAP mainte- nance.

(set in bit times, value in ms is calculated)

The cycle time in which this master:

1. Updates its Data Transfer List, in which it keeps an overview of all slave states.

2. Indicates its operation mode to the associated DP slaves.

Set to a value of at least 6 times Watchdog

Control Time T,,.

The smallest allowed period of time between two slave poll cycles. This lower limit of this value is determined by the larg- est value of all Minimum Slave Interval val- ues as read from the GSD files of the con- figured slaves. This ensures that all slaves can handle the sequences of requests they receive from this master.

The ratio (T,,,,) defines the watchdog control interval at all configured slaves as a multiple of the target rotation time. If a slave’s watchdog is enabled, and it does not detect master activity for a period T,,, it will set its outputs to fail-safe state.

A ! Caution

Auto-Clear Mode OFF/ON

Determines if the master will change from

Operate to Clear mode if it detects that one or more slaves are not in data exchange mode.

If Auto-Clear mode is ON, a single slave failure will thus reset the outputs of all active slaves.

A ! Caution

It is highly recommended to access the bus parameter panel after all slaves have been configured. By changing the baud rate, all timing parameters will be optimised for the number and types of defined slaves. If the configuration is subsequently modified, select the chosen baud rate again to start a new parameter optimisation. If any bus parameter is modified manually, no automatic optimisation will take place until the baud rate is changed.

42

Operation

4-3-8 Down load

No Upload

When to download

COM port selection

Section 4-3

The PROFIBUS-DP configuration, defined off-line, needs to be downloaded into the C200HW-PRM21. Please note that uploading the configuration data from the unit is not possible, since detailed information concerning slaves and modules will not be saved in the unit. Therefore it is advised to save your work on disk before starting a download.

There are two situations in which a configuration download is allowed.

The first situation is when on startup, the Unit has detected that a corrupted database is present in its non-volatile memory. In this case the RUN LED is flashing and the DP-ERR LED is ON. As soon as the download is started, the

DP-ERR LED goes OFF and the READY LED will flash. When the download is successful and a valid database is detected, the initialisation of the unit will continue.

The second situation is after initialisation is completed. This is when the RUN

LED is ON. During the download, the READY LED will flash and the other

PROFIBUS-related LEDs will be OFF. After completion of the download, the received database is checked. If it passes the check, the Unit is re-initialised; and the READY LED turns ON. If the database is invalid, the DP-ERR LED will be ON and the user needs to re-execute the download.

Note

Do not start a download in another situation than described above. The download will most likely fail.

Before a download, make sure a serial port of the PC is connected to the

CONF port of the Unit using a cable as specified in 2-l-4,

‘Configurator

Connector’. Select the COM port to be used in the menu ‘Setup-Driver’. The selection will be stored when saving the configuration file to disk:

Which driver will you use7

Slave overlap

Upon selecting ‘Online_Download’, the configurator will first perform a number of checks on the entered configuration data.

If any slave data is found to overlap with another slave or module, the download is aborted. An error message is displayed to indicate the first allocation problem that was encountered, e.g.:

43

Debug mode

Section 4-4

aborted

Use the address list viewer to locate the problem, and resolve the conflict by modifying the offset of one or more slaves.

When auto-addressing mode is selected, all slave offsets are recalculated before a download, and no allocation conflicts should occur. The calculated offsets can be verified in the address list.

The next check is on the selection of a serial communications port. If no port has been selected, the download cannot be performed.

Wo setting of the drivers has been done. The download is aborted.

If all checks have been passed successfully, a message is displayed:

If the downhad is done during ths bus operation, the communiwhm tcstween ths master and the ~lavm is stoppsd.

Da you

tealIp

ta

After confirmation, downloading the configuration data will take several seconds, depending on the size of the configuration. After the download, the

C200HW-PRM21 will restart. If the unit does not respond correctly, the download will be aborted.

4-4 Debug mode

Configuration file

The C200HW-PRM21 status of the unit and unit. configurator software allows the user to inspect the the assigned slaves online via the CONF port of the

In order to establish data communication with the unit, the correct configuration file must be open in the configurator. Immediately after a download this is automatically the case; if the unit has to be accessed for debugging in a later stage, the user must make sure that the correct file is opened before activating the debug function. The configuration file cannot be uploaded from the unit.

Functions

The debug function can be started via the menu command ‘Online_Start

Debugger’. A verification of the checksum in the unit will assure the validity of the configuration file. If the current configuration file differs from the configuration in the unit, the debug function cannot be started.

44

Debug mode

Section 4-4

The Debugger provides the following functions:

.

Display of master unit status.

.

Display of PROFIBUS-DP network state.

.

Display of each slave’s state.

.

Indication of slave diagnostics (standard + extended). l

Start/stop PROFIBUS-DP communication

4-4-l Master Diagnostics

,“, ,,,

Master Status

The top left of the screen shows the unit’s operating status.

‘RDY’

System has initialised without error.

‘RUN’

All tasks are initialised without error.

‘COM’

Bus communication is active.

The lower indicators show the state of the PROFIBUS-DP.

‘OPT’

‘CLR’

The master is in the state ‘Operate’

The master is in the state ‘Clear’.

‘STP’

‘OFF’

The master is in the state ‘Stop’.

The master is in the state ‘Off-line’.

‘CTRL’

‘ACLR’

A parameter error has occurred.

The master is in the state ‘Auto Clear’.

Master Diagnostic

Diagnostic information concerning the PROFIBUS-DP functions can be accessed by double-clicking the display master row of the master unit in debug mode. Information is displayed as below:

‘Location of error’ and ‘Error event’ display the same information as

45

Debug mode

Section 4-4

status

word IR

n+3

in

the PLC.

‘Master main state’ indicates the same as the upper 2 bits of status word

IR

n+2, i.e.: co = Operate

80 = Clear

40 = stop

00 = Off-line

4-4-2 SI ave Diagnostics

Slave Status

In debug mode, the bus configuration display shows a status overview of all configured devices:

HMS FiLldbw Systems AB

~RUF4~U~ W-32 MODULE

Skajion address 3

The slave status is indicated by the colour of the slave’s image.

Green

Red

Normal data exchange with this slave.

Slave has diagnostic information or the master couldn’t find this slave on the bus, i.e. there is no data exchange with this slave.

On the right of the slave description, information about each slave’s state is indicated. Each slave has six indicators, plus a text display area:

‘DIAG’

Diagnostics;

If the slave sets this bit, the master is requested to collect diag-

‘IRES’

‘NSUP’

‘CFG’

‘PRM’

‘NEXST’

nostic information from the slave.

Invalid response;

This bit is set by the master upon receiving an invalid answer from the slave. The slave sets this bit to zero.

Not supported;

This bit is set by the slave, when a function is called which is not supported by the slave.

Configuration fault;

This bit is set by the slave, when its configuration data does not match the master’s data.

Parameter fault;

This bit is set by the slave, when the last parameter telegram has an error, for example wrong Ident_Number, invalid parameter.

Station non-existent;

This bit is set by the master, when this slave does not respond. If this bit is set, the diagnostic bits holds the state of the last diag- nostic information, or the initial values. The slave sets this bit to zero.

46

Debug mode

Slave Diagnostic

Section 4-4

If one of the slave’s indicators is set, a double click with the mouse in the last column calls up more detailed diagnostic information. Slave diagnostics are displayed as defined in EN 50170, paragraph 9.3.1.

‘Diag.Master_Lock

‘Diag.Param_Fault’

‘Diag.lnvalid_Slave_Response’

‘Diag.Not_Supported’

‘Diag.Ext_Diag’

‘Diag_Cfg_Fault’

‘Diag.Station_Not_Ready’

‘Diag.Station_Non_Existent’

The slave has been parameterised by an other master.

This bit is set by the slave, when the last parameter telegram has an error, for ex- ample wrong length, wrong Ident_Number, invalid parameter.

This bit is set by the master, when the master received an invalid answer from the slave. The slave sets this bit to zero.

This bit is set by the slave, when a function should be performed which is not sup- ported by the slave.

This bit is set by the DP-slave. If the bit is set, then there is diagnostic information in the slave-specific diagnostic area (Ex- tended Diagnostic).

This bit is set by the slave, when the configuration data does not match those in the master.

This bit is set by the DP-slave, when the

DP-slave is not ready for data exchange.

This bit is set by the master, when this slave is not reachable on the bus. If this bit is set, the diagnostic bits hold the state of the last diagnostic information or the initial values. The slave sets this bit to zero.

47

Debug mode

Section 4-4

‘Diag.Deactivated’

‘Diag.Sync_Mode’

‘Diag.Freeeze_Mode’

‘Diag.WD_ON’

‘Diag.Stat_Diag’

‘Diag_Prm_Req’

This bit is set by the master, when the DP- slave in the DP-slave parameter set is not marked as active and is taken out of the cyclic processing. The DP-slave always sets this bit to zero.

This bit is set by the slave, when it has received the sync-control command.

This bit is set by the DP-slave, when it has received the freeze-control command.

This bit is set by the DP-slave, when its watchdog control is active.

If the slave sets this bit, the master has to collect diagnostic information as long as this bit active. The slave sets this bit for ex- ample when there is no valid user data. If the bit DIAG.PRM_REQ and the bit

DIAG.STAT_DIAG are set, the bit

DIAG.PRM_REQ has the higher priority.

If the DP-slave sets this bit, a new parameterisation and a new configuration has to be performed. This bit is set as long as no new parameterisation has been per- formed.

‘Diag.Ext_Diag_Overflow’

If this bit is set, there are more diagnostic informations than given in

EXT_DIAG_DATA. The DP-slave set this bit for example if there is more channel in- formation than the slave can hold in its send buffer; or the DP-master sets this bit, when the DP-slave sends more diagnostic information than the DP-master can hold in its diagnostic buffer.

‘Diag.Master_Add’ In this octet the address of the DP-master is entered, which has done the parameter- isation of the this slave. If the DP-salve is not parameterised by any DP-master, the

DP-slave puts the address 255 (FF) into this octet.

‘Ident code’ The identifier of the manufacturer is reserved for every DP participant.

This identifier can be used an exact identi- fication of the slave.

If the bit ‘Diag.Ext_Diag’ is set, the slave has more diagnostics and the button

‘extended diagnostic’ is available. Extended diagnostics will be displayed in an separate window.

4-4-3 Extended diagnostics

48

Debug mode

Section 4-4

The ‘Extended Slave diagnostic’ panel can display three types of diagnostic information, specific to the slave:

.

Device related diagnostics.

.

Identifier related (module) diagnostics. l

Channel related diagnostics.

If multiple messages are available, they can be selected for display using the scroll bar on the right.

The displayed Error Output message and further information are encoded in the slave’s GSD file. The meaning of the displayed messages is slave dependent, and will be described in the slave’s documentation.

The Hexdump area displays the unprocessed diagnostic data in hexadecimal form, as received from the slave.

4-4-4 Start / stop communication

In debug mode, the menu item ‘Online’ will show the option ‘Stop communication’ or Start communication’. In normal operation, the function of this menu item is overruled by PLC control bit IR n.O1 and should not be used (see also 5-3-1,

Control words, DP communication inhibit’).

Start / Stop communication should

on/y

be used if the Unit is mode by the PLC, i.e. when IR n.00 is OFF.

not

set to Run

‘Stop communication’ will change the network state from ‘Operate’ to ‘Clear’ to ‘Stop’. Therefore all remote outputs will be reset to 0.

‘Start communication’ will change the network state from ‘Stop’ to ‘Operate’.

49

Debug mode

Section 4-4

50

5 PLC Interface

This section describes the interface with the user via the PLC system. This includes Unit settings to configure the Unit and the control / status area.

5-1 Unit Settings.. .............................................................................................................................................................

5-l -1 VO Data Mapping.. ..........................................................................................................................................

5-I-2 Slave Status Area Mapping ..............................................................................................................................

5-I-3 Data Exchange Method.. ..................................................................................................................................

5-I-4 Fatal PLC error handling ................................................................................................................................

5-2 Input 1 Output Mailbox ..............................................................................................................................................

5-3 Control and status area.. .............................................................................................................................................

5-3-l Control words.. .................................................................................................................................................

5-3-2 Status words .....................................................................................................................................................

5-4 LEDs ..........................................................................................................................................................................

52

52

57

57

58

59

60

61

64

70

51

Unit Settings

Section

5-l

5-I Unit Settings

This Special I/O Unit is configurable with settings made in a dedicated DM area. The assigned DM area depends on the Unit number setting

Unit number

0

1

DM area*

DMlOOO -

DM1099

DMllOO - DM1199

All PLC models

A

B

C

D

E

DM2000 - DM2099

DM2100 - DM2199

DM2200 - DM2299

DM2300 - DM2399

DM2400 - DM2499

All PLC models except:

C200HS. C200HE.

C200HG:CPU3c-kPU4c-E,

C200HX-CPU3c-E/CPU4c-E

F DM2500 - DM2599

* Alternatively DM7000 - DM8599, selected by PLC setup of C200H..: DM6602 f

0000 (see Operation Manual of CPU unit)

The first word in the DM area allocated to the unit will be indicated by DM m, the last word by DM m+99. Not all 100 DM words are used by the C200HW-

PRM21

The Unit settings determine the areas and methods for data exchange between the PLC CPU and the C200HW-PRM21.

Data entered in the Unit settings area is only transferred to the unit during initialisation, i.e. at power ON and at Special l/O Unit restart.

Note

The Unit operates in default mode when all Unit settings are set to zero.

5-l-l I/O Data Mapping

Data flow

I/O refresh

The figure below shows the flow of remote I/O data in the PLC system. It is possible to map the I/O data to the DM, LR, IR and HR areas of the PLC memory. Up to two input areas and two output areas may be assigned.

Output data is transferred via the bus on the Backplane (I/O Bus) to the output buffer of the Unit. At certain time intervals this data is transmitted to the slaves over PROFIBUS. Slave input data coming from PROFIBUS is first stored in the input buffer of the Unit. At certain times, this data is transferred to the memory of the PLC. The exchange of data via the I/O Bus occurs during an I/O refresh.

By default, I/O refreshes are executed at the end of each PLC program cycle, but can also be triggered by the IORF instruction.

52

Unit Settings

DMOOOO

DM4095

CZOOH-series PLC

IROOO

IR511

Section

CZOOHW-PRM21

\

Output buffer

512 bytes

-

PROFIBUS

5-l

User configurable

Maximum I/O data

Data representation

The mapping of the PROFIBUS-DP slaves onto the buffers of the Unit is defined with the configurator described in section 4. The mapping between the I/O data buffers of the Unit and the PLC memory is user configurable via the settings in data memory.

For C200HS, the maximum number of mapped I/O data is 80 words and for

C200HE, C200HG, and C200HX, the maximum is set to 300 words. If the user-defined mapping exceeds these values, the mapping is ignored (no data will be exchanged) and a fatal error is indicated in IR n+2 (see section 5-3) and the ERR LED is turned ON.

The maximum amount of data mapped per single transfer block is 100 words.

In the I/O data buffers, the high bytes of PLC data always occupy even addresses, the low bytes occupy odd addresses (Motorola format).

PLC data area word

15 ..____.

I/O data buffer

The representation of PROFIBUS-DP slave data in the I/O data buffer depends on the specifications of the slave. Please consult the slave manufacturers’ documentation. In rare cases it may be necessary to modify the data representation either at the slave side, or in the PLC program.

53

Unit Settings

Setting values in BCD

Words vs. Bytes

Section

5-l

The table below lists the DM words for configuring the I/O data mapping, with the possible values and their meaning.

Except for the definition of the start address in the PLC CPU, all values are in

BCD. To be able to distinguish between start addresses in different PLC memory areas, the first digit of the ‘start address’ indicates the area, the following three digits indicate the address in the PLC

PLC memory memory area in BCD format.

Note that data allocation in the PLC memory is in WORD units, whereas the allocation in the Unit’s buffers is in BYTE units (1 word = 2 bytes). The start address in an I/O data buffer area must always be even. Odd-valued entries will generate a setting error.

PLC addresses IR050 - IR081 are mapped to

Unit output buffer bytes 000 - 063

C200HE,C200HG,C200HX: continued +

54

Unit Settings

Section

5-l

Unit input buffer bytes 000 - 063 are mapped to

PLC addresses I!4350 - IR381

C200HE,C200HG,C200HX:

Unit input buffer bytes 000 - 099 are mapped to

Notes

l

The Unit does not check the validity of the contents of any PLC data area, from which output data is to be transferred. Any data present in the area will be transferred to the output buffer of the Unit.

If multiple fieldbus masters (e.g. PROFIBUS-DP, CompoBus/D, SYSMAC

BUS) are mounted on the same PLC system, only one of them can be used in default mapping mode. The Unit does not check if the mapped

PLC input area is in use by other Units. If so, this Unit’s data may overwrite another Unit’s data, or vice versa.

If the settings cause two destination areas to overlap, the data of the higher number area will overwrite the lower. This practice is to be avoided by the user.

Example I/O data mapping

*’ Setting errors are indicated in IR n+2 (see section 5-3) and the ERR LED will be flashing to indicate a non-fatal error.

*’ If the specified number of words would make the area exceed the boundaries of the available buffer, DM, LR, IR or HR areas, the actual number of transferred words will be limited as to remain within all of these boundaries. This setting error is indicated in IR n+2 (see section 5-3) and the ERR LED will be flashing to indicate a non-fatal error.

Below is an example of user-defined I/O data mapping. The unit number is set to 0, so the settings start at DM word 1000. The example defines two

55

Unit Settings

Section

5-l

output areas and one input area.

DM word

1000

1001

1002

1003

1004

1005

1006

1007

1008

1009

1010

Value Meaning

0002

Two output areas

0000 Write to output buffer of Unit starting at address 000

6050 Read data from PLC starting at HR50

0020 Transfer 20 words of output data

0520 Write to output buffer of Unit starting at address 520

COO0 Read data from PLC starting at LROO

0050 Transfer 50 words of output data

0001 One input area

0400 Read data from input buffer of Unit starting at address 400

A500 Write data to PLC starting at address IR500

0100 Transfer 100 words of input data

The first output area is correctly defined, all values are in range.

The second output area has an incorrect value for the start address in the output buffer of the Unit. This output area will not be mapped; the output data will not be transferred to the buffer. This setting error is indicated in IR n+2

(see section 5-3) and the ERR LED will be flashing.

Also the input area definition causes a setting error. The specified number of words to be transferred crosses the boundaries of both the available IR area and the input buffer area. The available input buffer area is 112 bytes (400 -

511) and the available IR area is 12 words (IR500-IR511). The number of input words that will be transferred is therefore limited to 12 words = 24 bytes

(the lesser of the two values). This is also a setting error which will be indicated in the same IR word.

56

Unit Settings

Section

5-l

5-l-2 Slave Status Area Mapping

DM m+14 and DM m+15 define the PLC data area where the 16 words of slave status information are to be mapped. By default (i.e. both settings are

0) the Unit uses IR200 - IR215, an IR area originally reserved for SYSMAC

BUS slaves. Therefore, if the Unit is used in combination with a SYSMAC

BUS remote master unit, the default mode should not be used.

DM word m+14 m+15

Value Meaning

Slave status data mapping mode

0001

User defined mapping defined by DM m+15 other Default mapping to IR200 - IR215

Start address in user-defined mapping mode

(Area size = 16 words)

0000 - 4080

0000 - 5984

DMOOOO - DM4080 (C200HE-CPUll)

DMOOOO - DM5984 (all other CPUs) j

Default mapping to IR200 - IR215

The user is to verify that the assigned area is not yet allocated to other Units.

5-l-3 Data Exchange Method

DM m+16 defines the data exchange procedure between the Unit and the

PLC. The two possible exchange methods are:

1. Asynchronous: the fieldbus cycles are triggered independently of the PLC cycle and therefore the fieldbus cycles run asynchronous with the PLC cycle. This method provides optimal I/O response time when the PLC cycle time is at least twice the fieldbus cycle time.

2. Synchronous: The fieldbus cycles are triggered at the end of an I/O refresh and therefore the fieldbus cycle is synchronised with the PLC cycle. If the fieldbus cycle time is greater than the PLC program execution time, the next fieldbus cycle will not be triggered until the completion of the next I/O refresh. This method ensures synchronisation between PLC cycle and fieldbus cycle.

These exchange methods are described in more detail in section 3-2.

DM word

Value

m+16

Meaning

Data exchange procedure

0000

Default, fieldbus cycle asynchronous with PLC cycle other Fieldbus cycle synchronous with PLC cycle

Note

In synchronous mode, with the slave watchdog enabled (configurable), the

PLC cycle time should be less than the set watchdog time (configurable) otherwise the watchdog of the slave will expire. If the PLC cycle time can not be reduced, the watchdog time of the slave must be set to a larger value, or the asynchronous mode must be used.

57

Unit Settings

Section

5-l

5-I-4 Fatal PLC error handling

DM m+17 defines the handling of fatal PLC errors. The Unit will react on a falling edge of Run bit IR n.00. The Run bit will turn OFF in case of:

. a fatal error in the PLC system, e.g. Memory error, I/O bus errors.

. a system FALS error.

. a user-generated FALS error.

. a PLC CPU mode change to/from Program mode.

If any of these situations occur, the remote outputs will be switched to a user- defined state. If the data exchange mode (selected with DM m+l6) is asynchronous, DM m+l7 allows the user to choose between:

1. CLEAR outputs:

The output data in the Output buffer is cleared and transmitted to the slaves

(if communication is not inhibited).

2. HOLD outputs

The output data in the Output buffer is not transmitted to the slaves anymore; the outputs of the slaves remain the previous state.

DM word m+17

Value

Meaning

Fatal PLC error handling (asynchronous data exchange mode)

0000

other

CLEAR

outputs

HOLD

outputs

This selection is ONLY valid when the Unit operates in the asynchronous data exchange mode (i.e. DM m+16 = 0000). Even if program execution stops, fieldbus communication is maintained by the Unit, independent of the

PLC cycle.

In synchronous data exchange mode, when program execution stops, no fieldbus cycles are triggered. Therefore the remote output status cannot be maintained. The status of PROFIBUS-DP will automatically change to

CLEAR, followed by STOP. All outputs will be cleared automatically, even if

DM m+l7 specifies to hold the outputs!

Note

The Unit is not able to distinguish between a user-controlled reset of the IR n.00 bit and a reset due to a fatal PLC error. Both are handled in the same way. Be aware that changing the to/from Program mode will also reset IR n.00. In Program mode, it is possible to force IR n.00 to the ON state, so that remote I/O can be operated for debugging and commissioning.

58

Input / Output Mailbox

Section 5-2

5-2 Input/Output Mailbox

PROFIBUS-DP specific commands

Beside the input and output buffer, the Unit also contains an input mailbox and an output mailbox. PROFIBUS-DP specific commands can be transferred from the CPU to the output mailbox. The response to the command placed in the output mailbox will be placed in the input mailbox.

This response can then be read by to the CPU.

C200HW-PRM21

-_)

PR#FlE%US

There are two ways to transfer a command to the output mailbox.

1. Issuing a command by IOWR instruction in the PLC program. The contents of the data area specified by the IOWR instruction are trans- ferred to the output mailbox.

2. Via the control words. The most common PROFIBUS-DP control commands can be selected by activating the corresponding bit in the control word IR n. The Unit will interpret this control word and place the corresponding command in the output mailbox.

Responses to these common control commands are automatically removed from the input mailbox. These responses contain no valuable information for the user.

Responses to other commands - issued via IOWR instructions - should be read from the input mailbox with the IORD instruction. If this is omitted, the input mailbox buffer will fill up. When this is the case, the output mailbox will be disabled; it will not be possible to transfer commands to the output mailbox anymore. Once the input mailbox is emptied again, the outstanding commands-in the output mailbox will be processed by the unit.

Details about the IOWR and IORD instructions are given in section 6.

Note

The input mailbox can also be cleared using control word IR n. The status of the mailboxes is indicated in the status word IR n+2.

59

Control and status area

Section 5-3

5-3 Control and status area

After initialisation of the unit (RUN LED is ON), the control and status words are exchanged between the PLC and the Unit during each I/O refresh. The mapping of the control words and unit status words depends on the Machine number set by the rotary switch at the front of the Unit.

Unit number

0

1

IR area

IRlOO - IR104

IRllO- IR114

All PLC models

All PLC models except:

C200HS, C200HE,

C200HG-CPU3c-E/CPU4c-E,

C200HX-CPU3c-E/CPU4c-E

E

F

IR440 - lR444

IR450 - lR454

The first word in the IR area allocated to the Unit will be indicated by IR

n,

the last word by IF?

n+4.

The first two words are control words and are sent to the Unit. The next three words are status words and are read from the Unit.

The mapping of the slave status words that are read from the Unit is defined by the Unit settings (see section 5-1-2).

Note

During a configuration download or when a fatal error occurs in the unit, the control words IR n and IR n+l will not be processed.

60

Control and status area

5-3-l Control words

Section 5-3

The two control words, IR n and IR n+l, are shown below.

Any bits of the control words which are not assigned to a specific function, can freely be used as work bits. These bits will be ignored by the C200HW-

PRM21.

IR n

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

I I I

I

L

,

L

Run

I/O communication inhibit

Input mailbox clear

Issue control command

Clear-Data

Unfreeze

Freeze

Unsvnc

Sync

IR n+l

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

I I I I

Station address

Group select

Grow 1

Group 2

Group 3

Group 4

Groub 5

Group 6

Group 7

Group 8

IR

n.00

Run

0: No exchange of I/O data between PLC and remote I/O, and no processing of mailbox commands will take place. A transition from 1 to 0 will clear or hold the outputs depending on the value set in DM m+17. Holding remote outputs is only available in asynchronous data exchange mode.

1: Unit in normal operation; exchange of I/O data with PLC, and processing of mailbox commands are enabled.

The purpose of this bit is to allow detection of a fatal PLC error.

A fatal PLC error will always reset this bit. The Unit will detect this 1 + 0 transition, and will perform the action specified in the

Unit settings (see section 5-l-4).

Note: It is recommended to always set this bit ON during PLC program execution. In asynchronous mode, bit IR n.O1 can be used to control PROFIBUS-DP communication.

61

Control and status area

IR n.O1

Section 5-3

DP communication inhibit

0: DP communication is enabled.

1: DP communication is disabled. A transition from 0 to 1 changes the network state from ‘Operate’ via ‘Clear’ to ‘Stop’.

All remote outputs will therefore be reset.

Data in the input buffer of the Unit will no longer be updated and transferred to the PLC anymore (I/O refresh time will decrease). The PLC’s output data however, is still transferred to the output buffer of the Unit. This ensures that the output buffer contains valid output data at the moment the communi- cation is enabled again.

When DP communication is disabled, the output mailbox is disabled as well. It is possible to send mailbox commands to the Unit, but they are not transferred to the output mailbox.

Because no commands are put in the output mailbox, no responses will be received in the input mailbox.

IF? n.02

Input mailbox clear

0: No specific action.

1: Each I/O refresh, one unprocessed response (if available) is removed from the input mailbox.

IF? n.03-06

Not used by C200HW-PRM21.

IF? n.07 Issue control command

0: No control commands are issued.

1: Each I/O refresh, one control command is issued.

The control command is specified by IR n.09-13, and the destination is specified by IR n+l. No control command is transferred to the output mailbox if either the RUN-bit (IR n.00) is not set or if the communication is inhibited (IR n.O1) or the output mailbox is not ready to receive a command due to a full input mailbox. In the next PLC cycle, IR n+2.11 will indicate whether the control command was accepted or not.

IR n.08

Not used by C200HW-PRM21.

IR n.09-13

Specification of the PROFIBUS-DP

control command.

Bit Command

09 Clear-Data

10 Unfreeze

Meaning

Clear output data

Unfreeze input data

11 Freeze

12 Unsync

13 Sync

Freeze input data

Unsynchronise output data

Synchronise output data

When activated simultaneously, Unsync has priority over Sync, and Unfreeze has priority over Freeze.

The Clear-Data command will always clear the output data, whether the Freeze command is activated or not.

Note

The control commands ‘Freeze’ / ‘Sync’ are overruled by a reset

62

Control and status area

Section 5-3

of the slave. The control command has to be issued again after the reset to have the slave working in the desired mode.

IF? n.14-15 Not used by C200HW-PRM21.

Multicast

Broadcast

IR n+l

Group select and Station address

PROFIBUS-DP provides multi-peer and multicast). communication (broadcast

To enable multicast communication, each slave can be assigned to one or more groups (See 4-3-5, ‘Group membership’). Up to eight groups can be defined (l-8). A target group for a multicast command is selected by setting the corresponding bit in IR n+l.

A specific slave within a group is selected by specifying its address in the Station address area (hexadecimal). When the

Station address value is set to 7Fh, all slaves assigned to the group(s) are selected.

Entering the value OOh in the Group select area of IR n+l selects all groups. Therefore any single slave can be addressed by entering OOh for Group select and the station address of the slave for Station address. This also enables to address a slave that has not been assigned to a certain group.

A broadcast command to all slaves is generated by entering the values OOh for Group Select and 7Fh for Station Address.

Example: The first table shows an example of the assignment of the slaves to groups as made with the configurator.

Stations

02h - 20h

21h - 40h

41 h - 60h

61 h - 80h

Group assignment

no group group 1 group 2 group 1 and group 2

The second table shows some examples of settings for Group select and Station address, and the resulting selection of slaves that will be targeted by a control command.

Group select

OOh

Olh

Olh

03h

OOh

Station address Selection

15h

75h

15h

7Fh

7Fh slave 15h slave 75h slave 21 h - 80h slave 02h - 80h

Sync / Freeze control

The purpose of the control commands Sync and Freeze is to be able to synchronise the outputs and inputs of the slaves.

63

Control and status area

Section 5-3

The data exchange between the master and slaves is based upon the polling technique. This means that the exchange of data between the slave and the master does not occur at the same time for all slaves.

The outputs of the slaves can be synchronised by issuing Sync commands.

This function is activated after the first Sync command is sent to the slaves.

After activation of this function, the output data sent by the Master does not get through to the output. It is stored in a buffer. The data in the buffer is not transferred to the output until another Sync command is issued. Multicasting a Sync command results in a update of the outputs of all corresponding slaves at the same time. This function can be disabled again by sending an

Unsync command.

The Freeze and Unfreeze command work in a similar way. They are meant for synchronising the input data. After activating the function, by sending a

Freeze command, the input data is not updated until another Freeze command is sent.

5-3-2 Status words

The Unit provides 19 words of status information.

Three words (IR n+2 - IR n+4) show the status of the Unit (system status) and 16 additional words show the status of all slaves. System status information is transferred in each I/O refresh, irrespective of the state of the fieldbus system. The slave status information is also always transferred, but is not valid when the PROFIBUS-DP bus communication does not function properly or during the download of a configuration. In that case the slave status information bits will be reset to 0.

System status

The three words that indicate the system status are shown below.

IR n+2

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

L

L

L

L

L

Input data transferred

II II

I I

I ’

Auto-clear

No-data

P-DP HiW failure

Wrong CPU Unit

DM settina error rexceedina max. words)

DM setting error (output area mapping)

DM setting error (input area mapping)

Control command not processed

Output mailbox full

Reply in input mailbox

Network state

64

Control and status area

IR

n+3

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

I I I

I

Section 5-3

Error number

Station address

IR

n+4

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

I I I

I

Message length (001-l 28)

Unit number (0 - F)

IR n+2.00

Input data transferred

0: No input data has been transferred to the mapped PLC data area(s) during the last I/O refresh.

1: Input data has been transferred to the mapped PLC data area(s) during the last I/O refresh.

The Unit does not always transfer input data to the mapped

PLC data area(s). If the Unit cannot provide updated input data during an I/O refresh, no data will be transferred. This will typically occur if the fieldbus cycle time is larger than the

PLC cycle time, or if the DP communication inhibited. has been

IF? n+2.01 Not used by C200HW-PRM21.

IR n+2.02

Auto-clear

(PROFIBUS-DP status bit).

0: Not in Auto-clear mode. This bit is also cleared during a database download or a P-DP H/W failure is detected (IR n+2.06 is set).

1: The master branched into Auto-clear mode, because of a remote node error.

The master will only branch into Auto-clear mode when this has been enabled in the configuration (see 4-3-7, Bus parameters). In Auto-clear mode, the network state bits indicate Stop, and the DP-ERR LED is flashing. IR n+3 will indicate more details about the cause of the error.

To recover from Auto-clear mode, the C200HW-PRM21 must be restarted (Power OFF/ON or restart bit in AR01 / SR281).

IF? n+2.03

No-data (PROFIBUS-DP status bit).

0: All remote nodes are in data exchange mode. This bit is also cleared during a database download or when a P-DP H/W failure is detected (IR n+2.06 is set).

1: At least one remote node is not in the data exchange mode or reports a fatal error.

The DP-ERR LED is FLASHING to indicate this error. IR n+3 contains more details about the cause.

65

Control and status area

Section 5-3

IR n+2.04 Not used by C200HW-PRM21.

IR n+2.05

IF? n+2.06 P-DP H/W failure

0: No error

1: Malfunctioning of the PROFIBUS-DP hardware.

The ERR LED is ON to indicate a fatal error, no communica- tion over PROFIBUS.

IF? n+2.07 Wrong CPU Unit.

0: No error

1: The Unit is mounted to a PLC type which does not support the C200HW-PRM21.

The ERR LED is ON to indicate a fatal error, no communica- tion over PROFIBUS.

IR n+2.08

DM setting error (exceeding maximum number of words).

0: No error

1:

The input/output area mapping, defined by the Unit’s DM settings, exceeds the maximum allowed number of words

(300 words for C200Ha series, 80 words for C200HS).

The ERR LED is ON to indicate a fatal error, no communica- tion over PROFIBUS.

IR n+2.09

DM setting error (output area mapping)

0: No error

1: There is an error in the output area mapping.

The mapping contains an incorrect value for either:

- the start address in the output buffer in the Master,

- the start address of the output area(s) in the PLC,

- or the size of the output area(s), or the specified size makes the area(s) exceed the bounda- ries of available buffer, DM, LR, IR or HR areas.

The ERR LED is FLASHING to indicate a non-fatal error; no data is transferred from the output area(s) afflicted by the setting error(s).

IR n+2.10

DM setting error (input area mapping)

0: No error

1: There is an error in the input area mapping.

The DM settings contain an incorrect value for either:

- the start address in the input buffer in the Master,

- the start address of the input area(s) in the PLC,

- or the size of the input area(s), or the specified size makes the area(s) exceed the bounda- ries of available buffer, DM, LR, IR or HR areas.

The ERR LED is FLASHING to indicate a non-fatal error; no data is transferred from the output area(s) afflicted by the setting error(s).

66

Control and status area

Section 5-3

IR n+2.11 Control command not processed.

This bit is related to control commands sent via the control words

IR n and IR n+l, not the one sent via IOWR instruction.

0: The output mailbox was able to receive and process the previously issued control command message.

1: The issued control command could not be processed because the output mailbox was full (see section 5-2)

or

the

RUN-bit was not set orthe bus communication was inhibited.

This bit should be checked in the PLC cycle following the activation of a control command.

IR n+2.12 Output mailbox full

0: The output mailbox is able to receive (and process) a message. This message can be a control command issued via IR n or any PROFIBUS command by using the IOWR instruction.

1: The output mailbox is full and cannot receive new messages

(see section 5-2).

IR n+2.13 Reply in input mailbox

0: The input mailbox does not contain a response message to a command message issued with IOWR.

1: The input mailbox contains a response message to a command message issued with IOWR.

The PLC program should read this message from the input mailbox with IORD, or clear the message by setting IR n.02. If multiple command messages are issued without reading the responses, the input mailbox will fill up, making it impossible to send out further command messages (see section 5-2).

IR n+4 contains the source information for the IORD instruction.

IR n+2.14

IR n+2.15

Network state (PROFIBUS-DP status bits).

Note

IR n+2.15 IR n+2.14 Network state

0

0

0

Off-line

Communication with all DP participants is stopped.

0

stop

1

I I

Only communication

(class 2) is possible.

Clear with DP-Master

The master tries to set parameters, check configuration and perform data exchange with its associated DP-slaves; the slaves’ inputs are transferred to the input buffer, their outputs are cleared.

1 Operate

The master exchanges data with the assigned DP-slaves.

The network state will be Offline when a P-DP H/W failure is detected

(IR n+2.06 is ON) or when a database download is in progress.

67

Control and status area

IR n+3

Section 5-3

This IR word contains information about the PROFIBUS-DP error status.

IR n+3 will indicate the error type and the station address of the station that is in error. If more than one station is in error, it will report on the first station that is detected to be in error. After removing the cause of the error it will report on the next station that was found in error. If the error is in the master itself, the

Station address will show the value FFh.

The following table lists the error types.

Station Error address number

OOh any

#FFh

03h

FFh llh

36h

38h

D4h other

Cause

No errors

Unit fault

Action

Function in slave is Check if the slave is not activated conform

PROFIBUS-DP norm and that the correct

GSD files are used

No response of the Check the bus cable and slave the station address of the remote node

Error in configuration data

Download the configuration again

TrY downloading the configuration again; if the same error replace the Unit occurs,

Note

When the PROFIBUS hardware does not function properly (P-

DP HAN failure, IR n+2.06 bit is OFF), the contents of this word is set to 0.

IR n+4

Note

Unit Number and Message Length

When IR n+2.13 is set (Reply in output mailbox), this IR word contains the length of the message that can be retrieved with an

IORD instruction. Combined with the Unit number, this constitutes the correct source information for the IORD instruction. Refer to section 6-3 for more details about the IORD instruction.

When the PROFIBUS hardware does not function properly (P-

DP HAN failure, IR n+2.06 bit is OFF), the contents of this word is set to 0.

68

Control and status area

Section 5-3

Slave status

The 16 words that contain the slave status bits are shown below. The location of these words in the PLC’s memory depends on the settings in DM m+14 and m+15 (see 5-1-2). Default location is IR 200 - 215.

These words only indicate the status of the slaves that have been assigned to the respective master Unit and thus possibly not of all slaves in the network.

\, bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 word \

0

12

13

14

15

8

9

10

11

1

2

3

4

5

6

7

Active flags stations 01 - 15

Active flags stations 16 - 31

Active flags stations 32 - 47

Active flags stations 48 - 63

Active flags stations 64 - 79

Active flags stations 80 - 95

Active flags stations 96 - 111

Active flags stations 112 - 125

Diagnostic flags stations 01 - 15

Diagnostic flags stations 16 - 31

Diagnostic flags stations 32 - 47

Diagnostic flags stations 48 - 63

Diagnostic flags stations 64 - 79

Diagnostic flags stations 80 - 95

Diagnostic flags stations 96 - 111

Diagnostic flags stations 112 - 125

Slave active bits

Slave diagnostic bits

The first 8 words comprise the ‘slave active’ flags. These indicate which of the slaves are active and are exchanging data with the master Unit. If a slave active flag is OFF (0), the corresponding slave is either not configured, or not exchanging data.

It is recommended to use the ‘slave active’ bit as a condition in the PLC program for processing the slave’s input data. If the ‘slave active’ bit is OFF, the presented input data may not be valid.

The next 8 words comprise the ‘slave diagnostic’ flags. These indicate if slave diagnostic information is available from the corresponding slave station.

The master sets a flag when the diagnostic data sent by the slave does not contain all zeros. Diagnostic data that only contains zeros is considered as no diagnostics.

The diagnostic bit is also set when a configured slave fails to respond.

When the diagnostic bit is set, the corresponding diagnostic data can be retrieved by sending a ‘request for diagnostics’ command to the output mailbox with an IOWR instruction. The corresponding reply can be from the input mailbox with an IORD instruction (see section 6 for command transfer by IOWR / IORD). The diagnostic bit is reset after the request, but if the cause for diagnostics is persistent, the diagnostic bit will remain ON.

Note The contents of these status words are cleared during the initialisation after start-up, during a download of a new configuration and when the PROFIBUS hardware does not function properly (P-DP H/W failure, IR n+2.06 bit is set).

69

LEDs

5-4 LEDs

Section 5-4

The Unit has six LEDs to visualise its status. The layout of the LEDs is shown below.

The two LEDs on the left side (RUN, ERR) show the status of the Unit in general. The four LEDs on the right side indicate the status of the

PROFIBUS-DP network.

The different states of the LED are listed in the table below. The following flowchart describes the sequence in which the LEDs are turned ON or OFF.

In some states additional information is indicated by the status word IR n+2 and IR n+3. The flowchart and the table refer to this status word where applicable.

Unit status LEDs

LED

RUN

ERR

Colour

Green

State

OFF

Flashing

ON

Red OFF

Flashing

ON

Description

Fatal error detected lnitialising the hardware / software

The Unit is initialised and no fatal error is detected

No errors

Non-fatal error due to incorrect Unit settings

Details in IR n+2.09, n+2.10

Fatal error.

Details in IR n+2, bits 06 through 08

70

LEDs

Section

5-4

PROFIBUS-DP status

LEDs (only valid when RUN LED is ON)

LED

READY

Colour

Green

COMM Green

NW-ST Green

IP-ERR

Red

State

OFF

Flashing

ON

OFF

ON

OFF

Flashing

ON

OFF

Flashing

ON

Description

PROFIBUS-DP fatal error

Configuration download in progress

IR n+2.14 and IR n+2.15 are OFF (Off-line)

The Unit is ready to communicate.

The master does not get any positive reply back from the slaves during the polling procedure. No I/O data is being exchanged with DP-slaves.

The master does get at least one positive reply back from one of the slaves in the network. This does not automatically mean that I/O data is being exchanged!

Network state is Off-line or Stop

IR n+2.14 = 0

Network state is Clear

IR n+2.14 = 1, IR n+2.15 = 0

Network state is Operate

IR n+2.14 = 1, IR n+2.15 = 1

No PROFIBUS-DP specific errors and no fatal

PLC error detected.

At least one of the DP slaves is in error or is not configured correctly (See also IR n+2.02, n+2.03).

Configuration error is detected, RUN LED or

READY LED is flashing (see also IR n+3).

Download the configuration again.

71

LEDs

Section 5-4

72

6 Message Communication, IOWR / IORD

This section describes the message communication. The PLC program instructions IOWR and IORD are used to transfer the messages to and from the Unit.

6-1

Message communication.. ..........................................................................................................................................

74

6-2 IOWR .........................................................................................................................................................................

74

6-3 IORD.. ........................................................................................................................................................................ 76

6-4 Messages ....................................................................................................................................................................

77

6-4-l Control command.. ...........................................................................................................................................

78

6-4-2 Slave diagnostics.. ............................................................................................................................................

79

73

Message communication

Section 6-1

6-1 Message communication

Mailboxes

Control words

IOWR

IORD

The Unit handles the message communication via the Input and Output mailbox. These mailboxes are described in section 5-2.

The control words (see 5-3-l) can be used to send standard messages, i.e.

PROFIBUS control commands. The IOWR instruction can be used to send any fieldbus-specific message. The advantage of this method is that the Unit will be able to handle future upgrades of fieldbus message types.

The Input mailbox will contain responses to commands sent out via the

Output mailbox. The Unit will automatically remove responses to control commands as they do not contain any valuable information. Responses to other commands sent with the IOWR instruction, have to be read with an

IORD instruction to prevent filling up of the Input mailbox.

The transfer of messages via the control words is described in section 5-3-l.

This section will describe the transfer of messages via IOWR / IORD.

Note

The transfer of messages with IOWR and IORD is only supported by the

C200HE, C200HG, and C200HX series of PLC, not by the C200HS series.

6-2 IOWR

The ladder symbols for IOWR are shown below.

C

Control code s

D value: #OOOO

First source word value:

The address of the first word of the PLC data area that contains the message to be transferred to the Output mailbox.

Destination information value:

Combination of the Unit number of the Master Unit and the message length (number of words in BCD).

Message length (001 - 128)

Unit number (0 - F)

74

ZOWR

Output mailbox full

EQ-f lag

ER-flag

Example

Section 6-2

The IOWR instruction should not be executed unconditionally. The Output mailbox is not always able to receive and process a new message. Status bit

IR n+2.12 indicates the status of the Output mailbox at the moment of the last l/O refresh (1 = Output mailbox full). It is good practice to only execute the IOWR instruction when IR n+2.12 is not set. It should be noted that this

IR bit is only updated during the I/O refresh and thus the status of this bit is not valid anymore after executing an IOWR instruction in the PLC program.

Therefore it is recommended not to execute the IOWR instruction more than once per PLC cycle.

The EQ-flag in the PLC will indicate the result of execution of the IOWR instruction. If this flag is set, the message was transferred successfully to the

Output mailbox. If this flag is not set, either the Output mailbox was full, or the RUN-bit (IR n.00) was not set, orthe DP communication was disabled (IR n.O1). In all cases the message was not transferred to the Output mailbox. It is advised to always check the EQ-flag.

The ER-flag in the PLC will report on syntax errors made in the IOWR instruction itself. It is not necessary to check this flag; if a syntax error is made, the EC&flag will also indicate that the transfer was not successful.

An example of the use of the IOWR instruction is shown below.

255.06

IA

EQ_FLAG ERROR

In the example above, the Unit number setting is assumed to be ‘1’.

The IOWR instruction is only executed when the ‘Output mailbox full’ bit is not set. It transfers 8 words starting from DMOOOO to the Output mailbox of the Master Unit with Unit setting 1.

The ERROR output bit is set when the IOWR transfer was not successful.

75

ZORD

6-3 IORD

Section 6-3

The ladder symbols for IORD are shown below.

Reply in input mailbox

Input mailbox clear

EC&flag

E&f lag

S

D

C

Control code s value: #OOOO

Source information value: Combination of the unit number of the Master Unit and the message length (number of words in BCD).

IR n+4 can be used as source information. If a message is posted in the input mailbox, this IR word will contain the correct information for retrieval of the full message. v Messag;;yS;S; ; ;;j

D

First destination word value: The address of the first word of the PLC data area to message from the Input mailbox is to be transferred. where the

The IORD instruction should not be executed unconditionally. IORD should only be executed when there is a reply message in the Input mailbox. The status of the Input mailbox is indicated by status bit IR n+2.13 (Reply in input mailbox). If this bit is set, an IORD instruction should be executed to remove the response from the Input mailbox. This will prevent the Input mailbox from filling up.

An IORD instruction should not be executed in the PLC cycle after an ‘Input mailbox clear’ command is issued. As the ‘Input mailbox clear’ command (IR n.02) will not be executed until after the I/O refresh, the status of IR n+2.13 will be updated in the next I/O refresh.

It is not recommended to execute two IORD instructions per PLC cycle because the status of IR n+2.13 is not valid anymore after executing the first

IORD instruction.

The EQ-flag in the PLC will indicate the result of execution of the IORD instruction. If this flag is set, the message was transferred successfully from the Input mailbox to the specified PLC data area. It is advised to always check this flag, especially in the cases described above when an ‘Input mailbox clear’ command has been issued, or when more than one IORD instruction is programmed to be executed in one PLC cycle.

The ER-flag in the PLC will report on syntax errors made in the IORD instruction itself. It is not necessary to check this flag; if a syntax error is made, the EC&flag will also indicate that the transfer was not successful.

An example of the use of the IORD instruction is shown below.

Example

76

Section 6-4

Messages

IR 112.13

+ik

EQ_FLAG ERROR

In the example above the Unit number setting is assumed to be ‘1’.

The IORD instruction is only executed when the ‘Reply in input mailbox’ flag is set. IR 114 contains the correct source information. The IORD instruction transfers the oldest reply from the Input mailbox to the PLC, starting at

DMOOOO.

The ERROR output bit is set when the IORD transfer was not successful.

This could be because of a syntax error in the IORD instruction or because there was no reply in the Input mailbox anymore.

6-4 Messages

Fixed format

Max. length

Command types

Messages to be sent to the Output mailbox and received from the Input mailbox have a fixed format. The command and the response are according the following format.

Type

Message header

Telegram header

Telegram data

(words)

Description Size

I I

4 Defines the sender, receiver, command type and the total length of the telegram. It is also possible to give a unique number to each message.

0 - 4 Detailed definition of the command message

0 - 124 Message data

The overall length of the message is limited to 128 words (limitation of the

IOWR / IORD instruction). Every message has a message header, but not all messages have a telegram header or telegram data. In messages without a telegram header, the length of the telegram data can be up to 124 words.

With a telegram header, the length can only be up to 120 words.

The two types of command message presently supported are:

1. Control command

2. Slave diagnostics

These commands are described in more detail in the next two sub-sections.

77

Messages

Section 6-4

6-4-l Control command

This command can also be issued via the control words (see section 5-3-l).

The message for a control command is shown below. word n word n+l word n+2 word n+3 word n+4 word n+5

MSB

03h

03h

OOh

46h

Station address

(OOh - 7Fh)

Group select

(OOh - FFh)

LSB

10h

OOh

OOh

OOh

Control command

OOh

The message consists of 6 words which have to be prepared in a PLC data area.

Station address and Group select are described in the paragraph on control word IR n+l (see section 5-3-l).

The settings in the Control command byte define which control command is to be sent; see table below.

Bit Command

0

1

2

-

Clear-Data

3

Unfreeze

Freeze

4

Unsync

I

5

I

Sync

Meaning

Clear output data

Unfreeze input data

Freeze input data

Unfreeze output data

1 Freeze output data

Command priority

No response message

When issued simultaneously, Unsync has priority over Sync, and Unfreeze has priority over Freeze.

The Clear-Data command will always clear the output data, independent whether the Freeze command is activated or not.

The response message does not contain any valuable information and is therefore removed from the Input mailbox automatically. It is not necessary to issue an IORD command.

78

Messages

6-4-2 Slave diagnostics

The message for a slave diagnostics command is shown below.

Section 6-4

word n word n+l word n+2 word n+3 word n+4 word n+5 word n+6 word n+7

MSB

03h

08h

OOh

42h

Station address (01 h - 7Dh)

OOh

OOh

05h

LSB

10h

Message number

OOh

OOh

OOh

OOh

20h

Olh

Message number

Station address

Response message

The message consists of 8 words which have to be set in a PLC data area.

The message number can be any number that can be formed by one byte. It enables to give the message a unique number. The response message will also have this number. In this way it is possible to keep track of which response message belongs to which command message.

The diagnostics can only be retrieved from one slave at a time. The station address (hex) of that slave must be entered in high byte of the fifth word.

Note

Only request diagnostics of a station of which the diagnostics bit is set. Only then the data in the response message is valid. The data is most up to date just after the bit has been set.

The structure of the response message to a ‘get diagnostics’ command message is shown below. The response message is located in the Input mailbox and can be read with the IORD instruction.

Error message

word n word n+l word n+2 word n+3 word n+4 word n+5 word n+6 word n+7 word n+8 word n+9 word n+10 word

n+l 1

word n+l2 word n+l27

There are two types of responses. The response can either be an answer

79

Messages

Section 6-4

message to the issued command or an error message.

The error message occurs due to a syntax error in the command message. In this case the low byte of word n+2 will be unequal to zero to indicate the error; the values of the other words should not be considered valid.

Extended diagnostics

Note

If bit IR n+2.13,‘Reply in input mailbox’, does not get set after issuing the request for slave diagnostics with the IOWR instruction, the command message in the PLC data area is not correct.

The slave diagnostic bit will only get set when the extended diagnostic data does not contain all zeros orwhen the slave is noted as not being existent.

The lower byte of word n+6 contains the exact length in bytes of the message starting from word n+8. This represents the actual diagnostic data received from the slave The maximum data length is 244 (F4h).

The data starting from word n+ll is slave specific, some slaves do not have extended diagnostic information. The first extended data byte has a fixed format and describes the type of diagnostics, the rest of the data bytes are slave specific. The slave manual should give information about the definition of the extended diagnostics.

Master address

Identifier

The ‘Master address’ byte contains the address of the master which has parameterised the DP slave. If no master has parameterised the DP slave, the value of this byte is FFh.

Word n+10 contains the manufacturer identifier of the DP slave, as registered at the Profibus Nutzerorganisation (PNO).

80

Messages

Station Status

Section 6-4

The definitions of word n+8, n+9 and n+lO are the same for all slaves. The following tables describe the definition of these words. For more details refer to El 50170 Vol.2.

Stati w_status_l

Bit Meaning

0

1: DP Slave station non existent

1

1: DP Slave station not yet ready for data exchange

2 1: Configuration data sent by DP master to DP slave does not match the structure of the DP slave

3 1: DP slave has extended diagnostic information

4 1: Requested function is not supported by DP slave

5 1: Implausible answer received from DP slave

6 1: Parameterisation telegram contains an error

7

1: DP slave was parameterised by a DP master other than the DP master which currently has access to the DP slave

Stati r_status_2

Bit Meaning

0

1

1: DP Slave must be reparameterised

1: A diagnostic message is waiting. The DP slave cannot resume operation until the error has been rectified (static diagnostic message)

1: Bit is always ‘1’ if DP slave having this station number exists

1: Response monitoring (watchdog) is activated for this slave

1: DP slave has received a ‘Freeze’ control command

1: DP slave has received a ‘Sync’ control command

1: Bit is always ‘0’

1: DP slave is deactivated, i.e. slave has been removed from current processing

ti

4

5

2

3

6

7

Stati w-status-3

Bit

Meaning

0

1 reserved reserved

4

5

2

3

6

7 reserved reserved reserved reserved reserved

1: More diagnostic information exists than specified in the extended diagnostic data.

81

Messages

Section 6-4 a2

7 Troubleshooting and Maintenance

This section describes the troubleshooting procedures and maintenance operations needed to keep the

PROFIBUS-DP network operating properly

7-1 Error Indicators ..........................................................................................................................................................

7-2 Troubleshooting .........................................................................................................................................................

7-3 Maintenance..

.............................................................................................................................................................

7-3-l

Cleaning ...........................................................................................................................................................

7-3-2 Inspection .........................................................................................................................................................

7-3-3 Replacing Nodes.. .............................................................................................................................................

7-3-4 Adding Nodes ...................................................................................................................................................

84

84

90

90

90

91

91

83

Error Indicators

Section 7-1

7-1 Error Indicators

The Unit provides the following error indicators: l

The two red LEDs at the front of the Unit, ERR LED and DP-ERR LED l

The status words IR n+2 and IR n+3 which are transferred from the Unit to the PLC IR area every I/O refresh from the moment the Unit is initialised.

These indicators are described in section 5-3-2 and section 5-4.

7-2 Troubleshooting

Possible problems have been divided in the following categories: l

PLC Error l

Start-up problems l

Configuration problems l

I/O data communication problems l

Message communication problems

PLC Error

Description

An I/O verification error occurred.

An I/O Unit Over error occurred.

A Special I/O Unit error occurred.

An I/O Bus error occurred.

Possible cause

The current

PLC configuration is not the same as it was when the I/O table was registered.

The Master’s Unit number setting is incorrect.

Possible remedy

Check the I/O table with the I/O table verification operation and correct it if necessary. After correcting it, perform the I/O

Table Create operation.

Make sure that the unit number setting does not exceed the maximum possible unit number.

CPU Unit models

Max Unit number

C200HSCPU

C200H E-

CPU1 l/32/42

C200HG-CPU33/43

C200HXZPU34/44

C200HG-CPU53/63

C200HX-CPU54/64

Two units claim the same unit number.

The Unit is not connected properly or was removed while the power was ON.

The Unit is not connected properly.

The Master Unit is faulty

If it does exceed the limit, adjust the Unit number and restart the Unit.

Adjust the Unit number and restart the Unit.

Turn the power OFF an check that the Unit is connected properly and turn the power ON again.

Turn the power OFF an check that the Unit is connected properly and turn the power ON again.

Replace the Master Unit.

84

Troubleshooting

Section 7-2

Start-up problems

Description

No LEDs are ON or

Flashing

Possible cause

The PLC’s power is OFF

The RUN LED is

Flashing

The DP-ERR LED is ON and the RUN

LED is Flashing

ERR LED is ON

The Master Unit is faulty.

The same unit number has been set on another

Special I/O Unit, causing an I/O UNIT OVER error in the PLC.

I/O table verification error. A Unit has been removed or the Unit number setting has been changed that caused an I/O SET ERR error in the PLC.

A Special I/O Unit or Interrupt Input Unit has not been initialised, causing an CPU WAIT’G error in the PLC.

The Master Unit is faulty

Wrong configuration data is present in the Unit.

The Unit waits for a configuration to be downloaded.

The Master Unit is faulty.

A fatal error is detected. The cause is reported in IR n+2.06 - IR n+2.08

Possible remedy

Turn the PLC’s power supply ON.

Replace the Master Unit.

Make sure that the same unit number is not used by more than one Special I/O Unit and restart the PLC.

Verify the l/O table and/or register the I/O table again.

Check and/or remove the faulty Unit.

Replace the Master Unit.

Download a configuration.

Replace the Master Unit.

Try to solve the cause and 1 or restart the Unit.

If this does not help, replace the Master Unit

Configuration problems

Description

Downloaded a configuration, but the DP-ERR LED is flashing.

Configuration

Possible cause

is incorrect. IR n+2.03 is ON.

Possible remedy

Check IR n+3 to find out where I what the possible problem is.

Check if the configuration corresponds to the actual network configuration. Do the DP- slaves have the same station addresses as in the configuration? Are the correct GSD-files being used?

If all is correct, try to download it again. If the error remains, try to find out what is going on with the configurator debugger.

Download a configuration. DP-ERR LED is ON and the READY

LED is flashing

Configurator does not download the configuration.

Erroneous configuration data is present in the

Unit. The Unit waits for a configuration to be downloaded

Faulty RS232C connection.

COM-pot-t driver not set up or wrong COM-port configured.

Check if the connection between the computer and the Master Unit is correct.

Check if the cable is connected to the configured COM-port.

Check if the driver is configured to the correct

COM-port.

85

Troubleshooting

Section 7-2

Configuration problems (continued)

Description

<

Possible cause

A fatal error is detected. The cause is repotted

Possible remedy

Try to restart the Unit and do another download. If this does not work, replace the

Unit.

Try to solve the cause and I or restart the Unit.

If this does not help, replace the Unit

I/O data communication problems

Description

COMM LED is OFF

Possible cause

The wiring is not correct.

The network has not been terminated correctly.

Configuration is not correct.

The DP-communication is inhibited. The control bit IR n.O1 of the control words is set.

1 The Master Unit is faulty

Possible remedy

Check IR n+3 to find out where I what the possible problem is.

Check if the correct pins of the BUS connector are connected, if there are no short circuits, if the stub-lines are not too long.

Terminate the network at the appropriate places (see section 2-3-l).

Check IR n+3 to find out where I what the possible problem is.

Check if the DP-slaves have the same station address as in the configuration.

Check if no station address is used twice.

Check that all masters in the same network have been configured to the same baud rate.

Check if the correct GSD-files are being used.

Check that the bus parameters have the correct value. It is recommended to use the default bus parameters (e.g. HSA must be greater or equal to the highest master node address in the network).

After changing the configuration, download the configuration to the respective Master

Unit.

Reset the control bit IR n.O1

Replace the Master Unit.

86

Troubleshooting

Section 7-2 l/O data communication problems (continued)

Description

COMM LED is ON but DP-ERR LED is

Flashing

Possible cause

The wiring is not correct.

Configuration is not correct.

No I/O data is exchanged with the

PLC though the

COMM LED is ON

The Master Unit is faulty

The I/O data mapping has been defined at the wrong PLC data area.

The I/O data mapping contains errors that caused that certain or no data areas to be mapped at all. The ERR LED is Flashing.

The Run bit (IR n.00) is OFF

Another Special I/O Unit makes use of the same data area(s).

I/O data does not seem to get exchanged with a specific slave

The Master Unit is faulty

Slave is not connected properly.

The slave operates in ‘Sync’ I ‘Freeze’-mode.

The master or the transmission line has failed, the watchdog of the slave has switched the outputs of the slave to the fail-safe state.

Slave Unit is faulty.

Possible remedy

Check IR n+3 to find out where I what the possible problem is.

Check if the correct pins are connected, if there are no short circuits, if the stub-lines are not too long.

Check IR n+3 to find out where 1 what the possible problem is.

Check if the DP-slaves have the same station address as in the configuration.

Check if no station address is used twice.

Check that all masters in the same network have been configured to the same baud rate.

Check if the correct GSD-files are being used.

Check that the bus parameters have the correct value. It is recommended to use the default bus parameters (e.g. HSA must be greater or equal to the highest master node address in the network).

After changing the configuration, download the configuration to the respective Master

Unit.

Replace the Master Unit.

Make sure that the Unit settings are made in the correct DM memory area; the area depends on the unit number setting.

Check the Unit settings. IR n+2.09 and IR n+2.10 of the status words indicates what caused the error.

Set the Run bit IR n.00 ON.

Check the mapping of the Master Unit and the other Special I/O Unit. If they overlap, then one Unit overwrites the data area of the other

Unit and makes it look like that no data is being exchanged with the PLC. If an overlap exists, the Unit settings should be changed.

Replace the Master Unit.

Check IR n+3 to find out where I what the possible problem is.

Check if the slave is connected properly. Are the correct pins connected, Is the shield also connected, is the bus length not exceeded?

In these modes, the data is only updated after another transmission of the ‘Sync’ / ‘Freeze’ command. If this is not desired, these modes should be turned OFF. See section 5-3-l for more details.

Check the transmission line and master Unit or disable the slave’s watchdog (not recommended).

Replace the Slave Unit.

87

Troubleshooting

Section 7-2

I/O data communication

problems (continued)

Description

Outputs are being

reset.

Outputs do not change anymore

Inputs do not change anymore

ERR LED is switched ON

Possible cause

Run bit (IR n.00) is OFF. This can be due to a fatal PLC error or due to switching from RUN /

MONITOR to PROGRAM mode.

IR n+2.02 set? If so, the ‘Data_Control_Timer’ of one of the slaves has expired and the

‘Auto-Clear’ is enabled. The master has entered the network state ‘Clear’. (see for more details section l-4-4)

The Master Unit is faulty

A fatal error is detected. The cause is reported in IR n+2.06 - IR n+2.08

Possible remedy

Check if the PLC is in PROGRAM mode, or if a fatal PLC has occurred. Find the cause of the fatal error, set IR n.00 ON and operate the outputs.

Check IR n+3 to find out where I what the possible problem is.

Fix or remove the slave that caused the master to enter the ‘Clear’ state or disable the

‘Auto_Clear’ mode (see section 4-3-7)

Check the transmission line and master Unit or disable the slave’s watchdog (not recommended).

The master or the transmission line has failed, the watchdog of the slave (if enabled) has switched the outputs of the slave to the fail-safe state.

The PLC cycle time is greater than the configured watchdog time of the slave which results in expiration of the watchdog in the synchronous mode. This switches the outputs to the fail-safe state.

Increase watchdog time or decrease PLC cycle time or choose asynchronous mode.

The Master Unit is faulty.

Program execution has stopped due to a fatal

PLC error or PLC is in PROGRAM mode and

DM m+17 = 1

Replace the Master Unit.

Run bit (IR n.00) is OFF. This can be due to a fatal PLC error or due to switching from RUN /

Check if the PLC is in PROGRAM mode, or if a fatal PLC has occurred. Find the cause of

MONITOR to PROGRAM mode, with DM m+17 the fatal error, set IR n.00 ON and operate the

= 1 (hold mode). outputs.

Check if the PLC is in PROGRAM mode or if a

FALS error was generated.

The slave operates in ‘Sync’-mode. In this mode the data is only updated after another transmission of the ‘Sync’-command.

If this is not desired, this mode should be turned OFF. See section 5-3-l for more details.

Replace the Master Unit. The Master Unit is faulty

Run bit (IR n.00) is OFF. This can be due to a fatal PLC error or due to switching from RUN /

MONITOR to PROGRAM mode.

Check if the PLC is in PROGRAM mode, or if a fatal PLC has occurred. Find the cause of the fatal error, set IR n.00 ON and check the outputs.

The slave operates in ‘Freeze’-mode. In this mode the data is only updated after another transmission of the ‘Freeze’- command. If this is not desired, this mode should be turned OFF. See section 5-3-l for more details.

Replace the Master Unit.

Try to solve the cause and / or restart the Unit.

If this does not help, replace the Master Unit

88

Troubleshooting

Section 7-2

Message Communication problems

Description

IOWR instruction not successfully executed

Possible cause

Output mailbox is full. The Output mailbox is not able to process new command messages when the Input mailbox is not able to receive reply messages.

The RUN-bit (IR n.00) is not switched ON or the communication is inhibited (IR n.O1)

The IOWR instruction contains syntax errors

The transferred command message is not correct.

Note: This error can not be detected by the result of the EQ-flag!

The Master Unit is faulty

IORD instruction not There is no reply message in the Input mailbox successfully executed

The IORD instruction contains syntax errors

Possible remedy

Clear the messages in the Input mailbox to enable the Input mailbox to receive new messages and the Output mailbox to process new messages. The messages can be cleared by using IORD instructions or by setting IR n.O1 of the control words.

Set the RUN-bit and enable communication again.

Check the IOWR instruction. Is the correct

Unit number and message length specified?

Check the command message that is created in the PLC data area. Does it comply with the command messages definition specified in section 6-4?

Replace the Master Unit.

Only read a message when IR n+2.13 (Reply in input mailbox) is set.

Check the IORD instruction. Are the correct

Unit number and message length specified?

Replace the Master Unit.

Do not issue more than one IOWR per PLC scan or do not issue an IOWR after issuing an control command via the control words in the previous PLC scan.

Command was not successfully executed though

IR n+2.12 (Output mailbox full) is not set.

IORD command was not executed successfully though

IR n+2.13 (Reply in input mailbox) was set.

ERR LED is switched ON

The Master Unit is faulty

Issued more than one IOWR per PLC scan or issued an IOWR after issuing a control command via the control words in the previous

PLC scan. In both cases, IR n+2.12 has not been updated and the mailbox could just have been filled up and be unable to process more.

For other reasons see situation ‘IOWR instruction not successfully executed’

Issued more than one IORD per PLC scan or issued an IORD after issuing an ‘Input mailbox clear’ command via the control words in the previous PLC scan. In both cases IR n+2.13 has not been updated and the Input mailbox could just have been cleared.

For other reasons see situation ‘IORD instruction not successfully executed’

A fatal error is detected. The cause is reported in IR n+2.06 - IR n+2.08

Do not issue more than one IORD per PLC scan or do not issue an IORD after issuing an

‘Input mailbox clear’ command via the control words in the previous PLC scan.

Try to solve the cause and / or restart the Unit.

If this does not help, replace the Master Unit

89

Maintenance

Section 7-3

7-3 Maintenance

This section describes the routine cleaning and inspection recommended as regular maintenance.

7-3-l Cleaning

Clean the PROFIBUS-DP Master Units regularly as described below in order to keep it in its optimal operating condition.

Wipe the Unit with a dry, soft cloth for regular cleaning.

When a spot cannot be removed with a dry cloth, dampen the cloth with a neutral cleanser, wring out the cloth, and wipe the Unit.

A smudge may retain on the Unit from gum, vinyl, or tape that was left on for a long time. Remove the smudge when cleaning.

A

Never use volatile solvents such as paint thinner or benzene or chemical wipes. These substances could damage the surface of the Unit.

7-3-2 Inspection

Inspection Equipment

Inspection Procedure

Be sure to inspect the system periodically to keep it in its optimal operating condition. In general, inspect the system once every 6 to 12 months, but inspect more frequently if the system is used with high temperature or humidity or under dirty / dusty conditions.

Prepare the following equipment before inspecting the system.

Required Equipment

Have a standard and Philips-head screwdriver, multimeter, alcohol, and a clean cloth.

Equipment that could be needed

Depending on the system conditions, a synchroscope, oscilloscope, thermometer, or hygrometer (to measure humidity) might be needed.

Check the items in the following table and correct any items that are below standard.

Environmental conditions

Item

Ambient temperature

Installation

Ambient humidity

Dust/dirt accumulation

Are the Units installed securely?

Are the communications connectors fully inserted?

Are the external wiring screws tight?

Are the connecting cables undamaged?

Standard

0°C to

55°C

10% to 90%

None

No looseness

No looseness

No looseness

No damage

Equipment

Thermometer

Hygrometer

___

___

___

90

Maintenance

Section 7-3

7-3-3 Replacing Nodes

Replacing on the fly

Precautions

Except for the Master Unit, all PROFIBUS-DP nodes can be replaced on the fly; the only condition is that the node is of the same type. Also, the network can be expanded with another Master Unit and its assigned slaves in full operation.

The Master Unit can only be replaced when the PLC power is turned OFF.

After replacing the Unit, turn ON the power again and download the same configuration as was downloaded in the replaced Master Unit. Make sure that the Unit number setting is the same as the previous Master Unit. During replacement of the Master Unit the network is not operational.

Observe the following precautions when replacing a Unit. l

After replacement make sure that there are no errors with the new Unit. l

When a Unit is being returned for repair, attach a sheet of paper detailing the problem and return the Unit to your OMRON dealer. l

If there is a faulty contact, try wiping the contact with a clean, lint-free cloth dampened with alcohol.

7-3-4 Adding Nodes

Download new configuration

The PROFIBUS-DP network allows to add new nodes on the fly. After connecting the new node to the network, a new configuration which contains this new node must be downloaded to the Master. During the download, all bus activities are stopped.

91

Maintenance

Section 7-3

92

Appendix A

Tips and sample programs

Unless indicated otherwise, all shown examples assume that:

.

Machine No. switch of the C200HW-PRM21 is set to 0. l l

All unit settings are at the default value (0000).

Slaves are mapped into the unit’s I/O buffers by auto-addressing (start at offset=O)

Therefore: l

Unit settings area is DMI 000-l 017. l

Command/status data are IRl OO-104.

.

Remote inputs are lR350-399.

.

Remote outputs are lR050-099. l

Slave status area is lR200-215.

93

94

A.I. General guidelines on input data processing

The C200HW-PRM21 must be activated by setting the RUN bit (100.00) ON. It is recommended to always set this bit ON whenever the PLC program runs. If the PLC is set to PROGRAM mode, or the program stops due to a severe failure (FALS), this bit will turn OFF. If the unit detects this, it will Hold or Clear all slave output data, depending on the setting of DM 1017 (default = Clear, i.e. remote outputs are turned OFF like local outputs).

Profibus-DP master unit enable

Jump

Bit 102.00 indicates if the Master Unit transferred input data from its buffer to the mapped input area in the PLC memory. In case the PLC cycle time is shorter than the bus cycle time this may not always be the case. In case no new data is available, processing of slave data may be skipped. If 102.00 is OFF, the ladder program between the JMP instruction and the corresponding JME instruction will be skipped.

;lavr02-in.01

Move

Slave02,

16

digital out

Move

Before processing input data from a

PROFIBUS slave, it is recom- mended to verify the corresponding

‘slave active’ bit. If the slave is not exchanging data with the master, the data in the allocated input area may be invalid, and should not be processed.

In this case, 200.02 is the slave active bit of the slave with address

02, whose inputs are mapped to

IR350, and outputs to IR050.

JME{OS) Jump End

Failure Alarm

Slave02,

16

digital out

This JME instruction signifies the end of the

PROFIBUS slave input data processing. The program will continue here following the JMP command if no new input data was available (if 102.00 was OFF).

If a slave active bit turns OFF during operation, this signifies a communication breakdown or slave failure.

In this case, an alarm is triggered. Depending on the severity of the failure, further emergency processing may be added by the user.

95

96

A.2. Data exchange method: synchronous or asynchronous?

By setting DM 1016, the user may select to synchronise the PROFIBUS-DP bus cycle with the PLC cycle. If selected, each PLC l/O refresh the PROFIBUS-DP master will attempt to trigger a new fieldbus cycle. If the previous fieldbus cycle had not yet been completed, a new attempt will be made at the next l/O refresh.

The default setting is no synchronisation between PLC cycle and fieldbus cycle. In that case, fieldbus cycles are triggered autonomously, independent of the PLC cycle. All input data from the latest bus cycle is kept in a buffer for the PLC to access at I/O refresh time.

In general, it will be advantageous to select the asynchronous method if the PLC cycle time is considerably larger than the PROFIBUS cycle time. Due to the additional buffering required in asynchronous mode, if both cycles are in the same order of magnitude, it will be better to choose synchronous mode.

Without additional tools it is difficult to determine the actual PROFIBUS-DP cycle time. The calculations in

Chapter 2 will give a rough indication, but if the actual network is available, a measurement is more reliable.

With the help of the sample program on the next page, it is possible to measure the cycle time in all but the most extreme cases, i.e. at very high baudrates with very few slaves. The method is based on automatic variation of the PLC cycle time to determine when input data is still refreshed each PLC scan.

Determine PROFIBUS cycle time

1.

Using the configurator software, build the desired bus configuration and download the corresponding configuration file into the C200HW-PRM21. The complete configuration needs to be connected and powered up.

2. Enter the sample program as shown on the next page in the PLC CPU

3. Make the following settings in DM to achieve the minimum I/O refresh time, then restart the unit to activate these settings. (Note that the slave outputs will remain reset since no data is transferred from the PLC)

DMlOOO

DM1003

DM1007

1 0001

0000

0001

1 One output area

Output area size = 0

One input area

I

The PLC scan time will eventually settle on a fixed value.

If the value of DM 0000 falls to 0, the cycle time of PROFIBUS-DP is less than the minimum PLC cycle time that can be achieved. For any other value than 0, the PROFIBUS cycle time equals the PLC scan time MINUS the I/O refresh time. With the DM settings as above (1 I/O word transferred), the C200HW-PRM21’s I/O refresh on C200H alpha series PLCs takes 1.4 ms, on C200HS 2.1 ms.

Synchronous data transfer mode with PLC scan time fully adapted to PROFIBUS cycle time.

97

98

253.13

-I*

ON

100.00

PDP_run

Profrbus-DP master unit enable

102.15 102.03 102.00

-I* -I+

PDP_StatrP P DP_No_Data 0

P_lnput_Tm

cMP{29)

DMOOOO

Tscan in 0.1 ms

#II000

0000 hex compare

Decrement BCD

Activate the I/O data exchange.

Check if the unit is in Operate state (102.15 ON) and all slaves are in data exchange mode (102.03 OFF), then:

If new input data is received in the last I/O refresh (102.00

ON), the PLC scan time (set in DMOOOO) will be decreased by the minimum step size of

0.1 ms.

The scan time cannot be decreased below 0.0 ms

EQUALS in 0.1 ms

BCD Add in 0.1 ms

If no new data has been received during I/O refresh

(102.00 OFF), the previous

PROFIBUS cycle took longer than the PLC cycle. The PLC scan time is increased by 0.2 ms. It is essential that rate of increase is larger than the rate of decrease, in order to stabilise the process of approximation. in 0.1 ms

The value in DMOOOO is set as scan time for the next PLC cycle.

I

DMOOOO

I

I in 0.1 ms

Sample program to determine PROFBUS-DP cycle time.

After determining the cycle time of the PROFIBUS-DP system, it is possible to establish the optimal data exchange method using the actual PLC application program.

Actual application

Once the actual application program in the PLC has been completed, and the DM settings have been optimised to transfer only the data required for the application,

.

Read the actual value of the PLC scan time from AR27 with the PLC in Run/Monitor mode. l

Calculate the C200HW-PRM21’s I/O refresh time as shown in paragraph 3-2-2, ‘PLC cycle time’.

.

By subtracting these two figures, calculate the time required for the PLC program plus the overhead for servicing additional units and peripherals.

Only if the PROFIBUS-DP cycle is several times smaller than the time taken by the PLC program + overhead, choosing the asynchronous data exchange method will result in a consistent reduction of remote I/O response time.

CPU

PRM21

IO refresh

PLC program

+ overhead

PRM21

IO refresh

PLC program

+ overhead

I/O Buffer

C200HW

- PRM21

PROFIBUS cycle

PROFIBUS cycle

PROFIBUS cycle

PROFIBUS cycle

PROFIBUS cycle

PROFIBUS cycle

Asynchronous data transfer mode with PLC program + overhead = 2 * PROFBUS cycle.

This will result in irregular data transfer, but data is updated at least once per PLC cycle.

99

100

Appendix B

GSD file for C200HW-PRM21

;

;

;

;

;

.*************************************************************************

. ***

. ***

. ***

Omron Europe B.V.

. ***

. ***

. ***

European Headquarters

Wegalaan 67-69

NL-2132 JD Hoofddorp

.***

The Netherlands

. ***

. ***

European Technical Centre

. ***

. ***

. ***

. ***

Zilverenberg 2

NL-5234 GM 's-Hertogenbosch

The Netherlands

.***************************************~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

. ***

. ***

Device DataBase File for C2OOHW-PRM21 PROFIBUS-DP master

. ***

. ***

Filename

Version 1.00

OC_l656.GSD

01.07.1998

(c) 1998

. ***

.*************************************************************************

Important notice:

***

Any modification of parameters in this file may lead to undefined behaviour of the PROFIBUS DP system.

***

***

***

***

***

***

***

***

***

***

***

***

***

***

***

***

***

;

#PROFIBUS_DP

GSD_Revision

Vendor-Name

Model-Name

Revision

Ident_Number

Protocol_Ident

Station-Type

FMS_supp

Hardware-Release

Software-Release

1

"OMRON Corporation"

"C200HW-PRM21"

"Version 1.0"

Ox1656

1

0 i

"Version 1.0"

"Version 1.0"

; Supported baudrates

9.6_supp

19.2_supp

93.75_supp

187.5_supp

5oo_supp

1.5M_supp

3M_supp

6M_suPP

12M_supp

=

1

= 1

= 1

= 1

= 1

= 1

= 1

= 1

= 1

;

Maximum station delay of responder

; (unit = bit

MaxTsdr_9.6 times)

=

60

MaxTsdr_19.2 = 60

MaxTsdr_93.75 = 60

MaxTsdr_187.5

MaxTsdr_SOO

MaxTsdr_1.5M

= 60

= 100

= 150

; PROFIBUS-DP

;

DP master class 1

;

FMS not supported

101

MaxTsdr_3M

MaxTsdr_6M

MaxTsdr_l2M

Redundancy

Repeater_Ctrl_Sig

=

0

=

2

24V_Pins = 0

Implementation-Type

= "ASPC2"

Download_supp

Upload_supp

Act_Para_Brct_supp

Act_Param_supp

Max_MPS_Length

Max_Lsdu_MS

Max_Lsdu_MM

Min_Poll_Timeout

= 250

= 450

= 800

= 0

= 0

= 0

= 0

= 100

= 32

= 32

= 1

;

no redundancy

; supported, TTL level

; not supported

;

not supported

; not supported

; not supported

; not supported

; max.size of master parameter set

; max SDU length master-slave

; max SDU length master-master

; * 10 ms

. Time of master to get ready

I

(

unit = bit times)

Trdy_9.6 = 11

Trdy_19.2

Trdy_93.75

Trdy_187.5

Trdy_500

Trdy_l.5M

= 11

= 11

= 11

= 11

= 11

Trdy_3M

Trdy_GM

Trdy_l2M

= 11

= 11

= 11 for reply after a sending a request

. Quiet time (transmitter fall time)

I

(

unit = bit times)

Tqui_9.6

= 0

Tqui_19.2

= 0

Tqui_93.75

Tqui_187.5

Tqui_500

Tqui_l.5M

Tqui_3M

Tqui_GM

Tqui_l2M

= 0

= 0

= 0

= 0

= 3

= 6

= 9

. Setup time

I

(

unit = bit times)

Tset_9.6 = 1

Tset_19.2 = 1

Tset_93.75

Tset_187.5

Tset_500

Tset_l.5M

Tset_3M

Tset_GM

Tset_l2M

= 1

= 1

= 1

= 1

= 4

= 8

= 16

. Station delay time of initiator

I

(

unit = bit times)

Tsdi_9.6 = 60

Tsdi_19.2

Tsdi_93.75

= 60

Tsdi_187.5

Tsdi_500

Tsdi_l.5M

Tsdi_3M

Tsdi_6M

Tsdi_l2M

= 60

= 60

= 100

= 150

= 250

= 450

= 800

Las-Len

Max_Slaves_supp

= 125

= 124

102

Index

103

104

Index

Index

105

106

Revision History

A manual revision code appears as a suffix to the catalog number on the front cover of the manual.

Cat. No. W349-El-l N t

Revision code

The following table outlines the changes made to the manual during each revision. Page numbers refer to the previous version.

Revision code

W349-El-1

W349-El-1 N

Date

I 998

September 1998

Revised content

Original production

Produced in the Netherlands

107

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement

Table of contents