当前位置:首页 >> 信息与通信 >>

profibus通讯协议资料


GE Intelligent Platforms Programmable Control Products

PACSystems* RX3i
PROFIBUS Modules
User’s Manual, GFK-2301C
April 2010

GFL-002

Warnings, Cautions, and Notes as Used in this Publication Warning
Warning notices are used in this publication to emphasize that hazardous voltages, currents, temperatures, or other conditions that could cause personal injury exist in this equipment or may be associated with its use. In situations where inattention could cause either personal injury or damage to equipment, a Warning notice is used.

Caution
Caution notices are used where equipment might be damaged if care is not taken. Note: Notes merely call attention to information that is especially significant to understanding and operating the equipment.

This document is based on information available at the time of its publication. While efforts have been made to be accurate, the information contained herein does not purport to cover all details or variations in hardware or software, nor to provide for every possible contingency in connection with installation, operation, or maintenance. Features may be described herein which are not present in all hardware and software systems. GE Intelligent Platforms assumes no obligation of notice to holders of this document with respect to changes subsequently made. GE Intelligent Platforms makes no representation or warranty, expressed, implied, or statutory with respect to, and assumes no responsibility for the accuracy, completeness, sufficiency, or usefulness of the information contained herein. No warranties of merchantability or fitness for purpose shall apply.

* indicates a trademark of GE Intelligent Platforms, Inc. and/or its affiliates. All other trademarks are the property of their respective owners.
?Copyright 2009 GE Intelligent Platforms, Inc. All Rights Reserved

Contact Information
If you purchased this product through an Authorized Channel Partner, please contact the seller directly.

General Contact Information
Online technical support and GlobalCare
1H2

http://www.ge-ip.com/support http://www.ge-ip.com/
3H

Additional information Solution Provider
4H

solutionprovider.ip@ge.com

Technical Support
If you have technical problems that cannot be resolved with the information in this guide, please contact us by telephone or email, or on the web at www.ge-ip.com/support
5H

Americas
Online Technical Support
6H7

www.ge-ip.com/support 1-800-433-2682 1-780-420-2010 (if toll free 800 option is unavailable) support.ip@ge.com
8H9

Phone International Americas Direct Dial Technical Support Email Customer Care Email
10H

customercare.ip@ge.com English

Primary language of support

Europe, the Middle East, and Africa
Online Technical Support
12H3

www.ge-ip.com/support +800-1-433-2682 +352-26-722-780 (if toll free 800 option is unavailable or if dialing from a mobile telephone) support.emea.ip@ge.com
14H5

Phone EMEA Direct Dial Technical Support Email Customer Care Email
16H7

customercare.emea.ip@ge.com English, French, German, Italian, Czech, Spanish

Primary languages of support

Asia Pacific
Online Technical Support
18H9

www.ge-ip.com/support +86-400-820-8208 +86-21-3217-4826 (India, Indonesia, and Pakistan)

Phone

Technical Support Email
20H1 2H3

support.cn.ip@ge.com (China) support.jp.ip@ge.com (Japan) support.in.ip@ge.com (remaining Asia customers)
24H5

Customer Care Email
26H7 28H

customercare.apo.ip@ge.com customercare.cn.ip@ge.com (China)

Contents

Overview and Specifications........................................................................................1-1
Finding Information in this Manual.................................................................................... 1-1 Information about PROFIBUS.................................................................................. 1-1 PACSystems RX3i Installation and Operation ......................................................... 1-1 PROFIBUS Master Module............................................................................................... 1-2 PROFIBUS Slave Module................................................................................................. 1-3 PROFIBUS Basics ............................................................................................................ 1-4 PROFIBUS Network Overview ................................................................................ 1-4 Bus Communication ................................................................................................. 1-4 Network Topology .................................................................................................... 1-5 Network Connectors................................................................................................. 1-6 Data Consistency ..................................................................................................... 1-7

Installation......................................................................................................................2-1
Reviewing System Power Requirements ......................................................................... 2-1 Installing the Module in the RX3i Backplane .................................................................... 2-2 Connecting the Module to the PROFIBUS Network ......................................................... 2-3 Network Segment Length......................................................................................... 2-3 PROFIBUS Cable Types.......................................................................................... 2-4 Network Termination ................................................................................................ 2-5 Network Baud Rate .................................................................................................. 2-6

PROFIBUS Master Module Configuration ...................................................................3-1
Adding the PROFIBUS Master Module to the Configuration............................................ 3-1 Configuring the PROFIBUS Master Module ..................................................................... 3-2 Settings Tab ............................................................................................................. 3-2 Using Sync/Freeze Control ...................................................................................... 3-4 Configuring Network Settings for PROFIBUS Master ...................................................... 3-5 Master Properties Dialog Box - General Tab ........................................................... 3-5 Master Properties Dialog Box - Network Tab........................................................... 3-6 Master Properties Dialog Box - Parameters Tab ..................................................... 3-9 Adding Slave Devices to the PROFIBUS Master ........................................................... 3-10 Adding Slaves and Modules................................................................................... 3-10 Configuring Module Data Areas............................................................................. 3-14 Configuring DP-V1 Settings for a Slave................................................................. 3-15

PROFIBUS Slave Configuration ...................................................................................4-1
Adding a PROFIBUS Slave Module to the Hardware Configuration ................................ 4-1 Configuring PROFIBUS Slave Parameters ...................................................................... 4-2 Settings Tab ............................................................................................................. 4-2 Input Data Area Tab................................................................................................. 4-4 Output Data Area Tab .............................................................................................. 4-4

GFK-2301C

v

Contents
PROFIBUS Master Status and Diagnostics.................................................................5-1
PROFIBUS Master Module LEDs..................................................................................... 5-2 Status Arrays .................................................................................................................... 5-3 Fault Table Entries............................................................................................................ 5-4 PLC Faults................................................................................................................ 5-4 I/O Faults.................................................................................................................. 5-4 Communication Requests................................................................................................. 5-5 Get Device Status (1)............................................................................................... 5-6 Get Master Status (2)............................................................................................... 5-8 Get Device Diagnostics (4) .................................................................................... 5-13 Read Module Header (5)........................................................................................ 5-14 Clear Counters (6).................................................................................................. 5-16 DP-V1 Read Request (7) ....................................................................................... 5-17 DP-V1 Write Request (8) ....................................................................................... 5-19 DP-V1 Alarm Acknowledge (9) .............................................................................. 5-22 Device Information Details.............................................................................................. 5-24

PROFIBUS Slave Status and Diagnostics...................................................................6-1
PROFIBUS Slave Module LEDs....................................................................................... 6-2 Status Registers................................................................................................................ 6-3 Slave Status ............................................................................................................. 6-3 DP-V1 Status ........................................................................................................... 6-3 Communication Requests................................................................................................. 6-4 Get Slave Status COMMREQ (3) ............................................................................ 6-5 Read Module Header (5).......................................................................................... 6-7 Clear Counters (6).................................................................................................... 6-9 DP-V1 Read Response (7) .................................................................................... 6-10 DP-V1 Write Response (8)..................................................................................... 6-12 DP-V1 Alarm Request (9) ...................................................................................... 6-14

COMMREQ Operation .................................................................................................. A-1
COMMREQ Ladder Instruction......................................................................................... A-2 COMMREQ Programming Requirements and Recommendations .................................. A-3 Error Detection and Handling ........................................................................................... A-3 Corrective Actions for COMMREQ Errors................................................................ A-4 COMMREQ Status Word ......................................................................................... A-4

vi

PACSystems? RX3i PROFIBUS Modules User’s Manual–August 2007

GFK-2301C

Chapter

Overview and Specifications

1
Finding Information in this Manual
Chapter 1, Overview and Specifications: Basic information about the PACSystems RX3i PROFIBUS Master module, IC695PBM300 and Slave module, IC695PBS301. Chapter 2, Installation: Power requirements, cable specifications, grounding, and module installation. Chapter 3, PROFIBUS Master Configuration: How to configure PROFIBUS master communications. Chapter 4, PROFIBUS Slave Configuration: How to configure PROFIBUS slave communications. Chapter 5, PROFIBUS Master Status and Diagnostics: How to use LED operation, the Slave Status bit array, the PLC fault table and communications requests (COMMREQs) to obtain status and diagnostic information. Chapter 6, PROFIBUS Slave Status and Diagnostics: How to use LED operation, the slave Status/Firmware ID array and COMMREQs to obtain status and diagnostic information. Appendix A, COMMREQ Operation: Operation of the Communications Request function.

Information about PROFIBUS
The PROFIBUS logo is a registered trademark of the PROFIBUS International Organization. More information about the organization and the protocol is available at http://www.profibus.com. Please refer to the following sources of PROFIBUS information: PROFIBUS standard DIN 19245 parts 1 (low-level protocol and electrical characteristics) and 3 (DP protocol) IEC 61158 ET 200 Distributed I/O system, 6ES5 998-3ES22 IEEE 518 Guide for the Installation of Electrical Equipment to Minimize Electrical Noise Input to Controllers

PACSystems RX3i Installation and Operation
PACSystems RX3i System Manual, GFK-2314 PACSystems CPU Reference Manual, GFK-2222

GFK-2301C

1-1

1

PROFIBUS Master Module
The RX3i PROFIBUS Master Module, IC695PBM300, allows the RX3i CPU to send and receive data on a PROFIBUS-DP network. Features The IC695PBM300 module provides the following PROFIBUS communications features: Supports all standard data rates Supports a maximum of 3,584 bytes of input data and 3,584 bytes of output data Supports a maximum of 125 PROFIBUS-DP slaves Supports a maximum of 244 bytes of input data and 244 bytes of output data for each slave Supports Sync and Freeze modes Supports DP-V1 Read, Write and Alarm messages Has PROFIBUS-compliant module and network status LEDs Compatibility The PROFIBUS Master module requires an RX3i CPU with firmware version 2.9 or later. This module must be located in an RX3i Universal Backplane. The module requires Machine Edition Logic Developer-PLC, version 5.0 SP2 or later for configuration. Firmware Upgrades The PROFIBUS module receives its firmware upgrades indirectly from the host controller CPU using the WinLoader software utility. WinLoader is supplied with any updates to the PROFIBUS module software. Master Module Specifications
Environment Backplane Compatibility Backplane Current Consumption Data rates Status Information Available Storage temperature = -40°C to 85°C Operating temperature = 0°C to 60°C RX3i PCI 440mA @ 3.3VDC Supports all standard data rates (9.6 kBit/s, 19.2 kBit/s, 93.75 kBit/s, 187.5 kBit/s, 500 kBit/s, 1.5 MBit/s, 3 MBit/s, 6 MBit/s and 12 MBit/s) Slave Status Bit Array Table Network Diagnostic Counters DP Master Diagnostic Counters Firmware Module Revision Slave Diagnostic Address The amount of data that can be configured on the PBM300 PROFIBUS network provides up to 3584 bytes input and 3584 bytes output.
STATION ADDRESS PBM300 PROFIBUS MASTER PROF I B US OK NETWORK MOD STATUS

5-IGND 8-A 3-B

Data Sizes

For product standards and general specifications, refer to the PACSystems RX3i System Manual, GFK-2314.

1-2

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

1

PROFIBUS Slave Module
The IC695PBS301 module enables an RX3i CPU to be a slave on a PROFIBUS DP network and to communicate with a PROFIBUS DP master. The slave automatically exchanges data with a master device. The slave module has no bus access rights. It can only acknowledge received messages or transmit messages to a master upon request. Features The PROFIBUS Slave module provides the following PROFIBUS communications features: Ability to read up to 244 bytes of input data from the network, and send up to 244 bytes of output data Support for all standard PROFIBUS data rates Support for DP-V1 Read, Write and Alarm messages PROFIBUS-compliant module and network status LEDs Compatibility The PROFIBUS Slave module requires an RX3i CPU with firmware version 3.0 or later. This module must be located in an RX3i Universal Backplane.
5-IGND

PROF I B US OK NETWORK MOD STATUS

PBS301 PROFIBUS SLAVE

STATION ADDRESS

The Slave module requires Machine Edition Logic DeveloperPLC, version 5.0 Service Pack 3 or later for configuration. Firmware Upgrades The PROFIBUS module receives its firmware upgrades indirectly from the host controller CPU using the WinLoader software utility. WinLoader is supplied with any updates to the PROFIBUS module software. Slave Module Specifications
Environment Backplane Compatibility Backplane current consumption Data rates Status information available Storage temperature = –40°C to 85°C Operating temperature = 0°C to 60°C RX3i PCI 440mA @ 3.3VDC

8-A 3-B

Supports all standard data rates (9.6 KBit/s, 19.2 KBit/s, 93.75 KBit/s, 187.5 KBit/s, 500 KBit/s, 1.5 MBit/s, 3 MBit/s, 6 MBit/s and 12 MBit/s) Slave Status Word

For product standards and general specifications, refer to the PACSystems RX3i System Manual, GFK-2314.

GFK-2301C

Chapter 1 Overview and Specifications

1-3

1

PROFIBUS Basics PROFIBUS Network Overview
? ? ? PROFIBUS is an open, vendor independent fieldbus standard for a wide range of applications in industrial automation, including motion control. PROFIBUS is a dynamic technology that grows functionally while complying with IEC 61158. PROFIBUS Guidelines and Profiles provide the means for further technical development based on the ever-changing communication requirements of the networks, systems, and devices used in today's industrial automation applications.

The modules covered by this manual use the following protocols, which are defined by the PROFIBUS specification: ? ? PROFIBUS-DP High-speed data communication. DP stands for Distributed Peripherals. In practice, the majority of slave applications are DP applications. PROFIBUS DP-V1 Contains enhancements for process automation, in particular acyclic data communication for parameter assignment, operation, visualization and interrupt control of intelligent field devices, parallel to cyclic user data communication. The PROFIBUS logo is a registered trademark of the PROFIBUS International Organization. Membership in the organization is open to all individuals, companies and organizations. More information about the organization and the protocol is available at http://www.profibus.com

Note:

Bus Communication
The PROFIBUS specification defines the technical characteristics of a serial field bus system that links distributed digital controllers on the network, from field level to cell level. PROFIBUS is a multi-master system that allows the joint operation of several automation, engineering or visualization systems with their distributed peripherals on one bus. PROFIBUS distinguishes between the following types of 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. Slave devices include motion controllers, drives, I/O devices, valves, and transducers. Slaves do not have bus access rights and can only acknowledge received messages or send messages to the master when requested to do so. Slave devices are passive stations and require only small portions of the bus protocol.

?

The majority of PROFIBUS-DP applications are located at the field level. The field level typically includes slave devices such as the S2K motion controller station and host devices such as PLC or PC control systems for the PROFIBUS-DP master station. Operator interfaces and DCS type systems usually operate at the cell level.

1-4

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

1

Data Bandwidth Demands on PROFIBUS Communications Systems
Amount of Data Management level Cell level Field Level MBytes KBytes Bytes Transmission Duration Hours/Minutes Seconds Several 100 microseconds to 100 milliseconds Microseconds to milliseconds Transmission Frequency Day/Shift Hours/Minutes 10 to 100 Milliseconds

Actuator sensor level

Bits

Milliseconds

Network Topology
PROFIBUS uses linear bus architecture with active bus termination at both ends. Devices in a PROFIBUS network connect directly to the bus cable or indirectly via stub lines.
Master PACSystems RX3i PROFIBUS Master Module Bus Termination

Slaves Bus Termination

PLC with PROFIBUS Slave Module

Stub w/ Slaves

