Download PROFIBUS-DP Slave Protocol API
Transcript
Introduction 2/238 Table of Contents 1 Introduction.............................................................................................................................................5 1.1 About this Document......................................................................................................................5 1.2 List of Revisions .............................................................................................................................6 1.3 System Requirements....................................................................................................................7 1.4 Intended Audience .........................................................................................................................7 1.5 Technical Data ...............................................................................................................................8 1.6 Terms, Abbreviations and Definitions ..........................................................................................10 1.7 References ...................................................................................................................................11 1.8 Legal Notes ..................................................................................................................................12 1.8.1 1.8.2 1.8.3 1.8.4 2 Copyright ......................................................................................................................................... 12 Important Notes............................................................................................................................... 12 Exclusion of Liability ........................................................................................................................ 13 Export .............................................................................................................................................. 13 Fundamentals .......................................................................................................................................14 2.1 General Access Mechanisms on netX Systems ..........................................................................14 2.2 Accessing the Protocol Stack by Programming the AP Task’s Queue........................................15 2.2.1 Getting the Receiver Task Handle of the Process Queue ............................................................... 15 2.2.2 Meaning of Source- and Destination-related Parameters................................................................ 15 2.3 Accessing the Protocol Stack via the Dual Port Memory Interface..............................................16 2.3.1 Communication via Mailboxes......................................................................................................... 16 2.3.2 Using Source and Destination Variables correctly........................................................................... 16 2.3.3 Obtaining Information about the Communication Channel .............................................................. 19 2.4 3 DPS_ACYCLIC_ Client/Server Mechanism .............................................................................................................21 DATA_Ttag 2.4.1 Application as Client ........................................................................................................................ 21 2.4.2 Application as Server ...................................................................................................................... 22 Dual-Port Memory ................................................................................................................................23 3.1 Cyclic Data (Input/Output Data) ...................................................................................................23 3.1.1 Input Process Data .......................................................................................................................... 23 3.1.2 Output Process Data ....................................................................................................................... 24 3.2 Acyclic Data (Mailboxes)..............................................................................................................24 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3 General Structure of Messages or Packets for Non-Cyclic Data Exchange .................................... 25 Status & Error Codes ...................................................................................................................... 27 Differences between System and Channel Mailboxes .................................................................... 27 Send Mailbox................................................................................................................................... 27 Receive Mailbox .............................................................................................................................. 27 Channel Mailboxes (Details of Send and Receive Mailboxes) ........................................................ 27 Status ...........................................................................................................................................29 3.3.1 Common Status............................................................................................................................... 29 3.3.2 Extended Status .............................................................................................................................. 34 3.4 4 Control Block................................................................................................................................35 Getting started/Configuration .............................................................................................................36 4.1 Overview about Essential Functionality .......................................................................................36 4.2 Configuration Procedures ............................................................................................................37 4.2.1 Using a Packet ................................................................................................................................ 37 4.3 Warmstart Parameters .................................................................................................................38 4.3.1 Behavior when receiving a Set Configuration / Warmstart Command ............................................. 40 4.4 4.5 5 Process Data (Input and Output) .................................................................................................40 Task Structure of the PROFIBUS DP Slave Stack ......................................................................41 Overview................................................................................................................................................43 5.1 Classification of PROFIBUS-DP Devices ....................................................................................43 5.1.1 DP Master Class 1 .......................................................................................................................... 43 5.1.2 DP Master Class 2 .......................................................................................................................... 43 5.1.3 DP Slave ......................................................................................................................................... 43 5.2 Operation Modes..........................................................................................................................44 5.2.1 Operation Modes of PROFIBUS DP Masters .................................................................................. 44 5.2.2 Operation Modes of Profibus DP Slaves ......................................................................................... 44 5.3 Commissioning.............................................................................................................................47 5.3.1 Diagnosis......................................................................................................................................... 48 5.3.2 Parameterization ............................................................................................................................. 52 5.3.3 Configuration of Inputs and Outputs ................................................................................................ 54 PROFIBUS-DP Slave | Protocol API DOC050401API15EN | Revision 15 | English | 2013-09 | Released | Public © Hilscher, 2005-2013