SINEC CP 5430 TF with COM 5430 TF, CP 5431 FMS with COM 5431 FMS Volume 1 of 2 1 Introduction 11 Data Transmission with Distributed I/Os C79000-B8976-C060/02 2 System Overview 12 Service- und Diagnostic Functions on SINEC L2 Bus using FMA Services 3 Fundamentals of the Modul 13 Clock Services 4 Technical Description/Installation 14 Documentation and Testing 5 Selecting the Type of Communication 15 Utilities 6 Basics of Configuration with NCM 16 Working with the Application Examples
Wir haben den Inhalt der Druckschrift auf Übereinstimmung mit der beschriebenen Hard- und Software geprüft. Dennoch können Abweichungen nicht ausgeschlossen werden, so daß wir für die vollständige Übereinstimmung keine Gewähr übernehmen. Die Angaben in der Druckschrift werden jedoch regelmäßig überprüft. Notwendige Korrekturen sind in den nachfolgenden Auflagen enthalten. Für Verbesserungsvorschläge sind wir dankbar. We have checked the contents of this manual for agreement with the hardware described.
SINEC CP 5430 TF/CP 5431 FMS with COM 5430 TF/COM 5431 FMS Description C79000-B8976-C060/02
Note We would point out that the contents of this product documentation shall not become a part of or modify any prior or existing agreement, commitment or legal relationship. The Purchase Agreement contains the complete and exclusive obligations of Siemens. Any statements contained in this documentation do not create new warranties or restrict the existing warranty.
B8976060/02 Contents 1 Introduction 1-1 2 System Overview 2-1 2.1 SINEC Overview 2-3 2.2 The PROFIBUS-Compatible Network SINEC L2/L2FO Standards Network Access Technique Transmission Techniques Transmission According to RS-485 Transmission with Fiber Optic Cables (FO) 2 2 2 2 2 2 2.2.1 2.2.2 2.2.3 2.2.3.1 2.2.3.2 2.3 2.3.
Contents B8976060/02 3.3 3.3.1 3.3.1.1 3.3.1.2 3.3.1.3 3.3.2 3.3.2.1 3.3.2.2 3.3.2.3 Application Interfaces of Layer 2 Communication Explicit Communication S5-S5 Communication Free Layer 2 Communication with FDL Services Fieldbus Management with FMA Services Implicit Communication Global I/Os (GP) Cyclic I/Os (ZP), only with CP 5430 TF Distributed I/Os (DP) 3 3 3 3 3 3 3 3 3 4 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS 4-1 4.1 4.1.1 4.1.1.1 4.1.1.2 4.1.2 4.1.2.1 4.1.3 4.1.
B8976060/02 Contents 4.4.2 Example of Transmission with RS 485 Bus Terminals 4 - 29 5 Selecting the Type of Communication 5-1 5.1 Data Transmission with HDBs (S5-S5) 5-3 5.2 Data Transmission with HDBs (Free Layer 2 Access) 5-4 5.3 Data Transmission with Global I/Os (GP) 5-5 5.4 Data Transmission with Cyclic I/Os (ZP) (CP 5430 TF) 5-7 5.5 Data Transmission with Distributed I/Os (DP) 5-8 5.6 Communication with TF (CP 5430 TF) 5-9 5.
Contents B8976060/02 6.5.3.2 6.5.4 6.5.4.1 6.5.4.2 6.5.4.3 6.5.4.4 6.5.4.5 6.5.4.6 Local Network Parameters Network Functions Network Overview Network Matching GP Consistency Default S5-S5 Links Network Documentation Archiving 6 6 6 6 6 6 6 6 - 28 33 34 36 38 40 42 44 6.6 6.6.1 6.6.1.1 6.6.1.2 6.6.1.3 6.6.2 6.6.3 6.6.4 6.6.4.1 6.6.4.2 6.6.4.3 6.6.4.4 6.6.4.
B8976060/02 7.3 7.3.1 7.3.1.1 7.3.1.2 7.3.2 7.3.3 8 8.1 8.1.1 8.1.2 8.1.3 8.1.4 8.1.5 8.
Contents B8976060/02 9 Data Transmission with Global I/Os 9-1 9.1 9.1.1 Basics of Data Transmission with Global I/Os Checking the Data Transmission with ANZW and the GP Station List 9-3 9 - 18 9.2 9.2.1 9.2.2 9.2.3 Configuring I/O Areas CP 5430 TF I/O Areas CP 5431 FMS Editor for Global I/Os 9 9 9 9 - 23 24 28 32 9.
B8976060/02 Contents 11 Data Transmission with Distributed I/Os 11 - 1 11.1 11.1.1 Basics of SINEC L2-DP The SINEC L2-DP Interface for the CP 5430 TF/CP 5431FMS 11 - 4 11.2 CP 5430 TF/CP 5431 FMS L2-DP Functions 11 - 7 11.3 Communication Between the DP Master and the DP Slave Station 11 - 9 Basics of Data Transmission Using the DP Service of the CP 11 - 10 11.4 11.5 11 - 6 11.5.2 11.5.
Contents 11.8.3 B8976060/02 Cyclic and Acyclic Transmission of Global_Control Commands Special Job "STOP DP polling list processing" 11 - 69 11 - 74 Service and Diagnostic Functions on the SINEC L2 Bus using FMA Services 12 - 1 12.1 Use and Types of FMA Service 12 - 2 12.2 Fundamentals of using the FMA Services 12 - 5 12.3 12.3.1 12.3.2 FDL_READ_VALUE FDL_READ_VALUE_Request FDL_READ_VALUE_Confirmation 12 - 13 12 - 13 12 - 14 12.4 12.4.1 12.4.
B8976060/02 12.9.3 12.9.4 12.9.5 12.9.6 12.9.7 Contents Program Examples for the FDL_LIFE_LIST_CREATE_REMOTE Service Program Example for the FDL_LIFE_LIST_CREATE_LOCAL Service Program Example for the FDL_IDENT Service Program Example for FDL_READ_STATISTIC_CTR Service Program Example for FDL_READ_LAS_STATISTIC_CTR Service 12 - 42 12 - 43 12 - 45 12 - 48 12 - 51 13 Clock Services 13 - 1 13.1 Network Topology, Clock Master/Slave Functions 13 - 3 13.2 How the Clock Functions 13 - 6 13.
Contents B8976060/02 14.2.2.2 14.2.2.3 14.2.3 14.2.3.1 14.2.3.2 14.2.3.3 14.2.4 14.2.4.1 14.2.4.2 14.2.5 14.2.5.1 14.2.5.2 14.2.5.
B8976060/02 17.4.1 Contents 17.4.2 17.4.3 17.4.4 Messages in the status word for predefined S5S5 links, free layer 2 and FMA Global I/Os - Error Bits Cyclic I/Os Error Messages DP Error Displays 17 17 17 17 17.5 Overview of the FMA Services 17 - 21 17.6 17.6.1 Calculation of the Target Rotation Time (TTR) Overview 17 - 24 17 - 24 17.
Contents Volume 1 B8976060/02 XII
B8976060/02 1 Introduction Introduction The manual for the CP 5430 TF and CP 5431 FMS is divided into two volumes. This volume, Volume 1 of the manual describes the PROFIBUS (PROcess FIeld BUS) communication available with the two CPs. Differences in communication and performance are pointed out in the appropriate chapters. The communications processors are configured with COM 5430 TF/COM 5431 FMS under SINEC-NCM.
Introduction B8976060/02 The network is configured with COM 5430 TF/COM 5431 FMS under SINEC NCM (Network and Communication Management). The configuration tool can be run on the PG 710, 730, 750 and 770 under the S5-DOS/ST operating system. Active SINEC L2 / PROFIBUS stations S5 CP 5430 SINEC L2/ L2FO PROFIBUS PG CP 5410 Field device S5 CP 5430 TF Field device S5 CP 5431 FMS Field device PC CP 5412 Field device o.
B8976060/02 Introduction General symbols: Active star coupler Twisted pair Bus terminal (terminating resistor connected) Bus terminal (terminating resistor disconnected) DTE Data Terminal Equipment Fiber optic cable Optical bus terminal SF repeater adapter R Table 1.1 ✔ ☞ mm RS 485 repeater Symbols for SINEC L2/L2FO This character indicates an activity or operation for you to perform. This symbol highlights special features and dangers.
Introduction B8976060/02 Requirements of the user To understand the examples, you should have the following: ➣ Knowledge of programming with STEP 5 ➣ Basic knowledge of the use of handling blocks (HDBs). The description of the HDBs can be found in the manual for your programmable controller or in separate descriptions of the programmable controllers. Training offer Siemens provides SINEC users with a comprehensive range of training opportunities.
B8976060/02 Introduction To help you find your way through this manual (Volume 1) the remainder of this section outlines the chapters briefly. Chapter 2 System Overview This chapter supports you when structuring your network and provides an overview of the standards, techniques, devices and structure of the PROFIBUS-compatible network SINEC L2/L2FO. You will also find general information about different topologies, functions and network planning and design of the SINEC L2/L2FO bus system.
Introduction B8976060/02 Chapter 6 Basics of Configuration with NCM This chapter contains an introduction to working with SINEC NCM and COM 5430 TF/COM 5431 FMS. It is intended to familiarize you with the basics of configuring, i.e. how to use general guidelines and the basic configuration screens and their application. Chapter 7 S5-S5 Communication This chapter describes the communication with handling blocks on pre-configured S5-S5 links between active SIMATIC S5 programmable controllers.
B8976060/02 Introduction Chapter 12 FMA Services This chapter describes the different types of communication including a detailed description of the basics and the configuring procedure. At the end of each section there is an example to illustrate the type of communication. Chapter 13 Clock Services This chapter describes the data formats for the time of day and explains how the clock master and clock slave roles function.
Introduction B8976060/02 Chapter A and B Abbreviations and Index The list of abbreviations will help you considerably when working with this manual since you can check the meaning of unknown abbreviations quickly. You can use the index to find a term quickly. Chapter C Further Reading This section lists publications and manuals dealing with related aspects (marked in the text with /x/). Volume 2 of the CP 5431 FMS manual explains the range of functions of the FMS protocol architecture.
B8976060/02 2 System Overview System Overview The performance of control systems is no longer simply determined by the programmable controllers but also to a great extent by the accessory equipment. Apart from plant visualization, operating and monitoring this also means a high-performance communications system. Distributed automation systems are being used increasingly in production and process automation.
System Overview B8976060/02 LANs form the basis of the communications system and can be implemented ➣ electrically ➣ optically ➣ as an electrical/optical combination.
B8976060/02 2.1 System Overview SINEC Overview SINEC (SIEMENS Network Architecture for Automation and Engineering) is the name of the communications network for SIEMENS programmable controllers, process computers workstations and personal computers. SINEC includes the following: ➣ The communications network comprising the transmission medium, link and transmission components and the appropriate transmission technique. ➣ Protocols and services for data transmission between the devices mentioned above.
System Overview B8976060/02 - triaxial cable (50 Ω) - fiber-optic cable - twisted pair ➣ SINEC L2/L2FO, a communications network for the cell and field area according to PROFIBUS with hybrid medium access techniques token bus and master-slave operating on - twisted pair - fiber-optic cable The various communications networks can be used either independently of each other or in different combinations as required.
B8976060/02 2.2 System Overview The PROFIBUS-Compatible Network SINEC L2/L2FO Within the open, heterogeneous SINEC communications system, SINEC L2/L2FO is the network for the cell and field area, intended particularly for industrial environments. The SINEC L2 network complies with the German process and field bus standard PROFIBUS DIN 19245. SINEC L2 is the electrical network based on a shielded, twisted pair. The optical network SINEC L2FO (FO = fiber-optic) is the optical version of SINEC L2, i.e.
System Overview B8976060/02 The following devices could be connected to each other via a SINEC L2/L2FO network: ➣ SIMATIC programmable controllers, S5-95U, S5-115U, S5-115H, S5-135U, S5-150U, S5-155U and S5-155H ➣ PCs ➣ Motor protection and control devices capable of communication (e.g.
B8976060/02 2.2.1 System Overview Standards SINEC L2 is based on the reference model of the International Standards Organization ISO for "Open System Interconnection" (OSI, Fig. 2.1). The aim of this model is the connection of devices from different manufacturers via a common "communications system". The area of application of SINEC L2 bus systems ranges from simple field bus applications to the networking of production cells (cell bus).
System Overview B8976060/02 SIMATIC S5 provides the following connections for these three protocol standards: ➣ The SINEC L2-TF connection with the CP 5430 TF ➣ The SINEC L2-FMS connection with the CP 5431 FMS ➣ The SINEC L2-DP connection CP 5430 TF/CP 5431 FMS. with the IM308 B and the This manual (Volume 1) describes the common functions of the CP 5430 TF/CP 5431 FMS (layer 2). The layer 7 communication of the TF services on SINEC L2 is described in Volume 2 for each module separately.
B8976060/02 System Overview The ISO/OSI reference model is divided into 2 different areas: ➣ Transport-oriented layers: 1 - 4 ➣ Application-oriented layers: 5 - 7 In SINEC L2/L2FO the lower layers 1 (physical layer) and 2 (data link layer) comply with the PROFIBUS standard DIN 19245 Part 1.
System Overview 2.2.2 B8976060/02 Network Access Technique The medium access technique in SINEC L2/L2FO complies with the token bus technique for active stations and master-slave technique for passive stations as stipulated in DIN 19245 Part 1. Active stations ➣ can send data to other stations without being requested to ➣ can request data from other stations. Passive stations ➣ can only send data after a request from an active station.
B8976060/02 System Overview ➣ Every active station "knows" the addresses of the other active stations. An active station checks the address area between itself and the next active station cyclically, this is known as the GAP address area. With this check, the station recognizes whether an active or passive station has been included in the ring or whether a passive station has been removed. The GAP update factor specifies the interval at which an active station checks its complete GAP address area.
System Overview B8976060/02 Within the token mechanism for the active stations, various procedures are defined for the following special situations: ➣ Initializing the logical token ring ➣ Duplication of the token ➣ Loss of the token ➣ Addition or deletion of an active station in the logical ring The way in which the SINEC L2/L2FO network functions results in two special cases: 1. When only one station is active and all others are passive, the bus operates on a master-slave principle. 2.
B8976060/02 System Overview Each station measures the actual token rotation time and calculates the difference between the target rotation time and the actual rotation time (= token holding time). During this time, the station can transmit (first the frames with high priority and then the frames with low priority). Once the token holding time has elapsed, the token must be passed on. Fig. 2.
System Overview 2.2.3 B8976060/02 Transmission Techniques With SINEC L2/L2FO there are two different transmission techniques available (RS-485, FO) for two different transmission media (twisted pair or fiber-optic cable). The SINEC L2/L2FO communications processors (CPs) generally support both transmission techniques (refer to the manuals for the specific CPs). The transmission technique is selected along with the SINEC L2/L2FO bus terminal type. 2.2.3.
B8976060/02 System Overview (only when using the SINEC L2 bus cable) Various cables are available from Siemens for SINEC L2 Number of stations: max. 32 per bus segment max. 127 per network when using repeaters The SINEC L2 bus terminal is used to structure the network. The bus terminals can be connected to any standardized L2 connector (9-pin sub-D socket). The pin assignment of the terminal connector corresponds to the PROFIBUS standard.
System Overview B8976060/02 A point-to-point link between 2 SINEC L2FO bus terminals (without an active star coupler) is possible. Characteristics of the fiber-optic technique: ➣ long distance between two DTEs when star couplers are cascaded (max. 17 x 1.4 km = 23.8 km at dr = 187.5 kbps1) ➣ immune to electromagnetic interference ➣ terminal equipment electrically isolated ➣ supports glass and plastic fiber-optic technology.
B8976060/02 System Overview For more information about fiber-optic cables, refer to Fundamentals, Cable Technology /5/, VDI/VDE 3692 page 2 /6/ and the SINEC L2/L2FO Network Manual /9/.
System Overview B8976060/02 2.3 Network Topology 2.3.1 Topology of an Electrical SINEC L2 Network for the RS-485 Technique In an electrical SINEC L2 network, the bus cable is a shielded, twisted pair (SINEC L2 bus cable). The characteristic impedance is 160 ohms. All the stations are connected to the SINEC L2 bus cable using SINEC L2 bus terminals. Each SINEC L2 bus segment must be terminated at both ends.
B8976060/02 System Overview Data rate 9.6 19.2 93.75 187.5 500.0 1,500 Table 2.1 Max. segment length Kbps Kbps Kbps Kbps Kbps Kbps 1.200 m 1.200 m 1.200 m 1.000 m 400 m 200 m Upper Limits of the Data Rate Using the repeater as a structuring element, SINEC L2 bus systems can be implemented in rows and tree structures.
System Overview 2.3.2 B8976060/02 Topology of an Optical SINEC L2FO Network Using an active star coupler (AS 501) several stations can be connected together in a star network ( Fig. 2.6).The connection between the DTE and the active star coupler or between active star couplers is a plastic fiber-optic cable (980/1000 µm) or glass fiber-optic cable (62.5/125 µm).The maximum distance between a DTE and the active star coupler determines the maximum distance of 2800 m between any two DTEs.
B8976060/02 2.3.3 System Overview Topology of a Combined Electrical / Optical SINEC L2/L2 FO Network Using a SINEC L2 RS-485 repeater with an SF optical repeater adapter, an electrical L2 network (RS-485) can be connected to the active star coupler of an optical L2 network (see Fig 2.8). It is also possible to connect two electrical L2 networks optically by means of repeaters with optical repeater adapters (for interconnecting optical links, see Fig. 2.9).
System Overview B8976060/02 To connect a SINEC L2 repeater to an active star coupler using an SF optical repeater adapter, the maximum distance of 1400m applies just as for a direct optical connection between two repeaters using SF optical repeater adapters.
B8976060/02 System Overview 2.4 Configuring the Network 2.4.1 Configuring a SINEC L2 Network for RS-485 When configuring a purely electrical network the following values are important: ➣ max. segment length ➣ max. number of stations ➣ max. length of the connecting cables ➣ cascading rules for SINEC L2 repeaters. Fig. 2.5 shows the typical structure of a SINEC L2 network for RS-485, comprising several segments connected by repeaters.
System Overview B8976060/02 The following connecting cables are permitted for the data rates listed: Data rate Max. number of connectable RS-485 bus terminals with 1.5 m connecting cables Max. number of connectable RS-485 bus terminals with 3 m connecting cables 9.6 Kbps 32 32 19.2 Kbps 32 32 93.75 Kbps 32 32 187.5 Kbps 32 25 * 500 20 * 10 * 6* 3* Kbps 1500 Kbps *These values apply to version 1 of the RS-485 bus terminal.
B8976060/02 2.4.2 System Overview Configuring a SINEC L2FO Network When planning a SINEC L2FO network the following parameters are important: ➣ maximum signal attenuation/attenuation calculation ➣ cascading rules You will find detailed information about planning a SINEC L2FO network in the SINEC L2/L2FO Network Manual /9/. Further reading /7/8/.
NOTES
B8976060/02 3 Fundamentals of the Model Fundamentals of the Model To understand the procedure and to be able to work with the system, the user must be familiar with the model and the terminology. This chapter first explains the architecture, then the communications model and its terminology and finally the simulation on programmable controllers. To keep the explanation of terminology clear, some general terms are explained in the appendix.
Fundamentals of the Model 3.1 B8976060/02 ISO/OSI Reference Model for Communication To obtain a structured architecture, the communications tasks were divided into seven layers (refer to Fig. 3.1). Each device (station) within the network has the same structure. The layers are hierarchical and each layer provides a series of services to the next higher layer. With each service, the executing layer of the local station communicates with the peer layer of the remote station (logical data exchange).
B8976060/02 3.2 Fundamentals of the Model Architecture <-> OSI Environment The architecture of the CP 5430 TF is illustrated in Fig. 3.2, that of the CP 5431 FMS in Fig. 3.3, (refer also to Fig. 2.1). The components are briefly explained after the figures. in Vol.
Fundamentals of the Model B8976060/02 in Vol. 2 (CP 5431 FMS) COM USER PROGRAMS I/O ISO/OSI Layer 7 Application CI / ALI FMA PG S5S5 FL2 GP DP FMS 6 Presentation functions LLI 5 Session 4 Transport 3 Network CP L2 transport empty empty 2 Data Link 1 Physical PROFIBUS standard DIN 19245 T.1 FDL/MAC/FMA Technology Fiber Optic FO Technology RS 485 PROFIBUS DIN 19245 T2 (FMS) described in Volume 2 Fig. 3.
B8976060/02 Fundamentals of the Model LLI: Lower layer interface (Volume 2) CP 5431 FMS FMS: Fieldbus messaging specification (Volume 2) CP 5431 FMS ALI: Application layer interface (Volume 2) CP 5431 FMS CI: Cyclic interface (Volume 2) CP 5431 FMS MAC: Media access control L2-Transport: Transport layer TF: Technological functions (Volume 2) CP 5430 TF PG functions: Used for the following: - loading/deleting the CP - executing COM functions - bus selection - test functions COM: Used to co
Fundamentals of the Model 3.2.1 B8976060/02 Communications Model This section is intended to introduce you to the communications world and to provide explanations of the model and terminology to establish the relationship between theory and practice. In terms of communication, an application process includes all the programs, resources and tasks not assigned to a communication layer.
B8976060/02 3.2.1.2 Fundamentals of the Model Logical Data Exchange FDL services are available for issuing jobs. Jobs are transferred via the specified communication relations (logical channels as connection) to the communication partner in PDUs. DEVICE X Data exchange Application process transparent DEVICE Y Application process Layer 2 2 2 1 1 physical data transmission Fig. 3.5 Logical Data Exchange To the user, it appears as if the application processes exchange data directly.
Fundamentals of the Model B8976060/02 The communications start and end point of a logical channel between two stations on the bus is known as a Service-Access Point (SAP). A SAP is a further address criterion in addition to the station address. You must specify a SAP number for each channel to be able to use layer 2 services. 3.2.2.
B8976060/02 3.2.2.2 Fundamentals of the Model Addressing Model for Implicit Communication (GP, DP ZP) In data transmission using implicit communication via L2, the data exchange is handled via the I/O area of the SIMATIC PLC. All I/O bytes via which you want to send and all I/O bytes via which you want to receive must be assigned to the appropriate I/O protocol by configuring the I/O areas in COM. In GP (global I/Os) communication, I/O bytes are assigned to global objects of the GP during configuration.
Fundamentals of the Model B8976060/02 In ZP (cyclic I/Os) communication (CP 5430 TF), I/O areas of certain passive stations are assigned by configuring their L2 address and the remote SAP. Active station Input area Passive station CP Input buffer L2 bus PLC Output area Fig. 3.8 SAP SAP Output buffer Field device Addressing Model for Communication with ZP In DP (distributed I/Os) communication, I/O areas of certain passive stations are assigned simply by configuring their L2 address.
B8976060/02 3.3 Fundamentals of the Model Application Interfaces of Layer 2 Communication In this model, as already mentioned, there are two basic types of communication: Explicit communication using the existing handling blocks: ➣ S5-S5 communication ➣ Free layer 2 communication ➣ FMA services. Implicit communication using I/O bytes: ➣ Global I/Os (GP) ➣ Cyclic I/Os (ZP) with the CP 5430 TF ➣ Distributed I/Os (DP). 3.3.1 3.3.1.
Fundamentals of the Model B8976060/02 communication with the SIMATIC S5 PLC, it is necessary to check and evaluate the status words of the HDB during the communication. The basic sequence of communication via S5-S5 links is described in Chapter 7 . STATION 1 STATION 2 PLC PLC CP CP transmitted Data to be received in data block (DB) in data block (DB) Data to be HDB SEND ANR 1 ANZW Job active Fig. 3.10 3.3.1.
B8976060/02 Fundamentals of the Model The layer 2 firmware of the CP provides various services for reliable data transmission which you can use in the control program. In concrete terms, this means that you request layer 2 services for data transfer and evaluate confirmations (including error messages) made available by this layer in the control program. You must also evaluate layer 2 indications when a frame is received by the CP.
Fundamentals of the Model B8976060/02 The basic procedure for communication with the free layer 2 access is described in Chapter 8. The job numbers ANR 134 to ANR 186 are available for these layer 2 functions. 3.3.1.3 Fieldbus Management with FMA Services The FMA services are provided on the CP 5430 TF/CP 5431 FMS for service and information purposes. The execution of an FMA service corresponds to that of an FL2 service.
B8976060/02 3.3.2 Fundamentals of the Model Implicit Communication If you use implicit communication, the communications processor (CP) controls the communication. The types of communication in DP, ZP and GP in which communication is synchronized with the cycle and for which handling blocks are used to update information are exceptions.
Fundamentals of the Model 3.3.2.1 B8976060/02 Global I/Os (GP) The term "global I/Os" means that part of the I/O area is not used by I/O modules but for global data exchange between SIMATIC PLCs. Global data exchange involves the CP sending the entire changed output area assigned to the global I/Os and cyclically updating the entire input area assigned to the global I/Os with the received data once again. The global I/O area is in the I/O area of the controller and is also used by the PLC program.
B8976060/02 3.3.2.2 Fundamentals of the Model Cyclic I/Os (ZP), only with CP 5430 TF The demanding requirements of cyclic communication for automation functions of a field device cannot be met by direct HDB calls. Instead of cyclic HDB calls, the CP 5430 TF also provides the POLL or cyclic I/Os service. The term "cyclic I/Os" means that part of the I/O area is not used by I/O modules, but rather for cyclic data exchange between SIMATIC programmable controllers and passive stations.
Fundamentals of the Model 3.3.2.3 B8976060/02 Distributed I/Os (DP) Data transmission using L2-DP (distributed I/Os) provides a standardized interface for communication between SIMATIC S5 PLCs and field devices (DP slave), with the PROFIBUS DP protocol complying with DIN E19245 Part 3. Data transmission with DP is simple to implement. The programming and handling is reduced to a minimum for the user. When using the DP service, part of the I/O area of the PLC is occupied by the connected DP slaves.
B8976060/02 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS 4 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS 4.1 Technical Description 4.1.1 Communications Processor CP 5430 TF/CP 5431 FMS The elements of the CP 5430 TF/CP 5431 FMS important for operation can be seen in Fig. 4.1. The description of the indicators and interfaces can be found on the following page. X5 X5 S1 X1 S1 H1/H2 H1 H3 H2 H3 X4 Eprom 2 .. .. . .. .. .. .. X4 .. .. .. .. .
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS Explanation of Fig. 4.1: Mode indicator H1 : RUN (refer to Table 4.1) H2 : STOP (refer to Table 4.1) H3 : CP-FAULT (refer to Table 4.2) Mode selector switch: S1 : STOP/RUN (refer to Table 4.1) Interfaces: X1 : backplane connector (refer to Table 4.3) X2 : backplane connector (refer to Table 4.3) X3 : L2 interface (refer to Table 4.4) X4 : PG interface (AS511) (refer to Table 4.
B8976060/02 4.1.1.1 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS Mode Indicators (RUN and STOP LEDs) Table 4.1 explains the significance of the RUN and STOP LEDs Mode changes The mode can change in a variety of situations. Fig. 4.2 illustrates the factors causing a particular change. FROM Actions TO RUN STOP NOT SYNCHRON - Set STOP/RUN switch on front panel of CP 5430 TF/ CP 5431 FMSto RUN. - Trigger PG function "START CP" (only when mode switch is set to RUN).
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS B8976060/02 LED Status of the CP 5430 TF/ CP 5431 FMS Meaning Green RUN LED lit, red unlit RUN - All types of data transmission are possible, both from the CPU control program and via PG bus functions. - The memory submodule of the CP 5430 TF/CP 5431 FMS can be read, but not written to.
B8976060/02 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS The START /STOP response The CP is a slave processor system in the S5 rack and must therefore follow the START/STOP response of the master (here the PLC). After switching on the power supply, the CP runs through a hardware test program. Following this, it sets up a management block in the non-backed up RAM area for every job defined in the module card for internal program management.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS 4.1.1.2 B8976060/02 Fault LED The fault LED is lit permanently or flashes when the firmware of the CP detects an error (refer to Table 4.2). Note: when the CP fault LED flashes/is lit, the RUN and STOP LEDs are irrelevant! LED Meaning Fault LED flashes - No data transmission possible (data exchange with the CPU via the backplane bus blocked). - Parameters can be assigned on the AS 511 interface.
B8976060/02 4.1.2 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS Data Exchange between the CPU and CP 5430 TF/CP 5431 FMS The following section explains how the CP 5430 TF/CP 5431 FMS receives data for transmission from the CPU and how it passes on data it has received to the CPU.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS B8976060/02 Data exchange using the job buffers of the dual-port RAM With S5-S5 data transmission and free layer 2 access (refer to Chapters 7 and 8) data is exchanged using the dual-port RAM of the CP 5430 TF/CP 5431 FMS. All data and functions passing through the dual-port RAM of the CP 5430 TF/CP 5431 FMS must be provided by handling blocks from the point of view of the control program.
B8976060/02 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS The interface number (SSNR) consists of the base interface number and the page number of the CP. For the data exchange between the CP 5430 TF/CP 5431 FMS and the PLC-CPU a 4 Kbyte dual-port RAM (DPR) is available which is divided into 4 pages each of 1 Kbyte. In the address area of the CPU, the memory area F400H ... F7FFH (1 Kbyte) is available for addressing the dual-port RAM of CPs/IPs with page addressing.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS B8976060/02 For monoprocessor PLCs, it makes sense to use only the base interface number (refer to Fig. 4.4). Monoprocessor PLCs 0 1 2 3 base SSNR 4 4 CP 1 5 6 CP 2 7 ... base SSNR 248 base SSNR 0 base SSNR 8 CPU pointless Fig. 4.4 Interface Addressing with a Monoprocessor PLC The link between the STEP 5 user program and a particular action on the CP is the SSNR/ANR combination.
B8976060/02 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS PLC CP DPR (HDB call in user program) SSNR x+1 SEND x y SSNR x SSNR ANR Link block ANZW QTYP DBNR QANF QLAE SSNR x ANR y PAFE Link parameters Job buffer Link to another station on the SINEC L2 bus Status bits Fig. 4.5 ☞ 4.1.2.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS 4.1.3 Technical Data of the CP 5430 TF/CP 5431 FMS 4.1.3.1 Interfaces PG interface: TTY max. 1 km long transmission protocol Siemens AS 511 9.6 Kbps L2 interface: RS 485 L2FO interface: Plastic HP duplex ☞ 4.1.3.2 B8976060/02 The L2FO interface and the 9-pin RS 485 connector must never be both connected at the same time. If the L2FO interface is not being used, it must be closed with the rubber plug supplied.
B8976060/02 4.1.3.3 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS Mechanical and Electrical Data Current consumption: 5V typically 450 mA 24 V typically 70 mA for RS 485 Power loss: 1.9 W for RS 485 5.3 W at 5V2/500 mA Back-up current: typically 20 pA Vibration: 10 ... 57 Hz 0.15 mm; 57 ... 150 Hz 2 g complying with IEC 68-2-6 Electrical isolation: no Weight of the module approx. 0.4 kg Weight of the approx. 0.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS 4.1.3.5 B8976060/02 Performance Data CP 5430 TF S5-S5 Maximum number of links: 32 Maximum amount of data: 128 bytes per job Free Layer 2 Maximum number of links: Maximum amount of data: 32 (55 without S5-S5) 242 bytes per job ZP (cyclic I/Os) Max. polling list entries: 128 Maximum number of job: 242 bytes per ZP slave (max., however 256 bytes in total) Maximum number of outputs: 242 bytes per ZP slave (max.
B8976060/02 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS DP (distributed I/Os) Number of DP slaves per master: 32 Maximum number of inputs: 242 bytes per DP slave (max. however 256 bytes in total) Maximum number of outputs: 242 bytes per DP slave (max. however 256 bytes in total) TF (technological functions) Maximum no. of application associations 24 for PDU size 512 bytes Maximum PDU size: 9999 bytes Maximum number of configurable variables: of which max.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS 4.1.3.6 B8976060/02 Performance data of the CP 5431 FMS ALI Number of links: 32 Number of variables (indexes): approx. 256 Maximum length of a variable: 233 bytes Maximum PDU size: 241 bytes (data: 233 bytes) Link attributes: master-master and master-slave (without slave initiative) No connectionless services CI Number of links: 32 Maximum PDU size: 32 bytes Maximum number of inputs: 232 bytes per CI slave (max.
B8976060/02 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS GP (global I/Os) Maximum number of GP objects: 2048 throughout the network Maximum number of inputs: 256 bytes per station Maximum number of outputs: 64 bytes per station Maximum number of stations: 32 If CI and GP are used together, a maximum of 256 inputs and 256 outputs can be used. ☞ 1. The specifications for CI only apply when no ALI links are programmed (MMAC, MSAC). 2.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS 4.1.3.7 B8976060/02 Interface Assignments This section specifies the electrical interfaces of the CP 5430 TF/CP 5431 FMS (refer to Tables 4.3 - 4.5). The interfaces are as follows: ➣ Backplane connector X1/X2 ➣ L2 interface socket X3 ➣ PG interface socket X 4 X1 Pin no. D Signal name B Signal name Z Signal name X2 Pin no.
B8976060/02 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS L2 interface socket X3 (RS 485) Table 4.5 X3 Pin no. Signal name PROFIBUS designation 1 2 3 4 5 6 7 8 9 PE SIL RxD/TxD-P RTS (AG) M5V2 P5V2 BATT RxD/TxD-N RTS (PG) Protective earth Data line - B Control - A Data ref. potential Power supply + Data line - A Control - B occ. with RS 485 yes yes yes yes yes yes - Pinout Table of the L2 Interface Socket X3 PG interface socket X4 Table 4.4 X4 Pin no.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS B8976060/02 4.2 Memory Submodules 4.2.
B8976060/02 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS 4.3 Installation Guidelines 4.3.1 Basic Configuration Fig. 4.6 illustrates the minimum configuration of a SINEC L2 bus system. ➣ Communications processor CP 5430 TF/CP 5431 FMS ➣ Bus terminal with terminal cable ➣ Bus cable P L C C P . PG interface (AS 511) C P L2 interface bus cable . Bus terminal 1 with terminal cable Fig. 4.6 4.3.1.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS ☞ B8976060/02 Modules must only be inserted or removed when no voltage is applied. The rules for working with electrostatically sensitive devices (ESD guidelines) must be adhered to. Depending on the range of performance and the configuration of the control system, there are several subracks available for the central controller (CC) (S5 115U) and for expansion units (EU).
B8976060/02 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS Expansion unit (EU): Subrack ER 701-3LA.. PS 0 1 2 3 4 5 6 7 IM 4 5 6 7 IM Subrack ER 701-3LH.. PS Fig. 4.9 0 1 2 3 Slots for the CP 5430 TF/CP 5431 FMS in the Expansion Unit ER 701-3L SIMATIC S5-135U Central controller 3 11 19 27 35 43 51 59 67 75 83 91 99 107 115 123 131 139 147 155 163 without interrupt line Fig. 4.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS B8976060/02 SIMATIC S5-155U Central controller: 3 11 19 27 35 43 51 59 67 75 83 91 99 107 115 123 131 139 147 155 163 without interrupt line Fig. 4.10 Slots for the CP 5430 TF/CP 5431 FMS in the Central Controller CC 155U In the S5 155U, in certain situations (Manual S5-155U) further slots may be available for the CP Expansion unit EU 185U: 3 11 19 Fig. 4.
B8976060/02 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS SIMATIC S5-135U/155U 3 11 19 27 35 43 51 59 67 75 83 91 99 107 115 123 131 139 147 155 163 without interrupt line Fig. 4.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS 4.4 B8976060/02 Ways of Connecting PGs on the SINEC L2 Bus With the following L2 communications processors you can connect a PG or a PC/AT directly to a bus terminal and therefore to the L2 bus.
B8976060/02 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS If there are several CPs in one rack as for example in the multiprocessor PLC S5-135U, the modules can be connected using the PG-MUX 757. C P U .. . . .. ... ... PG interface (AS 511) Programmer (PG 710, PG 730, PG 750, PG770) Fig. 4.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS B8976060/02 If several PLCs are networked with one SINEC L2 bus system, you can also program the CPUs via the bus. In practice, this means that a centrally installed PG, e.g. in a control room, can reach all the PLCs connected to the bus system. With the SINEC L2 bus system, the following programmers can be used: PG 710, PG 750, PG 730 and PG 770.
B8976060/02 4.4.1 Technical Description and Installation of the CP 5430 TF/CP 5431 FMS Structure and Functions of the Bus Terminal Bus terminals connect a CP 5430 TF/CP 5431 FMS, CP 5412 or a CP 5410 to the SINEC L2 bus. As the end terminal, they also function as the terminator of the bus segment (refer to Chapter 2). 4.4.
Technical Description and Installation of the CP 5430 TF/CP 5431 FMS B8976060/02 Connecting cable for bus terminals with a PG/OP interface Fig. 4.18 shows the connecting cable between the PG/OP interface of the RS 485 bus terminal and the interface of the CP 5410 (PG). PG/OP interface* of the RS 485 bus terminal (9-pin male) .. .. .. ... Interface * of the CP 5410 (PG) (9-pin male) 5 9 4 8 3 7 2 6 1 .. .. .. ... 5 RXD/TXD(A) RXD/TXD(B) PE 9 4 8 3 7 2 6 1 * View of solder side Fig.
B8976060/02 5 Selecting the Type of Communication Selecting the Type of Communication Chapter 3 explained that there are various mechanisms available for data transmission that can, in practical terms, be divided into five different types as follows: ➣ Data transmission with HDBs on links (S5-S5) ➣ Data transmission with HDBs by direct access to layer 2 services (FL2) ➣ Data transmission with global I/Os (GP) ➣ Data transmission with cyclic I/Os (ZP) with the CP 5430 TF ➣ Data transmission with distribu
Selecting the Type of Communication B8976060/02 Chapter 5.7 provides a brief overview of SINEC FMS. In Volume 2 (CP 5431 FMS), you will find the complete description of communication with SINEC FMS and the services available.
B8976060/02 5.1 Selecting the Type of Communication Data Transmission with HDBs (S5-S5) Data transmission with HDBs on configured links is suitable for the transmission of related blocks of data up to 128 bytes long between active SIMATIC S5 programmable controllers. This type of communication has the following characteristics: ➣ The data transmission is via S5-S5 links configured in the PLC program and triggered by HDBs.
Selecting the Type of Communication 5.2 B8976060/02 Data Transmission with HDBs (Free Layer 2 Access) This type of data transmission is suitable for communication between SIMATIC S5 programmable controllers and remote PROFIBUS compatible automation or field devices. SIMATIC S5 programmable controllers can also communicate with each other with this type of data transmission, although for this situation, data transmission via S5-S5 links is much easier to handle (refer to Chapter 7).
B8976060/02 5.3 Selecting the Type of Communication Data Transmission with Global I/Os (GP) Data transmission with global I/Os (I/O interface) is suitable for communication between SIMATIC S5 PLCs. The data transmission using global I/Os is suitable for the transmission of single bytes between active SIMATIC S5 programmable controllers. Data with the following characteristics can be transmitted: ➣ Small volumes of data ➣ Time-critical data ➣ Data with few changes.
Selecting the Type of Communication B8976060/02 Special features: With this type of communication, the base interface is always used. Data is only transmitted when the status of bytes has changed. If you use GP, global objects must also be configured on the CP as well as the input/output bytes. ☞ Configured I/O bytes must not overlap the addresses of inserted I/O cards.
B8976060/02 5.4 Selecting the Type of Communication Data Transmission with Cyclic I/Os (ZP) (CP 5430 TF) Data transmission with cyclic I/Os is suitable for communication between SIMATIC S5 PLCs and PROFIBUS compatible field devices. The field devices are passive stations that cannot access the bus themselves and must normally be polled cyclically by active L2 stations. The "cyclic I/Os (ZP)" type of data transmission is easy to use, i.e.
Selecting the Type of Communication 5.5 B8976060/02 Data Transmission with Distributed I/Os (DP) Data transmission via L2-DP (distributed I/Os) provides a standardized interface for communication between SIMATIC S5 PLCs and field devices (DP slaves). Data transmission with DP is simple to handle. For the user, the programming and handling is reduced to a minimum.
B8976060/02 5.6 Selecting the Type of Communication Communication with TF (CP 5430 TF) Owing to its complexity, TF communication is discussed in detail in Volume 2 (CP 5430 TF). This section simply provides an overview of the services available and their advantages. For more information about the model and programming, refer to Volume 2 (CP 5430 TF). The SINEC technological functions (TF) form the application protocol (layer 7 ISO/OSI) for communication in a heterogeneous automation network with the CP.
Selecting the Type of Communication B8976060/02 program development (the system grows with the requirements of the user) and also means a reduction of training costs. ➣ Bridges can be implemented without problems. ➣ By using TF, the time and expense of software development can be greatly reduced. Advantage of using the TF infrastructure ➣ Increased reliability with logical acknowledgment of messages. ➣ Chronological and logical monitoring of the TF jobs.
B8976060/02 5.7 Selecting the Type of Communication Communication with FMS (CP 5431 FMS) FMS communication is discussed in detail in Volume 2 (CP 5431 FMS). Here, there is only a overview of the services available. For further information about the model and configuring, refer to Volume 2 (CP 5431 FMS). SINEC L2-FMS (Fieldbus Messaging Specification), is the version for application with the completely standardized PROFIBUS.
NOTES
B8976060/02 6 Basics of Configuration Basics of Configuration with NCM To configure the CP you require the corresponding software package COM 5430 TF/COM 5431 FMS, simply called COM from now on, which can be run on all PGs with S5-DOS Stage VI (or higher) or on PC/ATs with S5-DOS Stage VI. The COM under SINEC NCM (Network and Communication Management) allows menu-controlled programming of all the required parameters for the CP.
Basics of Configuration 6.1 B8976060/02 SINEC NCM To make it easier to handle the increasing number of different configuring and test tools, SINEC COM products now have the management interface SINEC NCM. SINEC NCM is the menu manager which unites the COMs of completely different end systems under one user interface. The SINEC NCM user interface has the following characteristics: ➣ Configuring is made more understandable and clearer by the method of representation.
B8976060/02 6.1.1 Basics of Configuration The Keyboard Functions are executed using standard keys or key combinations. The following list shows the assignment of the most commonly used COM functions to the keys on the PG/PC keyboard.
Basics of Configuration 6.1.2 B8976060/02 Menu Structure and Operation This chapter briefly explains the structure, functions and operation of SINEC NCM. The user interface is designed so that a menu bar is displayed in which you can see all the function groups as a menu item, which provides for programming and testing. The bottom edge of the screen contains the help line, in which a specific help text is available for each pull-down menu item (explanation see Fig. 6.1).
B8976060/02 Basics of Configuration ➣ Explanation of the menu bar and the individual pull-down menus. From the menu bar you can obtain all the menu items. The menu items in the menu bar represent a group of functions. The pull-down menu items represent the operations or commands used to activate the individual COM function screens. The NCM selection menu is no longer visible when a COM function screen has been activated by a pull-down menu item.
Basics of Configuration 6.1.3 B8976060/02 COM Screen Layout and Operation The COM software is operated exclusively via screens and softkey menus. The softkey menus display the possible branches and functions that can be triggered by the function keys F1 to F8. The four cursor keys (arrow keys left, right, up, down) are used to position the cursor within a screen. The input fields in the screens are completed using the ASCII keyboard. The OK key validates the string you have input.
B8976060/02 Basics of Configuration Screen title bar: Screen name: Description of the path in abbreviated form, e.g. "Init Edit" Context: Screens specific to the CP: name of the CP otherwise SINEC NCM Source: Module file/bus parameter file/path name Message line: Current messages are described in the line above the softkeys (warnings, errors, operating instructions etc.). A message remains displayed until you press a key. Keys: Function keys F1 to F8 for activating functions.
Basics of Configuration B8976060/02 ➣ Once you have processed a screen completely and want to enter the data, press F7 or the enter key to transfer the data to the database displayed as the "source". discards your entries and aborts the function.
B8976060/02 6.1.4 Basics of Configuration Special Windows These windows are used by NCM to provide help and information and are displayed automatically or after selecting a pull-down menu item of the INFO menu item ’=’. Explanatory screen Special window This is a help text or a copyright display OK This is a message F F F F F F F 1 2 3 4 5 6 7 Fig. 6.
Basics of Configuration 6.2 B8976060/02 Installation and Start Free working memory capacity of at least 590 Kbytes is required to use SINEC NCM. Make sure that you have enough free space on the hard disk. You should make approximately 1.2 Mbytes of hard disk available per COM (see the Readme file). When you install the COM under MS-DOS, the installation tool checks that there is sufficient space. Procedure: ✔ Start the operating system. ✔ Insert the COM diskette in a floppy disk drive.
B8976060/02 Basics of Configuration ✔ Call the command interpreter (KOMI) with >S5, then press the or key. – Selecting the package under S5 DOS stage V Activate SINEC NCM in the KOMI screen with the "package selection" key (or or OK) (for more detailed information, refer to the S5-DOS manual). – Selecting the package under S5 DOS stage VI Under the "OTHERS" menu item, you can navigate to the COM 5430/5431 directory.
Basics of Configuration 6.3 B8976060/02 General Guidelines for Working with your Software When designing your bus system, follow the procedure outlined below: ➣ Find out how many PLCs and field devices are required for your application. Assign the L2 station addresses carefully since renaming the L2 station addresses once you have configured them is time consuming. ➣ All the configuration data should be stored in one file, i.e. whenever possible, work "OFFLINE FD" with the PG hard disk.
B8976060/02 Basics of Configuration With ONLINE, you select the ONLINE functions of the COM. It is assumed that the PG is connected directly to a CP or to a remote bus station via a bus selection path (bus selection utility). The selected ONLINE functions basically provide the same possibilities as with the OFFLINE functions on the hard disk. The content of the submodule is organized as follows: SYSID Subfield 1 Subfield 2 .
Basics of Configuration 6.4 B8976060/02 Overview of Basic Configuration To provide you with an overview of the structure and procedures involved in configuration, these aspects are explained in more detail in this section which is then followed by an example. Opening display Copyright 1st time direct change to initial screen form otherwise Initial screen form Init->Edit = Init Edit ...
B8976060/02 Basics of Configuration When you first call SINEC NCM, the screen Init -> Edit appears automatically. Unless this screen is filled out correctly and completely, you cannot proceed any further. Once you exit SINEC NCM with a correct initialization screen, you no longer automatically obtain this screen and can only select it from a menu, for example to change the CP type and to load a different COM.
Basics of Configuration B8976060/02 2. Edit -> CP Init basic initialization (SYSID) block Here you program the system parameters which describe the general allocation of the CP to a programmable controller. The parameters also provide information about the firmware and software version of the CP. 3. Edit -> Global/Local Network Parameters "network parameters/network initialization" Here you can specify the network parameters. These include various processing times and the highest L2 station address.
B8976060/02 Basics of Configuration 6.5 Screens for Basic Configuration 6.5.1 Editing When you first call SINEC NCM, you are requested to select a CP type in the Init-Edit screen. Using the selection function, you can select the required CP type from a list. The name of the module then appears in the title line. You can then only exit this screen when all the required parameters have been set or you abort the function with .
Basics of Configuration B8976060/02 Input fields: CP type: Here, you can choose between the various CPs integrated in SINEC NCM: (possible selections: e.g. CP 5430 TF, CP 5431 FMS, CP 5412, CP 5470) Status: The status decides whether the next executable functions are performed: (possible selections: ONLINE CP, OFFLINE FD) description in Section 6.3 Database file: Format: drive : database - Drive: Here, you specify the drive you want to work with. If you press F8 the possible drives are displayed.
B8976060/02 Basics of Configuration Documentation: Footer: With this you decide whether you want a footer printed out at the end of each page (refer to footer file, possible selections: ON/OFF). Printer output: Controls the output either only on the screen or on the printer and screen (possible selections: ON/OFF). Printer file: Format: drive : printer file - Drive: Here, you specify the drive you want to work with. If you press F8 the possible drives are displayed.
Basics of Configuration B8976060/02 Function keys F7 OK The "OK" function key enters the data. If the module file does not yet exist it is set up after confirmation. F8 SELECT If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely. Select entries from the list with the cursor keys and enter them in the field with the return key.
B8976060/02 Basics of Configuration ➣ Transfer of parameters which define certain responses of the module. ➣ Display of the firmware version of the module. When you set up a new module file, the screen is automatically displayed for entering the Submodule size and Base SSNR. Select Edit -> CP Init to call the COM screen. The screen is structured as shown below:: Edit - CP Init Basic Initialization SINEC NCM Source: SIMATIC details : Init.
Basics of Configuration B8976060/02 Active / passive The CP 5430 TF/CP 5431 FMS must be active. Network file Here, the local system is assigned to a network. The network is managed independently of the database. As the default, the name of the last network processed is displayed. The assignment to a network is necessary to establish a consistent bus parameter field in all the databases belonging to the network using the menu item Network -> Network Matching.
B8976060/02 Basics of Configuration Date created: Date (max. 8 ASCII characters) Plant designation: Designation of the plant (possible selections: ASCII characters). Output fields Submodule type: This parameter is updated in the online mode and is used to display the read submodule type. The following memory types are allowed: "RAM", "EPROM". Module ID: The module ID is entered by the firmware when an upload is performed. The COM enters the expected module ID.
Basics of Configuration 6.5.3 B8976060/02 Network Parameters If you do not make entries in the network parameter screens, the COM automatically enters the default values. The network parameters are fundamental to the functioning of the whole network and the individual stations. When configuring the network parameters the following distinction is made: ➣ configuring global network parameters ➣ configuring local network parameters.
B8976060/02 6.5.3.1 Basics of Configuration Global Network Parameters In this screen you can modify the bus parameters for the whole network. The screen is divided into three logical areas, as follows: ➣ Cumulative topology data ➣ Bus parameters ➣ Bus parameter data. The first two areas contain information for calculating the default bus parameter values. With F1 , you can obtain these default values.
Basics of Configuration B8976060/02 Input fields Cumulative topology info: No. of remote active stations The number of active stations not included in the topology file. These are normally stations of other manufacturers. This parameter is required to calculate the bus parameter field. (Range of values: 0..(HSA (number of configured active stations.)) Highest station address (HSA): Highest Station Address, specifies the highest station address of an active station in the bus system.
B8976060/02 Basics of Configuration Setup time (TSET): Minimum "dead time" between the reception of an acknowledgment before sending a new call frame by the initiator (range of values: 1 to 255 bit times*) (see Table 6.1). Minimum station (Minimum protocol processing time) delay (min TSDR): A remote responder must not send an acknowledgment of a received call frame until this time has elapsed.
Basics of Configuration B8976060/02 Function keys F1 CALCULATE F7 OK The "OK" function key enters the data. If the module file does not yet exist it is set up after confirmation. F8 SELECT 6.5.3.2 This key triggers the calculation of the bus parameter databased on the information. If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely. Select entries from the list with the cursor keys and enter them in the field with the return key.
B8976060/02 Basics of Configuration Select Edit -> Local Network Parameters to call the COM screen. The screen has the following layout: Edit Local Network Parameters Source: SINEC NCM (EXIT) L2 station address : Cumulative topology data : Highest station address (HSA) : Bus parameters : Data rate : Default SAP : Maximum no.
Basics of Configuration B8976060/02 Default SAP: When an L2 frame is received without a destination SAP number, the layer 2 firmware automatically selects the default SAP. Maximum no. of retries Call repetition counter for unsuccessful transmission. It specifies how often a call is repeated by the initiator when no correct acknowledgment frame has been received (range of values: 1 to 8).
B8976060/02 Basics of Configuration Maximum station (Maximum protocol processing time) delay (max. TSDR): An initiator must wait at least this time after transmitting before sending a further call frame. The largest time between receiving the last bit of a frame to transmitting the first bit of the next frame (range of values: 1 to 1024 bit times*) (see Table 6.1). Target rotation time (TTR): Preset target rotation time within which the token must pass round the logical ring.
Basics of Configuration B8976060/02 Function keys: F7 OK F8 SELECT The "OK" function key enters the data. If the module file does not yet exist it is set up after confirmation. If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely. Select entries from the list with the cursor keys and enter them in the field with the return key.
B8976060/02 6.5.4 Basics of Configuration Network Functions Under the main menu item Network, you can call all the functions for the network. sind. Init Edit = Network Transfer Test Utilities Network Overview Network Matching GP Consistency Default S5-S5 Links Documentation Archive SINEC CP 54xx > Overview of the module files in a network file F F F F F F F F 1 2 3 4 5 6 7 8 Fig. 6.
Basics of Configuration 6.5.4.1 B8976060/02 Network Overview The network overview displays all the database files belonging to a network (i.e. nodes) in a list. By selecting a node, you can start the required COM. SINEC-NCM (EXIT) Source: NETZ1NCM.NET Network - Network Overview No. of stations: 3 Highest station address (HSA): 31 Node name / database file L2 address Q11 11 Type CP 5431 Q21 21 CP 5430 Q11 17 DPSLAVE F PAGE + F PAGE - F F F 1 LINE + 2 LINE - 3 4 5 Fig. 6.
B8976060/02 Basics of Configuration L2 address: Bus address of the station Bus station type: CP or DP slave Function keys: SHIFT F1 PAGE + Page one page down SHIFT F2 PAGE - Page one page up F1 LINE + Page one line down F2 LINE - Page one line up F5 DELETE F7 OK F8 SELECT Delete database file Start the selected COM Select a new network file 6 - 35 Volume 1
Basics of Configuration 6.5.4.2 B8976060/02 Network Matching In the global network parameters screen you can define all the bus parameters for all stations on the network. These bus parameters can be transferred to all the databases belonging to the network using Network -> Network Matching. The global network parameters screen is only supported OFFLINE. It is advisable to define all the network stations first and then finally to edit and match the global network parameters.
B8976060/02 Basics of Configuration - Network file: Here, a network file is displayed whose name was assigned in the Edit -> CP Init screen and which contains bus parameters created with Edit network parameters. As default, the name of the last processed network is displayed (possible selections: alphanumeric characters and the period, format: xxxxxNCM.NET only the characters in the name marked with x are freely selectable. If you type in more characters, a message is displayed.
Basics of Configuration 6.5.4.3 B8976060/02 GP Consistency This function starts a consistency check of the global I/Os within a network file. If the check detects that GP output bytes overlap, an error message is displayed. You can now decide whether the GP output byte will be deleted in station A or B or whether the function should be canceled. The GP input bytes are also checked in the same way. If an unreferenced GP input byte is found (i.e.
B8976060/02 Basics of Configuration - Network file: As default, the name of the last network you worked on is displayed. Update: Range of values: CYCLE SYNCHRONIZED: All configuration settings are set to cycle synchronized. FREE: All configuration settings are set to free. NO CHANGE: No changes are made. Output field: Status: Displays the status of the consistency check. File: Displays the name of the database file being checked for consistency.
Basics of Configuration 6.5.4.4 B8976060/02 Default S5-S5 Links This menu item allows simple configuration of an S5-S5 link.
B8976060/02 Basics of Configuration Input field: Network file: Format: Drive : Network file name - Drive: Here, you specify the drive you want to work with. You can display possible drives with F8. - Network file name: As default, the name of the last network you worked on is displayed. Selection: All: S5-S5 links are generated for all databases in the network file. CP 5430: Only the default S5-S5 links for CP 5430 database files are generated.
Basics of Configuration 6.5.4.5 B8976060/02 Network Documentation This function provides you with global network documentation of the various services. = Init Edit Network Transfer Test Utilities SINEC CP 54xx Network Overview Network Matching GP Consistency Default S5-S5 Links Documentation Archive All Topology ZP CI GP DP Application Associations FMS Links Output all Fig. 6.
B8976060/02 Basics of Configuration The following documentation filters are available: All: complete documentation of the network (starting with the network overview list). Topology: output of the network overview list. ZP: output of the ZP configuration (CP 5430 TF) incl. I/O area. CI: output of the CI configuration (CP 5431 FMS) incl. I/O area. GP: output of the GP configuration (CP 5430 TF/CP 5431 FMS) incl. I/O area. DP: output of the DP configuration (CP 5430 TF/CP 5431 FMS) incl.
Basics of Configuration 6.5.4.6 B8976060/02 Archiving With this function, you can archive a whole network on disk. . Netw. - Network Archiving SINEC NCM (EXIT) Network file : C : @@@@@NCM.NET Dest. drive: A Status: F F F F F F F 1 2 3 4 5 6 7 Fig. 6.17 F OK HELP 8 SELECT Archiving Screen Input field: Network file: Format: Drive : Network file name - Drive: Here, you specify the drive you want to work with. You can display possible drives with F8.
B8976060/02 Basics of Configuration Output field: Status: Displays the status of the currently active archiving function. Function keys: F7 OK F8 SELECT Starts the archiving If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely. Select entries from the list with the cursor keys and enter them in the field with the return key.
Basics of Configuration 6.6 B8976060/02 Transfer Functions Using the transfer functions, a parameter set, e.g. a submodule file of a CP created locally can be transferred. The commands start, stop and delete are used. In addition to this, it is possible to transfer data from one file to another and to transfer files to the PLC.
B8976060/02 Basics of Configuration In the ONLINE mode, the transfer is between the hard disk (= FD) and the memory submodule of the CP. If the memory submodule is an EPROM, only transfer from EPROM to diskette is possible ONLINE. 6.6.1 Start CP / Stop CP / CP Status The CP recognizes the modes RUN and STOP. The RUN mode is the normal operating status of the CP. In this mode, it is not possible to modify the database. It is only possible to read from the CP.
Basics of Configuration 6.6.1.2 B8976060/02 Stop CP Select Transfer -> Stop CP, to call the function. This function changes the CP to the STOP mode. A dialog box which you can exit by pressing a key or clicking with the mouse informs you whether the function was successful or not. 6.6.1.3 CP Status Select Transfer -> CP Status, to call the function. This function allows you to inquire about the CP status.
B8976060/02 6.6.2 Basics of Configuration Delete CP With the delete CP command, you can delete the content of a RAM submodule. To prevent you deleting data accidentally, this command must be confirmed. Select Transfer -> Delete CP to call the COM screen. The screen has the following layout: Init Edit = Network Transfer Test Utilities SINEC CP 54xx Delete CP ? F 1 YES Fig. 6.
Basics of Configuration 6.6.3 B8976060/02 Delete FD With the Delete FD command you can delete the contents of a database file. To prevent data being accidentally deleted, this command must be confirmed. Select Transfer -> Delete FD to call the COM screen. The screen has the following layout: = Init Edit Network Transfer Test Utilities SINEC CP 54xx Delete file ? F 1 YES Fig. 6.
B8976060/02 6.6.4 Basics of Configuration CP Database Transfer Select Transfer -> CP Database Transfer, to change to the submenu. 6.6.4.1 FD -> CP Submodule files created OFFLINE are transferred to the CP. The PG must, however, be connected ONLINE (via the PG interface or the bus) with the CP at the time of the transfer. There must be a RAM submodule inserted in the CP. As the submodule file, the database file specified in the Init -> Edit screen is used.
Basics of Configuration B8976060/02 Function keys: F1 SINGLE The blocks are transferred singly to the CP. For the meaning of the individual blocks refer to Fig. 6.27/6.28 in this chapter. F2 TOTAL The blocks are all transferred to the CP. F8 SELECT ☞ If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely. Select entries from the list with the cursor keys and enter them in the field with the return key.
B8976060/02 6.6.4.2 Basics of Configuration CP -> FD The submodule files are transferred from the CP to FD. The PG must, however, be ONLINE with the CP at the time of the transfer. The default destination file is the database file specified in the Init -> Edit screen. Select CP Database Transfer -> CP -> FD, to call the COM screen. The screen has the following layout: CP type : Source : Transfer - Database - Eprom->FD Dest. file F 1 : F SINGLE Fig. 6.
Basics of Configuration B8976060/02 Output fields: Dest. file This is the file in which the database from the CP is stored. Function keys: F1 SINGLE The blocks are transferred singly to the CP. For the meaning of the individual blocks refer to Fig. 6.28 in this chapter. F2 TOTAL The blocks are all transferred to the destination file. F8 SELECT Volume 1 If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely.
B8976060/02 6.6.4.3 Basics of Configuration FD -> EPROM The data records on FD (diskette or hard disk) are written directly to the EPROM (blown). Select CP Database Transfer -> FD -> EPROM to call the COM screen. The screen has the following layout: Input fields: CP type : Source : Transfer - Database -> Eprom (EXIT) Programming number : F F F F F F F 1 2 3 4 5 6 7 Fig. 6.
Basics of Configuration B8976060/02 Function keys: F7 OK The data are transferred to the EPROM. F8 SELECT 6.6.4.4 If you press this key, a selection list is displayed with possible entries for fields. Select entries from the list with the cursor keys and enter them in the field with the return key. EPROM -> FD The data records on the EPROM are copied directly to the default database file. Select CP Database Transfer -> EPROM -> FD to call the COM screen.
B8976060/02 Basics of Configuration Output fields Dest. file This is the file in which the database from the EPROM is stored. Function keys: F7 OK 6.6.4.5 All the data are read from the EPROM and stored in the destination file. FD -> FD This function is used to duplicate the source in the destination file. Select CP Database Transfer -> FD -> FD to call the COM screen. The screen has the following layout: CP type : Source : Transfer - Database Dest. file : F 1 : F SINGLE Fig. 6.
Basics of Configuration B8976060/02 Input fields: Dest. file Here, you specify the drive (e.g. A: for floppy disk or B: for a hard disk) and the name of the destination file (possible values drive: "A" to "Z", file name: alphanumeric characters and the period). Function keys: F1 SINGLE The data are read from the EPROM into the destination file in blocks. Refer to Figs. 6.27 and 6.28 in this chapter for the meaning of the individual blocks.
B8976060/02 6.7 Basics of Configuration Link Configuration This menu item is available in all SINEC NCM COMs but the screen layout differs depending on the protocol or type of data transmission and is therefore described in the relevant chapters.
Basics of Configuration 6.8 B8976060/02 Basic Configuration For basic configuring, the software package COM 5430 TF/COM 5431 FMS is used under SINEC NCM. The screens required for basic configuration are provided by SINEC NCM as illustrated in Fig. 6.26. = Init Edit ... SINEC NCM Menu item Init Menu item Edit Network-> Network matching screen Initial screen Init->Edit Screen (SYSID) Edit->CP Init Fig. 6.
B8976060/02 Basics of Configuration General Procedure: During configuration, the following must be done for each station: ➣ A database file must be assigned in the Init -> Edit screen per station and the status OFFLINE entered. ➣ The Edit -> CP Init screen must be completed, i.e.
Basics of Configuration 6.8.1 B8976060/02 Block Overview CP 5430 TF Block Meaning PB1 Link list for S5-S5 links PB2 GP inputs PB3 GP outputs PB4 ZP list PB7 DP list OB2 SAP list for FL2 access OB3 Start I/O area I/Os list OB5 Variable description VMD OB6 Configuration parameters OB8 Network data return reference VB 0...X TF data link block UB1 (UL1) Initialization block (bus parameter field) Fig. 6.
B8976060/02 6.8.2 Basics of Configuration Block Overview CP 5431 FMS Block Meaning PB1 Link list for S5-S5 links PB2 GP inputs PB3 GP outputs PB5 ZI list PB7 DP list OB2 SAP list for FL2 access OB3 Start I/O area I/Os list OB5 Variable description VMD OB8 Network data return reference VB 0...X FMS data link block UB1 (UL1) Initialization block (bus parameter field) Fig. 6.
NOTES
B8976060/02 7 S5-S5 Communication Data Transmission Using Configured S5-S5 Links This chapter describes how to transmit data using handling blocks via configured S5-S5 links. The following aspects are explained: ➣ The applications for which this type of data transmission is suitable. ➣ The principles of this type of data transmission. ➣ What is meant by "links" between the stations on the bus.
S5-S5 Communication 7.1 B8976060/02 Basics of Data Transmission Configured S5-S5 Links with HDBs on The following applies for the CP 5430 TF/CP 5431 FMS: The firmware of the module generates frames from the data records of the SIMATIC S5 PLC which meet the requirements of the PROFIBUS standard. The services of the first and second layers of the ISO/OSI reference model are used.
B8976060/02 S5-S5 Communication Link to station with L2 address with SEND-ANR and RECEIVE-ANR 1 2 1 101 2 3 2 102 3 4 3 103 . . . . . . . . 31 32 31 131 Table 7.1 ☞ via LSAP no. SAP-ANR (Job Numbers) - Assignment Proposed by COM Make sure there can be no overlapping of job numbers and LSAPs for FMS links. COM 5431 FMS does not check this automatically. Checking data transmission in the control program If frames are transmitted by a PLC, the PLC expects an acknowledgment.
S5-S5 Communication 7.1.1 B8976060/02 Sequence of the Data Transmission Figs. 7.1 to 7.3 are schematics showing how the relevant bits of the ANZW change during correct or incorrect data transmission. The transmitting L2 station is defined as "local", the receiving L2 station as "remote". Control program sender SSNR ANR FB ANZW S5-Adr. SEND CP BUS CP Control program receiver PAFE e.g. :DB (data) Anzw = RECEIVE possible Anzw = Job_active SSNR ANR ANZW PAFE RECEIVE S5 add.
B8976060/02 S5-S5 Communication If errors occur during the data transmission, the acknowledgment may be from either the remote or local CP depending on the error. Control program sender SSNR ANR FB ANZW S5 add. SEND CP BUS CP PLC (remote) PAFE e.g..:DB (data) Anzw = Job_active Anzw = Job_complete_with_error Fig. 7.2 Job Processing with Error Message from Local CP CP Control program sender SSNR ANR ANZW S5 add. BUS CP PLC (remote) FB SEND PAFE e.g..
S5-S5 Communication 7.1.2 B8976060/02 Checking with ANZW and PAFE The status word is part of a double word specified in the calling HDB. The second part of the double word is formed by the length word which indicates how much data has already been transferred for the current job. Following synchronization, the status words of all the HDBs (ANR) assigned parameters with COM 5430 TF/COM 5431 FMS contain the value 0008H.
B8976060/02 Bits 8 -11 S5-S5 Communication Meaning of the error bits 0H No error. If bit 3 "job complete with error" is nevertheless set, this means that the CP has set up the job again following a cold restart or RESET. 1H Wrong type specified in block call (QTYP/ZTYP). 2H Memory area does not exist (e.g. not initialized). 3H Memory area too small. The memory area specified in the HDB call (parameters Q(Z)TYP, Q(Z)ANF, Q(Z)LAE) is for too small for the data transmission. 4H Timeout (QVZ).
S5-S5 Communication Bits 8 -11 B8976060/02 Meaning of the error bits 9H Remote error. The remote CP has acknowledged the job negatively because e.g. the SAP assignment is incorrect. Remedy: reassign parameters for the link. AH Connection error. The sending PLC or receiving PLC is not connected to the bus. Remedy: switch systems on/off or check bus connections. BH Handshake error. The HDB processing was incorrect or the HDB monitoring time was exceeded. Remedy: start the job again.
B8976060/02 S5-S5 Communication Error number 7 6 5 4 3 2 1 0 0 - no error 1 - error 0 - no error 1 - wrong ORG format /ZTYP illegal (PLC or CP) 2 - area does not exist (DB does not exist/illegal) 3 - area too short 4 - QVZ (timeout) error no access possible 5 - wrong status word 6 - no source or destination parameters for SEND/RECEIVE 7 - interface does not exist 8 - interface not ready 9 - interface overload A - interface busy with other modules B - illegal ANR C - interface (CP) not acknowledging or n
S5-S5 Communication 7.2 B8976060/02 Configuring To assign parameters for S5-S5 functions, the software package COM 5430 TF/COM 5431 FMS is used under SINEC NCM. The screen forms required in addition to the basic initialization screen forms for assigning parameters are provided by SINEC NCM as shown in Fig. 7.7: ➣ Link editor ➣ Documentation and test functions. = Init Edit ... Documentation and SINEC NCM Menu item Edit S5-S5 Link Editor Links ->S5-S5 Links Dealt with in separate chapters Fig. 7.
B8976060/02 S5-S5 Communication General procedure: To implement a simple task (transferring data from PLC 1 to PLC 2 via pre-configured links with HDBs) the following procedure is required: ➣ The links between the PLCs must be configured (as mentioned in the general guidelines). For planning the link, refer to Characteristics of the S5-S5 Link (Section 7.2.1). ➣ Assigning parameters to the individual CP modules. This involves creating the SYSID and INIT blocks (refer to Chapter 6).
S5-S5 Communication B8976060/02 These links are either saved in a submodule file (offline mode) or written directly to the CP submodule or modified there (online mode). This means that submodule files created offline can also be loaded on the CP or that the contents of the CP submodule can be saved in a file. Select Edit -> Links -> S5-S5 Links to call the following screen.
B8976060/02 S5-S5 Communication "High": frames with this priority are given preference during data exchange. This means that if an L2 station has no more token time available when it receives the token, it can still transmit a high priority frame. "Interrupt": these frames are handled just like high priority frames during data exchange. They also trigger an interrupt in the receiving PLC (IR-A/B/C/D). SSAP: Local (Source) Service Access Point. (range of values: 2 .. 33).
S5-S5 Communication B8976060/02 Function keys: F1 +1 Page forwards through the links for several S5-S5 links. F2 -1 Page backwards through the links for several S5-S5 links. F4 INPUT Prepare next input. F5 DELETE Delete the input link. F7 OK F8 SELECT Volume 1 Enter the data in the link block. If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely.
B8976060/02 7.3 S5-S5 Communication Example of a Program for an S5-S5 Link The aim of the example is to set up a communication system that allows simple control of the activity on a SINEC L2 bus system. It should be possible to formulate the basic information required to set up and operate a SINEC L2 bus system and to control the activity on the bus system. The example illustrates how to program the CPU and assign parameters for the CP as well as triggering and checking the data transmission.
S5-S5 Communication B8976060/02 The following software packages are also required: ➣ COM 5430 TF/COM 5431 FMS under SINEC NCM ➣ PG software for STEP 5 programming ➣ Appropriate handling blocks for the PLCs ➣ Diskette with the example program. PLC1 (S5-155U) P L C C P PLC2 (S5-115U) PG interface (AS511) P L C C P L2 interface PG interface (AS511) . Bus terminal 1 with terminal cable Fig. 7.10 Volume 1 Terminator activated Bus cable .
B8976060/02 7.3.1 S5-S5 Communication Outline of the Task Data from PLC 1 will be transmitted via configured links using HDBs to PLC 2 and data will be transmitted via configured links using HDBs from PLC 2 to PLC 1. The following tasks must be performed in the individual PLCs: PLC 1 ➣ DW 1 is incremented in DB 10. ➣ After incrementing DW 1, this is transmitted to PLC 2 using the handling block SEND. ➣ HDB SEND is assigned the values ANR = 2 and SSNR = 0. ➣ PLC 1 has the L2 address 1.
S5-S5 Communication B8976060/02 PLC 2 ➣ DW 1 is incremented in DB 20. ➣ After DW 1 has been incremented in DB 20, this is transmitted to PLC 1 using HDB SEND. ➣ HDB SEND is assigned the values ANR=1 and SSNR=4. ➣ PLC 2 has the L2 address 2. ➣ The data sent from PLC 1 are received in PLC 2 and stored in DB 22. ➣ HDB RECEIVE is used for this. The HDB is assigned the values A-NR=101 and SSNR=4.
B8976060/02 7.3.1.1 S5-S5 Communication Program for PLC 1 (S5-155 U) When the PLC starts up, the CP interface is synchronized with the SYNCHRON handling block. PLC 1 increments data word DW 1 in DB10 and then transmits it to PLC 2. Once the job is completed, i.e. the status of the ANZW is "complete without error", the data word is incremented again and transmitted to PLC 2. Transmission is triggered in PLC 1 with a SEND HDB. This is called in FB 2.
S5-S5 Communication 7.3.1.2 B8976060/02 Program for PLC 2 (S5-115 U) The CP interface of PLC 2 must also be synchronized during start-up using the SYNCHRON handling block. The SYNCHRON calls must therefore be programmed for the PLC used in blocks OB 21 (for manual warm restart) and OB 22 (warm restart following power down). The synchronization is triggered and checked in FB 111 STARTUP (not a standard FB). If an error occurs, a flag bit is set which can be evaluated by the user program.
B8976060/02 S5-S5 Communication When using the CP 5431 FMS under the network file AGAGQNCM.NET – for station 1 QAGAG.155 – for station 2 QAGAG.115. ➣ Transfer the following STEP 5 files to the programmable controllers you are using: – For PLC 1 (S5-155U) the file AGAGT1ST.S5D – For PLC 2 (S5-115U) the file AGAGT2ST.S5D.
S5-S5 Communication 7.3.3 B8976060/02 Monitoring the Data Transmission The data transmission can be monitored best by using two PGs. Connect one PG to one CPU and display the data blocks, the status word (ANZW) and the parameter assignment error byte (PAFE) with which the data transmission can be monitored. The following table lists the blocks, flag words and flag bytes relevant for checking this example.
B8976060/02 8 Free Layer 2 Communication Data Transmission by Direct Access to Layer 2 Services This chapter explains the following aspects: ➣ The devices and applications for which "data transmission by direct access to layer 2 services" is suitable. ➣ How this type of data transmission functions. ➣ How this "link" is configured with COM 5430 TF/COM 5431 FMS and how to assign parameters for the CP 5430 TF/CP 5431 FMS module (example program in Section 8.4).
Free Layer 2 Communication 8.1 Basics of Services B8976060/02 Data Transmission using Layer 2 The following applies to the CP 5430 TF/CP 5431 FMS: The firmware of the modules generates S5 frames from the data records of the SIMATIC S5 PLC which comply with the requirements of the PROFIBUS standard. The services of the first and second layer of the ISO/OSI reference model are used. The services of layer 2 are also known as FDL (Fieldbus Data Link) services.
B8976060/02 8.1.1 Free Layer 2 Communication FDL Services implemented in a CP 5430 TF/CP 5431 FMS for Data Transmission The layer 2 firmware of the CP 5430 TF/CP 5431 FMS provides various services for reliable data transmission which can be used in the control program. In concrete terms this means that the control program can request layer 2 data transmission services and can evaluate confirmations (and error messages) made available by this layer.
Free Layer 2 Communication B8976060/02 Using the services for the actual data transfer The data to be transmitted (max. 242 bytes "net data") and the received data (also max. 242 bytes) should be stored in a data block; it can, however, also be stored in the flag area. The data to be transmitted and received is always preceded by an 8 byte header containing control and status information for the layer 2 firmware.
B8976060/02 Free Layer 2 Communication Byte Header 0 com_class 1 user_id 2 service_code 3 link_status 4 service_class 5 DSAP/RSAP 6 rem_add_station 7 rem_add_segment 8 Data 249 Fig. 8.
Free Layer 2 Communication service_code: B8976060/02 1 byte, format: KH This identifies the type of service requested for the transmitting job buffer: SDA=00H SDN=01H SRD=03H RPL_UPD_S=06H RPL_UPD_M=07H This identifies the type of service provided by layer 2 for the received job buffer. SDA=00H SDN=01H SRD=03H only with FDL confirmation: RPL_UPD_S=06H RPL_UPD_M=07H only with FDL indication: SDN_MULTICAST=7FH link_status: 1 byte, format: KH Table 8.1 describes the link_status for a confirmation Table 8.
B8976060/02 rem_add_station: Free Layer 2 Communication 1 byte, format: KH When transmitting, this indicates the station address of the receiver station, coded in hexadecimal. When receiving, this indicates the station address of the transmitting station, coded in hexadecimal.
Free Layer 2 Communication Value of Abbreviation link_status PROFIBUS B8976060/02 Meaning SDA 00H 01H 02H OK UE RR 03H 11H 12H RS NA DS positive acknowledgment, service executed. positive acknowledgment, remote user/FDL interface error positive acknowledgment, resources of the remote FDL controller not available. service or rem_add on remote SAP not activated. no reaction (Ack./Res.) from the remote station. local FDL/PHY not in the logical token ring or not connected to bus.
B8976060/02 Value of link_status Free Layer 2 Communication Abbreviation PROFIBUS Meaning SRD (Indication) 20H LO in this SRD exchange, the reply was with low priority data. 21H HI in this SRD exchange, the reply was with high priority data. 22H NO_DATA in this SRD exchange, no reply data were sent Table 8.2 8.1.
Free Layer 2 Communication CPU memory B8976060/02 CP 5430 HDB (SEND) Firmware Header layer1 Data field HDB (RECEIVE) Fig. 8.2 L2 frame layer2 Basic Sequence of Communication using Free Layer 2 Access The link to communication end points is via so-called channels. To communicate via the free layer 2 access, a link must be configured using "channels" with the link editor (Section 8.3.1).
B8976060/02 Free Layer 2 Communication SIMATIC S5 PLC PROFIBUS-compatible L2 station (REMOTE) (LOCAL) CP CPU Control program ANR SAP no. layer 2 Channel services layer 2 services LOCAL SAP Fig. 8.3 SAP no. Control program REMOTE SAP Access to Layer 2 Services via Service Access Points (SAPs) With the link editor you specify the following: ➣ The interface number ➣ The assignment between: – SEND/RECEIVE job numbers ANR (range: 134 to 186).
Free Layer 2 Communication ☞ B8976060/02 The firmware of the CP 5430 TF/CP 5431 FMS activates all the specified SAPs for the services SDA, SDN and SRD (both for the initiator and responder functions). The L2 address range of the remote station is not restricted.
B8976060/02 8.1.3 Free Layer 2 Communication Handling the Individual Data Transmission Services from the Point of View of the Control Program The SEND block can be used to transfer an FDL request. FDL confirmations or FDL indications are accepted in the PLC with a RECEIVE HDB. Via the bits in the status word which can be updated with the CONTROL block, the SEND or RECEIVE HDBs can be controlled.
Free Layer 2 Communication B8976060/02 The status word is part of a double word defined by the parameter ANZW in the HDB call. The second part of the double word is the length word which indicates how many data have already been transferred for the current job. The structure of the status word is basically identical to that for S5-S5 communication, however, it is handled differently.
B8976060/02 Free Layer 2 Communication If the bit "job complete with error" is set in the status bits, the "error bits" provide the coding of the cause. With the "channels" only the PLC error is indicated (error numbers 1 to 6). Errors processing an FDL request are transferred with the corresponding confirmation. The error number 15 (0FH) is set by the CP when the corresponding SAP was not enabled. With this number, the bits "job complete with error" and "job active" are also set (ANZW 0F0AH).
Free Layer 2 Communication Bits 8-11 B8976060/02 Meaning of the error bits 0 No error. If bit 3 "job complete with error" is nevertheless set, this means that the CP has set up the job again following a cold restart or RESET. 1 Wrong type specified in block call (QTYP/ZTYP). 2 Memory area does not exist (e.g. not initialized) 3 Memory area too small. The memory area specified in the HDB call (parameters Q(Z)TYP, Q(Z)ANF, Q(Z)LAE) is too small for the data transmission. 4 Timeout (QVZ).
B8976060/02 Free Layer 2 Communication Structure of the parameter assignment error byte The parameter assignment error byte (PAFE) informs you about various parameter assignment errors. When you assign parameters to the individual blocks, you specify the address at which this information is available. The meaning of the individual bits is explained in Fig. 8.6.
Free Layer 2 Communication 8.1.5 B8976060/02 Sequence of the Data Transmission To understand how the services are handled, the following section shows how a data exchange must be coordinated in the control program depending on the data transmission service used. It is assumed that the transmitter and receiver are SIMATIC PLCs which exchange data via the CP 5430 TF/CP 5431 FMS. Data are transmitted with the SEND HDB, data and acknowledgments (confirmation, indication) are received with the RECEIVE HDB.
B8976060/02 Free Layer 2 Communication Start-up OBs for SIMATIC S5 PLCs You must call the SYNCHRON handling block for the interface number of the CP 5430 TF/CP 5431 FMS in the start-up OB.
Free Layer 2 Communication Control program sender SSNR FB ANR SEND ANZW SDAS5 add. PAFE Request e.g..:DB Header DATA Anzw = Job_active B8976060/02 CP BUS CP 1 2 (data) (...5 H ) Anzw = RECEIVE possible (...1H ) or if previously (...4 H ) 3 SSNR ANR FB ANZW PAFE RECEIVE S5 add. (...2 H ) Anzw = Job_active receive possible (...3 H ) 4 SSNR ANR FB ANZW S5-Adr. RECEIVE Control program receiver 5 e.g..:DB Header PAFE DATA e.g.
B8976060/02 Free Layer 2 Communication Transmitting and receiving data without acknowledgment (service: SDN) Sequence of the transmission RECEIVER SENDER Request to layer 2 1 The data preceded by an 8-byte header are sent with the SEND HDB Indication 2 The receiver is informed that data have been received (Evaluation of the status word)) The receiver fetches the 3 received data with the RECEIVE HDB from the CP.
Free Layer 2 Communication Control program sender SSNR FB ANR SEND ANZW S5 add. SDNPAFE Request e.g..:DB Header DATA Anzw = Job_active B8976060/02 CP BUS CP 1 2 (data) (...2 H ) Anzw = Job_active receive possible (...3 H ) 4 SSNR ANR FB ANZW S5-Adr. RECEIVE Control program receiver 5 PAFE B U F F E R (...5 H ) Anzw = RECEIVE possible (...1H ) or if previously (...4 H ) 3 SSNR ANR FB ANZW PAFE RECEIVE S5 add. e.g..:DB Header DATA e.g.:DB Header Anzw = Job_complete_without_error (...
B8976060/02 Free Layer 2 Communication With the RPL_UPD_M service, the data remain in the buffer until the buffer is overwritten. This means that the data can be read out more than once. How the data are written to the buffer: RECEIVER 1 The receiver supplies the buffer with data (responder function), which the sender fetches with the SRD service.
Free Layer 2 Communication CP BUS B8976060/02 (remote) CP 1 B U F F E R as soon as data are read out of the buffer by the sender, it must be filled again (otherwise error message on the sender). This only applies to the service RPL_UPD_S SSNR FB ANR SEND ANZW RPL_UPD_S S5 add. PAFE Anzw = Job active (...2 H) e.g..:DB Header Request data DATA2 Anzw = Receive possible (...3 H ) 2 SSNR ANR ANZW RECEIVE S5 add. FB PAFE e.g..:DB Header Anzw = Job_complete_without_error (...4H ) Fig. 8.
B8976060/02 Free Layer 2 Communication Once the requirements for the SRD service are met, the sender can transmit data to the receiver and fetch the data from the receiver’s buffer. Fig. 8.11 is the logical continuation of the procedure outlined in Fig. 8.10.
Free Layer 2 Communication CP Control program sender SSNR FB ANR SEND ANZW S5 add. SRD request e.g..:DB Header B8976060/02 BUS CP 1 PAFE 2 (data) DATA1 Anzw = Job_active Anzw = RECEIVE possible (...2 H ) (...1H ) or (...5 H ) 4 SSNR FB ANR ANZW RECEIVE PAFE SRD ind S5 add. Anzw = Job_active receive possible (...3 H ) 3 SSNR ANR FB ANZW S5 add. RECEIVE Control program receiver 5 (data) PAFE e.g..:DB Header DATA1 e.g.
B8976060/02 Free Layer 2 Communication Special case: requesting data (service: SRD with 0 bytes of data to be transmitted) Sequence of the transmission If the sender does not have data to transmit to the receiver, but only wants to request data from the receiver, use the SRD service with 0 bytes of data to send. The terms "sender" and "receiver" are retained even if the "sender" has no data to transmit, but only requests data.
Free Layer 2 Communication 8.2 B8976060/02 Transmitting Multicast Messages by Direct Access to Layer 2 Services If the transmitted data are intended for several stations simultaneously (using layer 2 services) you must use the following procedure: ➣ Program the same (local) SAP number (range 2..54) for each receiver of the multicast message. ➣ Create the (request) header for the block of data to be transmitted, as follows: Byte 0 ........... 1 ........... 2 3 4 service_code =01 H (SDN) ...........
B8976060/02 Station 1 Free Layer 2 Communication Station 2 SAP 10 Station 3 SAP 10 SDN frame with DSAP/RSAP 10 and address 7F Fig. 8.12 Station 4 SAP 10 Station 5 SAP 12 H Sending Multicast Messages with the SDN Service Another way of sending multicast messages to all stations is to use the default SAP.
Free Layer 2 Communication Station 1 B8976060/02 Station 2 Default SAP Station 3 Default SAP Station 4 Default SAP SDN frame with DSAP/RSAP FF and address 7F H H Fig. 8.13 Receiving Multicast Messages using the Default SAP Fig. 8.13 illustrates how all the stations assigned a default SAP in the range 2..54 can receive a multicast frame. ☞ COM 5430 TF/COM 5431 FMS automatically assigns the same default SAP number to all CP 5430 TF/CP 5431 FMS stations.
B8976060/02 8.3 Free Layer 2 Communication Configuring The software package COM 5430 TF/COM 5431 FMS is used under SINEC NCM to configure free layer 2 communication. The screens required for configuration are provided by SINEC NCM as shown in Fig. 8.14: ➣ Link editor ➣ Documentation and test functions = Init Edit ... SINEC NCM Documentation and Test in Chapter 14 Menu item Edit Links->Free Layer 2 Links dealt with in separate chapters Fig. 8.
Free Layer 2 Communication B8976060/02 General procedure: To implement a simple task (transferring data from PLC 1 to the remote device via pre-programmed links with HDBs) the following procedure is required: ➣ The links between the PLC and remote device must be programmed (as mentioned in the general guidelines). For planning the link, refer to Characteristics of the S5-S5 Link. ➣ Assigning parameters to the CP module.
B8976060/02 Free Layer 2 Communication Select Edit -> Links -> Free layer 2 Links to call the following screen. The screen is structured as follows: CP type: Source: Link Editor Free Layer 2 Links (EXIT) Local L2 station address: PRIO (H/L) : Parameters sending/receiving: SSAP : SSNR : ANR : F 1 F +1 -1 2 Fig. 8.
Free Layer 2 Communication B8976060/02 SSNR: Interface number corresponding to the PLC DPR page number and therefore forming the CPU-CP interface. The interface number must be uniform for all jobs via a link. It can therefore only be entered in the first field and is automatically repeated for further parallel services (range of values: 0..3). ANR: Job number via which the job is triggered. (Range of values: 134 ..
B8976060/02 8.4 Free Layer 2 Communication Example of a Layer 2 Link This section describes how two stations can be configured with COM 5430 TF/COM 5431 FMS to be able to exchange data via direct access to layer 2 services. You should have worked through Chapters 3 to 6 of this manual and be familiar with the handling blocks and STEP 5.
Free Layer 2 Communication B8976060/02 PLC1 (S5-155U) P L C PLC2 (S5-115U) PG interface (AS511) C P C P P L C L2 interface PG interface (AS511) . Bus terminal 1 with terminal cable Fig. 8.16 8.4.1 . Terminator activated Bus cable PGinterface (AS511) Bus terminal 2 with terminal cable System Structure with all Hardware Components Program Description Two SIMATIC programmable controllers with the L2 addresses 1 and 2 are to exchange data via the SINEC L2 bus.
B8976060/02 8.4.1.1 Free Layer 2 Communication Program for PLC 1 During the PLC start up, the CP interface is synchronized with the SYNCHRON handling block. Four data words will be sent from PLC 1 to PLC 2. At the same time, four data words will be requested from PLC 2 (SRD). PLC 2 transfers the requested data to a buffer using an RPL_UPD_S job. The data (request) are transmitted with the SEND HDB, the receive data and "acknowledgments" (confirmations/indication) are received with the RECEIVE HDB.
Free Layer 2 Communication 8.4.2 B8976060/02 Transferring the Configuration Data for the CP 5430 TF/CP 5431 FMS and the STEP 5 User Program To be able to implement the practical example for free layer 2 communication, follow the procedure outlined below (and refer to Chapter 16): ➣ Transfer the following COM 5430 TF/COM 5431 FMS database files to the CPs you are using: When using the CP 5430 TF under the network file LAY2ONCM.NET – for station 1 OLAY2T1.155 – for station 2 OLAY2T2.
B8976060/02 9 Communication with Global I/Os Data Transmission with Global I/Os This chapter explains the following: ➣ The applications for which data transmission with global I/Os is suitable. ➣ How this type of data transmission functions. ➣ How to assign parameters for the CP 5430 TF/CP 5431 FMS for this type of transmission when programmable controllers exchange data via the global I/Os (GP).
Communication with Global I/Os B8976060/01 An important characteristic of the global I/Os is that changes in the data bytes are recognized and only these changes transmitted. The changed data bytes are then transmitted more quickly compared with data transmission using HDBs (refer to Chapter 7). The term "global I/Os" means that part of the I/O area is not used by I/O modules but for global data exchange between SIMATIC PLCs.
B8976060/02 9.1 Communication with Global I/Os Basics of Data Transmission with Global I/Os This section describes the functions of the global I/Os from the point of view of the CPU control program. ➣ Data exchange via I/Os ➣ How the data transmission functions ➣ Updating the I/Os with GP In data transmission with global I/Os the data exchange takes place using the I/Os of the SIMATIC PLC, as follows: ➣ The data for transmission are assigned to the output area of the I/Os in the control program.
Communication with Global I/Os B8976060/01 ➣ Each output I/O byte via which you want to transmit must be assigned to a "global object" (GO). A GO is a global I/O byte (GPB). ➣ The GOs are numbered. ➣ Each input I/O byte via which you want to receive, must also be assigned to a GO.
B8976060/02 Communication with Global I/Os Receiving: on the CP ➣ A frame containing changes is received. ➣ Locally configured objects are filtered out of the frame. ➣ All the filtered values are entered in the input area of the PLC. Fig. 9.1 is a schematic representation of transmission and reception using the "global I/Os area". A byte to be transmitted from station 1 is written to output byte 7 (PY 7). The global I/Os byte 10 (GPB 10) is assigned to PY 7.
Communication with Global I/Os B8976060/01 Updating the input and output bytes of the global I/Os The times at which the CP 5430 TF/CP 5431 FMS updates the GP bytes to be transmitted are either ➣ FREE mode: decided by the CP (the STEP 5 control program has no influence) or ➣ CYCLE-SYNCHRONIZED mode: decided by the control program using a send handling block call with job number 210.
B8976060/02 Communication with Global I/Os The FREE and CYCLE-SYNCHRONIZED modes are now explained in more detail. Send GP (free) PLC program execution GPB that transmits GP GPB I/O area in CP-DPR GPB10 PY7 ??? 0 1* 1 100 100 to the BUS 0 Internal cycle Comparison 100 Internal cycle Comparison 100 5 Internal cycle 5 5 5 t * not transferred, skipped by internal cycle ??? undefined status Fig. 9.2: How the Mode Transmit FREE Functions Explanation of Fig. 9.
Communication with Global I/Os B8976060/01 In the PLC program, the control program changes the output byte to be transmitted (PY 7). In the CP cycle, the CP checks all (GP) output bytes for changes (new/old comparison) and transmits only the GP bytes whose values have changed since the last comparison. Result: the CP 5430 TF/CP 5431 FMS only sends a GP byte when its value has changed between two consecutive "new/old" comparisons. The value of the GP byte at the time of the new/old comparison is decisive.
B8976060/02 Communication with Global I/Os Receive GP in the free mode PLC program execution GPB I/O area in CP-DPR GPB that receives GP GPB10 PY1 ??? 0 0 0 from BUS 20 20 Bus cycle 20 20 Bus cycle 40 40 Bus cycle 30 30 30 t ??? undefinined status Fig. 9.3: How the Mode Receive FREE Functions Explanation of Fig. 9.3: When a frame containing changes is received, the data are entered in the DPR independently of the PLC cycle.
Communication with Global I/Os B8976060/01 ➣ In the bus cycle, GP bytes are only received when the data have changed on the sender. ➣ In the PLC, the control program evaluates the received input byte (PY 1). The value of the GP byte at the time the control program accesses it in the PLC is decisive. If data is received several times between two accesses by the PLC, only the current value is passed on to the control program. All intermediate values are lost.
B8976060/02 Communication with Global I/Os Transmit GP cycle-synchronized PLC program execution GPB I/O area in CP-DPR GPB10 PY7 ??? 0 100 100 HDB execution 100 PLC cycle 100 100 HDB execution 100 5 5 HDB execution 5 t t PLC cycle GPB that transmits GP to the BUS 0 Comparison 100 Comparison 5 ??? undefined status Fig. 9.4: How the Mode Transmit CYCLE-SYNCHRONIZED Functions Explanation of Fig. 9.
Communication with Global I/Os B8976060/01 ➣ The PLC control program changes the output byte to be transmitted (PY 7). ➣ At the point when the HDB is executed, the CP 5430 TF/CP 5431 FMS rechecks all the (GP) output bytes for changes (new/old comparison) and only transmits the GP bytes which have changed since the last "new/old" comparison. Result: the CP 5430 TF/CP 5431 FMS only transmits a GP byte in the cycle-synchronized mode, when its value has changed between two consecutive new/old comparisons.
B8976060/02 Communication with Global I/Os Receive GP (cycle-synchronized) PLC program execution GPB I/O area in CP-DPR GPB10 PY1 PLC cycle GPB that receives GP ??? 0 0 0 0 20 HDb execution 20 20 20 HDB execution 60 40 * 60 * PLC cycle 60 60 HDB execution 20 t from BUS Bus cycle Bus cycle Bus cycle 20 t * cycle overrun is entered in the station list ??? undefined status Fig. 9.5: How the Mode Receive CYCLE-SYNCHRONIZED Functions Explanation of Fig. 9.
Communication with Global I/Os B8976060/01 ➣ The PLC control program accepts the received input byte (PY 1). The value of the GP byte at the time of the HDB execution (HDB receive call with job number 211) is decisive. If a GP byte has changed its value several times between two HDB executions, the current value is accepted. This cycle overflow is indicated in the GP station list by the bus.
B8976060/02 Communication with Global I/Os The following figure (Fig. 9.6) illustrates one way of integrating the HDBs in the cold or warm restart branch of the PLC. (OB 20, OB21, OB 22) HDB SYNCHRON call for the SSNR of the CP 5430 TF/CP 5431 FMS Synchronization of the interface PLC-CP 5430 TF/CP 5431 FMS With this HDB call (job number 201), the station list is read in by the CP 5430 TF/CP 5431 FMS.
Communication with Global I/Os B8976060/01 Cyclic operation The cyclic program has the following structure for all stations in the CYCLE SYNCHRONIZED update mode: Call HDB SEND with ANR 210 (at the start of the cyclic program) Cycle checkpoint Control program HDB RECEIVE call with ANR 211 (last statement in cyclic program before the end of the block) Fig. 9.
B8976060/02 Communication with Global I/Os Possibilities of error detection ➣ Group error message in ANZW (RECEIVE ANR 210) ➣ Reading the station list (ANR 201). Error statuses within the bus system including GP processing are written to the station list. Using a cyclic CONTROL call and a RECEIVE handling block call, the user program can read out the station list.
Communication with Global I/Os 9.1.1 B8976060/01 Checking the Data Transmission with ANZW and the GP Station List Structure of the status word with HDB SEND (ANR 210) and RECEIVE (ANR 211): Not used Error bits Data mgment. 15 14 13 12 11 10 9 8 7 6 5 4 Status bits 3 2 1 0 Job complete with error* (e.g.
B8976060/02 Bit Communication with Global I/Os 11 10 9 of the status word 8 Transmission delay in the other station, i.e. the PLC cycle was faster than the transfer capacity of the L2 bus (transmitted data of the remote station could not be fetched quickly enough by the L2 bus). or Reception delay in the local PLC, i.e.
Communication with Global I/Os B8976060/01 Evaluation of the GP station list (HDB RECEIVE with ANR 201) Each CP 5430 TF/CP 5431 FMS which receives global I/Os manages an internal GP station list. This has a length of 32 bytes. Each of these 32 bytes provide information about the operating statuses of all active L2 stations (maximum 32 stations) connected via global objects to the stations which evaluate the station list. Table 9.1 illustrates the structure of the GP station list, Fig. 9.
B8976060/02 Communication with Global I/Os Fig. 9.
Communication with Global I/Os B8976060/01 ➣ CYCLE-SYNCHRONIZED: the station list is updated by the CP at the point when the HDB RECEIVE with job number 211 is called in the control program (GP receive).
B8976060/02 9.2 Communication with Global I/Os Configuring The PG package SINEC NCM with COM 5430 TF/COM 5431 FMS is used to configure the functions. The screens you require for programming are provided by SINEC NCM as shown in Fig. 9.11. ➣ I/O areas ➣ GP editor ➣ Documentation and test ➣ GP consistency = Init Edit ...
Communication with Global I/Os 9.2.1 B8976060/01 I/O Areas CP 5430 TF The assignment of input and output areas in the SIMATIC PLC is made for the global I/Os in a screen. If you specify areas for ZP at the same time, you require only three limits for the input and output areas since one limit is always implicitly specified. ☞ Simultaneous use of GP and DP is not possible. Select Edit -> I/Os -> I/O Areas to call the following screen.
B8976060/02 Communication with Global I/Os Input fields: GP senders: All the stations from which GP bytes are expected must be marked with "X". Recommendation: only enter an X for the stations from which GP data are expected, otherwise the bus load is increased. Update: Cycle-synchronized: update at the cycle checkpoint by the HDB. Free: implicit update of the I/O areas by the CP. Input areas GP STA: Beginning of the (continuous) input area for the GP. (Range of values PY 0 .. 254, OY 0 ..
Communication with Global I/Os B8976060/01 Function keys: F7 OK The "OK" key enters the data. If the module file does not yet exist, it is set up when you confirm the entries. F8 SELECT If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely. Select values from the list with the cursor keys and enter them in the field with the return key.
B8976060/02 Communication with Global I/Os ➣ GP and ZP/DP input areas must not overlap. ➣ GP and ZP/DP output areas must not overlap. ➣ The reserved input area for GP and ZP/DP must not include gaps. ➣ The reserved output area for GP and ZP/DP must not include gaps. ➣ The input area per station for GP and ZP/DP together must not exceed a maximum of 256 bytes. ➣ The output area per station for GP and ZP/DP together must not exceed a maximum of 256 bytes, of which a maximum of 64 bytes are reserved for GP.
Communication with Global I/Os 9.2.2 B8976060/01 I/O Areas CP 5431 FMS The assignment of input and output areas in the SIMATIC PLC is made for the global I/Os in a screen. If you specify areas for ZI at the same time, you require only require three limits for the input and output areas since one limit is always implicitly specified. ☞ Simultaneous use of GP and DP is not possible. Select Edit -> I/Os -> I/O areas to call the following screen.
B8976060/02 Communication with Global I/Os Input fields: GP senders: All the stations from which GP bytes are expected must be marked with "X". Recommendation: only enter an X for the stations from which GP data are expected, otherwise the bus load is increased. Update: Cycle-synchronized: update at the cycle checkpoint by the HDB. Free: implicit update of the I/O areas by the CP. Input areas GP STA: Beginning of the (continuous) input area for the GP. (Range of values PY 0 .. 254, OY 0 ..
Communication with Global I/Os B8976060/01 Function keys: F7 OK The "OK" key enters the data. If the module file does not yet exist, it is set up when you confirm the entries. F8 SELECT If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely. Select values from the list with the cursor keys and enter them in the field with the return key.
B8976060/02 Communication with Global I/Os ➣ GP and ZI/DP input areas must not overlap. ➣ GP and ZI/DP output areas must not overlap. ➣ The reserved input area for GP and ZI/DP must not include gaps. ➣ The reserved output area for GP and ZI/DP must not include gaps. ➣ The input area per station for GP and ZI/DP together must not exceed a maximum of 256 bytes. ➣ The output area per station for GP and ZI/DP together must not exceed a maximum of 256 bytes, of which a maximum of 64 bytes are reserved for GP.
Communication with Global I/Os 9.2.3 B8976060/01 Editor for Global I/Os Once you have reserved the input/output areas for the global I/Os, you must assign the individual inputs and outputs of the stations to objects of the global I/Os (abbreviation GO) using the GP editor. These GOs are global I/O bytes (GPB). Select Edit -> I/Os -> GP station editor to call the following screen.
B8976060/02 Communication with Global I/Os Output fields: L2 station address: The address of the currently addressed station is displayed. Input/output area: Here, the I/O area is displayed in which the variables to be programmed will be simulated. From: the first byte of the block in the I/O area To: the last byte of the block in the I/O area (Range of values: area programmed in the I/O area.) Input fields: Output: Output byte to be transmitted. (Range of values PY 0 .. 254, OY 0 .. 254).
Communication with Global I/Os F8 SELECT Volume 1 B8976060/01 If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely. Select values from the list with the cursor keys and enter them in the field with the return key.
B8976060/02 9.3 Communication with Global I/Os Example of Data Transfer with Communication using Global I/Os The following example describes an application with cycle-synchronized global I/Os.
Communication with Global I/Os B8976060/01 The following software packages are also required: ➣ COM 5430 TF/COM 5431 FMS under SINEC NCM ➣ PG software for STEP 5 programming ➣ Appropriate handling blocks for the PLCs ➣ Diskette with the example program. 9.3.1 Program Description Station 1 S5-155U with CPU 946/947 Station 2 S5-115U with CPU 944 Station 3 S5-135U with CPU 928 L2 bus cable Fig. 9.
B8976060/02 Communication with Global I/Os The distribution of the tasks is as follows: PLC Bus station number Task S5-155U 1 "head control" - Sends program selection number and control commands for both manufacturing subunits 1 and 2 (bus stations 1 and 2) - Receives acknowledgement and position messages from the manufacturing subunits S5-115U 2 "manufacturing subunit 1" - Acknowledges the control commands received from the head control - Signals positions and faults to the head control - Signals
Communication with Global I/Os B8976060/01 The following specification of the transmitted and received data includes the assignment of the I/O bytes (PY) to the global I/O bytes (GB). Input/output bytes used for data transmission Assignment: input and output words to global I/Os QB PY 2 PY 2 -> GPB 10 QB PY 3 -Send the control commands to stations 2 and 3 -Send the program selection (number) to stations 2 and 3 IB PY 2 PY 2 <- GPB 100 IB PY 3 -Receive the ack.
B8976060/02 Communication with Global I/Os In Figs. 9.16 to 9.20 you can see that the I/O input and output bytes of the three stations in the manufacturing unit are practically directly connected or "wired" to each other by the GP. QB PY 130 Station 1 Auto Man Start Stop QB PY 3 PROGRAM SELECTION IB PY 10 IB PY 11 IB PY 110 IB PY 111 Station 2 Station 3 Fig. 9.
Communication with Global I/Os B8976060/01 QB PY 22 Station 2 Fault 1 Fault 2 IB PY 112 Station 3 Fig. 9.19: Station 2 Sends Fault Messages to Station 3 IB PY 12 Station 2 QB PY 122 Station 3 Fig. 9.
B8976060/02 Communication with Global I/Os IB PY 4 IB QB QB PY 121 PY 5 Station 2 PY 120 Station 3 Auto Man Start PO51 PO52 Fault Fault 1 2 Stop Position and fault messages Fig. 9.
Communication with Global I/Os 9.3.1.1 B8976060/01 Start-up Response During a PLC "cold restart" the various PLCs process the following start-up OBs: Start-up OB OB 20 OB 21 OB 22 Cold restart after STOP-RUN transition (manual) Cold restart after power down (automatic) Warm restart (manual) Warm restart (automatic) Device S5-115U S5-135U S5-155U Table 9.
B8976060/02 Communication with Global I/Os For the "manufacturing unit" example, the three stations should have different start-up responses: Station No. Start-up response 1 S5-155U (head control) The controller should always start up even if there is a GP error message such as PLC STOP, voltage OFF, no bus connection to the manufacturing subunits 1 and 2. 2 S5-115U (manufacturing subunit 1) The controller should always start up when the head control is active, i.e.
Communication with Global I/Os B8976060/01 Station 2: (OB 20, OB21) HDB SYNCHRON call for the SSNR of the CP 5430 TF/CP 5431 FMS Job number 211 causes the first reception of the GP, i.e. inputs and station list are updated (only necessary in the CYCLE-SYNCHRONIZED mode) HDB RECEIVE call with ANR 211 HDB RECEIVE call with ANR 201 Is GP of station 1 ok? no end Volume 1 With this HDB call (job number 201) the station list is read in by the CP 5430 TF/ CP 5431 FMS.
B8976060/02 Communication with Global I/Os Station 3: (OB 20, OB21, OB 22) HDB SYNCHRON call for the SSNR of the CP 5430 TF/CP 5431 FMS Synchronization of the interface PLC-CP 5430 TF/CP 5431 FMS With this HDB call (job number 201), the station list is read in by the CP 5430 TF/CP 5431 FMS. The station list contains the statuses of the CPs of all active stations on the bus from which input GP is expected.
Communication with Global I/Os 9.3.1.2 B8976060/01 Cyclic Mode The cyclic program has the following structure in all stations for the CYCLE-SYNCHRONIZED update mode. HDB SEND call with ANR 210 (at start of cyclic program) Control program HDB RECEIVE call with ANR 211 (last statement in cyclic program before block end) Fig. 9.24: Volume 1 Structure of the Cyclic Program (OB 1) for all Stations.
B8976060/02 9.3.2 Communication with Global I/Os Transferring the Configuration Data for the CP 5430 TF/CP 5431 FMS and the STEP 5 User Program To be able to implement the practical example for communication using global I/Os, follow the procedure outlined below (and refer to Chapter 16): ➣ Transfer the following COM 5430 TF/COM 5431 FMS database files to the CPs you are using: When using the CP 5430 TF under the network file GPO@@NCM.NET – for station 1 OGPTLN1.155 – for station 2 OGPTLN2.
Communication with Global I/Os B8976060/01 Notes Volume 1 9 - 48
B8976060/02 10 Communication with Cyclic I/Os Data Transmission with Cyclic I/Os (CP 5430 TF) This chapter contains the following information: ➣ The devices and applications for which data transmission with cyclic I/Os (ZP) is suitable. ➣ How this type of data transmission functions. ➣ How to assign parameters to the CP 5430 TF for this type of data transmission when an S5 programmable controller is to exchange data with a field device (example in Section 10.3). ➣ The STEP 5 program for this example.
Communication with Cyclic I/Os B8976060/02 required by the user to ensure the consistency of inputs and outputs. This HDB also serves to trigger a group job for data transmission. The volume of data to be transmitted with ZP should be small. This would, for example, include control commands, messages, measured values and analog values.
B8976060/02 10.1 Communication with Cyclic I/Os Basics of Data Transmission with Cyclic I/Os (ZP) When you have specified a SIMATIC S5 PLC with a CP 5430 TF as being an active station, you can program data transmission with "cyclic I/Os" for this PLC and exchange (poll) data with PROFIBUS-compatible field devices. The communication between the SIMATIC S5 PLC and field device functions according to the master slave method.
Communication with Cyclic I/Os B8976060/02 Configuring I/O areas for ZP Fig. 10.1 illustrates the basic function of the cyclic I/Os. The field device (slave) can only be addressed by the CP 5430 TF when it knows both the L2 address and the corresponding service access point (SAP) of this field device. Both the L2 address of the slave and the SAP number must be specified using the ZP editor of the COM 5430 TF software package.
B8976060/02 Communication with Cyclic I/Os ➣ receives the reply frames and assigns them to the configured ZP input bytes of the CPU The following information is important: ➣ With field devices, different data (e.g. programming data in contrast to signal data) can be assigned to different SAPs. ➣ ZP transmits and receives exclusively using SAP number 61. ➣ ZP uses the PROFIBUS layer 2 service SRD (send and request data) for data transmission. ➣ The frames of the cyclic I/Os always have low priority.
Communication with Cyclic I/Os B8976060/02 Consistency of the input and output bytes of the ZP ➣ FREE mode: guaranteed consistency of one byte. ➣ CYCLE-SYNCHRONIZED mode: guaranteed consistency over the whole area. ☞ The ZP update points depend on the communication via the L2 bus. Communication between the CP 5430 TF and passive stations is constant (cyclic) and not dependent on handling block calls (SEND/RECEIVE with ANR 210/211).
B8976060/02 Communication with Cyclic I/Os Procedure with the FREE mode: master transmits to slave PLC program execution The byte transmitted by ZP I/O area in CP- DPR to the BUS PY1 0 0 7 7 7 7 8 8 9 9 Internal CP cycle= "after processing the polling list" 9 9 1 1 t Fig. 10.2: t How the FREE Mode Functions: Master Transmits to Slave Explanation of Fig. 10.2: ➣ The control program modifies the output byte to be transmitted (PY 1).
Communication with Cyclic I/Os B8976060/02 Procedure with the FREE mode: master receives from slave PLC program execution The byte received by ZP I/O area in CP-DPR PY1 from BUS ? 0 0 10 10 10 10 10 10 Internal CPcycle = "after processing the polling list" 9 9 t 9 9 t ? undefined status Fig. 10.3: FREE Mode: Master Receives from Slave Explanation of Fig. 10.3: ➣ The byte received by ZP is transferred to the I/O area of the DPR within the internal CP cycle.
B8976060/02 ☞ Communication with Cyclic I/Os If ZP bytes need to be transferred together because they form a logical unit (e.g. a control parameter requiring a word), the FREE update mode must under no circumstances be selected. With this mode, there is no guarantee that the ZP bytes which belong together are actually transferred together. The receiver (PLC or slave) would then process inconsistent values.
Communication with Cyclic I/Os B8976060/02 Procedure with the CYCLE-SYNCHRONIZED mode: master transmits to slave PLC program execution I/O area in CP-DPR The byte transmitted by ZP PY1 to the BUS 0 0 7 7 HDB execution 7 Bus cycle 7 8 8 9 9 HDB execution 9 PLC cycle 9 1 1 t Fig. 10.4: t t CYCLE-SYNCHRONIZED Mode: Master Transmits to Slave Explanation of Fig. 10.4: ➣ The control program changes the output byte to be transmitted (PY1).
B8976060/02 Communication with Cyclic I/Os ➣ At the point when the HDB is executed, the CP 5430 TF transmits all the output bytes assigned to the ZP. In contrast to the FREE mode, you determine this point in time in the control program by means of an HDB SEND call with job number 210.
Communication with Cyclic I/Os B8976060/02 ➣ The control program can then work with these values under PY0. The advantage of the CYCLE-SYNCHRONIZED mode is that the time at which the ZP is sent or received is fixed in the control program. To ensure that the ZP input area of the CPU is also updated at a defined point in time, an HDB RECEIVE with job number 211 must be called in the control program, normally at the end of the cyclic control program.
B8976060/02 Communication with Cyclic I/Os ➣ If you have selected the CYCLE-SYNCHRONIZED update mode, the complete ZP should be received at the end of a start-up OB The SEND synchronization point is indicated by the SEND-HDB (ANR 210). The parameter QTYP must be assigned the value "NN". DBNR, QANF, QLAE are irrelevant. The ANZW should be assigned to a data or flag word. The RECEIVE synchronization point is indicated by the RECEIVE HDB in the "direct mode" and ANR 211.
Communication with Cyclic I/Os B8976060/02 Both in the cold restart branch (OB 20) and in the warm restart branch (OB 21/22) each CP interface to be used later must be synchronized (SYNCHRON HDB). From the cold restart branch, the PLC operating system branches directly to the first cycle checkpoint. The process image of the inputs (PII) is read in for the first time at this point. The first RECEIVE synchronization point for the CP 5430 TF is therefore already in the cold restart branch.
B8976060/02 Communication with Cyclic I/Os In cyclic operation, the SEND synchronization point is immediately at the start of OB 1; the RECEIVE synchronization point at the end of the PLC cycle. The division into a SEND and a RECEIVE synchronization point is necessary, since the CP must make the received ZP bytes available to the PLC before the PLC cycle control point and on the other hand the CP can only process the ZP output byte after the PIQ has been output.
Communication with Cyclic I/Os 10.1.1 B8976060/02 Checking the Data Transmission with ANZW and the ZP Station List Not used Error bits Data mgment. 15 14 13 12 11 10 9 8 7 6 5 4 Status bits 3 2 1 0 Job complete with error* (e.g. invalid job number) Job complete without error Synchronization done without error SEND synchronization disabled RECEIVE synchronization possible (Input GP was received) * Bit 3 of the status bits is not connected with the error bits (8..11).
B8976060/02 Communication with Cyclic I/Os Error bits for the RECEIVE-HDB (ANR 211) Bit 11 10 9 8 of the status word Reserved for GP error message Reserved for GP error message Reserved for GP error message ZP image is incomplete (either all stations have not yet started up or at least one station has dropped out) Fig. 10.
Communication with Cyclic I/Os B8976060/02 Structure of the ZP station list The station list has a length of 16 bytes, with each bit assigned to a station address. All stations configured for ZP and which respond correctly are marked with "0". Stations not responding correctly or from which a diagnosis request exists (only with IM318B) are marked with a "1" in the station list.
B8976060/02 Communication with Cyclic I/Os If an error occurs, (one or more links not in the data transfer phase), the ZP station list can be read out at any point. If all the links are functioning correctly in the data transfer phase, the RECEIVE HDB for the ZP station list is disabled. A further distinction must be made as to the mode (FREE or CYCLE-SYNCHRONIZED) in which the station list is evaluated, as follows: FREE: the station list is updated continuously by the CP.
Communication with Cyclic I/Os 10.2 B8976060/02 Configuring The PG package SINEC NCM with COM 5430 TF is used to configure the functions. The screens you require for configuring are provided by SINEC NCM as shown in Fig. 10.12. ➣ I/O areas ➣ ZP editor ➣ Documentation and test = Init Edit ... SINEC NCM Documentation and Test in Chapter 14 Menu item Edit ZP editor Edit -> I/Os -> ZP Editor I/O area Edit -> I/Os -> I/O areas dealt with in separate chapters Fig. 10.
B8976060/02 10.2.1 Communication with Cyclic I/Os I/O Areas Input and output areas of the SIMATIC PLC for cyclic I/Os are assigned in a screen. If you also specify areas for GP, you only require three area limits for the input and output areas since one limit is always specified implicitly. ☞ Simultaneous use of ZP and DP is not possible Select Edit -> I/Os -> I/O areas to call the following screen.
Communication with Cyclic I/Os B8976060/02 Input fields: Update: Cycle-synchronized: update at the cycle checkpoint by the HDB. Free: implicit update of the I/O areas by the CP. Input areas ZP/DP STA: Beginning of the (continuous) input area for the cyclic I/Os. (Range of values PY 0 .. 254, OY 0 .. 254) ZP/DP END: End of the (continuous) input area for the cyclic I/Os. (Range of values PY 1 .. 255, OY 1 .. 255) Output areas ZP/DP STA: Beginning of the (continuous) output area for the cyclic I/Os.
B8976060/02 ☞ Communication with Cyclic I/Os The input or output area must always begin with an even byte number and must always end with an odd byte number. The fields remain empty if no input or output areas are required for the cyclic I/Os. The input area/output area for ZP must not exceed a maximum of 256 bytes. If you want to reserve areas for the global I/Os (GP), remember the following when you are reserving areas: ➣ GP and ZP input areas must not overlap.
Communication with Cyclic I/Os 10.2.2 B8976060/02 ZP Editor Once you have reserved the input/output areas for cyclic I/Os, you must now assign part of the reserved area to each field device (slave) using the ZP editor. Select Edit -> I/Os -> ZP editor to call the following screen. The screen has the following structure: L2 station address: Default SAP: Output area: from Rem. add. (EXIT) CP type: Source: ZP Editor DSAP from Input area: from to to from F F F F F 1 2 3 4 5 Fig. 10.
B8976060/02 Communication with Cyclic I/Os Output area If you intend to define an output block for the corresponding slave on the DSAP, this block of continuous bytes is specified here. from: The first byte of the output block. to: The last byte of the output block. It is possible to assign the output areas more than once using a different L2 address. Input area If an input block is intended, it is defined here. Multiple assignment is, however, not possible. from: The first byte of the input block.
Communication with Cyclic I/Os B8976060/02 Function keys: F5 INSERT F6 DELETE F7 OK F8 SELECT ☞ An empty line is inserted at the current cursor position. Deletes the line marked by the cursor in the input or output area. The "OK" key enters the data. If the module file does not yet exist, it is set up when you confirm the entries. If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely.
B8976060/02 10.3 Communication with Cyclic I/Os Example of using the Cyclic I/Os The following example describes an application using cycle-synchronized cyclic I/Os.
Communication with Cyclic I/Os 10.3.1 B8976060/02 Program Description Two programmable controllers (S5-115U and S5-95U) must be linked via the SINEC L2-BUS. Station 2 Station 1 S5-115U with CPU 944 S5-95U L2 bus cable Fig. 10.15: Programmable Controllers For the example, a simple data exchange of two bytes in both communications directions has been selected. PLC 1 sends changing data to PLC 2. In PLC 2, these data are returned to PLC 1.
B8976060/02 Communication with Cyclic I/Os 10.3.1.1 Program for PLC 1 When a PLC starts up, the CP interface must be synchronized using a SYNCHRON HDB. PLC 1 sends DW 10 of DB 100 to PLC 2 and fetches the DW 1 of DB 100. 10.3.1.2 Program for PLC 2 (S5-95U) PLC 2 receives the ZP from PLC 1 via DW 10 in DB 100. FB 150 transfers the received DW 10 to DW 1 of DB 100 and therefore sends it back to PLC 1. Assignment of DB 1 parameters of the S5 95U for L2 SL2 STA 2 STA PAS BDR 187.
Communication with Cyclic I/Os 10.3.2 B8976060/02 Transferring the Configuration Data for the CP 5430 TF and the STEP 5 User Program To be able to implement the practical example for communication using cyclic I/Os, follow the procedure outlined below (and refer to Chapter 16): ➣ Transfer the following COM 5430 TF database file to the CP 5430 you are using: – under the network file ZP@@@NCM.NET, the file OZPTLN1.
B8976060/02 11 Distributed I/Os (DP) Data Transmission with Distributed I/Os With the distributed I/Os system SINEC L2-DP, you can use a large number of distributed I/O modules and field devices in close proximity to the process. Distributed means that there can be large distances between your programmable controller and the I/O and field devices which can be bridged by a field bus or (twisted pair or fiber optic).
Distributed I/Os (DP) B89060/02 The distributed I/Os system SINEC L2-DP consists of active and passive stations on the bus.
B8976060/02 Distributed I/Os (DP) ONLINE test and diagnostics with the COM 5430 TF/COM 5431 FMS package are described in Section 14.2.4 . S5 backplane bus DP polling list CP5430 TF/ CP 5431 FMS I/O area Slave x Q bytes L2 bus DP slave x Q bytes QX1 QX1 QX2 QX2 QX3 QX3 QX4 QX4 I bytes I bytes IX1 CPU IX2 IX1 IX2 Slave y Q bytes QY1 DP slave y Q bytes QY2 QY1 QY2 I bytes IY1 I bytes IY2 IY1 IY3 IY2 IY4 IY3 IY4 Fig. 11.
Distributed I/Os (DP) 11.1 B89060/02 Basics of SINEC L2-DP SINEC L2-DP is the Siemens implementation of the DIN E19245 Part 3 PROFIBUS-DP. The L2-DP protocol uses the functions specified in DIN 19245 Part 1 for layers 1 and 2, and supplements these for the special requirements of distributed I/Os. The data exchange in a pure SINEC L2-DP bus system is characterized by the master- (active station on the bus) slave (passive station on the bus) relationship.
B8976060/02 Distributed I/Os (DP) ➣ Communication with other active PROFIBUS devices functioning according to the standard DIN 19245 Part 1 and 2 on the bus. These configurations are suitable for applications with low to middle requirements in terms of system reaction times . Active station on bus DP master (class1) - IM 308 B - CP 5430 TF/CP 5431 FMS DP master (class 2) PG7xx with CP 5410 B SINEC L2 bus Passive station on bus DP slave ET200U-DP Fig. 11.
Distributed I/Os (DP) B89060/02 CP 5430 TF/CP 5431 FMS als DP-Master (classe 1) CP 5431 FMS CP 5431 FMS Active station on bus SINEC L2 bus Passive station on bus DP slave Fig. 11.3 11.1.1 DP slave FMS slave DP slave Bus Configuration with SINEC L2-DP in a Multi-Master Application The SINEC L2-DP Interface for the CP 5430 TF/CP 5431FMS Characteristics of the SINEC L2-DP interface of the CP 5430 TF/ 5431 FMS: ➣ The CP can only be operated as DP master, class 1 on the SINEC L2 bus.
B8976060/02 11.2 Distributed I/Os (DP) CP 5430 TF/CP 5431 FMS L2-DP Functions The following SINEC L2-DP functions are implemented on the CP 5430 TF/CP 5431 FMS: ➣ Assignment of parameters to the DP slave (Set_Prm_Request) Using this function, the connected DP slave is assigned parameters during the start up or restart phase of the DP system. ➣ Reading out configuration data of a DP slave (Get_Cfg_Request) This function allows configuration data to be read from a DP slave.
Distributed I/Os (DP) B89060/02 With the exception of the functions that the user can execute using HDB calls – read DP slave diagnostic information and – send control command to DP slave, all the functions listed above run automatically on the CP when the L2-DP service is activated.
B8976060/02 11.3 Distributed I/Os (DP) Communication Between the DP Master and the DP Slave Station DP slave DP master Request slave diagnostic data 1st time Repeat job until the slave replies Send parameter assignment data Fetch configuration data Start-up phase Send configuration data Request slave diagnostic data 2nd time If no error was signalled continue with cyclic data exchange Send output data to DP slave Receive input data from DP slave Cyclic data exchange phase Request Response Fig.
Distributed I/Os (DP) 11.4 B89060/02 Basics of Data Transmission Using the DP Service of the CP This section describes the functions of the DP service from the point of view of the CPU control program. With data transmission using L2-DP, the data exchange is handled via the I/O area of the SIMATIC PLC.
B8976060/02 11.5 Distributed I/Os (DP) Updating the Input and Output Areas with the DP Service Depending on the selected mode, the CP distinguishes between two times when the DP output bytes for transmission can be accepted: ➣ FREE mode: decided by the CP (the STEP 5 control program has no influence) ➣ CYCLE-SYNCHRONIZED mode: decided by the control program using a send handling block call with job number 210.
Distributed I/Os (DP) 11.5.2 B89060/02 How the FREE Mode Functions The following diagram illustrates how the FREE mode functions for output bytes. PLC Program L KH 0007 TPY 1 Output area in CP PY1 : 7 PY1 : 7 L KH 0003 TPY 1 PY1 : 5 PY1 : 5 L KH 0000 TPY 1 nth processing of the DP polling list PY1 : 5 PY1 : 00 (n+1) processing of the DP polling list (m+1) PLC cycle Fig. 11.
B8976060/02 Distributed I/Os (DP) The following diagram illustrates how the FREE mode functions for input bytes. PLC Program Input area in CP L PY 1 PY1 : 1 L IB 1 PY1 : 4 L IB 1 PY1 : 4 nth processing of the DP polling list mth PLC cycle L IB 1 Data information transmitted on the L2 bus PY1 : 9 PY1 : 9 PY1 : 9 (n+1) processing of the DP polling list (m+1). PLC cycle Fig. 11.6 CP 5430 TF/CP 5431 FMS Receives from L2-DP Slave Explanation of Fig.11.
Distributed I/Os (DP) ☞ B89060/02 If DP bytes need to be transferred together (e.g. analog values/counted values with word or double word length), the FREE update mode must under no circumstances be selected. With this mode, there is no guarantee that the DP bytes which belong together are actually transferred in one frame. Essential features of the FREE mode: ➣ Minimum cycle load (corresponds to the cycle load that would occur simply by plugging in the corresponding input/output modules..
B8976060/02 11.5.3 Distributed I/Os (DP) How the CYCLE-SYNCHRONIZED Mode Functions The following diagram illustrates how the CYCLE-SYNCHRONIZED mode functions for output bytes.
Distributed I/Os (DP) B89060/02 In the CYCLE-SYNCHRONIZED mode, all the data located in the output area of the CP are accepted and buffered when the HDB send 210 is called. At the beginning of the next DP polling list cycle, this data is transmitted to the connected DP slaves.
B8976060/02 Distributed I/Os (DP) The following diagram illustrates how the CYCLE-SYNCHRONIZED mode functions for input bytes. PLC Program Input area Data information received on the L2 bus in CP PY1: 0 PY1 : 0 PY1 : 0 HDB-RECEIVE 211 CALL PY1 : 10 PY1 : 10 nth processing of the DP PY1: 10 PY1 : 10 PY1 : 7 PY1: 10 PY1 : 10 polling list (n+1) processing of the DP HDB-RECEIVE 211 CALL PY1 : 9 PY1: 9 PY1 : 9 Fig. 11.
Distributed I/Os (DP) B89060/02 In the CYCLE-SYNCHRONIZED mode, you as user decide when the DP input and output data is accepted or transferred by the CP by calling the HDB checkpoints SEND 210/RECEIVE 211. As can be seen in Figs. 11.9 and 11.10, in the CYCLE-SYNCHRONIZED mode for DP, the processing of the DP polling list and the calls for the HDB checkpoints (PLC cycle) are independent of each other.
B8976060/02 Distributed I/Os (DP) Relationship between the HDB SEND 210 call and DP polling list cycle The information transferred to the output area of the CP with the HDB SEND 210 call, is only transferred to the bus as allowed by the processing of the DP polling list.
Distributed I/Os (DP) B89060/02 Relationship between the HDB RECEIVE 211 call and the DP polling list cycle The data information received during the processing of the DP polling list is only transferred to the input area of the CP at the end of the polling cycle.
B8976060/02 Distributed I/Os (DP) The DP update times are in no way connected to the communications taking place on the L2 bus. The data exchange with the L2-DP service between the CP and the L2-DP slaves is constant (cyclic according to the DP polling list entry) regardless of the call cycle of the handling blocks SEND 210 and RECEIVE 211. To start the DP polling list processing in the CYCLE-SYNCHRONIZED mode, at least one HDB checkpoint (SEND 210/RECEIVE 211) must be called.
Distributed I/Os (DP) 11.6 B89060/02 Configuring The PG package SINEC NCM with COM 5430 TF/COM 5431 FMS is used to configure the DP functions. The screens you require for configuring are provided by SINEC NCM as shown in Fig. 10.12. ➣ Assignment/reservation of the I/O areas required for the DP service ➣ Assignment of parameters to the DP slaves to be addressed ➣ Entry of the DP polling list in the DP editor ➣ Documentation and Test = Init Edit ...
B8976060/02 11.6.1 Distributed I/Os (DP) I/O Areas The I/O areas used with the DP service are selected in the I/O area editor screen. ☞ Simultaneous use of GP/ZP and DP is not possible Simultaneous use of GP/CI and DP is not possible. The I/O area editor is different for the CP 5430 TF and CP 5431 FMS.
Distributed I/Os (DP) Free: B89060/02 The point at which the I/O areas are updated is decided by the CP. Input areas: (CP 5431 FMS) CI/DP STA: (CP 5430 TF) ZP/DP STA: (CP 5431 FMS) CI/DP END: (CP 5430 TF) ZP/DP END: Beginning of the (continuous) input area for the distributed I/Os. Range of values: PY0-254, OY0-254. Only even addresses allowed. End of the (continuous) input area for the distributed I/Os. Range of values: PY1-255, OY1-255. Only odd addresses allowed..
B8976060/02 Distributed I/Os (DP) Function keys: F7 OK F8 SELECT ☞ The "OK" key enters the data. If the module file does not yet exist, it is set up when you confirm the entries. If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely. Select values from the list with the cursor keys and enter them in the field with the return key. The input or output area must always begin with an even byte number and must always end with an odd byte number.
Distributed I/Os (DP) 11.6.2 B89060/02 Assigning Parameters to DP Slaves For each DP slave to be addressed with the DP service, parameters must be assigned using the screen "Edit->I/Os->DP Slave Parameters". This information such as "Slave L2 address" and "Slave Vendor Identification", is required later separately for each DP slave during data exchange. 32 DP slaves can be assigned.
B8976060/02 Distributed I/Os (DP) The second slave parameter screen (Fig. 11.14) selected with F6 USER PAR. CP type: Source: User-Specific Parameters User-selectable data : Length : 0 F F F F F F F 1 2 3 4 5 6 7 Fig. 11.15 (EXIT) F OK HELP 8 DP Slave Parameter Assignment Screen II Input fields: Slave L2 address: Here, you enter the L2 bus address of the DP slave (Range of values: 1-124).
Distributed I/Os (DP) B89060/02 The group identifier makes it possible to distinguish the following 8 groups. 0 0 0 0 0 0 0 0 1st group 2nd group 3rd group : : 8th group Fig. 11.16 Group Identifier Structure If no group identifier was specified at the HDB call for the global control job (all bits set to "0"), the global control job is sent and executed by all DP slaves capable of the Sync and/or freeze mode.
B8976060/02 Slave watchdog time: Distributed I/Os (DP) With this parameter, you decide whether or not the slave operates on the L2-DP bus with watchdog monitoring ON or watchdog monitoring OFF. The monitoring time itself is set only once in the DP editor screen and applies to all connected DP slaves. The watchdog monitoring on the DP slave is used to monitor the DP master. Each time a frame is received from the DP master, the watchdog monitoring is restarted in the DP slave.
Distributed I/Os (DP) F8 SELECT B89060/02 If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely. Select values from the list with the cursor keys and enter them in the field with the return key. Once a slave has had parameters assigned with F7 OK, the following function keys are available in the screen: F1 +1 Page forwards in the DP slave parameters (only if more than one DP slave has had parameters assigned).
B8976060/02 11.6.3 Distributed I/Os (DP) DP Editor Once you have reserved the input/output areas for distributed I/Os and have entered the parameter data for the slaves to be addressed, you must now assign part of the required I/O area of the CP to each DP slave using the DP editor. CP TYP: Quelle: Edit - DP Editor Watchdog time: 200 x 10 ms Clear DP: NO Slave Input areas: L2 address 100 x 10 ms Output areas: Name from: PB 0 to: PB 255 F PAGE + F PAGE - F 1 LINE + 2 LINE - 3 GLOB.
Distributed I/Os (DP) B89060/02 Input fields: Input areas: Here, you assign the input bytes of the configured DP slaves to the reserved input area of the CP. The permitted range of values is from one byte (from PYxxx to PYxxx, xxx = same address) to the I/O byte limit specified in the I/O area editor for the I area (up to a maximum of 242 bytes). If the DP slave does not have an I area, these fields remain empty. Multiple assignment for different DP slave stations is not possible.
B8976060/02 Min. polling cycle time: Distributed I/Os (DP) Here you select the time intervals at which the DP polling list is processed. Once all the jobs in the DP polling list have been executed, the processing of the DP polling list is only restarted after this cycle time has elapsed. Setting the times: For the configured times: - Minimum polling cycle time - Highest min.
Distributed I/Os (DP) Highest min. slave interval B89060/02 The time specified here is the highest value of the minimum slave interval of all DP slaves to be processed using the DP polling list. The min. slave interval of a DP slave is the time the slave requires to process the last polling frame received. Following this, the slave is ready to receive the next polling frame. The value of the min. slave interval can be found in the documentation for the particular slave.
B8976060/02 F3 GLOB.DAT. F5 DELETE Distributed I/Os (DP) Change to the fields watchdog monitoring time, min. Polling cycle time and clear DP. Delete the input and output areas of a L2-DP slave. F7 OK With the OK function key, you enter the data. If the module file does not yet exist it is created after you press this key. F8 SELECT If you press this key, a selection list is displayed with possible entries for fields which cannot be edited freely.
Distributed I/Os (DP) B89060/02 ET200U-DP example of a configuration The following I/O assignments were made with the help of the COM for the ET200U-DP station 10 described below: I/O area editor: DP-mode: cycle-synchronized Input area DP STA: PY100 Input area DP-END: PY107 Output area DP STA: PY80 Output area DP-END: PY85 DP-Editor: Station 10, Input area: PY100 to 107/Output area PY80 to PY85 ET200U-DP Station 10 DQ PS IM 318B 440 Occupied address area (bytes) DQ 441 1 1 2 PY80 PY81 1) Number o
B8976060/02 11.6.4 Distributed I/Os (DP) Example of using the DP service The following example describes the use of the cycle-synchronized DP. Task: Three ET200U-DP station are to be connected to a programmable controller (S5 115U) as distributed I/Os using the DP service. The ET200U-DP stations have the following data: Vendor identification: Sync mode: Freeze mode: Watchdog: 8008H OFF OFF ON 1. L2 station L2 bus address: I inputs: Q outputs: 20 3xDI each with 8 bits 2xDQ each with 8 bits 2.
Distributed I/Os (DP) B89060/02 The distributed I/O bytes will be assigned to the input addresses from PY100 and the output byte addresses from PY108 . I/O bytes of the L2 bus address ET200U-DP station 3 x DI 20 2 x DQ 2 x DI 21 1 x DQ 1 x DI 22 1 x DQ Table 11.
B8976060/02 Distributed I/Os (DP) Configuring with COM 5430 TF/COM 5431 FMS To assign parameters to the CP 5430 TF/CP 5431 FMS for the DP service, several steps are required: ➣ First, the basic configuration of the CP must be specified. This is described in detail in Chapter 6. ➣ After the basic configuration, the input/output area for the I/Os used must be specified. ➣ Using "DP slave parameter assignment", you specify the parameters for each DP slave to be addressed.
Distributed I/Os (DP) B89060/02 11.7 L2-DP Diagnostics with the User Program 11.7.1 Overview To allow you to monitor the data exchange with the configured DP slaves from the user program, the CPs provide the following functions: ➣ Read out DP station list The DP station list provides information about the status of all slaves and has a length of 16 bytes (128 bits). Each bit of the station list corresponds to one of the possible bus addresses of a DP slave station.
B8976060/02 Distributed I/Os (DP) All the bits of the DP slave stations, for which there was no configuration in the DP editor, (-> no input/output areas configured), are identified with "0". These DP slave stations are known as passive DP stations and are ignored in the station list. This also applies to DP stations with which cyclic data exchange is running free of error.
Distributed I/Os (DP) B89060/02 Meaning of the bits Bit coding Meaning 0 Station does not exist or there are no new diagnostic data . 1 There are new diagnostic data . All the bits of the DP slave stations for which there are no new diagnostic data or which are not configured and all the passive stations are identified by "0" in the diagnostic list. If there are new diagnostic data from a DP station, the DP station diagnostic bit is set to "1".
B8976060/02 Distributed I/Os (DP) The extended DP slave diagnostic data: – Device-related diagnostics (Vendor and device-specific diagnostic data) – ID-related diagnostics (Configuration-dependent listing of the I/O channels). All I/O channels for which diagnostics are available are marked. – Channel-related diagnostics (reason for diagnosed channels).
Distributed I/Os (DP) B89060/02 Structure of the diagnostic data according to the DP standard Byte 1 Station status 1 2 Station status 2 3 Station status 3 4 Master address General DP slave diagnostic data 5 Vendor ID 6 7 : : Other DP slave-specific diagnostic data, such as: - device-related - ID-related - channel-related diagnostics : : *) *) can be extended to max. 242 bytes Fig. 11.
B8976060/02 11.7.2 Distributed I/Os (DP) Examples of Practical Applications 11.7.2.1 Reading out the DP station list Whenever the cyclic data exchange is disturbed with at least one DP slave station, the DP station list can be read out with the HDB call RECEIVE A-NR: 202. If there is no fault/error, i.e. all DP slave stations are in the cyclic data transfer phase, the HDB RECEIVE 202 call is blocked with the ANZW bit "Receive possible".
Distributed I/Os (DP) B89060/02 DP Group messages with HDB Receive 202 ANZW The DP ANZW bits 8-11 of the HDB Receive job 202 create the following DP group message: Bit 11 10 9 8 of ANZW/A-NR: 202 0 = no error, all the configured DP slaves are in the data transfer phase 1= at least one DP slave is not in the data transfer phase Cause of error, what to do: To find out which slave(s) is affected, you must read out the DP station list using HDB-RECEIVE A-NR: 202.
B8976060/02 Distributed I/Os (DP) Programming example of reading out the DP station list and updating DP group messages FB202 "STAT-LIS" makes all DP group messages available by means of bit formal operands. If a slave leaves the cyclic data transfer phase, the DP station list is read and saved in data block DB202 from DW0 onwards.
Distributed I/Os (DP) 11.7.3 B89060/02 Reading Out the DP Diagnostic List The message that a slave has new diagnostic data causes the corresponding bit in the DP diagnostic list to be set to "1". As soon new diagnostic data exist for at least one connected slave, this is indicated in the group status ANZW HDB/A-NR202 (DP station list) bit 9. Using the HDB special service, A-NR209, the diagnostic list can be read out.
B8976060/02 Distributed I/Os (DP) Example of a program for reading out the DP diagnostic list The following figure shows the sequence of the HDB special service A-NR 209 for reading out the DP diagnostic list. CP L2-DP bus Control program SSNR FB ANR SEND ANZW S5-Adr. A-NR: 209 PAFE Job field Anzw = job_active Job (...2 H ) Anzw = job_active receive possible (...3 ) H SSNR FB ANR ANZW RECEIVE S5-Adr. A-NR: 209 PAFE Ack. Data Anzw = job_complete_without_error (...4 H ) Fig. 11.
Distributed I/Os (DP) B89060/02 Structure of the job field "DP diagnostic list" 1st byte 2nd byte 3rd byte 04 Length of the job field in bytes 01 Job type Diagnostics request 01 Diagnostics type DP station diagnostics list 4th byte Fig. 11.23 not occupied with this function Structure of the Job Field "DP Diagnostic List" Structure of the Acknowledgment field for "DP diagnostic list" 1st byte Length in bytes 2nd byte Acknowledgment 3rd byte Diagnostics list : : - with negative ack.
B8976060/02 Distributed I/Os (DP) Example of programming for reading out the DP diagnostic list FB209 "DIAG-LIS" requests the diagnostic list from the CP with the special service HDB A-NR. 209 and enters it in DB209 from DW4 onwards (incl. acknowledgment). Function block FB 209 signals that the job has been done by resetting the assigned trigger bit "ANST". Function block FB 209 with the corresponding data block 209, for use in a CPU of the S5-115U series is in the STEP 5 file DIAG@@ST.
Distributed I/Os (DP) 11.7.5 B89060/02 Example of a Program for Requesting Single DP Station Diagnostics The following figure shows the sequence of the HDB special service, A-Nr: 209 single DP station diagnostics. CP L2-DP bus Control program SSNR FB ANR SEND ANZW S5-Adr. A-NR: 209 PAFE Request diagnostic Job field Anzw = job_active data Job Acknowl. with (...2 H ) DP slave diagnostic data Anzw = job_active receive possible (...3 ) H SSNR FB ANR ANZW RECEIVE S5-Adr. A-NR: 209 PAFE Ack.
B8976060/02 Distributed I/Os (DP) Structure of the job field "single DP station diagnostics" 04 Length of job field in bytes 01 Job type Diagnostics request 3rd byte 02 Type of diagnostics Single DP diagnostics 4th byte 03 Station address (e.g. 3) 1st byte 2nd byte Fig. 11.
Distributed I/Os (DP) B89060/02 Structure of the acknowledgment field for "single DP station diagnostics" 1st byte - with negative acknowl. -> 2 - with positive acknowl.
B8976060/02 Distributed I/Os (DP) Structure of the station status bytes Station status byte 1 Bit no. Meaning Explanation 7 Master_Lock The DP slave was assigned parameters by a different DP master. This bit is set by the CP (DP master) when the master address in the byte is not FFH and not the CP bus address. 6 Parameter_Fault The last parameter frame received contained an error.
Distributed I/Os (DP) B89060/02 Station status byte 2 Bit no. Meaning Explanation 7 Deactivated 6 Reserved 5 Sync_Mode Set by the DP slave after receiving sync command. 4 Freeze_Mode Set by the DP slave after receiving freeze command. 3 WD_On Watchdog on (response monitoring) DP slave is active (bit = "1"). 2 Status_From_Slv The slave sets this permanently to "1".
B8976060/02 Distributed I/Os (DP) Station status byte 3 Bit no. Meaning Explanation 7 Ext_Diag_Data _Overflow If this bit is set, there is more diagnostic information than specified in the extended diagnostic data. 6-0 reserved Table 11.6 Station Status Byte 3 Structure of the byte "master address" Bit 7 6 5 4 3 2 1 0 - Station address of the DP master which assigned parameters to the slave - If the DP slave has not yet had parameters assigned, FFH is entered here. Fig. 11.
Distributed I/Os (DP) B89060/02 "Ident_Number" bytes These two bytes contain the vendor ID for exact identification of a DP slave type. Structure of the extended DP slave diagnostics The extended DP slave diagnostics is divided into 3 groups depending on the DP slave device type and type of error signaled. ➣ Device-related diagnostics ➣ ID-related diagnostics and ➣ Channel-related diagnostics.
B8976060/02 Distributed I/Os (DP) The three diagnostic groups are distinguished by the header or identification bytes. The order of the groups is unimportant. Each group can also occur more than once. Device-related diagnostics Bit 7 6 5 4 3 2 1 0 Header byte for the data field (group) device-related diagnostics Field length in bytes (incl. header byte) 2 to 63 (Field length can also be "0") 0 Identification for device-related diagnostics 0 2nd byte : : : : xth byte Fig. 11.
Distributed I/Os (DP) B89060/02 1st byte of the data field of ID-related diagnostics Bit 7 6 5 4 3 2 1 0 Header byte for the data field (group) ID-related diagnostics Field length in bytes (incl. header byte) 2 to 63 (Field length can also be "0") 1 Identification for device-related diagnostics 0 Fig. 11.
B8976060/02 Distributed I/Os (DP) 3rd byte of the data field of ID-related diagnostics Bit 7 6 5 4 3 2 1 0 ID number 8 has diagnostic data : : : ID number 15 has diagnostic data usw. Fig. 11.32 Structure of the Field of ID-Related Diagnostics Byte 3 Channel-related diagnostics Part of a module is known as channel. The order of the diagnosed channels and the reason for diagnostics are each entered in three bytes in the data field for channel-related diagnostics.
Distributed I/Os (DP) B89060/02 1st byte of the channel-related diagnostics Bit 7 6 5 4 3 2 1 0 Identification byte for channel-related diagnostics ID number 0 to 63 0 Identification for channel-related diagnostics 1 Fig. 11.33 Channel-Related Diagnostics Byte 1 2nd byte of the channel-related diagnostics Bit 7 6 5 4 3 2 1 0 Byte channel number Channel number 0 to 63 Input/output ID * * ID bytes which contain both inputs and outputs, the direction is indicated.
B8976060/02 Distributed I/Os (DP) 3rd byte of the channel-related diagnostics Bit 7 6 5 4 3 2 1 0 Byte for error and channel type Error type 00000 reserved 00001 short circuit 00010 undervoltage 00011 overvoltage 00100 overload 00101 overtemperature 00110 line break 00111 upper limit exceeded 01000 lower limit exceeded 01001 error 01010 reserved : : 01111 reserved 10000 vendor-specific : : 11111 vendor-specific channel type 000 reserved 001 bit 010 2 bits 011 4 bits 100 byte 101 word 110 2 words
Distributed I/Os (DP) B89060/02 Example: Structure of a complete data field "extended diagnostics" Bit 7 6 5 4 3 2 1 0 0 0 0 0 0 0 1 1 2 bytes vendor-specific Meaning explained in in DP slave documentation. diagnostic data 0 1 0 0 0 1 Device-related diagnostics 0 0 ID-related diagnostics -> ID number 1 with diagn. 1 1 -> ID number 11 with diagn. 1 -> ID number 23 with diagn.
B8976060/02 Distributed I/Os (DP) Example of a program for read single DP slave diagnostics Functions block FB 208 "EINZ-DIA" requests the diagnostic data of a single DP slave using the CP 5430 TF/CP 5431 FMS special service HDB A-NR 209. The corresponding DP slave station number is transferred to the function block with the formal operand "STAT". FB 208 signals that the job has been done by resetting the FB trigger bit "ANST".
Distributed I/Os (DP) 11.8 B89060/02 Sending Control Commands to the DP Slave Using the special HDB A-NR: 209, the "Global_Control" DP service can be used to send various control commands to the DP slaves. These Global_Control jobs can be used, for example, to synchronize the I/O data from some or all of the connected DP slaves .
B8976060/02 11.8.1 Distributed I/Os (DP) Function of the Control Commands - Sync and Unsync Sync The output data last received with the "Sync" control command are output by the DP slave and frozen. All the output data received after this are ignored until the next Sync control command or the control command "Unsync" is received. Unsync The control command "Unsync" cancels the function of the control command "Sync".
Distributed I/Os (DP) 11.8.2 B89060/02 Function of the Control Commands - Freeze and Unfreeze Freeze When the control command "Freeze" is received, the current statuses of the inputs are read in by the DP slave and frozen. The frozen input data are transferred to the L2-DP master during cyclic transfer until the next "Freeze" control command or the control command "Unfreeze" is received. Unfreeze Cancels the function of the control command "Freeze".
B8976060/02 11.8.3 Distributed I/Os (DP) Cyclic and Acyclic Transmission of Global_Control Commands When a control command is sent with the special HDB A-NR: 209, the CPs distinguish between the two job types in the transferred job field: ➣ Acyclic transmission of control commands ➣ Cyclic transmission of control commands Acyclic transmission of control commands With the job type, "acyclic transmission", the CPs send the required control command once at the end of a DP polling list cycle.
Distributed I/Os (DP) B89060/02 If any of the DP slaves relevant to the control command job are not in the cyclic data transfer phase with the CPs when the job field is transferred, the job is acknowledged negatively when it is transferred to the CP or may be deactivated later. A cyclic global control job that only deactivates the mode Sync and /or Freeze is converted to a cyclic control job. The requirement for this is a Group ID other than "0".
B8976060/02 Distributed I/Os (DP) Program example of sending a control command to a DP slave CP L2-DP bus Control program SSNR FB ANR SEND ANZW S5-Adr. A-NR: 209 PAFE Job field Control command Job DP slave Anzw = job_active (...2 H ) Anzw = job_active receive possible (...3 ) H SSNR FB ANR ANZW RECEIVE S5-Adr. A-NR: 209 PAFE Ackn. field Anzw = job_complete_without_error (...4 H ) Fig. 11.39 Sequence of HDB Special Service A-NR: 209 for Global_Control Explanation of Fig. 11.
Distributed I/Os (DP) B89060/02 Structure of the job field "send control command" 1st byte 04 hex 2nd byte Job type 3rd byte Control command 4th byte Fig. 11.
B8976060/02 Distributed I/Os (DP) Control Command Byte Bit 7 6 5 4 3 2 1 0 reserved = 0 reserved = 0 Unfreeze Freeze Unsync Sync reserved = 0 reserved = 0 Fig. 11.
Distributed I/Os (DP) B89060/02 Meaning of the bits for Un-/Sync and Un-/Freeze bit 2 or 4 0 0 1 1 11.8.4 bit 3 or 5 0 1 0 1 Meaning No function Function is activated Function is deactivated Function is deactivated. Special Job "STOP DP polling list processing" Using the special job "STOP DP polling list processing" with special HDB A-NR: 209, you can stop the cyclic processing of the DP polling list.
B8976060/02 Distributed I/Os (DP) Sequence of the special service "STOP DP polling list processing" CP L2-DP bus Control program SSNR FB ANR SEND ANZW S5-Adr. A-NR: 209 PAFE Job field Anzw = job_active Job (...2 H ) Anzw = job_active receive possible (...3 ) H SSNR FB ANR ANZW RECEIVE S5-Adr. A-NR: 209 PAFE Ackn. Data Anzw = job_complete_without_error (...4 H ) Fig. 11.43 Sequence of the Special Service "STOP DP Polling List Processing" Explanation of Fig. 11.
Distributed I/Os (DP) B89060/02 Structure of the job field "STOP DP polling list processing" 1st byte 04 2nd byte 04 Length of the job field in bytes Job type: STOP-DP polling list processing 3rd byte Not used with this function 4th byte Fig. 11.44 Structure of the Job Field "STOP DP Polling List Processing" Structure of the acknowledgment field for "STOP DP polling list processing" 1st byte Length in bytes 2nd byte Acknowl. Fig. 11.
B8976060/02 12 Service and Diagnostics using FMA Functions Service and Diagnostic Functions on the SINEC L2 Bus using FMA Services This chapter describes the administrative fieldbus management (FMA) services available to you as the user and the corresponding parameters.
Service and Diagnostics using FMA Functions 12.1 B8976060/02 Use and Types of FMA Service The fieldbus management (FMA) organizes the initialization, monitoring and error handling between the FMA user and the logical functions in layers 1 and 2. The management therefore serves as mediator between the local user and layers 1 and 2. Service requests which may be specified by the management are passed on to layers 1 or 2 and the user of the FMA services receives an acknowledgement with a confirmation.
B8976060/02 Service and Diagnostics using FMA Functions To avoid dangerous plant states in the bus system, only the following reading (passive) FMA services are permitted with the CP 5430 TF/CP 5431 FMS: Services Function FDL_READ_VALUE Reading the current bus parameters. LSAP_STATUS Reading the status values of an SAP. FDL_LIFE_LIST_CREATE_LOCAL Creating the current overview of all the systems connected to the bus system by means of station-internal information.
Service and Diagnostics using FMA Functions B8976060/02 The following table lists some of the characteristics of the individual services.
B8976060/02 12.2 Service and Diagnostics using FMA Functions Fundamentals of using the FMA Services The request for an FMA service by the CP 5430 TF/CP 5431 FMS and the transfer of the confirmation to the CPU of the PLC is the responsibility of the handling blocks SEND and RECEIVE. For FMA services, use job number ANR 200 when calling the HDBs SEND and RECEIVE.
Service and Diagnostics using FMA Functions B8976060/02 A distinction is made between local and remote FMA services Local control program SSNR FB ANR SEND ANZW FMAS5-add.Request PAFE e.g.:DB CP BUS 1 (data) Header Anzw = Job_active (...2H ) 2 Anzw = Job_active receive possible (...3 H) 3 SSNR ANR FB ANZW S5-add.RECEIVE PAFE e.g.:DB Header Anzw = Job_complete_without_error Fig. 12.2 Schematic Sequence of an FMA Service (local) Local control program CP SSNR FB ANR SEND ANZW FMAS5-add..
B8976060/02 Service and Diagnostics using FMA Functions An FMA request consists of an 8-byte header. Depending on the service, the confirmation consists of a maximum of 250 bytes, of which the first 8 bytes are occupied by the confirmation header (FMA header). Fig. 12.4 shows the structure of a block of data to be transmitted or received. The designations of the header bytes are taken from the PROFIBUS standard.
Service and Diagnostics using FMA Functions B8976060/02 Storing the request header and confirmation data The data to be transferred (8 bytes) and the received data (max. 250 bytes) should be stored in a data block. Correct storage of the header information in a DB (see Fig. 12.4) is necessary for error-free use of an FMA service. It is advisable to provide enough space for the confirmation data in the same DB.
B8976060/02 Service and Diagnostics using FMA Functions Controlling the data exchange To be able to control the data exchange between the CPU and CP 5430 TF/CP 5431 FMS, you must evaluate the status word (ANZW) for this job. The condition contains information about the status of the job, information about data management and error bits (refer to Figs. 12.5/12.6). The figures illustrating the sequence of the control program (refer to Figs. 12.2/12.3) illustrate the changes in the status word.
Service and Diagnostics using FMA Functions Error bits 11 10 9 8 For meaning of the error bits: refer to Table 12.3 Data mgment. 7 6 5 4 B8976060/02 Status bits 3 2 1 0 Reserved Data transfer complete on CP (FMA request was transferred), This bit is reset by the HDB Data acceptance complete (FMA indication or FDL confirmation transferred to PLC) This bit is reset by the HDB Data acceptance/transfer (enable/disable bit) This bit is not required here, no fragmentation Fig. 12.
B8976060/02 Bits 8-11 0H Service and Diagnostics using FMA Functions Meaning No error If bit 3 "job complete with error" is nevertheless set, this means that the CP has set up the job again following a cold restart or RESET. 1H Wrong type specified in block call (QTYP/ZTYP). 2H Memory area does not exist (e.g. not initialized).. 3H Memory area too small. The memory area specified in the HDB call (parameters Q(Z)TYP, Q(Z)ANF, Q(Z)LAE) ist for too small for the data transmission. 4H Timeout (QVZ).
Service and Diagnostics using FMA Functions B8976060/02 The parameter assignment error byte (PAFE) must also be evaluated in the control program. It informs you about various parameter assignment errors. When you assign parameters to the individual blocks, you specify the address at which this information is available. The meaning of the individual bits is explained in Fig. 12.7.
B8976060/02 12.3 Service and Diagnostics using FMA Functions FDL_READ_VALUE This service allows the FMA user to read out the current bus parameters of the local station. 12.3.1 FDL_READ_VALUE_Request For the structure of the FDL_READ_VALUE request you must enter the following parameters in the header: com_class 0.
Service and Diagnostics using FMA Functions 12.3.2 B8976060/02 FDL_READ_VALUE_Confirmation In the FDL_READ_VALUE confirmation, the values for the header and bus parameters are stored as follows: com_class 0. byte: format KH, service request to layer 2 here: FDL confirmation =01H user_id 1st byte: ID assigned with FDL request (optional) service_code 2nd byte: format KH, type of service requested: FDL_READ_VALUE=0BH link_status 3rd byte: format KH, OK or error message (refer to Table 12.
B8976060/02 Service and Diagnostics using FMA Functions The following messages can occur with the FMA service FDL_READ_VALUE: Value of link_status Abbrev. PROFIBUS Meaning FDL_READ_VALUE 00H OK Positive acknowledgment: service executed, bus parameters read 15H IV Negative acknowledgment: "...RESET" currently active or no receive buffer Table 12.4 link_status Message for FDL_READ_VALUE Confirmation The reaction in the user program when this message is received is not fixed.
Service and Diagnostics using FMA Functions B8976060/02 Structure of the bus parameter block (see also network parameters): Parameter Meaning Range of values/Code hsa (byte) Highest station address 2 to 126 (display of the value set in the Init block) loc_add._station (byte) Address of the local station 1 to 126 station_typ (word) Active / passive 00H = passive 01H = active baud_rate (word) Baud rate 00H = 9.6 Kbps 01H = 19.2 Kbps 02H = 93.75 Kbps 03H = 187.5 Kbps 04H = 500 Kbps 07H = 1.
B8976060/02 12.4 Service and Diagnostics using FMA Functions LSAP_STATUS This service allows the FMA user to read out the services and functions assigned to a particular SAP of a remote or local station.
Service and Diagnostics using FMA Functions 12.4.1 B8976060/02 LSAP_STATUS_Request The LSAP_STATUS request block must be structured as follows: com_class 0. byte: format KH, service request to layer 2 here: FDL request =00H user_id 1st byte: freely assignable ID, which is returned unchanged with a confirmation.
B8976060/02 12.4.2 Service and Diagnostics using FMA Functions LSAP_STATUS Confirmation The values for the header and LSAP status are stored as follows in the LSAP_STATUS confirmation: com_class 0. byte: format KH, service request to layer 2 here: FDL confirmation =01H user_id 1st byte: ID assigned with FDL request (optional) service_code 2nd byte: format KH, type of service requested: LSAP_STATUS=19H link_status 3rd byte: format KH, OK or error message (refer to Table 12.
Service and Diagnostics using FMA Functions B8976060/02 The following messages can occur with the FMA service LSAP_STATUS Value of link_status Abbrev.
B8976060/02 Service and Diagnostics using FMA Functions The entries in the right or left nibble have the following significance: Service_type Bit 3 2 1 Enabled service 0 0 0 0 0 SDA enabled 0 0 0 1 SDN enabled 0 0 1 1 SRD enabled 0 1 0 1 CSRD enabled 7 6 5 4 SAP function for the enabled services 0 0 0 0 Initiator 0 0 0 1 Responder 0 0 1 0 Initiator and Responder 0 0 1 1 Service not activated Bit Role_in_service Table 12.
Service and Diagnostics using FMA Functions 12.5 B8976060/02 FDL_LIFE_LIST_CREATE_LOCAL This service supplies status information about all active stations and all passive stations located in the GAP area of the service requesting station. To provide the status information, no information is requested from remote station, i.e. the bus is not subjected to extra load by this service. 12.5.
B8976060/02 12.5.2 Service and Diagnostics using FMA Functions FDL_LIFE_LIST_CREATE_LOCAL Confirmation The values for the header and station status are stored as follows in the FDL_LIFE_LIST_CREATE_LOCAL confirmation: com_class 0.
Service and Diagnostics using FMA Functions B8976060/02 The following messages can occur with this FMA service: Value of link_status Abbrev. PROFIBUS Meaning FDL_LIFE_LIST_CREATE_LOCAL 00H 15H Table 12.
B8976060/02 12.6 Service and Diagnostics using FMA Functions FDL_IDENT With this service, identification information can be requested from a station connected to the bus. This can involve both the local or a remote station. The identification contains the manufacturers name, the PROFIBUS interface module type, the hardware and software versions. 12.6.1 FDL_IDENT Request The FDL_IDENT request block must be structured as follows: com_class 0.
Service and Diagnostics using FMA Functions 12.6.2 B8976060/02 FDL_IDENT Confirmation The values for the header and station Ident parameters are stored in the FDL_IDENT confirmation as follows: com_class 0. byte: format KH, service request to layer 2 here: FDL confirmation =01H user_id 1st byte: ID assigned with FDL request (optional) service_code 2nd byte: format KH, type of service provided: FDL_IDENT=1CH link_status 3rd byte: format KH, OK or error message (refer to Table 12.
B8976060/02 Service and Diagnostics using FMA Functions The parameter link_status of the confirmation indicates the success or failure of the previous FMA request. The following messages can occur with this FMA service: Value of link_status Abbrev.
Service and Diagnostics using FMA Functions 12.7 B8976060/02 FDL_READ_STATISTIC_CTR This service is used to read station-oriented statistical information. In the appropriate bytes, counters indicate how often certain statuses occurred in the bus system. The counters are set to 0 at each cold restart and whenever they are read. This means that the values always relate to a defined period. If the counters overflow, this is not indicated. When the upper limit is reached, the counters stop. 12.7.
B8976060/02 12.7.2 Service and Diagnostics using FMA Functions FDL_READ_STATISTIC_CTR Confirmation The values for the header and station statistics parameters are stored in the FDL_READ_STATISTIC_CTR as follows: com_class 0.
Service and Diagnostics using FMA Functions B8976060/02 The following messages can occur with this FMA service: Value of link_status Abbrev. PROFIBUS Meaning FDL_READ_STATISTIC_CTR 00H OK Positive acknowledgment: service executed, statistics read 15H IV Negative acknowledgment: "..._RESET" currently active or no receive buffer or no statistics buffer exists Table 12.
B8976060/02 Service and Diagnostics using FMA Functions The values in the statistics block provide information about how often the following processing statuses occurred: Parameter Meaning invalid_start_delimiter_ctr Received frame with invalid start delimiter invalid_fcb_fcv_ctr Received frame with invalid FCB/FCV. invalid_token_ctr Token frame: - does not match LAS - DA and SA > bus_parameter.hsa. collision_ctr Unexpected response frame wrong_fcs_or_ed_ctr Received frame with wrong FCS or ED.
Service and Diagnostics using FMA Functions 12.8 B8976060/02 FDL_READ_LAS_STATISTIC_CTR This service is used to read bus-oriented statistical information. In the appropriate bytes, counters indicate how often certain statuses occurred in the bus system. The counters are set to 0 at each cold restart and whenever they are read. This means that the values always relate to a defined period. If the counters overflow, this is not indicated. When the upper limit is reached, the counters stop. 12.8.
B8976060/02 12.8.2 Service and Diagnostics using FMA Functions FDL_READ_LAS_STSTISTIC_CTR Confirmation The values for the header and statistical data are stored in the FDL_READ_LAS_STATISTIC_CTR confirmation as follows: com_class 0.
Service and Diagnostics using FMA Functions B8976060/02 The following messages can occur with this FMA service: Value of link_status Abbrev. PROFIBUS Meaning FDL_READ_LAS_STATISTIC_CTR 00H OK Positive acknowledgment: service executed, statistics read. 15H IV Negative acknowledgment: "..._RESET" currently active or no receive buffer or passive station. Table 12.
B8976060/02 12.9 Service and Diagnostics using FMA Functions Examples The program example is described in detail for the FMA service FDL_READ_VALUE. Setting up the DB is also illustrated as comprehensively as the user program. The user program for the other FMA services has an analogous structure. The only difference is that a different DB must be called with parameters assigned for the particular service (e.g. service_code). 12.9.
Service and Diagnostics using FMA Functions B8976060/02 Word DB 140 0: 1: 2: 3: 4: 5: 6: 7: 8: 9: KH = 0000; KY = 000,000 KY = 011,000 KY = 000,000 KY = 000,000 KH = 0000; KY = 000,000 KY = 000,000 KY = 000,000 KY = 000,000 ***Request-Header**** com_class / user_id service_code / no significance no significance no significance ****Confirmation-Header**** com_class / user_id service_code / link_status no significance/no significance no significance/no significance 10: 11: 12: 13: 14: 15: 16: 17: 18: 1
B8976060/02 Service and Diagnostics using FMA Functions FB140 Explanation Segment 1 Name: READ-Val DECL:ANST I/Q/D/B/T/C: I BI/BY/W/D: BI 0008 : 0009 : 000A : 000B : 000C : 000D : JU FB 123 000E Name: CONTROL 000F SSNR: KY 0,0 0010 A-NR : KY 0,200 0011 ANZW: FW 140 0012 PAFE: FY 145 0013 : 0014 : 0015 : AN =ANST 0016 : O F 141.
Service and Diagnostics using FMA Functions FB 140 (continued) 0029 : 002A : RB =ANST 002B : 002C : 002D CONF: 002E : 002F : A F 141.0 0030 : BEC 0031 : 0032 : JC FB 121 0033 Name : RECEIVE 0034SSNR : KY 0,0 0035 A-NR : KY 0,200 0036 ANZW: FW 140 0037 ZTYP : KS DB 0038 DBNR: KY 0,140 0039 ZANF : KF +6 003A ZLAE : KF -1 003B PAFE: FY 146 003C : 003D : 003E : O F 141.3 003F : O F 146.0 0040 : BEC 0041 : Table 12.
B8976060/02 Service and Diagnostics using FMA Functions FB 140 (continued) 0042 0043 0044 0045 0046 0047 0048 0049 004A 004B 004C 004D 004E 004F 0050 0051 0052 0053 0054 0055 Table 12.17 : : : Explanation *************************************** evaluation of link_status : C DB 140 : : L KB 0 : L DR 1.
Service and Diagnostics using FMA Functions 12.9.2 B8976060/02 Program Example for the LSAP_STATUS Service For the example, DB 141 is set up to store the request and confirmation data. The following parameters must be specified for the FMA service LSAP_STATUS. com_class 00H = request service_code 19H = LSAP_STATUS Remote SAP no.
B8976060/02 Service and Diagnostics using FMA Functions The structure of the user program for sending the request and receiving the confirmation is exactly as described for the FMA service FDL_READ_VALUE (refer to Section 12.9.1). The differences simply result from using a different DB for storing the request or confirmation block. ☞ Remember that when reading a remote station of a different manufacturer, the position of the status bytes in the data field may be different.
Service and Diagnostics using FMA Functions 12.9.
B8976060/02 12.9.4 Service and Diagnostics using FMA Functions Program Example for the FDL_LIFE_LIST_CREATE_LOCAL Service For the example, DB 143 is set up to store the request and confirmation data.
Service and Diagnostics using FMA Functions B8976060/02 The structure of the user program for sending the request and receiving the confirmation is exactly as described for the FMA service FDL_READ_VALUE (refer to Section 12.9.1). The differences simply result from using a different DB for storing the request or confirmation block.
B8976060/02 12.9.5 Service and Diagnostics using FMA Functions Program Example for the FDL_IDENT Service For the example, DB 144 is set up to store the request and confirmation data. The following parameters must be specified for the FMA service FDL_IDENT: com_class : service_code : rem._add._station : 00H = 1CH = 0AH = request FDL_IDENT address of the receiver After accepting the confirmation block with HDB RECEIVE, the values are entered in the DB and can be read out.
Service and Diagnostics using FMA Functions B8976060/02 Example of DB 144 with identification data of the station: DB144 0: 1: 2: 3: 4: 5: 6: 7: 8: 9: KH = 0000; KY = 000,000 KY = 028,000 KY = 000,000 KY = 002,000 KH = 0000; KY = 001,000 KY = 028,000 KY = 000,000 KY = 002,000 10:KH = 020A; 11:KS = ????; 15:KH = 3232; 16:KS = ????; 23:KH = ????; 24:KS = ????; 27:KH = ????; 28:KS = ????; 32:KS = ????; 33:KH = 0101; 34:KH = 0101; 35:KH = 0101; 36:KH = 0101; 37:KH = 0101; 38:KH = 0101; 39:KH = 0101; 40:KH =
B8976060/02 Service and Diagnostics using FMA Functions The structure of the user program for sending the request and receiving the confirmation is exactly as described for the FMA service FDL_READ_VALUE (refer to Section 12.9.1). The differences simply result from using a different DB for storing the request or confirmation block.
Service and Diagnostics using FMA Functions 12.9.6 B8976060/02 Program Example for FDL_READ_STATISTIC_CTR Service For the example, DB 145 is set up to store the request and confirmation data.
B8976060/02 Service and Diagnostics using FMA Functions After accepting the confirmation block with HDB RECEIVE, the values are entered in the DB and can be read out. DB 145 0: 1: 2: 3: 4: 5: 6: 7: 8: 9: KH = 0000; KY = 000,000 KY = 029,000 KY = 000,000 KY = 010,000 KH = 0000; KY = 000,000 KY = 000,000 KY = 000,000 KY = 000,000 10:KH 11:KH 12:KH 13:KH 14:KH 15:KH 16:KH 17:KH 18:KH 19:KH 20:KH 21:KH 22:KH 23:KH 24:KH 25:KH 26:KH = = = = = = = = = = = = = = = = = Table 12.
Service and Diagnostics using FMA Functions B8976060/02 The structure of the user program for sending the request and receiving the confirmation is exactly as described for the FMA service FDL_READ_VALUE (refer to Section 12.9.1). The differences simply result from using a different DB for storing the request or confirmation block.
B8976060/02 12.9.7 Service and Diagnostics using FMA Functions Program Service Example for FDL_READ_LAS_STATISTIC_CTR For the example, DB 146 is set up to store the request and confirmation data. The following parameters must be specified for the FMA service: FDL_READ_LAS_STATISTIC_CTR: com_class service_code : : 00H 1EH = = request FDL_READ_LAS_STATISTIC_CTR After accepting the confirmation block with HDB RECEIVE, the values are entered in the DB and can be read out.
Service and Diagnostics using FMA Functions B8976060/02 The structure of the user program for sending the request and receiving the confirmation is exactly as described for the FMA service FDL_READ_VALUE (refer to Section 12.9.1). The differences simply result from using a different DB for storing the request or confirmation block.
C8976060/02 13 Clock Services Clock Services The CP 5430 TF/CP 5431 FMS clock function is implemented by a clock chip and clock software that uses the clock chip (clock task). There are two basic clock functions: 1. The clock keeps the time on the CP 5430 TF/CP 5431 FMS within the absolute limits of accuracy described in the technical data. This clock continues to run during a power down as long as the battery voltage is present. 2.
Clock Services C8976060/02 8--------------------1 Bit position for serial transmission via L2 0000t t t t Time of day: More significant part t t t t t t t t Milliseconds relative to 0:00 o’clock t t t t t t t t Less significant part t t t t t t t t Date: dddddddd Days relative to 01.01.
C8976060/02 13.1 Clock Services Network Topology, Clock Master/Slave Functions Within a SINEC L2 network, all the CP 5430 TF/CP 5431 FMSs can execute clock functions. The aim is to achieve network-wide clock synchronization. Station n CP 5430 TF CP 5431 FMS L2 CP 5430 TF CP 5431 FMS Station I Fig. 13.2 CP 5430 TF CP 5431 FMS Station II Network Topology The synchronization can be performed by one selected CP 5430 TF/CP 5431 FMS.
Clock Services C8976060/02 The station address is defined as the L2 address: Based on the L2 address, a time is stipulated after which the station attempts to become clock master. The following terms are important: ➣ Delay Time, corresponds to the L2 address in seconds. ➣ Update Time, selected time interval for transmitting clock synchronization frames. ➣ Undefined Time sum of the delay time and update time.
C8976060/02 Clock Services Example: the following table shows which station takes over the clock master function and if this fails, which station will replace it. Status Master possible Master not possible Dyn. Master Delay Time Master Y 03 Slave Y 07 Slave Y 08 Slave Y 10 Slave Y 12 Slave Y 13 Slave N 18 Slave N 21 Slave N 01 etc.
Clock Services 13.2 C8976060/02 How the Clock Functions The clock can have the following statuses: Power OFF 1 2 Clock invalid Start-up 8 3 Clock valid 9 7 4 Clock slave 5 6 Clock master = "invisible" CP operating statuses = "visible" CP operating statuses Fig. 13.3 Clock Statuses Description of the status transitions 1. When the CP starts up, the hardware clock of the CP 5430 TF/CP 5431 FMS is checked. 2. The status of the hardware clock was recognized as invalid. The clock must be reset.
C8976060/02 Clock Services 5. During the undefined time, no synchronization frame was received. The CP therefore attempts to take over the clock master function. 6. The current clock master has received a synchronization frame from a higher priority CP 5430 TF/CP 5431 FMS. The station once again assumes the status of clock slave. 7. The CP with the clock slave status recognizes an invalid time (e.g. defective hardware clock). 8.
Clock Services 13.3 C8976060/02 Several CP 5430 TF/CP 5431 FMS Modules on a SINEC L2 Bus Dynamic clock masters can be configured on an L2 bus. The L2 address determines which CP 5430 TF/CP 5431 FMS assumes the clock master function. A double definition is not possible. The clock is programmed in the Edit->Clock_Init screen. CP Type: Clock Master Editor Source: Clock master : N Sync cycle : 10 sec. F F F F F F F 1 2 3 4 5 6 7 Fig. 13.
C8976060/02 N Clock Services The CP 5430 TF/CP 5431 FMS receives synchronization frames if they exist in the L2 network. Sync cycle: 10 (sec) default If the CP 5430 TF/CP 5431 FMS is the clock master, it sends clock synchronization frames to the SINEC L2 network at the time intervals specified above. Possible values: 1 - 60 sec. F7 OK The data edited in the screen are entered as the current data.
Clock Services C8976060/02 Data format of the time in a DB of the PLC (S5 155 U format) 15 12 11 8 7 4 3 0 DW n: tens sec units sec 1/10 sec 1/100 sec DW n+1: tens hr units hr tens min units min DW n+2: tens day units day weekday 0 DW n+3: tens year units year tens month DW n+4: units month correction value Possible values (hexadecimal): 1/100 1/10 units tens units tens units seconds: seconds seconds seconds minutes minutes hours 0...9 0...9 0...9 0...5 0...9 0...5 0...
C8976060/02 Clock Services The following identifiers are possible replies to a "set time" job from the PLC. Reply (decoded IDs) Identifier OK, no error 00H Command could be executed without error. Protocol error 01H Time is invalid (was not set etc.). System error 0EH System error (e.g. invalid command). Hardware clock 0FH Hardware clock has failed.
Clock Services C8976060/02 The following identifiers are possible as the reply to a "read time" job of the PLC. Reply Identifier Meaning System error 0EH System error (e.g. with invalid command). Hardware clock 0FH Hardware clock has failed. Clock_Master 06H CP is clock master and executes this function. Clock_Slave 07H CP is clock slave. Clock_Slave, + invalid 08H Station has an invalid clock chip, clock must be reset. Clock_Slave, + asynchronous 09H Station not receiving clock frame.
C8976060/02 Clock Services Receive possible Job active ANZW Set clock Read clock 0 0 yes no 0 1 yes yes 1 0 no no 06H..0FH free 1 1 no yes Identifier X X Length word Fig. 13.5 ID in the Status Word of the Handling Blocks (HDBs) When the CP is starting up, the lower two bits of the status word are set to "set clock" and "read clock" not possible. During normal operation, these bits are set according to the CP clock status.
Clock Services 13.4 C8976060/02 Setting and Reading the Time with COM 5430 TF/CP 5431 FMS Using COM 5430 TF/CP 5431 FMS, it is possible to both set the hardware clock of the CP 5430 TF/CP 5431 FMS as well as to read the current time cyclically. The clock can only be read when it is in one of the following statuses: ➣ Clock master ➣ Clock slave substitute sync ➣ Clock slave asynchronous ➣ Slave > master ➣ Master > slave.
C8976060/02 Clock Services In the NCM menu, the following screen can be called under the menu item Utilities -> Clock Functions. CP type: Read Date/Time (EXIT) Source: WEEKDAY: DATE TODAY: CURRENT TIME: TIME DIFFERENCE (1/2 H): CLOCK MASTER : CP CLOCK STATUS: F 1 F UPDATE Fig. 13.6 SET 2 F F F F F F 3 4 5 6 7 8 Clock Functions Screen A clock read frame is then sent to the selected CP 5430 TF/CP 5431 FMS.
Clock Services F2 SET C8976060/02 The time can only be set when the CP status is "master clock" or "clock_slave_asynchronous" or when the clock chip of the CP 5430 TF/CP 5431 FMS is marked as invalid. Displays in the COM 5430 TF/CP 5431 FMS screen WEEKDAY: MONDAY - SUNDAY DATE TODAY: e.g. 29. 10. 1993 The data can be set within the limits 01.03.1984 to 31.12 2083. CURRENT TIME: e.g.
C8976060/02 13.5 Clock Services Restrictions / Tips The time should be read or set by the programmable controller (with RECEIVE) at a time interval > 10 ms. a) The hardware clock of the CP 5430 TF/CP 5431 FMS itself only has a resolution of 10 ms. b) By reading or setting the clock too quickly (cyclically) PLCs, the CP 5430 TF/CP 5431 FMS can be influenced to such an extent that the module is disabled for other activities.
Clock Services 13.6 C8976060/02 Accuracy The hardware clock of the CP 5430 TF/CP 5431 FMS has a maximum deviation of 11.94 s/day or 8.3 ms/min. This deviation is based on a calculation involving the quartz inaccuracy and temperature fluctuation. ➣ Absolute accuracy The absolute accuracy of the clock chip on the CP 5430 TF/CP 5431 FMS is in the worst case +/- 11.94 sec per day.
C8976060/02 Clock Services If the CP is in a transitional status, i.e. it has not received a synchronization frame, and is attempting to become master, then depending on the L2 address, larger deviations are possible (refer to Table 13.2). The bus parameters are not included in these calculations. Depending on the real CP load and parameter settings, greater deviations in the accuracy may be possible. Cycle time and resulting deviations in the time of day L2 address 1s 1 2 : 10 s 0.55 ms/s 0.
NOTES
B8976060/02 14 Documentation, Test Documentation and Testing The screens required for documentation or testing are provided by SINEC NCM as listed in Fig. 14.1 and Fig. 14.2. 14.1 Documentation Functions To give you the opportunity of producing lists with your programming, the following documentation and print functions are integrated. = Init Edit ...
Documentation, Test B8976060/02 = Init Edit ... SINEC NCM Menu item Network Network -> Documentation Menu item Utilities Request Editor -> Documentation All Topology All Applic. Associations ZP CI GP Overview Job Buffer DP Applic. Associations CP 5430 TF CP 5431 FMS Fig. 14.2 Menu Structure Network Documentation With footer on/off in the "Init -> Edit" screen (Chapter 6, Fig. 6.7) you can specify a footer file in which you saved a footer for the printout using the S5-DOS footer editor.
B8976060/02 14.2 Documentation, Test Test Suitable test and diagnostic tools are particularly important when installing SINEC L2 networks. For this reason, the software package COM 5430 TF/COM 5431 FMS under SINEC NCM provides a number of test functions. To allow you to test your configuration, the test and diagnostic functions shown in Fig. 14.
Documentation, Test ☞ 14.2.1 B8976060/02 With the test functions, only the data exchange between the PLC and CP via the S5 backplane bus is monitored. The data transmission from the CP on the L2 bus cannot be checked with the test functions (to check this traffic, use the SINEC L2 bus monitor "SCOPE L2"). If PLC or bus errors occur, COM 5430 TF/COM 5431 FMS uses the various messages contained in the status word (ANZW) of the handling blocks and the link_status of the confirmation header.
B8976060/02 Documentation, Test 14.2.1.1 Total Status The screen has the following structure (examples of parameters): (EXIT) CP Type: Total Status S5S5 / Free Layer 2 Links L2 station address: Sel. Source: 8 SSNR ANR L status 0 0 1 0120 1 0 101 0120 2 0 200 0120 POS J type J status J error Send- S5S5 0001 0000 Recv- S5S5 0001 0000 Send- FMA 0001 0000 Cha Message line F 1 F UPD ON Fig. 14.
Documentation, Test B8976060/02 J type: Job type: the following job types can be distinguished: SEND - S5-S5 RECV - S5-S5 SEND - FL 2 RECV - FL 2 SEND - FMA RECV - FMA J status: Job status (see Table 14.2). J error: Job error with S5-S5/free layer 2 communication. Cha: Indicates a status change with " * " . Function keys: F1 UPD ON Using this key, you can update the content of the screen.
B8976060/02 Documentation, Test Link statuses Based on the link statuses, you can see the current status of a configured link. Hex value ID Meaning 0120H LINK_LAYER_2 Layer 2 link is established. 0180H CANNOT_EST Layer 2 link cannot be established. Table 14.
Documentation, Test B8976060/02 Job status Hex Meaning 0000H Initial status, no current job exists 0001H No job processing at preset 0021H Await-Indication Request field sent to layer 2. 0022H Data being transferred to PLC 0023H CP waiting for transfer of an indication. 0024H Error in indication transfer (FL2). 0025H Error in the indication ( S5-S5) -> Await-Request field to layer 2. 0026H Incorrect request field transfer with send direct 0031H Request field transfer to layer 2.
B8976060/02 Documentation, Test Errors in S5-S5/free layer 2 communication Error ID Meaning 0000H No error 0001H Wrong block type for SEND-DIRECT. 0002H Memory area does not exist on PLC 0003H Memory area too small 0004H Timeout 0005H Error in status word 0006H Data too long or short for S5-S5 and FL2. 0007H No local resources 0008H No remote resources. 0009H Remote error 000AH Link error 000CH System error Table 14.
Documentation, Test B8976060/02 14.2.1.
B8976060/02 Documentation, Test J status: Job status. Presentation of the action coded (see Table 14.2) and in text form. J error: Job error in S5-S5/free layer 2 communication (see Table 14.3) and in text form. L status: Displays the link status coded (hexadecimal) (refer to Table 14.1) and in text form. L error: Link error FDL error message (see Table 14.4). SSNR: Page via which the PLC and CP communicate. ANR: Job number.
Documentation, Test B8976060/02 FDL error messages These error messages are returned acknowledgment (Confirmation). ID link_status as the link status in Meaning L2_LST_OK 0x0000 ack. positive L2_LST_UE 0x0001 rem. user interface error L2_LST_RR 0x0002 no remote resources L2_LST_RS 0x0003 rem service or SAP error L2_LST_DL 0x0008 resp. data low available L2_LST_NR 0x0009 no resp. data rem. L2_LST_DH 0x000a resp. data high available L2_LST_RDL 0x000c neg. ack., resp.
B8976060/02 14.2.2 Documentation, Test GP Test Functions With the GP test functions, the user can determine the statuses of individual parts of the system and localize any errors from the PG. 14.2.2.1 Total Status of the GP Jobs The total status of the GP jobs provides you with an overview of all or some of the data transmission statuses. The status job requests the statuses of the station from the point of view of the local station. Up to 32 stations and their statuses can be displayed in two columns.
Documentation, Test B8976060/02 Output fields: L2 add: Here, the L2 addresses of the master stations in the logical ring are displayed. GP inp: "X" indicates all the stations from which GP input bytes are expected. PLC stat: Indicates the PLC status. The status can only be RUN or STOP. Cycle errors: A data delay is indicated by "X". Function keys: F1 UPD ON Volume 1 Using this key, you can update the content of the screen.
B8976060/02 Documentation, Test 14.2.2.2 Display of the GP Output Values The GP output values are displayed as bytes in ascending order. The screen with the example parameters has the following structure: L2 station address: Sel. Source: Status of GP: 2 Pos. Output GO 0 PY20 GPY 100 KH= 0 KM= 0000 0000 1 PY21 GPY 101 KH= 0 KM= 0000 0000 F 1 (EXIT) CP type: Test Functions / GP Outputs F UPD ON 2 Fig. 14.
Documentation, Test B8976060/02 Pos: Line index. Output: Physical assignment of the output bytes of this station. GO: Global Object or object name of the output. Symbol: Symbolic name of the output. Value Value of the output in KH (hexadecimal) and KM (bits). Function keys: F1 UPD ON Using this key, you can update the content of the screen. Pressing this key activates the automatic, cyclic updating of the screen data, pressing it again deactivates the automatic updating.
B8976060/02 F8 DESELECT Documentation, Test With this key, you can cancel the selection made with F7. With the page up and page down keys you can page through the lines of the screen if they cannot all be displayed.
Documentation, Test B8976060/02 14.2.2.3 Display of the GP Input Values The GP input values are displayed as byes in ascending order. The screen has the following layout: L2 station address: Sel. 2 Incorrectly programmed station: Pos. GO Input Sender Value 0 GPB 10 PB 10 n.e. KH= 0 KM= 0000 0000 1 GPB 11 PB 11 n.e. KH= 0 KM= 0000 0000 Error F F F F F F F 1 UPD ON 2 3 4 5 6 7 Fig. 14.
B8976060/02 Documentation, Test Sel: Indicates with an asterisk that a line is selected. Pos: Line index. GO: Global object or object name of the input. Input: Physical assignment of the input bytes of this station. Sender: L2 address of the GP sender. A GP byte, that has not yet been received cannot be assigned to a sender and is marked as n.e. (non-existent). Value: Value of the input in KH (hexadecimal) and KM (bits).
Documentation, Test B8976060/02 With the page up and page down keys you can page through the lines of the screen if they cannot all be displayed.
B8976060/02 14.2.3 Documentation, Test ZP Test Functions (CP 5430 TF) With the ZP test functions you can determine the status of individual parts of the system during communication and localize any errors that are detected on the PG. 14.2.3.1 Total Status of the ZP Jobs The total status of the ZP Jobs is displayed in the form of lists. The screen has the following structure: CP Type: Source: Test Functions / ZP Total Status L2 station address: Sel. Pos. 1 Rem. add.
Documentation, Test B8976060/02 Pos: Display position. links are displayed in ascending order (0-255). rem. add.: Address of the remote station. DSAP: Remote SAP of the configured link. Output area: Physical output area of a ZP link. Input area: Physical output area of a ZP link. M: Specifies how often a station is entered in the polling list. Status: Provides the status of the selected station (hexadecimal) (see Table 14.4 and Table 14.5).
B8976060/02 Documentation, Test ID Status Meaning ZP_ERR_START 0x00F0 Start-up ID ZP_ERR_DIAG_REQ 0x00F1 Diagnostics request from ET200U ZP_ERR_INP_TOO _LONG 0x00F3 Input area> receive_len of frame ZP_ERR_I_FRA_TOO _LONG 0x00F4 Input area < receive_len of frame Table 14.
Documentation, Test B8976060/02 14.2.3.2 Display of the ZP Output Values The ZP output values are displayed as byes in ascending order. The screen has the following layout: (EXIT) CP Type: Test Functions / ZP Outputs L2 station address: Sel. Source: 2 Pos. Output Rem. add. DSAP Value 0 PB32 60 44 KH= 0 F F 1 UPD ON 2 Fig. 14.
B8976060/02 Documentation, Test Output: Physical assignment of the output bytes of this station. Rem. add: Remote L2 address or address of the remote station. DSAP: Remote SAP of the configured link. Value value of the output in KH (hexadecimal) and KM (bits). Function keys: F1 UPD ON Using this key, you can update the content of the screen. Pressing this key activates the automatic, cyclic updating of the screen data, pressing it again deactivates the automatic updating.
Documentation, Test F8 DESELECT B8976060/02 With this key, you can cancel the selection made with F7. With the page up and page down keys you can page through the lines of the screen if they cannot all be displayed.
B8976060/02 Documentation, Test 14.2.3.3 Display of the ZP Input Values The GP input values are displayed as byes in ascending order. The screen has the following layout: (EXIT) CP type: Test Functions / ZP Inputs L2 station address: Sel. 2 Pos. Input Rem. add. DSAP Value 0 PB36 60 44 KH= 0 KM= 0000 0000 1 PB37 60 44 KH= 0 KM= 0000 0000 2 PB38 60 44 KH= 0 KM= 0000 0000 F 1 Source: UPD ON F F F F F F 2 3 4 5 6 7 Fig. 14.
Documentation, Test B8976060/02 DSAP: Remote SAP of the configured link. Value: Value of the input in KH (hexadecimal) and KM (bits). Function keys: F1 UPD ON Using this key, you can update the content of the screen. Pressing this key activates the automatic, cyclic updating of the screen data, pressing it again deactivates the automatic updating.
B8976060/02 14.2.4 Documentation, Test DP Test Functions With the DP Test Functions you can find out the statuses on individual DP slaves and the DP master ONLINE and to localize any errors. 14.2.4.1 DP Total Status The test function total status of the DP jobs displays a list of the communications statuses of all configured DP slaves. The screen has the following layout: (EXIT) CP Type: Source: Test Functions / DP Total Status PLC status : DP station poll. cyc.
Documentation, Test B8976060/02 DP station status: Local DP master mode with the following meaning: RUN: DP polling list is processed. STOP: DP polling list is not processed. Clear: DP polling list is processed, all output data bytes are sent with the value "0". DP station L2 add: Bus address of the DP master (CP). DP station poll. cyc. timeout: An asterisk indicates that the DP polling list could not be processed in the set time. Cycl.
B8976060/02 Documentation, Test Function keys: F1 UPD ON This key switches on automatic cyclic updating of the screen data. F1 UPD OFF This key switches off automatic cyclic updating of the screen data. F2 SING-STAT This key branches to the screen for the DP single status. The selection criterion is the cursor position (inverse bar).
Documentation, Test B8976060/02 14.2.4.2 DP Single Status The screen for the test function "DP single status", which can be called in the total status screen, has the following layout: (EXIT) CP type: Test Functions / DP Single Status Source: Data being updated - CP in RUN Slave Slave Master Vendor Group L2 address name L2 address ID ID. : : : : : Station diagnos.: StationNonExistent StationNotReady InvalidSlaveResponse ServiceNotSupported MasterLock WatchdogOn Device diagn.
B8976060/02 Documentation, Test Vendor ID: The configured vendor ID or (if possible) the vendor ID sent by the slave is displayed here. Group ID: The group ID of the DP slave specified in parameter assignment is displayed here. PLC status: The mode of the PLC is displayed here (RUN/STOP). DP station status: Local DP master mode with the following meaning: RUN: DP polling list is processed. STOP: DP polling list is not processed.
Documentation, Test B8976060/02 DP slave I/O configuration - DP slave works with consistent I/O areas, but the free mode is configured on the CP. Device diagn.: Here, the general DP slave device-specific diagnostic messages are displayed, see documentation of the DP slave). As soon as ID and/or channel-related diagnostic information exists, this is indicated by COM. After stopping the DP single status updating with F1, you can branch to the ID and channel-related diagnostics with F3 "ID&C DIAG".
B8976060/02 14.2.5 Documentation, Test FMA Test Functions These test functions are used to read out the Layer 2 statistics. 14.2.5.1 Local Life List This screen contains a list of all the active and passive stations on SINEC L2. The screen has the following structure: CP type: Source: Local Life List L2 address 1 Station status 1 Active station in logical token ring 2 Active station in logical token ring F F PAGE + 2 Fig. 14.
Documentation, Test B8976060/02 Function keys: F1 PAGE + Page one page forwards. F2 PAGE - Page one page backwards. 14.2.5.2 Station-oriented Statistics This screen contains station-related statistical information.
B8976060/02 Documentation, Test Output fields: Counted values about station statuses. 14.2.5.3 Bus-oriented Statistics This screen contains bus-oriented assessment of the bus response.
NOTES
B8976060/02 15 Utilities Utilities The following figure is an overview of all the utilities available under the Utilities menu item. The individual utilities are described in this chapter. = Init Edit ... SINEC NCM Menu item Utilities Request Editor Volume 2 Fig. 15.1 Bus Selection Sec. 15.1 Clock Functions Chap. 13 Convert (CP 5430 TF) Sec. 15.3 Change Subm. Size Sec. 15.
Utilities 15.1 B8976060/02 PG Functions on the SINEC L2 Bus The PG functions on the SINEC-L2 Bus allow you to obtain, monitor and configure stations (CPs, CPUs) in the network topology from a central PG. A link from a PG to the required station is known as a path. Using this path, all the normal programming functions can be executed as if a direct point-to-point link existed. The selected devices or CPs on the path are known as nodes. There are basically two ways of configuring a path.
B8976060/02 Utilities The PG has an internal L2 interface: PG e.g.CP L2 L2 ENDP "Dest CP" (e.g. CPU connected to dest. CP with a "swing cable") Fig. 15.3 PG via Internal L2 Interface (Path_2) This path (see Fig. 15.2,15.3), symbolized by the path name can be used to monitor the selected station and if necessary to reconfigure it using the appropriate software packages (COM, LAD/CSF/STL). The two paths shown here are examples that can be extended and modified to fit other topologies.
Utilities B8976060/02 PG 511 MUX * PG CP-H1 CP-H1 SINEC H1 CP-H1 PG 511 MUX * MUX * PG CP-H1 CP-L2 CP-L2 SINEC L2 CP-L2 MUX * CP-L2 SINEC L2 ENDP CP-L1 CP-L2 SINEC L1 MUX * ENDP ENDP MUX * In the diagram, this is an alternative to a direct connection, however, the maximum number of MUX levels is two. Fig. 15.
B8976060/02 15.1.1 Utilities Bus Selection - Creating Paths in Path Files To be able to obtain remote active stations on the SINEC L2 bus with the PG, the "BUS SELECTION" utility is available under the SINEC NCM menu item. This provides tools with which you can edit paths and store them in a path file. Selecting a remote station via the L2 bus is only possible with S5-DOS from Stage VI onwards. In the BUS SELECTION utility, you edit a dedicated link from a PG to the required station.
Utilities B8976060/02 With the TERMINATE command of this utility, or by calling a different PATH, you can terminate a dedicated link again. Example of a Path:: PG-->COR/MUX-->CP 5430 TF-->CP 5430 TF-->COR/MUX-->ENDP 15.1.2 Editing a Path The method of editing a path is described in the manual for your PG under the utility "BUS SELECTION". Here, the procedure for the paths represented in Figs. 15.2 and 15.3 will be illustrated.
B8976060/02 Utilities – Activate the path only as far as the internal L2 interface module. – Check and if necessary match the internal SYSID. The set bus parameters of the internal L2 interface module must not collide with the bus parameters of the external L2 CPs (e.g. data rate). – Activate the remaining nodes of the path.
Utilities 15.1.3 B8976060/02 Activating the Edited Path Before activating a path starting from a CP L2, the local (SYSID) parameters of the CP L2 must be matched to the L2 bus parameters. How is the PATH activated? An edited path can be activated as follows: ➣ In the NCM menu under menu item Init->Path selection (>screen: INIT PATH DEFINITIONS). ➣ In an S5 program package intended for path selection. DR CP link: Path file : Path name .INI F F F F F F F 1 2 3 4 5 6 7 Fig. 15.
B8976060/02 Utilities The screen for Init->Path selection has the following structure Input fields: CP link /Path file: Format: drive: file Drive Here, you must specify the drive you wish to work with. If you press F8, possible drives are displayed for selection. Path file Paths with different path names can be stored in this PATH FILE. A path file can contain up to 100 different paths. The path files are all of the type AP.INI (range of values: max. 6 ASCII characters).
Utilities 15.2 B8976060/02 Change Submodule Size You can change the submodule size (16/32/64 bytes) using the menu item with this name in the Utilities menu. Change Submodule Size SINEC NCM (EXIT) Database file : Current submodule size : 32 KByte Currently requiered submudule size : 31200 New submodule size : 64 KByte C : QDPDP1 Byte F F F F F F F 1 BACK 2 3 4 5 6 7 Fig. 15.
B8976060/02 Utilities Output fields: Current submodule size: Memory capacity of the submodule in Kbytes (values: 16/32/64) Currently required Memory requirements of the currently selected submodule size database file in bytes; (minimum submodule size) Function keys: F1 BACK F7 OK F8 SELECT With the BACK function, you can reverse the change. The old submodule size is selected again. Starts the conversion to the new submodule size.
Utilities 15.3 B8976060/02 Convert CP 5430 Database old - new (CP 5430 TF) The CP 5430 TF has its own menu item under "Utilities" with which you can convert old CP 5430 databases to new ones. SINEC NCM (EXIT) Convert CP 5430 Database old - new Source file : C Network file : C : Dest: : NETZ1NCM.NET F F F F F F F 1 2 3 4 5 6 7 Fig. 15.
B8976060/02 Utilities Network file: Format: drive: network file name - Drive: Here, you specify the drive with which you want to work. Press F8 to display a list of drives for selection. - Network file name: Destination network file where the new database will be saved. The new database name is displayed in the "Dest:" output field and matches that specified with "Init -> Edit". The database file specified for conversion must be new. F7 OK F8 SELECT This function key starts the conversion.
NOTES
B8976060/02 16 Working with the Application Examples Working with the Application Examples On the COM 5430 TF/COM 5431 FMS diskette, you will find all the COM and STEP 5 user files required to work through the application examples. The application examples were written for RAMs on both the CPs and the CPUs. The following general procedure is recommended for working with the example programs: ➣ Delete the CPUs and switch to the STOP mode.
Working with the Application Examples B8976060/02 The following list include all the COM and STEP 5 files required for the application examples: List of example programs for the CP 5430 TF: S5-S5 AGAGT1ST.S5D AGAGT2ST.S5D OAGAG.115 OAGAG.155 AGAGONCM.NET AGAGONCM.BPB LAYER2 LAY2T1ST.S5D LAY2T2ST.S5D LAY2ONCM.NET LAY2ONCM.BPB OLAY2T1.155 OLAY2T2.115 GP OGPTLN1.155 OGPTLN2.115 OGPTLN3.135 GP115UST.S5D GP155UST.S5D GP135UST.S5D GPO@@NCM.NET GPO@@NCM.BPB DP DIAGNOST.S5D STATIOST.S5D EINZELST.S5D ODPTLN1.
B8976060/02 Working with the Application Examples ZP OZPTLN1.115 ZP115UST.S5D ZP95U@ST.S5D ZP@@@NCM.NET ZP@@@NCM.BPB TF TF115UST.S5D OTFTLN1 OTFTLN2 TF@@@NCM.NET TF@@@NCM.BPB List of example programs for the CP 5431 FMS: S5-S5 AGAGT1ST.S5D AGAGT2ST.S5D QAGAG.115 QAGAG.155 AGAGQNCM.NET AGAGQNCM.BPB LAYER2 LAY2T1ST.S5D LAY2T2ST.S5D LAY2ONCM.NET LAY2ONCM.BPB QLAY2T1.155 QLAY2T2.
Working with the Application Examples B8976060/02 GP QGPTLN1.155 QGPTLN2.115 QGPTLN3.135 GP115UST.S5D GP155UST.S5D GP135UST.S5D GPQ@@NCM.NET GPQ@@NCM.BPB DP DIAGNOST.S5D STATIOST.S5D EINZELST.S5D QDPTLN1.115 DP115UST.S5D DPQ@@NCM.NET DPQ@@NCM.BPB FMS FERTIGST.S5D LAGER@.ST.S5D QFERTIG.TN1 QLAGER.TN2 QZIBEIS.TN1 FMS2@NCM.NET FMS2@NCM.BPB ZIBEISST.S5D FMS1@NCM.NET FMS1@NCM.
B8976060/02 Appendix 17 Appendix 17.
Appendix B8976060/02 SAP Use ANR 0 Disabled ------------ 1 Disabled ------------ 2 . . . 33 These SAPs are normally used for S5S5. Their use for free layer 2 access or FMS application associations is possible as long as the memory limits are kept to (total number of links); double use of a SAP must, however, be avoided. 1 - 32 Send S5S5 link 101-132 Receive S5S5 link 34 . . . 53 These SAPs are normally used for free layer 2 access.
B8976060/02 17.
Appendix B8976060/02 SAP Use ANR 0 Disabled ------------ 1 Disabled ------------ 2 . . . 33 These SAPs are normally used for S5S5. Use as "free channels" is only possible when less than the maximum number of links have been defined. 1 - 32 Send S5-S5 link 101-132 Receive S5-S5 link 34 . . . 53 These SAPs are not used by the system program of the CP 5430 TF and are available as "free channels" .
B8976060/02 17.3 Appendix SAP - Job Number Assignment Before you can work with free channels, the SAPs involved must be configured with the free layer 2 links. While the dual-port RAM sizes are limited to 128 bytes for the predefined S5S5 links, data units of up to 256 bytes can be exchanged using "free channels". This allows transmission of blocks of data with a maximum length of 242/256 bytes. The first 8 bytes of these 256 bytes are used for the header.
Appendix 17.4 B8976060/02 Overview of the Error Messages The error messages are listed here to provide you with an overview. 17.4.1 Messages in the status word for predefined S5S5 links, free layer 2 and FMA Not used Error bits Data mgment. 15 14 13 12 11 10 9 8 If bit set Fig. 17.
B8976060/02 Bits 8 -11 Appendix Meaning of the error bits 0H No error. If bit 3 "job complete with error" is nevertheless set, this means that the CP has set up the job again following a cold restart or RESET. 1H Wrong type specified in block call (QTYP/ZTYP). 2H Memory area does not exist (e.g. not initialized). 3H Memory area too small. The memory area specified in the HDB call (parameters Q(Z)TYP, Q(Z)ANF, Q(Z)LAE) is for too small for the data transmission. 4H Timeout (QVZ).
Appendix Bits 8 -11 B8976060/02 Meaning of the error bits 9H* Remote error. The remote CP has acknowledged the job negatively because e.g. the SAP assignment is incorrect. Remedy: reassign parameters for the link. AH* Connection error. The sending PLC or receiving PLC is not connected to the bus. Remedy: switch systems on/off or check bus connections. BH Handshake error. The HDB processing was incorrect or the HDB monitoring time was exceeded. Remedy: start the job again. CH System error.
B8976060/02 Appendix The following table lists the Profibus error IDs (link_status) modeled on the S5-S5 error messages.
Appendix 17.4.2 B8976060/02 Global I/Os - Error Bits Structure of the status word for HDB SEND (ANR 210) and RECEIVE (ANR 211) Not used Error bits Data mgment. 15 14 13 12 11 10 9 8 7 6 5 4 Status bits 3 2 1 0 Job complete with error* (e.g. invalid job number) Job complete without error Synchronization done without error SEND synchronization disabled RECEIVE synchronization possible (Input GP was received) * Bit 3 of the status bits is not connected with the error bits (8..11).
B8976060/02 Bit Appendix 11 10 9 8 of the status word Transmission delay in the other station, i.e. the PLC cycle was faster than the transfer capacity of the L2 bus (transmitted data of the remote station could not be fetched quickly enough by the L2 bus). or Reception delay in the local PLC, i.e. the transfer capacity of the L2 bus was faster than the PLC cycle (while the received data was being evaluated in the local PLC, the L2 bus had supplied new data data which could no longer be evaluated).
Appendix B8976060/02 Evaluation of the GP station list (HDB RECEIVE with ANR 201) Every CP that receives global I/Os manages a GP station list internally. This list is 32 bytes long. Each of the 32 bytes provides information about the status of an active L2 station (max. 32 stations) using global objects with which the stations evaluating the station list are "connected". Byte no.
B8976060/02 Appendix Explanation of the individual bits of the status byte: 7 Bit 6 5 4 3 2 1 0 0=no 1=yes Status byte of the local station: The complete expected GP is OK Status byte of the remote station: Input GP expected from this station is ok Status byte of the local station: Station expects input GP from other stations Status byte of the remote station: Input GP expected from this station Status byte of the local station: All remote stations are in RUN status Status byte of the remote stati
Appendix 17.4.3 B8976060/02 Cyclic I/Os Error Messages Not used Error bits Data mgment. 15 14 13 12 11 10 9 8 Status bits 7 6 5 4 3 2 1 0 Job complete with error* (e.g. invalid job number) Job complete without error Synchronization done without error SEND synchronization disabled RECEIVE synchronization possible (Input GP was received) * Bit 3 of the status bits is not connected with the error bits (8..11). When bit 3 is set, the error is not specified by the error bits.
B8976060/02 Appendix Error bits for RECEIVE-HDB (ANR 211) Bit 11 10 9 8 of the status word Reserved for GP error message Reserved for GP error message Reserved for GP error message ZP image is incomplete (either all stations have not yet started up or at least one station has dropped out) Fig. 17.
Appendix B8976060/02 Structure of the ZP station list (ANR 202) The station list has a length of 16 bytes, with each bit assigned to a station address. 0 Byte 1 15 2 - 14 Bit 7 6 5 4 3 2 1 0 7 6 5 Station address 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - 119 120 Fig. 17.
B8976060/02 17.4.4 Appendix DP Error Displays Structure of the status word for HDB SEND (ANR 210) and RECEIVE ANR 211). Not used Error bits Data mgment. 15 14 13 12 11 10 9 8 7 6 5 4 Status bits 3 2 1 0 Job complete with error* (e.g. invalid job number) Job complete without error Synchronization done without error SEND synchronization disabled RECEIVE synchronization possible (Input DP was received) * Bit 3 of the status bits is not connected with the error bits (8..11).
Appendix B8976060/02 DP group messages of the DP station list The DP ANZW bits 8-11 of job 202 provide the following DP group message: Bit 11 10 9 8 of ANZW/A-NR: 202 0 = no error, all the configured DP slaves are in the data transfer phase 1= at least one DP slave is not in the data transfer phase Cause of error, what to do: To find out which slave(s) is affected, you must read out the DP station list using HDB-RECEIVE A-NR: 202.
B8976060/02 Appendix Structure of the DP station list (ANR 202) The DP station list has a length of 16 bytes (128 bits). Each bit of the DP station list corresponds to one of the possible station addresses on the bus of the DP slave stations.
Appendix B8976060/02 Meaning of the acknowledgment messages for special job ANR 209 Acknowledgment: 00 Hex 01 Hex 02 Hex 03 Hex 04 Hex 05 Hex 06 Hex 07 Hex 08 Hex 09 Hex 0A Hex 0B Hex 0C Hex Volume 1 No error Syntax error in job field. Error in HDB handling. CP not in logical token ring. Slave station not configured. Slave not responding (failed).
B8976060/02 17.5 Appendix Overview of the FMA Services Relevant bytes in the request field You want to.... .. then use the service FDL request (byte 0) Service code (byte 2) SAP no. Read current bus parameters FDL_READ _VALUE 00H OBH (= 11) _____ ______ Read status values of an SAP LSAP_STATUS 00H 19H (= 25) 2...63 0...
Appendix Byte 0 B8976060/02 Field to be sent (request) Byte com_class Field received (Confirmation/Indication) 0 com_class FDL confirmation = 01H (acknowledgment from layer 2 firmware after FDL request) or FDL Indication = 02H (data received) FDL request=00 (service request to layer 2) 1 user_id Freely assigned ID that is returned unchanged in the confirmation 1 user_id Identifier assigned in an FDL request (only relevant for confirmation; with indication the value is "0") 2 service_code Typ
B8976060/02 Value of link_status Appendix Abbreviation PROFIBUS Meaning SDA 00H 01H 02H OK UE RR 03H 11H 12H RS NA DS Positive-acknowledgment, service executed. Negative-acknowledgment, remote user/FDL interface error. Negative-acknowledgment, resources of remote FDL controller not available. Service or rem_add on remote SAP not activated. No reaction (Ack./Res.) from remote station. Local FDL/PHY not in logical ring or disconnected from the bus.
Appendix 17.6 B8976060/02 Calculation of the Target Rotation Time (TTR) The TTR is dependent to a great extent on the data rate and the number of active stations (NAS). 17.6.1 Overview Parameter Retry-Counter Slot-Time* Explanation Number of attempts to re-transmit when transmission unsuccessful. Wait to recieve time (or wait for reaction time). This is the time the sender(initiator) of a request has to wait until the addressed station reacts.
B8976060/02 Appendix Parameter GAP Update Factor Explanation The address area between the local station address of an active station and the address of the next active station is known as the GAP. The GAP addresses are checked cyclically to obtain the status of stations in the GAP address area ("not ready", "ready" or "passive"). If the status is "ready", the station is a new active station and the token is passed to it.
Appendix B8976060/02 Orientation values for the INIT parameters Recommended default parameters: Data rate (in Kbps)) 9.6 19.2 93.75 187.
B8976060/02 Appendix Proceed as follows to calculate the required target rotation time: ➣ Work out the maximum possible number of frames from all stations that can occur in one token rotation distinguishing between the different types of frame (e.g. SDN, SDA frames). Frames on predeifined S5-S5 links count as SDA frames. ➣ Calculate the "worst case" target rotation time using Table 17.13. You must then add 11 bit time units for every data byte to the basic overhead from the table (BTU).
Appendix B8976060/02 Selecting the GAP update factor: The GAP update factor decides how many token rotations take place before all the active stations check their GAP area. If you require a low bus load, select a high GAP update factor. Stations that have dropped out of the ring and wish to re-enter it are registered later in this case. If, on the other hand, you want such stations to be included in the ring as soon as possible, then select the GAP update factor as small as possible.
B8976060/02 Appendix Calculation of the volume of frames and time required: Type of frame Number Overheads from column 187,5 Kbps Table 17.13 Token 3 (stations) x 320 960 GAP 1 (GAP upd.
Appendix 17.7 B8976060/02 Calculating the Switch-off and Reaction Times of the Global I/Os Calculation of the switch-off cycle-synchronized modes times Tso for the free and The CP 5430 TF/CP 5431 FMS "registers" the failure of a station only after the switch-off time Tso has expired. After this time, the CP resets the GP inputs, i.e. the input bytes assigned to this station are set to the value "0".
B8976060/02 Appendix The shape of the curve is similar for all data rates; it always consists of areas 1 and 2. The curves for different data rates differ in - The position of the "dog-leg" separating areas 1 and 2. and - The angle of the curve in area 2. The switch-off times (in seconds) for the different data rates can be calculated based on the following table (BTU=bit time units): Switch-off time in area 1 Data rate Switch-off time in area 2 TTRlimit = 317 BTU 9.
Appendix B8976060/02 Calculation of the reaction time TR of the global I/Os In the CYCLE-SYNCHRONIZED mode, the time interval between HDB SEND (RECEIVE) calls in the control program determines the reaction times of the global I/Os. In the FREE mode, you can calculate the minimum time interval between two consecutive "changed value frames" (the CP sends only data whose values have changed!).
B8976060/02 Appendix The shape of the curve is similar for all data rates; it always consists of areas 1 and 2. The curves for different data rates differ in - The position of the "dog-leg" separating areas 1 and 2. and - The angle of the curve in area 2. The reaction times (in milliseconds) for the different data rates can be calculated based on the following table. Data rate Switch-off time in area 1 Switch-off time in area 2 TTRlimit = 3177 BTU 9.
Appendix B8976060/02 Example: You have set a TTR of 4000 BTU at a data rate of 187.5 Kbps. Based on the table this means: Switch-off time Tso = Tsomin = 1.06 s Reaction time TR = TRMin = 132 ms Now increase the TTR to 10,000 BTU at the same data rate. Result: Switch-off time Tso = 0.000128xTTR(s) = 1.28 s Reaction time TR = 0.016xTTR(ms) = 160 ms.
B8976060/02 A Abbreviations Abbreviations Abbreviations A ALI Application Layer Interface ANR Job number (for handling blocks) ANZW Status word AP Automation protocol layers 5 to 7 of the ISO/OSI reference model AS Active star coupler AS 511 511 interface, protocol for the communication between PLC and PG ASCII American Standard Code of Information Interchange B B Block BCD Binary coded decimal BE Block end C CC Central controller CI Cyclic interface CIM Computer Integrated Manu
Abbreviations B8976060/02 COR Coordination module CP Communications Processor CPU Central Processing Unit CSF Control System Flowchart, graphical representation of automation tasks with symbols CSMA/CD Carrier sense multiple access with collision detect D DA Destination Address DB Data block DCE Data Communication Equipment DIN Deutsches Institut für Normung (German Standards Institute) DIR Directory of data medium and files DMA Direct Memory Access DOS Operating system DP Distrib
B8976060/02 Abbreviations E EG/EU Expansion unit EIA Electronic Industries Association EPROM Erasable Programmable Read Only Memory ET 200 Electronic Terminal 200 F F Flag bit FB Function block FD Floppy Disk (data medium) FD Flag double word FDDI Fiber Distributed Data Interface FDL FDL2 Fieldbus Data Link (subfunction of layer 2) Free layer 2 communications FlexOs Multitasking operating system FMA Fieldbus Management Layer FMS Fieldbus Message PROFIBUS) FO Fibre Optic FW Fla
Abbreviations B8976060/02 G GO Global Object GP Global I/Os GPW Global Peripheral Word GPY Global Peripheral Byte GRAPH 5 Software package for planning sequence controllers and programming H HDB Handling blocks HSA Highest Station Address I IB Input byte IEC International Electronics Commission IEEE Institution of Electrical and Electronic Engineers IP Intelligent peripheral module ISO International Standardization Organization IW Input word K KOMI Command interpreter L LAD V
B8976060/02 Abbreviations LAN Local Area Network LB Link block LED Light Emitting Diode LEN Length of a block LLC Logical Link Control LLI Lower Layer Interface LSB Least Significant Bit M MAC Medium Access Control MAP Manufacturing Automation Protocol MMS Manufacturing Message Specification N NCM Network and Communication Management O OB Organization block OSI Open System Interconnection OW Word from the extended I/Os OY Byte from the extended I/Os P PAFE Parameter assignme
Abbreviations B8976060/02 PC Personal Computer PCI Protocol Control protocol) PCP/M-86 Operating system Personal CP/M-86 PDU Protocol Data Unit (frames consisting of PCI and SDU) PG Programmer PI Program invocation PI Process image PII Process image of the inputs PIQ Process image of the outputs PLC Programmable controller PNO PROFIBUS user organization PRIO Priority PROFIBUS PROcess Field BUS PW Peripheral word PY Peripheral byte Information Q QB Output byte QW Output wo
B8976060/02 Abbreviations RLO Result of logic operation (code bits) RS Recommended Standard RS 485 EIA standard (multipoint electrical data transmission capability) standard for S S5-S5 Special type of communication PLC with PLC SA Source Address SAP Service Access Point. Logical interface points on the interface between the layers via which the PDUs are exchanged between service users.
Abbreviations B8976060/02 SINEC L2 SINEC bus system for industrial applications based on PROFIBUS SINEC L2-FO SINEC bus system for industrial applications based on PROFIBUS with fiber optics SINEC L2-FMS SINEC bus system for industrial applications based on PROFIBUS with the FMS protocol SINEC L2-DP SINEC bus system for industrial applications based on PROFIBUS with the DP protocol SINEC L2TF SINEC bus system for industrial applications based on PROFIBUS with the TF protocol SINEC TF SINEC tech
B8976060/02 Abbreviations T TF Technological functions TSAP Transport Service Access Point TSAP-ID Transport Service Access Point Identifier TSET Set-up time TSDR Station delay TSL Slot-time TTR Target rotation time TPDU Transport Protocol Data Unit (size of the block of data transferred by the transport system) TSDU Transport Service Data Unit (size of the block of data transferred to the transport system with a job for transportation via a transport relation) TSEL Transport selector,
Notes
B8976060/02 Index Index A Ack.
Index B8976060/02 Cycle-synchronized Cyclic and acyclic transmission Cyclic communication 10-6 11-69 5-11 D Data rate Delete CP Medium connector Device-related diagnosis DIN E19245 Part 3 PROFIBUS-DP DP diagnostic list DP editor DP group message DP MASTER, class 1 DP MASTER, class 2 DP polling list cycle DP polling list, processing time DP slave DP slave diagnostic information DP slave single diagnosis DP slave, parameter assignment DP station list DPR page DSAP Dual-port RAM 6-26 6-49 4-2 11-59 11-4 1
B8976060/02 Index Global_Control GP station list Group identifier 11-66 9-18, 9-20 11-27 H Handling block (HDB) HDB Receive 202 ANZW HDB RECEIVE 211 HDB SEND 210 Highest station address 4-8 11-46 11-20 11-19 6-26, 6-29 I I/O area I/O areas ID-related diagnostics Ident_Number Installation and start Installation guidelines Interface assignments Interface number Interrupt 11-22 9-24, 9-28 11-59 11-58 6-10 4-21 4-18 4-9 7-13 J Job number 4-8 L L2 interface socket Layer 2 service link_status Local netw
Index B8976060/02 Memory submodules Menu structure SINEC NCM Minimum polling cycle Minimum station delay (min.
B8976060/02 Index R Response monitoring RPL_UPD_M RPL_UPD_S 11-29 8-3 8-3 S S5-S5 links characteristics Screen layout SDA SDN Service access point (SAP) Setup time (TSET) SINEC SINEC L2 SINEC L2 repeater SINEC L2-DP SINEC L2-TF SINEC L2FO SINEC technological functions (TF) Slot time (TSL) Slots SRD SSAP Start CP START/STOP response Status word Stop CP STOP DP polling list processing Sync Sync mode/Freeze mode SYSID block 7-1 7-2 6-6 5-3, 8-3 8-3 3-8 6-27 2-3 2-5 2-18 11-1 2-7 2-5 5-9 6-26 4-21 8-3 7-13
Index B8976060/02 Token rotation Token rotation time Transfer functions Transmission according to RS 485 Transmission medium Transmission with fiber optic cables 2-10 2-12 6-46 2-14 2-16 2-15 U Unfreeze Unsync Update PII 11-68 11-67 11-13 V Vendor identification 11-27 W Watchdog 4-11 Z ZP editor ZP station list Volume 1 10-24 10-18 B-6
B8976060/02 C Further Reading Further Reading /1/ N.N.: PROFIBUS Standard DIN 19245, Part 1 Beuth-Verlag Berlin 1988 /2/ Siemens: SINEC TF, Manual for Order No. 6GK1971-1AB00-0AA0 German Order No. 6GK1971-1AB00-0AA1 English SIEMENS AG 12/90 /4/ N.N.: EIA RS 485 Standard /5/ G. Mahlke, P. Gössig.: Lichtwellenleiterkabel: Grundlagen, Kabeltechnik SIEMENS AG, Berlin und München ISBN 3-8009-1501-4, 2Auflage 1988 /6/ N.N.: VDI VDE 3692 Sheet 2 /7/ N.N.
Further Reading B8976060/02 /11/ N.N.: PROFIBUS Standard DIN E19245, Part 3 Beuth-Verlag Berlin 1994 /12/ Siemens: CP 5431 FMS with COM 5431 FMS, Volume 2 Order no. refer to latest SINEC Catalog Siemens AG 07/94 /13/ Siemens: CP 5430 TF with COM 5430 TF, Volume 2 Order no.