Sample PROFIBUS Network A PROFIBUS-DP network may have up to 125 slave stations (addresses 0-126 are valid addresses), however address 126 is reserved for commissioning purposes. The master must consume one of the valid addresses to create a PROFIBUS system. The bus system must be sub-divided into individual segments to handle this many participants. These segments are linked by repeaters, which condition the serial signal to allow connection of segments. In practice, both regenerating and non-regenerating repeaters may be used. Regenerating repeaters condition the signal to allow increased range of the bus. Up to 32 stations are allowed per segment and the repeater counts as a station address. A specialized “link” segment consisting only of optical fiber modem repeaters may be used to span long distances. Plastic fiber optic segments are typically 50 meters or less while glass fiber; optic segments may extend several kilometers. The user assigns a unique PROFIBUS station address to identify each master, slave, or repeater in the network. Each participant on the bus must have a unique station address.

GFK-2301C

Chapter 1 Overview and Specifications

1-5

1
Repeater Connecting Segments Remote Repeater Link Segment Termination Branch Segment Participant Participant Participant (No Participants) Remote Repeater

Participant

Participant

Participant

Termination To additional participants

Repeaters and Bus Termination

Network Connectors
PROFIBUS connections are typically created with a 9-pin sub-D connector. A minimum connection consists of a shielded twisted-pair cable (shield to pin 1 and twisted-pair wires to pins 3 and 8) with terminating connections in the appropriate bus plugs. The pin to signal conventions for a 9-pin sub-D connector are described below. PROFIBUS Bus Connector Pin Assignments
Pin No. 1 2 3 4 5 6 7 8 9 Signal Shield M24 RxD/TxD-P CNTR-P DGND VP P24 RxD/TxD-N CNTR-N Designation Shield / protective ground -24V Output voltage Receive data / transmission data positive Control signal for repeaters (direction control) Data ground Supply voltage of the terminating resistance (+ 5V) +24V Output voltage Receive data / transmission data negative Control signal for repeaters (direction control)

Note:

For information on network segment length, network connectors and network termination, and network baud rate, refer to Chapter 2, “Installation.”

1-6

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

1

Data Consistency
Data consistency ensures that a data block contains one set of updated data instead of a mixture of old and new data. In systems that provide data consistency, the master is prevented from reading or writing the slave data while the slave is updating its data area For consistent data exchanges between any PROFIBUS master and any PROFIBUS slave, both master and slave must support consistency. All GE PROFIBUS masters provide data consistency when used with a slave station that has data consistency. All PROFIBUS devices provide byte and word-level consistency. Some devices support whole length data consistency, meaning that all words are guaranteed to be consistent over one network scan. Whether a slave supports whole length data consistency is determined on a module-bymodule basis, as specified in the GSD (General Station Description) file associated with the slave. For each supported module type, the GSD file contains a configuration identifier that specifies module characteristics, such as data length and consistency. The following GE slave device supports whole length data consistency for some modules: IC220PBI002 To find out whether a module supports whole length consistency, examine the configuration identifier. For explanation of the configuration identifier formats, refer to the PROFIBUS Specification. Sample Configuration Identifiers:
General identifier format (identifier byte) Module = "16 byte input 8 EndModule Module = "16 word output 38 EndModule (0x1F)" 0x1F

Special identifier format

(0x6F)" 0x6F

To determine whether non-GE PROFIBUS modules support consistency, refer to the documentation provided by the module manufacturer.

GFK-2301C

Chapter 1 Overview and Specifications

1-7

Chapter

Installation

2
This chapter contains information on the following procedures: Reviewing system power requirements Installing the PROFIBUS module in the host controller rack Installing PROFIBUS wiring Connecting the module to the PROFIBUS network Selecting the proper line type PROFIBUS cable types Installing bus termination

Reviewing System Power Requirements
Review the power requirements of your system to ensure that your power supply has sufficient capacity to support the PROFIBUS module. The Machine Edition software automatically calculates power supply load. Details on manually calculating power supply load can be found in the PACSystems RX3i System Manual, GFK-2314. Master Module (PBM300) Slave Module (PBS301) 440mA at 3.3VDC (typical) 440 mA at 3.3 VDC (typical)

GFK-2301C

2-1

2

Installing the Module in the RX3i Backplane
The PROFIBUS module must be located in an RX3i Universal Backplane (IC695CHS012 or CHS016). It cannot be located in an expansion or remote backplane. Modules in a Universal Backplane (IC695CHS012 or CHS016) can be installed or removed while power is applied to the system. This includes backplane power and field power supplied to the module. Note: The module must be properly seated on the carrier with the latch engaged and all pins connected within 2 seconds. For removal, the module must be completely disengaged from the carrier within 2 seconds. It is important that the module not remain partially inserted during the insertion or removal process. There must be a minimum of two seconds between the removal and insertion of modules.

Warning
Inserting or removing a module with power applied to the system may cause an electrical arc. This can result in unexpected and potentially dangerous action by field devices. Arcing is an explosion risk in hazardous locations. Be sure that the area is non-hazardous or remove system power before removing or inserting a module. For details about installing RX3i rack systems and modules, refer to the PACSystems RX3i System Manual, GFK-2314.

2-2

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

2

Connecting the Module to the PROFIBUS Network
The module contains a standard female DB9 connector, labeled “PROFIBUS,” that can be connected to a PROFIBUS bus terminal that complies with EN 50170. The PROFIBUS module has no built-in termination. If termination is required, you must use a bus terminal that has built-in selectable termination. PROFIBUS DB-9 connector recommendation: Siemens 6ES7-972-OBB50-OXAO (12MB)

Caution
Do not connect any devices to the +5V pin (pin 6). It is to be used for termination purposes only. Doing so could damage equipment or cause erratic behavior.

Network Segment Length
A PROFIBUS network uses either fiber optic or RS-485 copper media. The copper bus line specified in EN 50170 is “Line Type A” and is the recommended cable type. Cable Type B should not be used with this product. It is extremely important to use cable rated to PROFIBUS specifications. The higher the baud rate selected and the longer the distances involved, the more critical cable selection becomes. (PROFIBUS cable has a distinctive purple color.) For details, see “PROFIBUS Cable Types” on page 2-4. Stub or “T” type branch connections are supported if the total stub (branch) lengths do not exceed 6.6 meters. Do not use stubs at all on 12 MBaud networks. The data rates for network communication with maximum segment trunk length for type A cable are provided in the following table. Multiple segments may be connected via repeater stations to extend the total bus length. Data Rates and Segment Lengths for Cable Type A
Baud Rate 9.6 Kbit/s, 19.2 Kbit/s and 93.75Kbit/s 187.5 Kbit/s 500 Kbit/s 1.5 MBit/s 3 MBit/s, 6 MBit/s and 12 MBit/s
*

Distance (Max) * 1200 m 1000 m 400 m 200 m 100 m

Glass Fiber 6 km 6 km 6 km 6 km 6 km

Values shown are the sum of all bus segments and drop cable lengths. NA = Not Applicable

GFK-2301C

Chapter 2 Installation

2-3

2

PROFIBUS Cable Types
The recommended cable is: Belden 3079A PROFIBUS cable This is a shielded, 150 Ohms twin-axial (single twisted pair) cable. It has 0.66 mm conductor diameter and a mutual capacitance of 28 pF/m, nominal. For complete specifications on this cable, please contact your Belden dealer or visit their website at www.belden.com. Alternate cable types are: Siemens 6XV1 830-OAH10 Two Core shielded Siemens 6XV1 830-OBH10 w/PE Sheath Siemens 6XV1 830-3AH10 for underground burial Siemens 6XV1 830-3BH10 trailing cable Bosch Comnet DP #913 548 Flexible PROFIBUS cable Bosch Comnet DP #917 201 Trailing PROFIBUS Cable Bosch Comnet DP #917 202 Massive PROFIBUS Cable Notes: Allen Bradley “blue hose”, which has an impedance of 78 Ohms, is not recommended for this application. Cable type B should not be used with the PROFIBUS module. Type A Cable Specifications
Impedance Capacitance Resistance Core Diameter Conductor Area 135 to 165 Ohms at f = 3 to 20 MHz < 30 pF/m < 110 Ohms/km > 0.64 mm > 0.34 mm2 (22 AWG)

2-4

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

2

Network Termination
Termination Note: The two physical ends of the PROFIBUS network must be terminated. There should be two, and only two, terminators on a network. Termination resistors are needed, as defined in DIN 19245 Part 1 section 3.1.2.5.
Master Slave Slave Slave Slave Slave

Termination Required (Segment 1)

One terminator must be applied at each end of a network segment.
M aster S lave S lave Repeater S lave S lave S lave

Term ination R equired (S egm ent 1)

Term ination R equired (S egm ent 2)

Generally, termination is provided in commercially-available PROFIBUS standard network connectors. Some connector vendors provide termination capability in the connector and a switch on the connector to enable/disable termination. Some connector vendors provide both terminated and unterminated connectors. Note: For proper network termination, it is essential that the terminating devices maintain power. Power is provided by the device on Pin 6 and Ground on Pin 5. If power is lost to either terminating device, the network may not operate correctly. Generally, the lone network master device is one of the terminating devices. Therefore, a loss of power to the network master renders the network inoperable anyway. The other terminating device may be a critical slave device that must maintain power or a separately powered, stand-alone terminator. These standalone devices are commercially available.
VP (6) RxD/TxD-P (3) RxD/TxD-N (8) DGND (5) Ru = 390 Ohms Rt = 220 Ohms Rd = 390 Ohms

Bus Termination for Type A Cable in Accordance to PROFIBUS Specifications

GFK-2301C

Chapter 2 Installation

2-5

2
In addition to the termination shown above, the following compensation should be added for 12 Mbit/s bus technology:
9 8 7 6 5 4 3 2 1

To/from another node

110nH

110nH

110nH

To/from another node

110nH

12 Mbit/s Bus Compensation

Network Baud Rate
The master configures the appropriate network baud rate for each station on the network. Typical baud rate values are: 9.6 Kbit/s, 19.2 Kbit/s, 93.75 Kbit/s, 187.5 Kbit/s, 500 Kbit/s, 1.5 Mbit/s, 3 Mbit/s, 6 Mbit/s, or 12 Mbit/s. For details on using the configuration software, refer to chapter 3.

2-6

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

Chapter

PROFIBUS Master Module Configuration

3
These configuration procedures are written for users with at least a basic knowledge of the Machine Edition Logic Developer software and the PACSystems RX3i. For help with using the software, please see the software’s built-in help system. Note: The PROFIBUS Master module does not support redundant masters.

Software configuration of the PROFIBUS master module consists of the following steps: Adding the PROFIBUS master module to the configuration Configuring the PROFIBUS master parameters Configuring network settings for the PROFIBUS master Adding slave devices to the PROFIBUS master configuration

Adding the PROFIBUS Master Module to the Configuration
Add the IC695PBM300 module to the rack configuration. 1. In the folder. Project tab of the Navigator, expand the Hardware Configuration

2. In the Hardware Configuration folder, expand the main rack, right click the slot where the module will reside and select Add Module. The Module Catalog dialog box appears. 3. Select the IC695PBM300 PROFIBUS Master module and click the OK button. The module is added to the configuration in the Navigator window, and the module’s Parameter Editor window appears.

GFK-2301C

3-1

3

Configuring the PROFIBUS Master Module
The parameters on the Settings tab are used to configure the operation of the PROFIBUS master.

Settings Tab
Slave Status Bit Array Address The starting address for the consumed range used to receive the slave status bits. This array of bits indicates the health of each node on the PROFIBUS network. The Slave Status Bit Array must be a non-overlapping range in %AI, %I, %Q, %G, %AQ, %R, %W, %T, or %M. It defaults to %I memory. A slave's status address equals Start Address + Station Address of the slave. For example, if the status bits are mapped to %I00001, the status for the slave at Station Address 5 would be found at %I00001 + 5=%I00006. The master’s status is located in the same way as the slaves’ (Start Address + Station Address). The master is configured as station 0 by default, but can be set to any valid address (0-125). For information on changing the master’s station address, see “Configuring Network Settings for PROFIBUS Master” on page 3-5.

Tip:



Use the Communication Request command 1 (Get Device Status) or command 2 (Get Master Status) to retrieve the status information that is reported in this memory area. For details, see “Communication Requests” in chapter 4. For discrete memory, Length is 128 bits. For word-type memory, Length is 8 words. The starting address for this 32 bit (two-word) consumed array. The Slave Diagnostics ID array requires a non-overlapping range in %AI, %I, %Q, %G, %AQ, %R, %W, %T, or %M. Defaults to %AI memory. The first word (Slave Diagnostics) is used by the PROFIBUS master to communicate the station address of any slave that has reported diagnostic data. If diagnostics are pending, the master places the address of the first slave that has diagnostics into this word. The diagnostics can be read using the Get Device Diagnostics COMMREQ (command 4). This clears the word and the master then places the next pending diagnostic address into the Slave Diagnostics word. If the word is zero there are no pending diagnostics. The second word is set to a value of 0. For discrete memory, Length is 32 bits. For word-type memory, Length is 2 words.

Length (of slave status bit array) Slave Diagnostics ID Address

Length (of slave diagnostics ID array) Sync/Freeze Control Bits Address

The starting reference address of a 16-bit (1-word) produced range used for the Sync/Freeze command data. The Sync/Freeze Control Bits must be in a nonoverlapping range in %AI, %I, %Q, %G, %AQ, %R, %W, %T, or %M. Defaults to %Q memory. Sync and Freeze are global control functions used to synchronize remote I/O stations. You can use these functions to cause a group of slaves to operate at the same time in your system. For additional information, see “Using Sync/Freeze Control” on page 3-4. For discrete memory, Length is 16 bits. For word-type memory, Length is 1.

Length (of sync/freeze control bits)

3-2

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

3
DPV1 Status The starting reference address of a 32-bit (2-word) produced range used at the beginning of a scan to receive the station address of a slave that has sent a DPV1 Alarm message. If another slave has sent a DPV1 alarm message, it is ignored until the first one has been serviced, and will then appear in a subsequent scan. To acknowledge the DPV1 Alarm message and obtain the alarm information it contains, use a DPV1 Alarm Acknowledge (command 9) COMMREQ. The DPV1 Acknowledge block must be a non overlapping range in %AI, %I, %Q, %G, %AQ, %R, %W, %T, or %M. Defaults to %AI memory. For the block format, see “DPV1 Alarm Acknowledge” in chapter 4. The length for the DPV1 Alarm Status Block is always 2 words (32 bits).

Length (of DPV1 Alarm Status Block) Slave Configured Bits

The starting address for the consumed range used to receive the array of bits that indicate which slaves on the PROFIBUS network are configured. The array contains 128 bits (8 words). The Slave Configured Bits array must be a non-overlapping range in %AI, %I, %Q, %G, %AQ, %R, %W, %T, or %M. It defaults to %I memory. Each slave has a corresponding bit in this array. A slave's configuration status address equals Start Address + Station Address of the slave. For example, if the configuration status bits are mapped to %I00001, the status for the slave at Station Address 5 would be found at %I00001 + 5=%I00006. If Length is set to 0 (default), the Slave Configured Bits mapping is disabled. If Length is set to 128, mapping is enabled. The starting address for the consumed range used to receive the array of bits that indicate which slaves on the PROFIBUS network have diagnostic data available. The array contains 128 bits (8 words). The Slave Diagnostics Bits array must be a nonoverlapping range in %AI, %I, %Q, %G, %AQ, %R, %W, %T, or %M. It defaults to %I memory. The diagnostics can be read using the Get Device Diagnostics COMMREQ (command 4). Each slave has a corresponding bit in this array. A slave's diagnostic status address equals Start Address + Station Address of the slave. For example, if the configuration status bits are mapped to %I00001, the status for the slave at Station Address 5 would be found at %I00001 + 5=%I00006. If Length is set to 0 (default), the Slave Diagnostics Bits mapping is disabled. If Length is set to 128, mapping is enabled. Double-clicking this field opens the Master Properties dialog box. This dialog box is discussed in “Configuring Network Settings.” Determines the values that the master reports for a particular slave if communications between master and slave are lost. The RX3i CPU applies this setting in any case where the PROFIBUS Master module is no longer available. Choices are Hold Last State (default) and Force Off. If set to True (default), slave communications status events (loss and re-establish) are reported as fault table entries. If set to False, slave status events are not reported to the fault table. If set to True, names and descriptions for the slaves and the master are sent to the PLC and do not revert to default upon uploading. If set to False, the names and descriptions are not downloaded to the PLC and revert to the default values upon uploading from the PLC.

Length Slave Diagnostic Bits

Length Network Settings Inputs Default

Slave Status Fault Table Entries Download Names/Descriptions

Note:

Downloading names and descriptions uses more memory in the PLC. It is recommended that this parameter remain set to False (Default). Names and descriptions are a convenience only. Omitting them from the download does not affect system operation. The scan set (as defined in the CPU's Scan Sets tab) to be assigned to the PROFIBUS module.

I/O Scan Set

GFK-2301C

Chapter 3 PROFIBUS Master Module Configuration

3-3

3

Using Sync/Freeze Control
Sync and Freeze are global control functions used to synchronize remote I/O stations. You can use these functions to cause a group of slaves to operate at the same time in your system. ■ The Sync command is used to control a slave’s outputs. When a slave receives a Sync command, it holds the last output data from the master until the slave receives another sync command from the master. ■ Freeze is used to control a slave’s inputs. When a Freeze command is sent to a slave, the slave freezes its current inputs and does not update the inputs with new data until it receives another Freeze command. The use of the Sync/Freeze control word is optional. However, it must be assigned a starting reference address, which is defined in the PROFIBUS configuration parameters. The Sync/Freeze control word can be assigned to any PLC memory area and has a length of either 16 bits if in discrete PLC memory (%Q, %I, %T, %M, %G) or one word if in Word PLC memory (%AI, &AQ, %R, %W). The default is the first available address in %Q. To use the Sync/Freeze control, you must specify a Group Select and a Command. Sync/Freeze Control Word
Bits 0—7 (LSB) Name Group Select Description Specifies which group of slaves to send this command to. Each slave can be in one or more groups (0 through 7), which are selected on the Parameters tab of the slave Properties dialog box. The Group ID is a bit mask of the Group ID locations. The LSB corresponds to Group ID 0 and the MSB corresponds to Group ID 7. The command can be one of the following (HEX): UNFREEZE = 0x04 FREEZE = 0x08 UNSYNC = 0x10 SYNC = 0x20 TRIGGER = 0x80* * The most significant bit is used to trigger the command to be sent.

8—15 (MSB)

Command

Note:

The trigger operation occurs on both the 0 to 1 and 1 to 0 transitions of the Trigger bit.

Example If you wanted to send a SYNC command to all the slaves with group ID 04, you would write 0x10 to the LSB (which sets bit 4 of the Group Select byte) and 0x20 to the MSB. To send this command, toggle the trigger bit of the Command (bit 15).

3-4

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

3

Configuring Network Settings for PROFIBUS Master
To configure network settings for the master, double-click the Network Settings field in the Parameter Editor Settings tab. The Master Properties dialog box opens. Note: You can also open this dialog box by selecting the Project tab of the Navigator and expanding the Hardware configuration folder and the rack that contains the module. Right click the slot containing the IC695PBM300 module, and choose Network Settings.

Master Properties Dialog Box - General Tab

Name Station

The name assigned to the PROFIBUS master. You can edit the name or use the default name. The name appears in the title bar of the dialog box. The address of the PROFIBUS master on a PROFIBUS DP network. The master is configured as Station 0 by default. Each device on a network must have a unique address. Note: If the network is operating at 9.6 Kbits/s, the master must be configured with an address of 59 or less. An optional user-defined description for the PROFIBUS master device, which is displayed in the Machine Edition software’s Inspector window. The Inspector displays a maximum of 254 characters. However, more than 254 characters can be entered in the dialog box. The type of PROFIBUS master device. This is a read-only field. The ID of the PROFIBUS master device. This is a read-only field. The number of bytes used by the PROFIBUS master device. The amount of resources used depends on the PROFIBUS slave(s) that are configured and each slave's modules, parameters, and diagnostic messages. This is a read-only field. The number of bytes available for use by the PROFIBUS master device. The amount of available resources depends on the PROFIBUS slave(s) that are configured and each slave's modules, parameters, and diagnostic messages. This is a read-only field.

Description

Master Type Device ID Resources Used Resources Available

GFK-2301C

Chapter 3 PROFIBUS Master Module Configuration

3-5

3

Master Properties Dialog Box - Network Tab

Network parameters are automatically set. This tab provides additional configuration for advanced users.
Baud rate Highest Station Token Rotation Time The baud rate of the PROFIBUS network. The choices are 9.6 KBps, 19.2 KBps, 93.75 KBps, 187.5 KBps, 500 KBps, 1.5 MBps, 3 MBps, 6 MBps, 12 MBps. Default is 1.5 MBps. The highest possible station address for any active station on the network. This affects how much time is spent soliciting for new PROFIBUS master devices. Default is 126. The maximum target token rotation time for the network, expressed in t_bits and seconds. (A t_bit (time bit) is the inverse of the baud rate.) Valid range: 0 through 20,971,200 t_bits

3-6

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

3

Time Sub-Tab of Network Tab

Slot (TSL)

The amount of time (in t_bits and seconds) the PROFIBUS master waits for a reply to a message. Valid range: 0 through 65,535 t_bits. Default depends on the Baud Rate and other parameters on the Time and Parameters subtabs. Read only. The amount of time (in t_bits and microseconds) the PROFIBUS master waits after it receives a reply or an acknowledgement. The amount of time (in t_bits and seconds) the PROFIBUS master waits after sending a message and before sending another message. Valid range: 0 through 65,535 t_bits. Default depends on the Baud Rate, Quiet (TQUI) and Setup (TSET) parameters. The amount of time (in t_bits and seconds) the PROFIBUS master waits before sending an ACK response after sending a command. Valid range: 0 through 65,535 t_bits. Default: 11 t_bits. The amount of time (in t_bits and nanoseconds) the PROFIBUS master waits after it turns on its transmitter before it begins to send data. Valid range: 0 to 255 t_bits. Default depends on Baud Rate. The time that expires from the occurrence of a transmission event (for example, an interrupt on the last bit of a sent telegram or when synchronization time expires) until the necessary reaction is performed (for example, to start synchronization time or to enable the receiver). The time is expressed in t_bits and seconds. Valid range: 1 through 255. Default: Depends on Baud Rate.

Idle1 (TID1) Max. Station Delay (MAX_TSRD)

Min. Station Delay (MIN_TSRD) Quiet

Setup (TSET)

GFK-2301C

Chapter 3 PROFIBUS Master Module Configuration

3-7

3

Parameters Sub-Tab of Network Tab

Token Retry Token Error Response Error Gap Update Factor Message Retry

Not supported. Read only. Not supported. Read only. Not supported. Read only. The number of token rotations between solicitations for a new PROFIBUS master card. Valid range: 0 to 255. Default: 10 The maximum number of times the PROFIBUS master tries to send a message when the slot time expires. Valid range: 0 to 255. Default depends on Baud Rate.

3-8

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

3

Master Properties Dialog Box - Parameters Tab

Scan Cycle Times Typical The estimated time (?s) required for one scan of the PROFIBUS network. This is a read-only field. The following parameters enable you to set minimum and maximum scan cycle times for the Watchdog timer The minimum I/O scan time in 100 microsecond increments. This may be required if the I/O modules are restricted in how often they can be scanned. Valid range: 2 to 65535. Default: 2 The maximum I/O scan time and Watchdog timer are assigned automatically based on the number of slave devices configured. The maximum I/O scan time in 10 millisecond increments. If the scan time exceeds this value, the PROFIBUS master faults all the slaves, reinitializes them, and brings them back online. When the maximum I/O scan time is updated, the Watchdog timer is also updated. Range is 12 to 65535. Default: 6 * W, where W = the value assigned to the Watchdog parameter If a PROFIBUS slave does not receive any communication from its master within the Watchdog time, the slave generates a fault, the outputs are set to 0, and the slave is reinitialized by the PROFIBUS master card. Assigning a value affects the maximum cycle time. Valid range: 2 through 10,922, where each unit represents a 10 millisecond increment. For example, a value of 3 represents 30 milliseconds. Default: DCTM / 6, where DCTM = the value assigned to the Data Control Time parameter Not supported. Read only. Not supported. Read only. Not supported. Read only.

Min. Slave Interval

Auto Data Control Time

Watchdog

Options Parameter Group Repeater FMS Devices Stay Offline on Error

GFK-2301C

Chapter 3 PROFIBUS Master Module Configuration

3-9

3

Adding Slave Devices to the PROFIBUS Master
The number and types of slave devices that can exchange data with the master are constrained by memory resources within the master module. The amount of memory available for the PROFIBUS configuration is affected by the number and types of slave modules in the network configuration. The total slave configuration data size is limited to approximately 9KB.

Adding Slaves and Modules
1. In the Navigator window, right click the IC695PBM300 and choose Add Slave. The Slave Catalog dialog box appears. This dialog box lists the slave devices that are available to configure in the PROFIBUS network.

2. Select a slave device and click OK. The Slave Properties dialog box opens. Note: If the slave module is not in the list but you have a GSD file for it, click the “Have Disk” button.

3-10

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

3
Note: The following figures use the IC693PBS201 PROFIBUS Slave module as an example.

Name

The name assigned to the slave. You can edit the name or use the default name. The name appears in the title bar of the dialog box (in the figure above, the default name is Station 1 (SERIES 90-30 PROFIBUS SLAVE). The address of the slave on a PROFIBUS DP network. The slave is defaulted to the next highest available address. An optional description for the slave device. The Inspector displays a maximum of 254 characters. However, more than 254 characters can be entered in the dialog box. The manufacturer of the slave device, from the GSD file. This is a read-only field The ID of the PROFIBUS device. This is a read-only field. The model of the slave device. This is a read-only field. The hardware revision of the device, from the GSD file. This is a read-only field. The class of the slave device. This is a read-only field. The software revision of the device, from the GSD file. This is a read-only field.

Station Description Vendor Device ID Model Hardware Rev. Class Software Rev.

3. Enter “Name”, “Description” and “Station” if desired.

GFK-2301C

Chapter 3 PROFIBUS Master Module Configuration

3-11

3
4. To add modules to the slave, select the Modules tab and click Add. The Select New Module dialog box appears. Note: To add the slave to the configuration, you must configure at least one module.

Note:

The Select New Module list of modules is determined by the .GS* for the slave type. Each type of slave may have a different list of modules.

5. Select a module and click OK. The module is added to the Modules list in the slave Properties dialog box. Add additional modules as required for your system. The following figure shows the Modules tab after several modules have been added.

3-12

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

3
To change the order (position) of a module, select it and click Properties. The module Properties dialog box opens. Enter the numerical value of the new position the module is to have. The position numbering starts at 0. The other information in this dialog box is generated by the GSD file associated with the Slave module. Note: The Data field corresponds to the module’s configuration identifier as defined in the PROFIBUS specification.

6. When you have finished adding modules, click OK. The modules appear under the slave node in the Hardware Configuration.

Note:

To add, remove, or change the order of modules associated with an existing slave, right click the Slave node in the Hardware Configuration and choose Configure. The Properties dialog box for the selected slave opens. (See page 3-11.)

GFK-2301C

Chapter 3 PROFIBUS Master Module Configuration

3-13

3

Configuring Module Data Areas
To configure module data areas, right click the module node in the Hardware Configuration, and choose Configure. The Parameter Editor window for the module appears. The values for read-only parameters are supplied from the GS* text file that defines the PROFIBUS module's characteristics. Most devices have one data area with inputs, outputs or both. Some devices have multiple data areas that are shown as additional rows.

Data Area Parameters
Area Type Ref Address This value is an index beginning at 1. Read-only. Specifies whether the data is input or output as well as type, digital or analog. Value can be Digital In, Analog In, Digital Out, or Analog Out. Specifies the memory area that is used to map the data area. Regardless of the reference type used, input areas are considered as consumed and cannot overlap, while output areas are considered as produced and may overlap. Allowable Ranges: %AI, %AQ, %I, %Q, %G, %R, %W, %T, %M. If the number of bytes is odd, analog memories are not allowed and selections are limited to: %I, %Q, %G, %M Specifies the length of the reference. Includes the entire data area by default. If set to 0, the data area is not mapped. For discrete memories, the allowable range is [0, 8, 16, …, X] For analog memories, the allowable range is [0, 1, 2, …, X] The swap bytes field is used to manipulate the byte order. Because PROFIBUS devices often do not follow the standard, the ability to change byte ordering is provided. The analog areas travel in MSB and should be swapped if LSB is required.

Length

Swap Bytes

■ ■ ■

If Type is Digital and the module has an odd number of bytes, Swap Bytes is set to False (no swapping) and read-only. If Type is Digital and the module has an even number of bytes, default is set to False. Setting Swap Bytes to True causes the LSB and MSB to be swapped before the data is mapped into PLC memory. If Type is Analog, default is set to False. Setting Swap Bytes to True causes the LSB and MSB to be swapped before the data is mapped into PLC memory.

3-14

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

3

Configuring DP-V1 Settings for a Slave
Whether or not a slave device supports DP-V1 functions is indicated in the GS* file provided by the vendor of that device. For devices that do provide DP-V1 functions, support is disabled by default. To enable DP-V1: 1. In the project Navigator, right click the slave and select Properties.

2. In the Properties window, click the button in the DPV1 Settings field. The PROFIBUS DPV1 Setup dialog box appears.

GFK-2301C

Chapter 3 PROFIBUS Master Module Configuration

3-15

3

PROFIBUS DPV1 Setup Parameters
The default values in this dialog box are populated by the GS? file associated with the device.
Enable DPV1 Support Check this box to enable DPV1 settings for the selected PROFIBUS device. The device's GS? file determines which settings are editable and which are read-only. Clear this check box to disable DPV1 settings. The values of all parameters are retained until the DPV1 settings are enabled again for the selected device. The maximum length in bytes of the DPV1 telegrams. The slave adapts its buffer size for the respective data count. Valid range: 4 through n bytes, where n is the value specified in the GS? file. The maximum length in bytes of the DPV1-Alarm telegrams. Valid range: 4 through n, where n is calculated by the following formulas m = Max_Diag_Data_Len - 6 n = Max(Min(m,64),4) Max_Diag_Data_Len is a value specified in the GS? file. If m is greater than 64, n is set to 64. If m is less than 4, then n is set to 4. Otherwise, n is set to m. If n is set to 4, the only valid Maximum Alarm PDU Length is 4. Default: The value n calculated by the above formulas. The maximum number of extra diagnosis cycles that the master waits to obtain from a slave the release for a DATA_EXCHANGE. If the Diagnostic Update Delay is set to 0, the master waits for one diagnosis cycle before reporting an error. If the Diagnostic Update Delay is set to 15, the master waits for 16 diagnosis cycles before reporting an error. The master waits for one diagnosis cycle more than the value of the Diagnostic Update Delay. Some newer slave devices require more time for the consistency testing for the processing of the SET_PRM parameterizing telegrams. Therefore a simple diagnosis cycle may be insufficient until the participant can inform the Master of the release for the DATA_EXCHANGE. Valid range: 0 through 15. The maximum number of possible active alarms. Choices: 1 alarm of each type 2, 4, 8, 12, 16, 24 or 32 alarms in total

Maximum Channel Data Length Maximum Alarm PDU Length

Diagnostic Update Delay

Maximum Active Alarms

Slave Functions
Extra Alarm Service Access Point The service access point (SAP) through which the master quits alarms. Choices: Master Alarmacknowledge SAP51: Master quits alarms via SAP51. Master Alarmacknowledge SAP50: Master quits alarms via SAP50. The DPV1 data types. Choices: Configuration Data of EN 50170 Configuration Data of DPV1

Configuration Data Convention

3-16

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

3

Enabled Alarms
Pull Plug Alarm Process Alarm Editable or read-only, depending on the GS? file. When this box is checked, a slot signals the withdrawal of a module or the insertion of a module. Editable or read-only, depending on the GS? file. When this check box is checked, a process alarm signals the occurrence of an event in the connected process. For example, the event may be "upper limit value exceeded." Editable or read-only, depending on the GS? file. When this check box is checked, a diagnostic alarm signals an event within a slot. For example, events may be over temperature or short circuit. Editable or read-only, depending on the GS? file. When this box is checked, manufacturer-specific alarms are enabled. Editable or read-only, depending on the GS? file. When this check box is checked, a status alarm signals a change in the state (such as run, stop, or ready) of a module. Editable or read-only, depending on the GS? file. When this check box is checked, an update alarm signals the change of a parameter in a slot, for example, by a local operation or remote access.

Diagnostic Alarm

Manufacture Alarm Status Alarm Update Alarm

GFK-2301C

Chapter 3 PROFIBUS Master Module Configuration

3-17

Chapter

PROFIBUS Slave Configuration

4
These configuration procedures are intended for users with at least a basic knowledge of the Machine Edition Logic Developer software and the RX3i. For information on using the software, please see the software’s built-in help system. Software configuration of the PROFIBUS slave consists of the following steps: Adding the PROFIBUS slave module to the configuration. Configuring the PROFIBUS slave parameters

Adding a PROFIBUS Slave Module to the Hardware Configuration
Add the IC695PBS301 module to the PLC rack configuration. 1. In the folder. Project tab of the Navigator, expand the Hardware Configuration

2. In the Hardware Configuration folder, expand the main rack, right click the slot where the module will reside and select Add Module. The Module Catalog dialog box appears. 3. Select the IC695PBS301 PROFIBUS Slave and click the OK button. The module is added to the configuration in the Navigator window, and the module’s Parameter Editor window appears in the InfoViewer window space.

GFK-2301C

4-1

4

Configuring PROFIBUS Slave Parameters
The PROFIBUS Slave module has three tabs that contain configurable parameters: Settings, Input Data Area and Output Data Area. Note: The IC695PBS301 autodetects the data transmission rate.

Settings Tab
Station The Slave module’s station number that is used on the PROFIBUS network. Can be in the range from 1 to 125. Each module on a network should be given a unique station number. Default is 1. Note that the Master is commonly assigned to Station 0 (zero). The starting reference address used for the status data. This is a consumed range and must not overlap. Valid memory areas: %AI, %I, %Q, %G, %AQ, %R, %W, %T, or %M. Default memory area: %AI memory. The Status word provides information about the PROFIBUS slave module to the controller application. For more information, see “Get Slave Status - Reply Data Format” in chapter 6. Always two words. (A value of 2 for register memories and 32 for discrete memories.) The starting reference address of a 32-bit (2-word) range used at the beginning of a scan to monitor the DP-V1 master messages. (For details, see “DP-V1Status” in chapter 6. Valid memory areas: %AI, %AQ, %G, %I, %Q, %R, %W, %T, %M. Default: %AI. Valid range: For a discrete memory area: 1 through n-31, where n is the memory area's configured limit on the CPU's Memory tab. For a non-discrete memory area: 1 through n-1, where n is the memory area's configured limit on the CPU's Memory tab. Always two words. (A value of 2 for register memories and 32 for discrete memories.) Determines what values are used for the data received by the module from the master (inputs to the Slave module/outputs from the master) if communication with the master is lost. Choices are: Hold Last State (default) – Until communication resumes and new values are received each input will have the value that it had when communication was lost. Force Off – Until communication resumes and new values are received, each input will have a value of 0.

Status Address

Length DP-V1 Status

Length Inputs Default

4-2

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

4
DP-V1 Class 1 Buffer Length The length of the data buffer in the PROFIBUS chip for Class 1 DP-V1 messages. This includes the length of the header buffer, which is set to 4 bytes. Note: This value impacts the available data width for the cyclic I/O data. Valid range: 0 through 244 bytes. PROFIBUS memory allocations for cyclic I/O data, the DP-V1 Class 1 Buffer Length, and the DP-V1 Class 2 Buffer Length conform to the following formulas: Cyclic I/O data only: 3 (Ir + Qr) must be less than or equal to 1192. Cyclic I/O data and Class 1 buffer: 3 (Ir + Qr) + B1r must be less than or equal to 1192. Cyclic I/O data and Class 2 buffer: 3 (Ir + Qr) + B2r must be less than or equal to 1160. Cyclic I/O data and Class 1 and Class 2 buffers: 3 (Ir + Qr) + B1r + B2r must be less than or equal to 1152. The above formulas use the following acronyms: B1r: (4 + DP-V1 Class 1 Buffer Length), rounded up to a multiple of 8 B2r: (4 + DP-V1 Class 2 Buffer Length), rounded up to a multiple of 8 Ir: length of input data, rounded up to multiple of 8 Qr: length of output data, rounded up to multiple of 8 Note: The 4 additional bytes in B1r and B2r indicate SPC3 internal administration data. The length of the data buffer in the PROFIBUS chip for Class 2 DP-V1 messages. This includes the length of the header buffer, which is set to 4 bytes. Note: This value impacts the available data width for the cyclic I/O data. Valid range: 0 through 244 bytes. PROFIBUS memory allocations for cyclic I/O data, the DP-V1 Class 1 Buffer Length, and the DP-V1 Class 2 Buffer Length conform to the formulas given under the DP-V1 Class 1 Buffer Length parameter. The scan set (as defined in the CPU's Scan Sets tab) to be assigned to this module. Valid range: 1 through 32. Default: 1

DP-V1 Class 2 Buffer Length

I/O Scan Set

GFK-2301C

Chapter 4 PROFIBUS Slave Configuration

4-3

4

Input Data Area Tab
The input data area describes data received over the network by the Slave module from the network Master. These inputs are mapped, using the Input Data Area tab, into specific memory locations in the PLC where the Slave module resides.
Area Type Size A read-only identifier for the row. Valid range: 1 to 32. Data type of area being defined. Valid types are Digital In, Analog In, and Empty. The default value is Empty. Describes the size of the data area on the network. Set to 0 and read-only if Type is set to Empty. Valid ranges: If Type is set to Analog In (Word): 1, 2, 3, 4, 8, 12, 16, 20, 32, 64 If Type is set to Digital In (Byte): 1, 2, 3, 4, 8, 12, 16, 20, 32, 64 The total number of input bytes for all entries cannot exceed 244. A value of 0 sets Type to Empty. This read-only field gives the units for the Type specified. Valid ranges: If Type is set to Empty or Digital In: Byte If Type is set to Analog In: Word Location in PLC memory where the received data is mapped. This field is read-only if Size is set to 0. This is a consumed range and must be a non-overlapping range in %AI, %I, %Q, %G, %AQ, %R, %T, %M or %W. If Type is set to Digital In and the number of bytes (Size) is odd, an address in discrete memory must be used: %I, %Q, %G, %M, or %T. Default: For Digital In, next available address in %I For Analog In, next available address in %AI The number of %G, %I, %M, %Q, or %T bits, or the number of %AI, %AQ, %R, or %W 16-bit registers (words) used for the input area, starting at the Ref Address location.

Note: Units

Ref Address

Length

Output Data Area Tab
The output data area describes data sent over the network by the Slave module to the network Master. These outputs are mapped, using the Output Data Area tab, from specific memory locations in the PLC where the Slave module resides.
Area Type Size Read-only identifier for the row. Valid range: 1-32. Data type of area being defined. Valid types are Digital Out, Analog Out, and Empty. The default value is Empty. Describes the size of the data area on the network. Set to 0 and read-only if Type is set to Empty. Valid ranges: If Type is set to Digital Out (Byte): 1, 2, 3, 4, 8, 12, 16, 20, 32, 64 If Type is set to Analog Out (Word): 1, 2, 3, 4, 8, 12, 16, 20, 32, 64 The total number of output bytes for all entries cannot exceed 244. A value of 0 sets Type to Empty. This read-only field gives the units for the Type specified. If Type is set to Empty or Digital Out: Byte If Type is set to Analog Out: Word Location in PLC memory where the data to be sent is mapped. This field is read-only if Size is set to 0. This is a produced range and can be any range in %AI, %I, %Q, %G, %AQ, %R, %W, %T, or %M. If Type is Digital Out and the number of bytes (Size) is odd, an address in discrete memory must be used: %I, %Q, %G, %M, or %T. Overlaps with another produced range are not considered fatal and can be included in a valid configuration. Default: For Digital Out, next available address in %Q For Analog Out, next available address in %AQ The number of %G, %I, %M, %Q, or %T bits, or the number of %AI, %AQ, %R, or %W 16-bit registers (words) used for the output area, starting at the Ref Address location.

Note: Units

Ref Address

Length

4-4

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

Chapter

PROFIBUS Master Status and Diagnostics

5
There are four methods for obtaining status and diagnostic data for the PROFIBUS Master module: Observing and interpreting the LED indicators on the PROFIBUS Master module, page 5-2 Using the Status Arrays, page 5-3 Monitoring the PLC Fault Table, page 5-4 Using Communications Request (COMMREQ) ladder logic instructions to instruct the PROFIBUS Master to gather diagnostic or status data and report it to the host controller CPU, page 5-5 Obtaining device information such as firmware and hardware versions, page 5-24

GFK-2301C

5-1

5

PROFIBUS Master Module LEDs
LED PROFIBUS OK NETWORK Color Green Off Yellow State Static On NA Static On Flashing Non-cyclic Off Red MOD STATUS Green Static On Flashing Cyclic Flashing Non-cyclic NA NA n/a Between 0.5 Hz and 100 Hz NA NA 5 Hz Frequency Meaning Module has power and backplane reset is complete. Module does not have power or backplane reset is not complete. Module is holding the PROFIBUS token and is able to transmit PROFIBUS telegrams. Module is sharing the PROFIBUS token with other master on the network. Module is not configured or has not received the token permission from the network. Module has found a communication problem with at least one network slave, usually connection timeout. No error in configuration found; module is ready for communication; it tries to open a connection to a slave, but is not connected yet. Power Up: Configuration missing. For details on hardware configuration, refer to Chapter 3. Runtime: Firmware has found a critical problem, such as a watchdog timeout. Module has established at least one connection to another device on the network. Module is in boot-loader mode and is waiting for firmware download. Firmware download is in progress. Hardware or non-recoverable runtime error detected, module may need to be replaced. No power.

3 times fast at 5 Hz, 8 times between 0.5 Hz and 1 Hz NA 1 Hz 5Hz 3 times fast at 5 Hz, 8 times between 0.5 Hz and 1 Hz NA

Static On Yellow Flashing Cyclic Flashing Cyclic Flashing Non-cyclic Off NA

5-2

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

5

Status Arrays
The starting addresses of these arrays are set in the hardware configuration. For details, see “Configuring the PROFIBUS Master Module” in chapter 3. Slave Status Bit Array The Slave Status bit array contains a bit for each slave. If communication with a slave has no errors, the bit corresponding to the slave (determined by its network address) is set. If the communication has errors or is not occurring for any reason, the bit is cleared. The Master also maintains its own status in the bit corresponding to its network address. Slave Diagnostics ID Array If diagnostics are pending, the first word of this two-word array contains the station address of the first slave that has diagnostics. The diagnostics can be read using the Get Device Diagnostics COMMREQ (command 4), described on page 5-13. This clears the word and the master then places the next pending diagnostic address into the Slave Diagnostics word. If this word is zero there are no pending diagnostics. The second word of this array is reserved and set to 0. DPV1 Alarm Status Array The 32-bit DPV1 Alarm Status array is used at the beginning of a scan to receive the station address of a slave that has sent a DPV1 Alarm message. If another slave has sent a DPV1 alarm message, it is ignored until the first one has been serviced, and will then appear in a subsequent scan. For details on the status format, refer to “DPV1 Alarm Acknowledge COMMREQ” on page 5-22. Slave Configured Bits This 128-bit array indicates which slaves on the PROFIBUS network are configured. Each slave has a corresponding bit in this array. A slave's configuration status address equals Start Address + Station Address of the slave. For example, if the configuration status bits are mapped to %I00001, the status for the slave at Station Address 5 would be found at %I00001 + 5=%I00006. Slave Diagnostic Bits This 128-bit array indicates which slaves on the PROFIBUS network have diagnostic data available. The diagnostics can be read using the Get Device Diagnostics COMMREQ (command 4), described on page 5-13. Each slave has a corresponding bit in this array. A slave's diagnostic status address equals Start Address + Station Address of the slave. For example, if the configuration status bits are mapped to %I00001, the status for the slave at Station Address 5 would be found at %I00001 + 5=%I00006.

GFK-2301C

Chapter 5 PROFIBUS Master Status and Diagnostics

5-3

5

Fault Table Entries PLC Faults
Communications errors are displayed in the PLC fault table. For information on using fault tables, refer to the programming software’s online help. For details on the effects of the different types of faults on PLC behavior, refer to the PACSystems CPU Reference Manual, GFK-2222. Note: Slave communications status events (loss and re-establish) are reported to the PLC fault table by default. If the Slave Status Fault Table Entries parameter in the PROFIBUS Master software configuration is set to False, these events are not reported to the fault table. (For information on software configuration, see chapter 3.)
When a PBM300 Master is configured at 9.6 kBits/s with an address greater than 60, a Loss of IOC Fault occurs during Storing of configuration or during powerup with configuration.

Note:

If the network is operating at 9.6 Kbits/s, the master must be configured with an address of 59 or less.

I/O Faults
There are two I/O Faults that can be logged by the PROFIBUS Master module: Loss of Device - This fault is logged whenever there is a PROFIBUS fault detected on a configured slave, such as a timeout. That is, whenever the device bit in the Slave Status Table transitions from 1 to 0, this fault will be logged if there is not a LossOfNetwork. Addition of Device - This fault is logged whenever the device bit in the Slave Status Table transitions from 0 to 1, indicating that a device is active in the PROFIBUS scan list. The following figure shows the I/O fault table display in the Machine Edition software.
Rack.Slot.Station Address location of device Address of first input data area configured in PROFIBUS Master

5-4

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

5

Communication Requests
The Communication Request function (COMMREQ) allows the program to communicate with a GE Intelligent Platforms module, such as a PROFIBUS Master. Note: For details on the operation of the COMMREQ function block, refer to Appendix A.

The figure below illustrates the flow of information between the host controller CPU and the PROFIBUS master.
PLC CPU
PLC Backplane

PROFIBUS Card Interface

Ladder Program COMMREQ

Command

Firmware Instructions

PROFIBUS Network To Slaves

Requested Data CPU Memory Data Status Word

On-Board Memory

Status Bits

Communications Request Operation for PROFIBUS Master The PROFIBUS Master module supports the following COMMREQ commands and responses.
Command Code 1 2 4 5 6 7 8 9 Name Get Device Status Get Master Status Get Device Diagnostics Read Module Header Clear Counters DPV1 Read Request DPV1 Write Request DPV1 Alarm Acknowledge Description Retrieves detailed status information for the specified node. Retrieves detailed status information for the Master. Retrieves diagnostics for a specified Slave. Retrieves module header information. Clears the counters in the Module Header Performs a DPV1 read request from a slave device. Performs a DPV1 write request to a slave device. Acknowledges a DPV1 alarm request. Page No. 5-6 5-8 5-13 5-14 5-16 5-17 5-19 5-22

The following table lists the memory types that can be used for the Status Block and Reply Data areas. COMMREQ Status Word Memory Type Codes
Memory Type %I %Q %W %R %AI %AQ %T %M Memory Type Discrete input table (Byte mode) Discrete output table (Byte mode) Word memory Register memory Analog input table Analog output table Discrete temporary memory (Byte) Discrete internal memory (Byte) Decimal code 16 18 196 8 10 12 20 22

GFK-2301C

Chapter 5 PROFIBUS Master Status and Diagnostics

5-5

5

Get Device Status (1)
The Get Device Status Command retrieves detailed status information for the specified device. Note: This request retrieves diagnostics directly from the slave device using a PROFIBUS network request. If network scan time is critical, PROFIBUS network impact should be considered when using this COMMREQ command.

Get Device Status Command Block
Word Offset Word 1 Word 2 Word 3 Word 4 Value Dec (Hex) 5 (0005) 0 (0000) See page 5-5. 0-based offset Always 0 (no-wait mode request). Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: If Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. Get Device Status = 1. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Definition Length of command Data Block in words.

Word 5 Word 6 Word 7 Word 8 Word 9

0 (0000) 0 (0000) 1 (0001) See page 5-5. 0-based offset

Word 10 Word 11

Words: 9 (0009) Maximum size of response area in words. Must be 9 if word memory type is Bytes: 18 (0012) used; 18 if discrete memory type is used. 0—125 (0—007D) The address of the device the COMMREQ is to retrieve device status from. If the address of the master or a slave that is not on the bus is entered, a COMMREQ Status Word response of 4 will be returned.

5-6

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

5

Get Device Status Reply Data Format – Response written to location specified by Words 8 & 9
Word 1 2 3 4 5 6 7 …9 Name Command Code Device Status 1 Device Status 2 Device Status 3 Master Address Ident Number Reserved for future use. Description Echo of Command Code that this data block is replying to (0x0001). Code indicating the status of the slave device. See tables below. Code indicating the status of the slave device. See tables below. Code indicating the status of the slave device. See tables below. The address of the master connected to this slave. If the slave is not parameterized this value will be 255 (0x00FF). The Ident Number of the slave. Word 10 of the Get Device Status command block should specify a minimum of 9 words (18 bytes) to accommodate possible future use of this space.

Device Status 1 – Word 2
Bit 0 1 2 3 4 5 6 7 8 … 15 Name Sta._Non_Exist Sta._Not_Ready Cfg_Fault Ext_Diag Not_Supp Inv._Slv_Res Prm_Fault Master_Lock RFU Description No response from slave device. The station is non-existent. Slave not ready. Slave has incorrect parameterization. The extended diagnostics area is used. Unknown command is detected by the slave. Invalid slave response. Last parameterization telegram was faulty. Slave is controlled by another master. Reserved for further use

If this status word is zero, the slave device has no errors. The non-zero values, which are errors, are defined in the following table.

Device Status 2 – Word 3
Bit 0 1 2 3 4 5 6 7 8 … 15 Name Prm_Req Stat_Diag 1 WD_On Freeze_Mode Sync_Mode Reserved Deactivated RFU Description Slave must be parameterized. This bit remains active until all diagnostic data has been retrieved from the slave. Always a value of one. Slave watchdog is activated. Freeze command active. Sync command active Reserved. Slave not active. Reserved for further use

Device Status 3 – Word 4
The Device Status 3 word has only one active meaning. If this word is set to 0x0080 then the slave has an Extended Diagnostic data overflow. This means that the slave has a large amount of diagnostic data and cannot send it all.

GFK-2301C

Chapter 5 PROFIBUS Master Status and Diagnostics

5-7

5

Get Master Status (2)
The Get Master Status Command provides detailed status information about the Master module.

Warning
When a Get Master Status COMMREQ is called on the first scan of the PLC, the COMMREQ may return a false positive, indicating that the PROFIBUS network has “1 or more slaves not in IO exchange mode.” The Get Master Status COMMREQ should not be called or relied upon for any data during the first scan of the PLC.

Get Master Status Command Block
Word Offset Word 1 Word 2 Word 3 Word 4 Value Dec (Hex) 4 (0004) 0 (0000) See page 5-5. 0-based offset Always 0 (no-wait mode request) Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: if Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. Get Master Status = 2. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Maximum size of response area. Must be 9 if word memory type is used; 18 if discrete memory type is used. Definition Length of command Data Block in words

Word 5 Word 6 Word 7 Word 8 Word 9

0 (0000) 0 (0000) 2 (0002) See page 5-5. 0-based offset

Word 10

Words: 9 (0009) Bytes: 18 (0012)

5-8

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

5

Get Master Status Reply Data Format – Response written to location specified by Words 8 & 9
Word 1 2 3 4L 4H 5…9 Name Command Code Global State Bits DPM State Error Remote Address Error Event Reserved for future use Description Echo of Command code that this data block is replying to. (0x0002) Bits indicating the global state of the master. See “Global State Bits.” Control state of the Dual Port Memory in the master. See “DPM State” on page 5-10. Remote address of device with error. See “Error Remote Address” on page 5-10. Error code response to the Error Remote address. See “Error Event” on page 5-10. Word 10 of the Get Master Status command block should specify a minimum of 9 words to accommodate possible future use of this space.

Global State Bits
The master’s global state is reported in Word 2 of the Get Master Status reply data and the low byte of Word 4 in the Read Module Header reply data (described on page 5-15). If there are no errors reported by the master, all bits in this word have a value of zero. The following table provides definitions for bits with a value of 1.
Bit 0 1 2 3 4 Name CTRL ACLR NEXC FAT EVE Description CONTROL-ERROR: Parameterization error. AUTO-CLEAR-ERROR: Master has stopped communications to all slaves and reached the auto-clear end state. NON-EXCHANGE-ERROR: At least one slave has not reached the data exchange state and no process data is being exchanged with it. FATAL-ERROR: Because of major network fault, no further bus communication is possible. EVENT-ERROR: The master has detected bus short circuits. The number of detected events is reported in Word 6, BusErrorCnt, of the Read Module Header reply. The bit is set only when the first event is detected. HOST-NOT-READY-NOTIFICATION: If this bit is set, the HOST program is not ready to communicate. TIMEOUT-ERROR: The timeout supervision time has been exceeded because of rejected PROFIBUS telegrams. This error indicates bus short circuits that cause the master to interrupt communications. The number of detected timeouts is reported in Word 7, TimeOutCnt, of the Read Module Header reply. The bit is set only when the first timeout is detected. Reserved.

5 6

NRDY TOUT

7

NA

GFK-2301C

Chapter 5 PROFIBUS Master Status and Diagnostics

5-9

5

DPM State
This byte indicates the current control state of the Dual Port Memory in the master. DPM State is reported in Word 3 of the Get Master Status reply data and the high byte of Word 4 of the Read Module Header reply data (described on page 5-15). The following table provides definitions of the possible values.
Value 0x00 0x40 0x80 0xC0 DPM Master State OFFLINE STOP CLEAR OPERATE Description The master system has been switched on, but there is no data transfer on the bus. The master loads bus parameters and initializes the diagnostic buffer. No data transfer takes place. The master parameterizes and configures the slaves through the bus. It reads the input data, but retains the output data. User data transfer is active. New output data is transmitted cyclically and the latest input data is read.

Error Remote Address (Low Byte Word 4)
The Error Remote Address field contains the physical address of a device that has caused an error. If the master is the source of the error, this byte contains the value 255. If the error was detected at or reported by a network device, the byte contains the source station address and has a range from 0 to 125. If this field is contains an address, the Error Event byte will contain a code that identifies the error.

Error Event (High Byte Word 4)
The Error Event byte contains the error code of the device identified in the Error Remote Address field. This error code is also reported in the high byte of Word 5 of the Read Module Header reply data (described on page 5-15). For descriptions of master errors, see the table on page 5-11. For slave device errors, see page 5-12.

5-10

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

5
Error Event Codes for PROFIBUS Master (Error Remote Address of 255)
Code 0 50 51 52 53 54 55 56 57 58 59 Indication No errors are present. USR_INTF-Task not found. No global data-field. FDL-Task not found. PLC-Task not found. Non-existing master parameters. Faulty parameter value in the master parameters Non-existing slave parameters. Faulty parameter value in a slave parameters data file. Duplicate slave address. Configured send process data offset address of a slave is outside the allowable range of 0— 255. Configured receive process data offset address of a slave is outside the allowable range of 0— 255. Data areas of slaves overlapping in the send process data. Data areas of slaves are overlapping in the receive process data. Unknown process data handshake. Free RAM exceeded. Faulty slave parameter dataset. No memory segment free. Faulty reading of a database. Structure used by the operating system is faulty. Software Watchdog error. No Data Acknowledge in process data handshake. Master in Auto Clear mode Source None Master Master Master Master Master Configuration Configuration Configuration Configuration Configuration None. Firmware is invalid. Module must be updated. Firmware is invalid. Module must be updated. Firmware is invalid. Module must be updated. Firmware is invalid. Module must be updated. Download hardware configuration. Firmware is invalid. Module must be updated. Download hardware configuration. Check GSD file for possible incorrect slave parameterization values. Check configured slave addresses in project. Check slave configuration in project. Corrective Action

60

Configuration

Check slave configuration in project.

61 62 63 64 65 202 212 213 220 221 222

Configuration Configuration Master Master Configuration Master Configuration Master Host Host Slave Device

Check slave configuration in project. Check slave configuration in project. Problem with master’s startup parameters. Master has a hardware issue. Check GSD file for possible incorrect slave parameterization datasets. Master has a hardware issue. Execute download of configuration database again. Master has a hardware issue. Firmware watchdog has an error. Firmware is having trouble with Host acknowledgement. The auto clear mode was activated, because one slave is missing during runtime. Master has a hardware issue.

225

No further segments.

Master

GFK-2301C

Chapter 5 PROFIBUS Master Status and Diagnostics

5-11

5

Error Event Codes for Slave Devices (Error Remote Address Not Equal to 255)
Code 0 2 3 9 17 18 No errors Slave station reports data overflow. Master is requesting a function that is not supported in the slave. No answering data, although the slave must respond with data. No response from the slave. Master not in the logical token ring. Faulty parameter in request. Indication Source NA Master Telegram Master Telegram Slave Slave Master Corrective Action NA Check length of configured slave parameter or configuration data. Check if slave is PROFIBUS-DP norm compatible. Check configuration data of the slave and compare it with the physical I/O data length. Check bus cable and bus address of slave. Check FDL-Address of master or highest station address of other master systems. Examine bus cabling for bus short circuits. Master has a firmware issue.

21

Master Telegram

5-12

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

5

Get Device Diagnostics (4)
The Get Device Diagnostics command retrieves detailed status information for the specified device.

Get Device Diagnostics Command Block
Word Offset Word 1 Word 2 Word 3 Word 4 Value Dec (Hex) 5 (0005) 0 (0000) See page 5-5. 0-based offset Always 0 (no-wait mode request) Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: if Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. Get Device Diagnostics = 4. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, Starting Address to write response (the response will be written to %R251. Maximum size of response area. Must be 9 if word memory type is used; 18 if discrete memory type is used. If the Diagnostic data does not fit in this memory block, a value of 7 is returned in the COMMREQ Status Word. You are responsible for assuring that this area is large enough to contain the requested data without overwriting other application data. Specifies the address of the device the COMMREQ is retrieving device status from. If the address of the master or a slave that is not on the bus is entered, a COMMREQ Status Word response of 4 will be returned. Definition Length of command Data Block in words

Word 5 Word 6 Word 7 Word 8 Word 9

0 (0000) 0 (0000) 4 (0004) See page 5-5. 0-based offset

Word 10

Words: 9 (0009) Bytes: 18 (0012)

Word 11

0—125 (0—007D)

Get Device Diagnostics Reply Data Format – Response written to location specified by Words 8 & 9
Word 1 2 3 4 … 2 + (x/2) Name Command Code Size x of Diagnostics Received Diag 0 (Low Byte) Diag 1 (High Byte) Diag 2 (Low Byte) Diag 3 (High Byte) … Diag ….x (Low Byte) Diag ….x+1 (High Byte) Description Echo of the Command Code = 4. Size in bytes of the Extended Diagnostics received. Extended diagnostic data bytes. Extended diagnostic data bytes. … Extended diagnostic data bytes.

GFK-2301C

Chapter 5 PROFIBUS Master Status and Diagnostics

5-13

5

Read Module Header (5)
The Read Module Header command retrieves Network Diagnostic Information and statistics from the device

Read Module Header Command Block
Word Offset Word 1 Word 2 Word 3 Word 4 Value Dec (Hex) 4 (0004) 0 (0000) See page 5-5. 0-based offset Always 0 (no-wait mode request) Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: if Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. Read Module Header = 5. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, (the response will be written to %R251. Size in words of response area, 20 if word memory type is used, 40 if discrete memory is used. You are responsible for assuring that this area is large enough to contain the requested data without overwriting other application data Definition Length of command Data Block in words

Word 5 Word 6 Word 7 Word 8 Word 9

0 (0000) 0 (0000) 5 (0005) See page 5-5. 0-based offset

Word 10

Words: 20 (0014) Bytes: 40 (0028)

5-14

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

5

Read Module Header Reply Data Format
Word 1 2 3 4L 4H 5L Name Command Code Interface Type Firmware Revision Global State Bits (Low Byte) DPM State (High Byte) Error Remote Address Description Echo of the Command Code = 5. 2 if the interface is a master. 1 if the interface is a slave. Indicates the current firmware revision: high byte is major version number; low byte is minor version number. Indicates the global state of the master. See “Global State Bits” on page 5-9. Dual Port Memory control state of the master. See “DPM State” on page 5-10. The physical address of a device that has caused an error. If the master is the source of the error, this byte contains the value 255. If the error was detected at or reported by a network device, the byte contains the source station address and has a range from 0 to 125. If this field is non-zero, the Error Event byte will contain a code that identifies the error. Error code response to the Error Remote address. See “Error Event” on page 5-10. Number of major bus error, for example bus short circuits. Number of rejected PROFIBUS telegrams. Number of slave diagnostics requests. Number of global control requests. Number of data exchange cycles. Number of positive data exchange cycles. Number of negative data exchange cycles. Number of all active data exchange cycles. Number of data exchange cycles (all positive requests). Number of data exchange cycles (all negative requests.). Number of slaves found on bus. Note: Only the slaves on the network that do not belong to another master are counted as SlavesFound. Number of configured slaves on the bus. Number of slaves active in data exchange mode. Time (in ms) of the data exchange. Reserved for future use

5H 6 7 8 9 10 11 12 13 14 15 16

Error Event BusErrorCnt TimeOutCnt SlaveDiagReq GlobalConReq DataExReq DataExReqPos DataExReqNeg DataExAllReq DataExAllReqPos DataExAllReqNeg SlavesFound

17 18 19 20

SlavesConfigured SlavesActive DataControlTime Reserved

GFK-2301C

Chapter 5 PROFIBUS Master Status and Diagnostics

5-15

5

Clear Counters (6)
This command sets the counters in the PROFIBUS Master module to zero. For a list of counters, see words 6 through 18 of the “Read Module Header Reply Data Format” on page 5-15.

Clear Counters Command Block
Word Offset Word 1 Word 2 Word 3 Word 4 Value Dec (Hex) 4 (0004) 0 (0000) See page 5-5. 0-based offset. Definition Length of command Data Block in words Always 0 (no-wait mode request) Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: if Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. Clear Counters = 6. Memory type for the response. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Maximum size of response area: Must be 2 if word memory type is used, 4 if discrete memory is used. If Response Memory Size is set greater than 2 words (4 bytes), the COMMREQ will fail.

Word 5 Word 6 Word 7 Word 8 Word 9

0 (0000) 0 (0000) 6 (0006) See page 5-5. 0-based offset.

Word 10

Word 2 (0002) Byte: 4 (0004)

Clear Counters Reply Data Format
Word Word 1 Word 2 Name CommandCode StatusCode Description Echo of Command code that this data block is replying to. (0x0006) Reports 1 for success and 0 for failure.

5-16

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

5

DP-V1 Read Request (7)
The DPV1 Read Request Block is used by the master to perform a DP-V1 Read Request to a slave device. The Command/Response format of this block is as follows.

DP-V1 Read Request Command Block
Word Offset 1 2 3 4 Value Dec (Hex) 7 (0007) 0 (0000) See page 5-5. 0-based offset Always 0 (no-wait mode request) Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: if Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. DP-V1 Read Request = 7. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Size of the response plus the size of the expected DPV1 data from the slave. For word memory types, (x ranges from 1 to 120 words. For discrete memory types, x ranges from 1 to 240 bytes. Example: If the expected length of the DP-V1 response COMMREQ is 8 words, word 10 should be 6 + 8 = 14. The address of the device the COMMREQ is to retrieve device status from. If the address of the master or a slave that is not on the bus is entered, a COMMREQ Status Word response of 4 will be returned. Slot Number. Slot and Index depend on the specific slave device. Please refer to the user documentation for the slave for further details. Index. Definition Length of command Data Block in words

5 6 7 8 9

0 (0000) 0 (0000) 7 (0007) See page 5-5. 0-based offset

10

Words: 6+x (0006+x) Bytes: 12+x (000C + x) 0—125 (0—007D) 0—254 (0—00FE) 0—254 (0—00FE)

11

12 13

GFK-2301C

Chapter 5 PROFIBUS Master Status and Diagnostics

5-17

5

DP-V1 Read Request Response Data Format – Response written to location specified by Words 8 & 9
Word 1 2 3 4 5 6 Name Command Code Slave Address Slot Number Index Length ReadReqStat Description Echo of the Command Code = 7. Echo of Slave address from command. Echo of Slot number from command. Echo of Index from command. Length of received data. In words if word Memory Type was specified in the command block. In bytes for discrete memory. The DPV1 status of the read request. This status word indicates success or failure of the DPV1 request. See status table on page 5-20. Indicates Error Code 1. Indicates Error Code 2. First received data byte from slave. Second received data byte from slave. … …. Last received data byte from slave.

If ReadReqStat = CON_AD (54)
7L 7H 7L 7H … 7+(x-1)L 7+(x-1)H Data Low Data High Data Low Data High … Data Low Data High

If ReadReqStat = 0

5-18

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

5

DP-V1 Write Request (8)
The DP-V1 Write Request Block is used by the master to perform a DP-V1 Write Request to a slave device. The Command/Response format of this block is as follows.

DP-V1 Write Request Command Block
Word Offset 1 2 3 4 Value Dec (Hex) 8+x (0008+x) 0 (0000) See page 5-5. 0-based offset Definition Length of command Data Block in words. Always 0 (no-wait mode request) Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: if Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. DP-V1 Write Request = 8. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Size of response. Always 12 if word memory type is used, 24 for discrete memory. Specifies the address of the device the COMMREQ is retrieving device status from. If the address of the master or a slave that is not on the bus is entered, a COMMREQ Status Word response of 4 will be returned. Slot Number. Slot and Index depend on the specific slave device. Please refer to the user documentation for the slave for further details. Index Length x of data to be written in words or bytes. The uppermost bit determines whether the size value is interpreted as words or bytes. For example, a value of 0x0005 indicates a data size of five words while a value of 0x8005 indicates a data size of five bytes. Data to be written.

5 6 7 8 9

0 (0000) 0 (0000) 8 (0008) See page 5-5. 0-based offset

10

Words: 12 (000C) Bytes: 24 (0018) 0—125 (0—007D)

11

12

0—254 (0—00FE) 0—254 (0—00FE) Word: 1—120 Byte: 1—240

13 14

15—(14+x)



(…)

GFK-2301C

Chapter 5 PROFIBUS Master Status and Diagnostics

5-19

5

DP-V1 Write Request Response Data Format – Response written to location specified by Words 8 & 9
Word 1 2 3 4 5 6 Name Command Code Slave Address Slot Number Index Length WriteReqStat Description Echo of the Command Code = 8. Echo of Slave address from command. Echo of Slot number from command. Echo of Index from command. Actual length of received data. In words if word type memory was specified in the command block. In bytes if discrete memory was used. The DPV1 status of the read request. This status word indicates success or failure of the DPV1 request. See “DPV1 Return Status and Error Codes” below. Indicates Error Code 1. Indicates Error Code 2. NA

If ReadReqStat = CON_AD (54)
7L 7H 8—12 Data Low Data High Reserved

DPV1 Return Status and Error Codes
The tables below shows possible return messages contained in the ReadReqStat / WriteReqStat fields of the DPV1 requests discussed above. Also included are the Error Code 1 and 2 fields.
Code 0 2 3 9 17 18 25 54 129 130 131 132 133 154 Name CON_OK CON_RR CON_RS CON_NR CON_NA CON_DS CON_NP CON_AD REJ_SE REJ_PS REJ_LE REJ_IV REJ_COM Service executed without error. Resource unavailable. Requested function not supported by the slave. No answer data however, slave did respond. No response from slave. Master not in logical bus. Unrecognizable reply from slave. Negative response, Access denied. Master is about to stop DPV1 communication or DPV1 is not in Open state. A previous service is still in process. The length indicator oversteps maximum configured size. Wrong parameter in request Unknown command. Indication

REJ_ABORT Master has stopped DPV1 communication automatically.

5-20

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

5
Error Code 1 The bits that make up the Error Code 1 byte are defined below.
D7 D6 D5 D4 D3 Error Code D2 D1 D0 Error Class

Error Class Meaning
0 to 9 Reserved 10 Application

Error Code
0 to 15 0 1 2 3 to 7 8 9 10 to 15 0 1 2 3 4 5 6 7 8 9 10 to 15 0 1 2 3 4 to 7 8 to 15 0 to 15

Meaning
Reserved Read error Write error Module failure Reserved Version conflict Feature not supported Device specific Invalid index Write length error Invalid slot Type conflict Invalid area State conflict Access denied Invalid range Invalid parameter Invalid type Device specific Read constrain conflict Write constrain conflict Resource busy Resource unavailable Reserved Device specific Device specific

11 Access

12 Resource

13 to 15 Device Specific

Error Code 2 Error Code 2 is Device specific. Please refer to the user documentation of that slave for further details.

GFK-2301C

Chapter 5 PROFIBUS Master Status and Diagnostics

5-21

5

DP-V1 Alarm Acknowledge (9)
The master uses the DP-V1 Alarm Status Block to perform a DP-V1 Alarm acknowledgement to a slave device. This message is sent to acknowledge and receive information about an alarm when the alarm information appears in the DP-V1 status words of the PLC. The information mapped to these words must be used in the DP-V1 Alarm Acknowledge command to process the alarm properly. The mapping of these words is as follows.
Word 1 1 2 2 2 Byte Low High Low High (bits 0—2) High (bits 3—7) Name Slave Address Slot Number Alarm Type Alarm Spec Sequence Number Description Address of slave with alarm Slot number of alarm Type of the alarm. (Valid values are 1—6 and 32—126.) Alarm Specification. (Valid values are 0—7.) Alarm Sequence Number (Valid values are 0—31.)

DP-V1 Alarm Acknowledge Command Block
Word Offset 1 2 3 4 Value Dec (Hex) 9 (0009) 0 (0000) See page 5-5. 0-based offset Always 0 (no-wait mode request) Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: if Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. DP-V1 Alarm Acknowledge = 9. Memory type for the reply data. Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Size of response. If word memory type is used, must be 7. Must be 14 for discrete memory. Specifies the address of the device from which status will be retrieved. If the address of the master or a slave that is not on the bus is entered, a COMMREQ Status Word response of 4 will be returned. Slot Number. Depends on the specific slave device. Please refer to the user documentation for the slave for further details. Sequence Number. Please refer to the user documentation for the slave for further details Alarm Type. Depends on the specific slave device. Please refer to the user documentation for the slave for further details. Alarm Spec. Please refer to the user documentation for the slave for further details Definition Length of command Data Block in words.

5 6 7 8 9

0 (0000) 0 (0000) 9 (0009) See page 5-5. 0-based offset

10

Words: 7 (0007) Bytes: 14 (000E) 0—125 (0—007D) 0—254 (0—00FE) 0—31 (0—001F) 1—6 and 32—126 (0020—007E) 0—7

11

12 13 14

15

5-22

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

5 DP-V1 Alarm Acknowledge Response Data Format – Response written to location specified by Words 8 & 9
Word 1 2 3 4 5 6 7 Name Command Code Slave Address Slot Number Sequence Number Alarm TYPE Alarm Specifier Return Status Description Echo of the Command Code = 9 Echo of Slave address from command Echo of Slot number from command Echo of Index from command Actual length of received data Additional information related to the alarm. See “DPV1 Alarm Specifier Codes” below. See “DPV1 Alarm Return Status Error Codes.”

DPV1 Alarm Specifier Codes
Code 00 01 10 11 Indication No additional information Error present and slot is not okay Error resolved and slot is okay Error resolved but slot is still not okay

DPV1 Alarm Return Status Error Codes
The tables below show the possible return messages contained in the Return Status word of the DPV1 Alarm Response.
Code 134 135 136 137 154 Name REJ_INT REJ_SRT The alarm handler is not initialized. The alarm handler is not initialized. Indication

REJ_ENA The alarm that has been acknowledged is not pending. It is possible that you have entered an incorrect Slot ID or Sequence number. REJ_NPD The alarm that has been acknowledged is not pending on a MSAL1_Alarm_Res. REJ_COM Unknown command.

GFK-2301C

Chapter 5 PROFIBUS Master Status and Diagnostics

5-23

5

Device Information Details
To obtain information about RX3i (IC695) modules installed in a target RX3i system, access the Device Information Details provided by Machine Edition software. This interface reports the rack/slot location, model number, primary and boot firmware versions and hardware version for each RX3i module in the system. Project tab of the Navigator, right click the Target node. Choose the 1. In the Online Commands menu and select Show Status. The status dialog box appears.

2. Click the Details button. The Device Information Details dialog box appears.

5-24

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

Chapter

PROFIBUS Slave Status and Diagnostics

6
There are three methods for obtaining status and diagnostic data: Observing and interpreting the LED indicators on the PROFIBUS Slave Module, page 6-2 Monitoring the Slave and DP-V1 Status registers, page 6-3 Using Communications Request (COMMREQ) ladder logic instructions to instruct the PROFIBUS slave to gather diagnostic or status data and report it to the PLC CPU, page 6-4 Note: The PROFIBUS slave does not generate faults for the Fault Table.

GFK-2301C

6-1

6

PROFIBUS Slave Module LEDs
The slave module provides three PROFIBUS-compliant LEDs that indicate module and network status.
LED PROFIBUS OK NETWORK Color Green Off Yellow Red MOD STATUS Green Static On Off Static On Flashing, Cyclic Flashing, Non-cyclic State Static NA NA NA NA NA 5 Hz Frequency Meaning Module has power and backplane reset complete. Module does not have power or backplane reset not complete. Module is able to transmit PROFIBUS telegrams. No exchange of PROFIBUS telegrams. A critical problem, such as handshake timeout, was encountered. No error in configuration found; module is ready for configuration; it tries to open a connection, but is not connected yet. Powerup: Configuration missing. For details on hardware configuration, refer to Chapter 4. Runtime: Firmware has found a critical problem, such as a watchdog timeout. Module has established a connection to the network master. Module is in boot-loader mode and is waiting for firmware download. Firmware download is in progress. Hardware or non-recoverable runtime error detected. Module needs to be replaced. No power

Three times fast at 5 Hz, Eight times between 0.5 Hz and 1 Hz NA 1 Hz 5 Hz Three times fast at 5 Hz, Eight times between 0.5 Hz and 1 Hz NA

Static On Yellow Flashing, Cyclic Flashing, Cyclic Flashing, Non-cyclic Off NA

6-2

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

6

Status Registers Slave Status
The starting reference address for this two-word array is set in the PROFIBUS slave software configuration. For details, see “PROFIBUS Slave Parameters” in chapter 4.
Word 1 2 Name Slave Status Reserved Description This word contains the slave status code. The status can be read using the Get Slave Status COMMREQ (command 3), described on page 6-4. Always 0.

Word 1 – Slave Status Word
Bits 15—12 Meaning Baud Rate (bps) Value 0=12MBit/s, 1=6MBit/s, 2=3MBit/s, 3=1.5MBit/s, 4=500Kbit/s, 5=187.5Kbit/s, 6=93.75Kbit/s, 8=19.2Kbit/s, 9=9.6Kbit/s Note: Baud rate value is valid only if module is connected to the PROFIBUS network. 0=Module is waiting for parameters from master 1=Module is waiting for configuration from master 2=Data Exchange is occurring – normal operation 3=Error (either configuration error or module watchdog timeout) 1=Online module firmware is running 0=Offline 0= Module configuration from CPU is bad 1=Module configuration from CPU is good This is the state of the PROFIBUS Master. 0=Stop or Clear mode 1=Operate (Run) mode Contains the Slave Last Error code, which is the same as that returned in word 2 of the Get Slave Status COMMREQ reply data. For error code definitions, see “Slave Last Error Codes” on page 6-6.

11—10

Module State

9 8 7

On-line PLC Cfg Run/Stop

6—0

Error Info

DP-V1 Status
This two-word array is used at the beginning of a scan to monitor the DP-V1 master messages. Its starting address is set in the PROFIBUS slave software configuration. For details, see “PROFIBUS Slave Parameters” in chapter 4.

DPV1 Read Indication
DP-V1 Status Register 1 Bit 15 0 Bit 14—8 Master Address Bit 7—0 Data Size DP-V1 Status Register 2 Bit 15—8 Slot Bit 7—0 Index

DPV1 Write Indication
DP-V1 Status Register 1 Bit 15 1 Bit 14—8 Master Address Bit 7—0 Data Size DP-V1 Status Register 2 Bit 15—8 Slot Bit 7—0 Index

GFK-2301C

Chapter 6 PROFIBUS Slave Status and Diagnostics

6-3

6

Communication Requests
The Communication Request function (COMMREQ) allows the program to communicate with a GE Intelligent Platforms module, such as a PROFIBUS slave. For details on the operation of the COMMREQ function block, refer to appendix A. The figure below illustrates the flow of information between the PLC CPU and the PROFIBUS slave.
PLC CPU
PLC Backplane

PROFIBUS Card Interface

Ladder Program COMMREQ

Command

Firmware Instructions

PROFIBUS Network To Master

Requested Data CPU Memory Data Status Word

On-Board Memory

Status Bits

Communications Request Operation for PROFIBUS Slave The PROFIBUS slave supports the following COMMREQ commands and responses. PROFIBUS Slave COMMREQs
Command Code 3 5 6 7 8 9 Name Get Slave Status Read Module Header Clear Counters DP-V1 Read Response DP-V1 Write Response DP-V1 Alarm Request Description Retrieves detailed status information for the slave. Retrieves module header information. Clears counters in Read Module Header Sends a response to a DP-V1 Read Indication from the PROFIBUS master. Sends a response to a DP-V1 Write Indication from the PROFIBUS master. Sends a DP-V1 alarm indication to a DP-V1 master. Page No. 6-5 6-7 6-9 6-10 6-12 6-14

The following table lists the memory types that can be used for the Status Block and Reply Data areas. COMMREQ Status Word Memory Type Codes
Memory Type %I %Q %R %W %AI %AQ %T %M Memory Type Discrete input table (Byte mode) Discrete output table (Byte mode) Register memory Word memory Analog input table Analog output table Discrete temporary memory (Byte) Discrete internal memory (Byte) Decimal Code 16 18 8 196 10 12 20 22

6-4

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

6

Get Slave Status COMMREQ (3)
The Get Slave Status COMMREQ retrieves detailed status information for the slave device from the 16-bit slave status word. The starting address of this word is configured as Status Address in the PROFIBUS slave software configuration. For details, refer to “PROFIBUS Slave Parameters” in chapter 4.

Get Slave Status Command Block
Word Offset Word 1 Word 2 Word 3 Word 4 Value Dec (Hex) 4 (0004) 0 (0000) See page 6-4. 0-based offset Definition Length of command Data Block in words Always 0 (no-wait mode request) Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: If Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. Get Module Status = 3. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Maximum size of response area Must be 9 if word memory type is used; 18 if discrete memory type is used, or an error will be reported in the COMMREQ status and the Get Slave Status request will be ignored.

Word 5 Word 6 Word 7 Word 8 Word 9

0 (0000) 0 (0000) 3 (0003) See page 6-4. 0-based offset

Word 10

Words: 9 (0009) Bytes: 18 (0012)

GFK-2301C

Chapter 6 PROFIBUS Slave Status and Diagnostics

6-5

6

Get Slave Status - Reply Data Format
Word Word 1 Word 2 Word 3 Name CommandCode Last Error Running State See “Slave Last Error Codes” below. Word values: xxx1 – Slave in initialization state. If slave remains in this state the slave hardware configuration has an error. xx1x – Slave initialized without error. x1xx – Slave diagnostics information is being sent. 1xxx – Data exchange is active with master. Example: A value of 0x1010 (4112 decimal) indicates that the slave has been initialized without error and is exchanging data with the master. 0 = 12 MBit/s, 1 = 6 MBit/s, 2 = MBit/s, 3 = 1.5 MBit/s, 4 = 500 kBit/s, 5 = 187.5 kBit/s, 6 = 93.75 kBit/s, 8 = 19.2 kBit/s, 9 = 9.6 kBit/s Note: Baud rate value is valid only if module is connected to the PROFIBUS network. Reserved. Description Echo of Command code that this data block is replying to. (0x0003)

Word 4

Baud Rate

Words 5 - 9

NA

Slave Last Error Codes
The following error codes may be returned in word 2 of the Get Slave Status COMMREQ reply data or word 6 of the Read Module Header COMMREQ reply data (page 6-8).
Value Dec (Hex) 0 (0000) 52 (0034) 53 (0035) 54 (0036) 55 (0037) 70 (0046) 72 (0048) 73 (0049) 74 (0050) 75 (0051) 76 (0052) 77 (0053) 78 (0054) 79 (0055) 80 (0056) No error. Slave is running properly. DPS_ERR_INIT_BUS_ADDRESS. Invalid bus address configured, valid addresses are 1 ... 125 DPS_ERR_INIT_WAIT_FOR_WARMSTART. Application has not made a warm start to the slave yet. DPS_ERR_INIT_MODULE_TYPE. Invalid module type configured. The configured module type code is unknown. DPS_ERR_INIT_MODULE_LENGTH. Invalid module length. The code for the parameter module length is not defined. DPS_ERR_INIT_IO_LEN. Invalid length of I/O data. The maximum length of I/O data has been exceeded or no I/O modules were specified. DPS_ERR_INIT_DPV1_C1_BUF_LEN. Illegal DP-V1 class 1 buffer length. DPS_ERR_INIT_DPV1_C2_BUF_LEN. Illegal DP-V1 class 2 buffer length. DPS_ERR_INIT_SPC3_NOFF. PROFIBUS slave chip not in offline mode during initialization. DPS_ERR_INIT_SPC3_LESS_MEM. Not enough memory in SPC3 for all buffers. DPS_ERR_INIT_DIN_DOUT_BUF_LEN. Illegal I/O data buffer length. DPS_ERR_INIT_DIAG_BUF_LEN. Illegal diagnostic buffer length. DPS_ERR_INIT_PRM_BUF_LEN. Illegal parameter buffer length. DPS_ERR_INIT_CFG_BUF_LEN. Illegal configuration buffer length. DPS_ERR_INIT_SSA_BUF_LEN. Illegal SSA buffer length. Meaning

6-6

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

6

Read Module Header (5)
The Read Module Header command retrieves Network Diagnostic Information for the device.

Read Module Header Command Block
Word Offset Word 1 Word 2 Word 3 Word 4 Value Dec (Hex) 4 (0004) 0 (0000) See page 6-4. 0-based offset Always 0 (no-wait mode request) Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: If Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. Read Module Header = 5. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Size of response area: 12 for word memory type; 24 for discrete memory type. If the Response Memory Size is set smaller, the COMMREQ will fail with a 7 in the COMMREQ Status Word. You are responsible for assuring that this area is large enough to contain the requested data without overwriting other application data Definition Length of command Data Block in words

Word 5 Word 6 Word 7 Word 8 Word 9

0 (0000) 0 (0000) 5 (0005) See page 6-4. 0-based offset

Word 10

Words: 12 (000C) Bytes: 24 (0018)

GFK-2301C

Chapter 6 PROFIBUS Slave Status and Diagnostics

6-7

6

Read Module Header Reply Data Format for Slave
Word 1 2 3 4 5 6 7 Name Command Code Interface Type Firmware Revision Slave Bus Address Ident Number Last Error Running State Description Echo of the Command Code = 5. 2 if the interface is a master. 1 if the interface is a slave. Indicates the current firmware revision. High Byte is major version number. Low Byte is minor version number. Address of slave in active bus. PROFIBUS identification number. Last Error reported from slave. See “Slave Last Error Codes” on page 6-6. Word values: xxx1 – Slave in initialization state. If slave remains in this state the slave hardware configuration has an error xx1x – Slave initialized without error. x1xx – Slave diagnostics information is being sent. 1xxx – Data exchange is active with master. Example: A value of 0x1010 (4112 decimal) indicates that the slave has been initialized without error and is exchanging data with the master. 0 = 12 MBit/s, 1 = 6 MBit/s, 2 = MBit/s, 3 = 1.5 MBit/s, 4 = 500 kBit/s, 5 = 187.5 kBit/s, 6 = 93.75 kBit/s, 8 = 19.2 kBit/s, 9 = 9.6 kBit/s State Slave is configured and connected to the network Slave is disconnected from the network Slave was not connected to the master (auto baud) 9 10 11 12 Error Count I/O Length Module Count Reserved Word 8 Value Current baud rate Last baud rate A number between 0 and 9

8

Baud Rate

A count of errors that have occurred since start. Size of the I/O for the slave. Number of modules configured. Reserved.

6-8

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

6

Clear Counters (6)
The Clear Counters Command sets the counters in the PROFIBUS module to zero.

Clear Counters Command Block
In the following command block, Status is returned in %R251—%R252 (words 8 and 9).
Word Offset Word 1 Word 2 Word 3 Word 4 Value Dec (Hex) 4 (0004) 0 (0000) See page 6-4. 0-based offset Always 0 (no-wait mode request) Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: If Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. Clear Counters = 6. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Definition Length of command Data Block in words

Word 5 Word 6 Word 7 Word 8 Word 9

0 (0000) 0 (0000) 6 (0006) See page 6-4. 0-based offset

Word 10

Words: 2 (0002) Maximum size of response area. The Response Memory Size must be set to Bytes: 4 (0004) 2 if word memory is used, 4 if discrete memory is used, otherwise the COMMREQ will fail.

Clear Counters Reply Data Format
Word Word 1 Word 2 Name CommandCode StatusCode Description Echo of Command code = 6 Reports 1 for success and 0 for failure.

GFK-2301C

Chapter 6 PROFIBUS Slave Status and Diagnostics

6-9

6

DP-V1 Read Response (7)
Read Response Command Block
When a DP-V1 master executes a Read Request to a slave, an indication will appear in the DP-V1 status register of the PLC. The application program must use this information in order to formulate the appropriate COMMREQ response to the master’s request. The response format for this COMMREQ is as follows.
Word Offset 1 2 3 4 Value Dec (Hex) 8+x 0 (0008+x) (0000) Length of command block in words. Always zero - no wait mode request. Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: If Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved. Reserved. Command code for the COMMREQ to be executed. Read Response = 7. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Maximum size of response area (6 for word memory type, 12 for discrete memory type). Master address (range 0 - 125), read from DP-V1 status register. Slot. Depends on the application. Index. Depends on the application. Size y of data to be written. Maximum value of y is 120 words or 240 bytes. See note on page 6-11. Data to be written. Definition

See page 6-4. 0-based offset

5 6 7 8 9

0 0 7

(0000) (0000) (0007)

See page 6-4. 0-based offset

10 11 12 13 14

Words: 6 (000C) Bytes: 12 (000C) 0—125 (0000—007D) 0—254 (0000—00FE) 0—254 (0000—00FE) y

14 + y 0 to 65535 (0 to FFFF)

6-10

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

6
Note: The slave can respond to master DPV1 read requests for data in odd byte sizes even though the read data size in the DPV1 Status register (described on page 6-3) and the DPV1 Read Response COMMREQ is in number of words. If a request for an odd byte length is made, the DPV1 Status in reference memory will indicate a read size rounded up to the nearest word, but the DPV1 Read response on the PROFIBUS network will only be for the size requested. For example, if a master requests a DPV1 read of 5 bytes, the DPV1 Read request size in the DPV1 Status reference memory will be 3 words (6 bytes). The slave must also respond with a DPV1 Read Response COMMREQ with data size of 3 words. However, the PROFIBUS network response back to the master will be based on the original request size, so only 5 bytes of response data are transmitted (the last byte is discarded).

Read Response Reply Data Format
Word 1 2 3 4 5 Name Command Code Master Address Slot Number Index Length Description Echo of Command code = 7 Echo of master address from command Echo of Slot Number from command Echo of Index from command Actual length of data sent. If word memory type is specified in Word 8 of the command block, Length is in words. If discrete memory type is specified, Length is in bytes. 0 = Successful 1 = Unsuccessful Reserved

6

ReadResStat (Read Response Status) Reserved

7—12

GFK-2301C

Chapter 6 PROFIBUS Slave Status and Diagnostics

6-11

6

DP-V1 Write Response (8)
Write Response Command Block
When a DP-V1 master executes a Write Request to a slave, an indication will appear in the DP-V1 status register of the PLC. The application program must use this information in order to formulate the appropriate COMMREQ response to the master’s request. The response format for this COMMREQ is as follows.
Word Offset 1 2 3 4 Value Dec (Hex) 7 0 (0007) (0000) Definition Length of command block in words. Always zero - no wait mode request. Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: If Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved. Reserved. Command code for the COMMREQ to be executed. Write Response = 8. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Maximum size of response area. The maximum value of x is 120 if word memory type is used (240 bytes if discrete memory is used). The length is always a minimum of 6 words (12 bytes) plus the actual DP-V1 data length x. x ranges from 1 to 120 if word type memory is used and from 1 to 240 if discrete memory is used . For example, if the expected length of the DPV1 indication COMMREQ is 8 words, word 10 should be 6 + 8 = 14.

See page 6-4. 0-based offset

5 6 7 8 9

0 0 8

(0000) (0000) (0008)

See page 6-4. 0-based offset

10

Words: 6+x (0006+x) Bytes: 12+x (C+x)

11 12 13

0—125 Master address (range 0 - 125), read from DP-V1 status register. (0000—007D) 0—254 Slot. Depends on the application. (0000—00FE) 0—254 Index. Depends on the application. (0000—00FE)

6-12

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

6

Write Response Reply Data Format
Word 1 2 3 4 5 Name Command Code Master Address Slot Number Index Length Description Echo of Command code = 8 Echo of master address from command Echo of Slot Number from command Echo of Index from command Actual length of data received. If word memory type is specified in Word 8 of the command block, Length is in words. If discrete memory type is specified, Length is in bytes. 0 = Successful 1 = Unsuccessful Data received (0 to 65535 (0 to FFFF)) Data received (0 to 65535 (0 to FFFF))

6 6+x …

WriteResStat (Read Response Status) Data …

GFK-2301C

Chapter 6 PROFIBUS Slave Status and Diagnostics

6-13

6

DP-V1 Alarm Request (9)
The slave can send DP-V1 alarm indications to a master. The format of this COMMREQ is as follows.

Alarm Request Command Block
Word Offset 1 2 3 4 Value Dec (Hex) 9+x (0009+x) 0 (0000) See page 6-4. 0-based offset Definition Length of command block in words. Always zero - no wait mode request. Memory type of COMMREQ status word. (Words 3 and 4 specify the starting address where the status word will be written.) COMMREQ status word address minus 1. Example: If Words 3 and 4 contain values of 8 and 9 respectively, the status word will be written to %R10. Reserved Reserved Command code for the COMMREQ to be executed. Alarm Request = 9. Memory type for the reply data. (Words 8—9 specify the starting address where the response will be written.) Starting address to which the response will be written. The value entered is the 0-based offset from the beginning of PLC memory for the memory type specified in Word 8. This offset will be in bits, bytes, or words depending on the memory type specified. Valid ranges of values depend on the PLC’s memory ranges. Example: If Words 8 and 9 contain values of 8 and 250 respectively, the response will be written to %R251. Maximum size of response area. (6 for word memory type, 12 for discrete memory type).

5 6 7 8 9

0 0 9

(0000) (0000) (0009)

See page 6-4. 0-based offset

10 11 12

Words: 6 (0006) Bytes: 12 (000C)

0—254 Slot. Value depends on the specific application. (0000—00FE) 0—31 (0000—001F) Sequence Number. The sequence number is used to determine alarms that are active at the same time. Thus the sequence number must be unique to each alarm.

13 14 15

0—254 Alarm Type. Application specific. (0000—00FE) 0 y (0000) (y) Alarm Specifier (should always be 0) Alarm Size. Specifies the amount of data (y) to be transmitted in this COMMREQ. Maximum value of y is 32 bytes. Alarm Size is 0 (zero) if no data needs to be transmitted to the master. Always word length regardless of command block memory type. Data to be sent. This optional field can be used to transmit additional alarm relevant data to the master. The length of the data must be entered in the Alarm Size field.

16+y

0-65535 (0000-FFFF)

6-14

PACSystems? RX3i PROFIBUS Modules – August 2007

GFK-2301C

6

Alarm Request Reply Data Format
Word 1 2 3 4 5 6 7 Name Command Code Slot Number Sequence Number Alarm Type Alarm Specifier Return Status Reserved Description Echo of Command code = 9 Echo of Slot Number from command Echo of Sequence Number from command Echo of Alarm Type from command Echo of Alarm Specifier from command See “Return Status Codes” table below. Reserved

Return Status Codes
Value Dec (Hex 0 (0000) 115 (0073) 116 (0074) 119 (0077) 120 (0078) 121 (0079) 123 (0081) 125 (0083) 152 (0098) 165 (00A5) 200 (00C8) No Error Status data exceeds the length of the SPC3 diagnostic buffer No diagnostic buffer available at the moment (this is a temporary error.) DP-V1 class 1 services are disabled Maximum number of active alarms exceeded Alarm is disabled User specific alarm data out of range Sequence number out of range or already in use Unknown command code Length mismatch Task not initialized Meaning

GFK-2301C

Chapter 6 PROFIBUS Slave Status and Diagnostics

6-15

Appendix COMMREQ Operation

A
The Communication Request function (COMMREQ) allows the program to communicate with a GE Intelligent Platforms module, such as a PROFIBUS master or slave. The COMMREQ function uses a command block that contains the data to be communicated to the device, plus information related to the execution of the COMMREQ. The command block must be placed in the designated memory area using data move instructions, such as MOVE or BLKMOV (Block Move). The CPU reports the result of the COMMREQ in the status word, which is a single location in PLC data memory. The status word address is specified in the command block. For a list of status codes reported in the status word, see “COMMREQ Status Word” on page A-4. For details on the COMMREQ tasks supported by the PROFIBUS Master module, see chapter 4. This appendix provides an overview of the COMMREQ instruction. For details of the COMMREQ ladder instruction, refer to the online help provided with the programming software.

GFK-2301C

A-1

A

COMMREQ Ladder Instruction
A Communications Request is initiated when a COMMREQ ladder instruction is activated during the PLC scan. At this time, a command from the PLC via the Communications Request is sent to the PROFIBUS device.
Enable Input

COMM_ REQ IN SYSID TASK FT
Fault Output

Command Block Pointer Rack/Slot Location Task #

At the conclusion of every request, the CPU reports the status of the request to the Status Word, which is a location in PLC memory that is designated by the Status Word Pointer in the Command Block. The COMMREQ ladder instruction has four inputs and one output: Enable Input: Must be Logic 1 to enable the COMMREQ Instruction. It is recommended that the enabling logic be a contact from a transition (“one-shot”) coil. IN: The memory location of the first word of the Command Block. It can be any valid address in word-type memory (%R, %AI, or %AQ). For example, %R00100 at IN would indicate that the starting address of the Command Block is %R00100. SYSID: A hexadecimal value that gives the rack and slot location of the target device. The high byte (first two digits of the hex number) contains the rack number, and the low byte contains the slot number.
SYSID Example Rack 0 Slot 4 Hex Word Value 0004h

TASK: Must be 1 for the PROFIBUS module. FT Output: The function’s FT (fault) output can provide an output to optional logic that can verify successful completion of the Communications Request. The FT output can have these states:
FT Output Truth Table Enable Input Status Does an Error Exist? FT output

Active Active Not active The FT output is set High if:

No Yes No execution

Low High Low

The specified target address is not present (for example, specifying Rack 1 when the system only uses Rack 0). The specified task number is not valid for the device. Data length is set to 0. The FT output can either be connected to another device, such as a set coil, or can be left open.

A-2

PACSystems? RX3i PROFIBUS Modules User’s Manual – August 2007

GFK-2301C

A

COMMREQ Programming Requirements and Recommendations
COMMREQ instructions should be enabled by a contact from a transition coil. If using more than one COMMREQ in a ladder program, verify that a previous COMMREQ executed successfully before executing another one. This can be done by checking the Status Word and the FT (Fault) output. The FT output is held False if the Enable Input is not active. This means that if the COMMREQ is enabled by a transitional (one-shot) contact and a fault occurs, the FT output is High for only one PLC scan. To capture the fact that a fault occurred, you can program the fault output as a Set coil, which would not be automatically reset at the end of a scan. Additional logic would then be needed to reset the fault output coil after the fault is acknowledged and before the next execution of the COMMREQ. Programming a device, such as a Set Coil, on the FT output of the COMMREQ is optional; this output may be left open if desired. It is necessary to initialize the data in the Command Block before executing the COMMREQ instruction. Since the normal PLC sweep order is from top to bottom, initializing the Command Block in an earlier rung (or rungs) than the rung that contains the COMMREQ will satisfy this requirement. If you use MOVE instructions to load values into Command Block registers, use a Word-type MOVE to load a hexadecimal number, and an Integer-type MOVE to load a decimal number.

Error Detection and Handling
As shown in “COMMREQ Status Word”, a value of 1 is returned to the Status Word if communications proceed normally, but if any error condition is detected, a value greater than 1 is returned. If you require error detection in your ladder program, you can use a Greater Than (GT) compare instruction to determine if the value in the Status Word is negative (less than zero). If an error occurs, the GT instruction’s output (Q) will go high. A coil driven by the output can be used to enable fault handling or error reporting logic. The FT output of the COMMREQ, goes high for certain faults and can also be used for fault detection. Additionally, the first Status Word can be monitored by error message logic for display on an Operator Interface device, in which case, Status Word codes correspond to the error messages that appear on the operator screen. To dynamically check the Status Word, write a non-significant positive number (0 or 99 are typically used) into the Status Word each time before its associated COMMREQ is executed. If the instruction executes successfully, the CPU will write the number 1 there. This method lets you know that if the number 1 is present, the last COMMREQ definitely executed successfully, and that the 1 was not just left over from a previous execution. When multiple COMMREQs are used, each should be verified for successful communications before the next is enabled. Monitoring the Status Word is one way to accomplish this.

GFK-2301C

Appendix A COMMREQ Operation

A-3

A

Corrective Actions for COMMREQ Errors
The type of corrective action to take depends upon the application. If an error occurs during the startup or debugging stage of ladder development, you should verify the COMMREQ parameters. The same is true if an error occurs right after a program is modified. But, if an error occurs in a proven application that has been running successfully, the problem is more likely to be hardware-related. The PLC fault tables should be checked for additional information when troubleshooting Status Word errors.

COMMREQ Status Word
The following table defines the state codes that can be returned in the COMMREQ status word.
Value Dec (Hex) 0 (0000) 1 (0001) Command Complete Note: 2 (0002) 3 (0003) 4 (0004) 5 (0005) 6 (0006) 7 (0007) This status does not necessarily mean success. Some commands have reply data that must also be checked. Description Device has not yet processed the COMMREQ.

Command Terminated – module busy Command Terminated – invalid command Command Terminated – invalid command data Command Terminated – not enough data Not used Command Terminated – not enough memory in reply area The command did not specify sufficient PLC memory for the reply. Command will be ignored.

8 (0008)

Command Terminated – command-specific error. See AdditionalCode in the Status Block for more information.

A-4

PACSystems? RX3i PROFIBUS Modules User’s Manual – August 2007

GFK-2301C

Index
A
Adding module to configuration, 3-1 Adding slave devices, 3-10

F
Fault table entries, 5-4 Firmware ID, 5-24 Firmware upgrades, 1-2, 1-3

C
Cable specifications, 2-4 Clear Counters (6), 5-16, 6-9 COMMREQs
Clear Counters (6), 5-16, 6-9 DP-V1 Alarm Acknowledge (9), 5-22 DP-V1 Alarm Request (9), 6-14 DP-V1 Read Request (7), 5-17 DP-V1 Read Response (7), 6-10 DP-V1 Write Request (8), 5-19 DP-V1 Write Response (8), 6-12 Get Device Diagnostics (4), 5-13 Get Device Status (1), 5-6 Get Master Status (2), 5-8 Get Slave Status, 6-5 Read Module Header (5), 5-14, 6-7 Task ID, A-2

G
Get Device Diagnostics, 5-13 Get Device Status, 5-6 Get Master Status, 5-8 Get Slave Status, 6-5 GS? files, 3-10, 3-14, 3-15, 5-11

I
Indicators
PBM300, 5-2

Installation procedures, 2-1
connecting the module to the PROFIBUS network, 2-3 installing network termination, 2-5 system power requirements, 2-1

COMMREQs, general information
error detection and handling, A-3 ladder instruction, A-2 master, 5-5 memory type codes, 5-5 programming recommendations, A-3 slave, 6-4 status word, A-4

L
LEDs
PBM300, 5-2 PBS301, 6-2

Configuration
adding slave devices, 3-10 master network settings, 3-5 PROFIBUS master, 3-1 PROFIBUS slave, 4-1

N
Network segment length, 2-3 Network termination, 2-5

Configuration identifier, 1-7, 3-13 Connectors
network, 1-6, 2-3

O
Overview, 1-1

Consistency, data, 1-7

D
Data consistency, 1-7 Device information, 5-24 DP-V1 Alarm Acknowledge (9), 5-22 DP-V1 Alarm Request (9), 6-14 DP-V1 Read Request (7), 5-17 DP-V1 Read Response (7), 6-10 DP-V1 setup parameters, 3-16 DP-V1 status
read indication, 6-3 write indication, 6-3

P
Parameters
PROFIBUS master, 3-2 PROFIBUS slave, 4-2

Pin-out
PROFIBUS bus connector, 1-6

PLC fault table entries, 5-4 Power consumption, 1-2, 1-3 Power requirements
system, 2-1

PROFIBUS
additional information, 1-1 baud rate, 2-6 bus communication, 1-4 cable types, 2-4

DP-V1 Write Request (8), 5-19 DP-V1 Write Response (8), 6-12

GFK-2301C

Index-1

Index
network connectors, 1-6 network overview, 1-4 network topology, 1-5

PROFIBUS Master
overview, 1-2

R
Read Module Header, 5-14, 6-7 Redundant masters, 3-1 RX3i information, 1-1

S
Selecting the proper line type, 2-3 Slave diagnostics/firmware ID array, 5-3 Slave status bit array, 5-3 Specifications
cable, 2-4 master module, 1-2 slave module, 1-3

Status
DP-V1, 6-3 slave status, 6-3

Status and diagnostic methods, 6-1
master, 5-1

Status Word codes, COMMREQ, A-4

T
t_bit, 3-6 Task ID
COMMREQ, A-2

Index-2

PACSystems? RX3i PROFIBUS Modules User’s Manual–August 2007

GFK-2301C


相关文章:
profibus通讯协议_图文.ppt
profibus通讯协议 - PROFIBUS通信协议 ? 9.1 ProfiB
Profibus DP通讯协议简单介绍.pdf
Profibus DP通讯协议简单介绍_信息与通信_工程科技_专业资料Profibus通讯 网络诊断工具 1 虹科 Profibus DP 通讯协议简单介绍一、 首先,Profibus DP 通讯协议是一...
PROFIBUS通信协议_图文.ppt
PROFIBUS通信协议 - PROFIBUS通信协议 ? 9.1 ProfiB
Profibus协议报文说明.doc
Profibus协议报文说明 - 详细的报文解说,让初学者更容易理解相应报文的含义... Profibus协议报文说明_信息与通信_工程科技_专业资料。详细的报文解说,让初学者更容易理...
PROFIBUS-DP通讯协议.doc
PROFIBUS-DP通讯协议 - 2.2 PROFIBUS 通讯协议 对于调速
PROFIBUS总线协议概述及应用_图文.ppt
PROFIBUS总线协议概述及应用 - PROFIBUS总线协议概述及应用 主讲人:陆伟青 1 ?一 Profibus通讯协议概念篇 ? 1.1 Profibus协议概述 ? 1.2 Pr...
最完美的PROFIBUS通讯教材_图文.ppt
掌握PROFIBUS采用的访问控制方式、PROFIBUS通信协议,了解PROFIBUS-DP三个版本的数据 传输,了解PROFIBUS站点开发与实现,了解 PROFIBUS-PA的基本特点、连接接口及安装。...
西门子PROFIBUS通讯完整教程_图文.pdf
西门子PROFIBUS通讯完整教程_信息与通信_工程科技_专业资料。 www.plcworld.cn ...2018 Baidu |由 百度云 提供计算服务 | 使用百度前必读 | 文库协议 | ...
PROFIBUS DP协议简介.doc
PROFIBUS DP协议简介_信息与通信_工程科技_专业资料PROFIBUS协议简介 PROFIBUS-DP 协议简介 用于现场层的高速数据传送。 一.PROFIBUS DP 用于现场层的高速数据...
PROFIBUS通信协议解析_图文.ppt
PROFIBUS通信协议解析 - PROFIBUS通信协议 ? 9.1 Prof
西门子PROFIBUS通讯完整教程_图文.pdf
西门子PROFIBUS通讯完整教程_城乡/园林规划_工程科技_专业资料。www.plcworld.cn ...西门子Profibus通讯协议... 暂无评价 48页 29.98 西门子profibus通讯数据.....
PROFIBUS-DP协议简介(和利时)_图文.pdf
PROFIBUS-DP协议简介(和利时)_信息与通信_工程科技_专业资料 暂无评价|0人阅读|0次下载|举报文档PROFIBUS-DP协议简介(和利时)_信息与通信_工程科技_专业资料。 ...
modbus & profibus通讯协议区别.doc
modbus & profibus通讯协议区别 - Modbus K1
profibus协议.doc
profibus协议_信息与通信_工程科技_专业资料PROFIBUS 协议 2010-01-21 18:03 RS485 接口 (1) PROFIBUS 是一种国际化.开放式.不依赖于设备生产商的现场总线...
ProfiBus通讯原理详解.._图文.ppt
(MAC)具体控制数据传输,并确保 在任何时刻只有一个站点发送数据 PROFIBUS总线存取协议的设计必须满足MAC控制的 两个基本要求,即:在复杂的自动化系统(主站)间通信,...
直流传动的PROFIBUS通讯协议.doc
直流传动的PROFIBUS通讯协议 - Ansaldo Sistemi Indu
六、与支持PROFIBUS-DP协议的第三方设备通信实例_图文.pdf
六、与支持PROFIBUS-DP协议的第三方设备通信实例_信息与通信_工程科技_专业资料PROFIBUS 组态 PROFIBUS- 与支持 PROFIBUS-DP 协议的第三方设备通信实例 S7-400(...
PLC和PLC之间的ProfiBus通讯.pdf
PLC和PLC之间的ProfiBus通讯 - www.plcworld.cn PLC PLC 之间的 ProfiBus 通讯 3. 怎样加入支持 PROFIBUS-DP 协议的第三方设备 ...
基于软件协议的PROFIBUS-DP从站实现_论文.pdf
基于软件协议PROFIBUS-DP从站实现_信息与通信_工程科技_专业资料。利用单片机软件编写PROFIBUS-DP从站协议,并改进PROFIBUS-DP从站驱动电路实现了PROFI-BUS-DP的从...
带Profibus(DP协议)端口数显智能电表.doc
Profibus-DP 协议智能电表 张小莉 第一章 Profibus-DP 协议概述 本章节简要介绍了 Profibus-DP 协议,用户若熟悉本节内容,可以直接阅读第二章节仪表的通讯配 置。...
更多相关标签: