Siemens SIMATIC NET CP 5613 Manual

Dp base programming interface
Table of Contents

Advertisement

Quick Links

SIMATIC NET
DP Base Programming Interface
for CP 5613/CP 5614
Manual
C79000-G8976-C108-02
Release 2 1999
Preface, Contents
Basic Steps in Creating a DP
Application
Overview of PROFIBUS DP
Overview of the DP Base
Interface
Description of the DP
Functions, Data, and Error
Codes
FAQ (Frequently Asked Ques-
tions)
Where to Get Help,
Index, Glossary
1
2
3
4
5

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC NET CP 5613

  • Page 1 SIMATIC NET Preface, Contents DP Base Programming Interface Basic Steps in Creating a DP Application for CP 5613/CP 5614 Overview of PROFIBUS DP Manual Overview of the DP Base Interface Description of the DP Functions, Data, and Error Codes FAQ (Frequently Asked Ques- tions) Where to Get Help, Index, Glossary...
  • Page 2 Trademarks SIMATIC ® and SIMATIC NET ® are registered trademarks of Siemens AG. Third parties using for their own purposes any other names in this document which refer to trademarks might infringe upon the rights of the trademark owners.
  • Page 3 Preface Purpose of the Manual This manual supports you when creating user programs for the DP programming interface of the CP 5613/CP 5614. It is assumed that you are familiar with writing user programs in the "C" programming language in Windows NT. Validity of the Manual This manual applies to the following software versions: CP 5613/CP 5614 (DP Base V1.0)
  • Page 4 Preface DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 5: Table Of Contents

    Contents Basic Steps in Creating a DP Application ..............9 Overview of PROFIBUS DP ...................13 Where Does PROFIBUS DP Fit In? ..............14 The Master-Slave Concept of PROFIBUS DP............16 Cyclic Polling by the Master.................18 Process Image of the DP Master .................19 Startup and Operational Phase of a DP System...........21 Modes of the DP Master ..................23 Separation of the Slave Data from the User Program...........25 Reliability of DP ....................27...
  • Page 6 Contents Description of the DP Functions, Data, and Error Codes ..........67 List of Functions of the CP 5613 and CP 5614.............68 4.1.1 Overview of the Functions ...................70 4.1.2 DP_start_cp ......................72 4.1.3 DP_reset_cp......................73 4.1.4 DP_open ......................74 4.1.5 DP_get_pointer ....................75 4.1.6 DP_release_pointer.....................77 4.1.7 DP_close......................78 4.1.8...
  • Page 7 Contents 4.3.12 Activating/Deactivating the Generation of Hardware Events .......172 4.3.13 Sending Data with the CP 5614 as DP Slave.............174 4.3.14 Receiving Data with the CP 5614 as DP Slave ..........175 4.3.15 Sending Diagnostic Data with the CP 5614 as DP Slave........176 Error Codes.......................177 4.4.1 Entries in the error_decode, error_code_1 and error_code_2 Structure...
  • Page 8 Contents DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 9: Basic Steps In Creating A Dp Application

    Basic Steps in Creating a DP Application This chapter recommends a step-by-step procedure for creating a DP user program based on the DP programming interface of the CP 5613 and CP 5614 known as "DP Base". The steps begin with the basics of PROFIBUS DP and are completed when you test your application.
  • Page 10 Basic Steps in Creating a DP Application Procedure The steps outlined below represent the fastest and simplest way of achieving your aims: Step Description Familiarize yourself with the basic principles of PROFIBUS DP. Read the following chapter 2 (“Overview of PROFIBUS DP"). Familiarize yourself with the basic characteristics of the DP Base programming interface of the CP 5613 and CP 5614.
  • Page 11 Basic Steps in Creating a DP Application Table continued from previous page Step Description Now create your own DP user program. You can use the "ExamComp" sample as a basis. Test your application. Refer to the information and tips in the FAQ list in Chapter 5 and the diagnostic tools described in the installation instructions.
  • Page 12 Basic Steps in Creating a DP Application DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 13: Overview Of Profibus Dp

    Overview of PROFIBUS DP This chapter will familiarize you with the basic principles of PROFIBUS DP. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 14: Where Does Profibus Dp Fit In

    1600 products are now available for use in PROFIBUS systems. Siemens has supported PROFIBUS for many years as an optimized fieldbus solution and reliable investment for the user and supplies both products and complete systems.
  • Page 15 Overview of PROFIBUS DP The Advantages of DP PROFIBUS DP is intended for fast data exchange in the fieldbus area. Distributed peripheral devices collect the input signals locally and transfer them via the fieldbus to the central controller in the PG/PC. In the opposite direction, the central controller sends the output data to the distributed peripheral devices.
  • Page 16: The Master-Slave Concept Of Profibus Dp

    Overview of PROFIBUS DP The Master-Slave Concept of PROFIBUS DP Distributed I/Os The distributed peripheral I/Os (abbreviated to DP in the remainder of this manual) allow a large number of analog and digital input/output modules to be used in a distributed structure in the immediate vicinity of the process.
  • Page 17 Overview of PROFIBUS DP DP Slave A DP slave is a peripheral device from which the master reads in input information and to which it sends output information. There are also devices that provide only input or only output information. Slaves are generally inexpensive since passive participation on the bus is simple to implement.
  • Page 18: Cyclic Polling By The Master

    Overview of PROFIBUS DP Cyclic Polling by the Master Polling Communication between the DP master and the distributed nodes takes the form of polling. Polling means that the DP master sends cyclic calls to its slaves during the productive phase. A separate call frame is sent to each DP slave. In one polling cycle, all the operational DP slaves are addressed.
  • Page 19: Process Image Of The Dp Master

    Overview of PROFIBUS DP Process Image of the DP Master Automatic Updating of the Data The CP 5613 or 5614 as the PROFIBUS DP master polls the data of the slaves continuously and buffers this data on the PC. The DP application accesses this data directly.
  • Page 20 Overview of PROFIBUS DP Data Areas There are three different data areas on the DP master for each configured DP slave, as follows: Input data from the DP slave Output data to the DP slave Diagnostic data from the DP slave The data are buffered by the CP 5613 or CP 5614 in memory that can be accessed by the AP application directly without requiring function calls.
  • Page 21: Startup And Operational Phase Of A Dp System

    Overview of PROFIBUS DP Startup and Operational Phase of a DP System Functions of the DP Master during Startup and Operation The DP master handles the following tasks: Initialization of the DP system Parameter assignment/configuration of the DP slaves Cyclic data transfer to the DP slaves Monitoring the DP slaves Storage of diagnostic information Initialization...
  • Page 22 Overview of PROFIBUS DP Diagnostics If a DP slave detects an error/fault during the initialization or productive phase, it can signal this to the DP master in the form of diagnostic data. The received diagnostic data are entered in the diagnostic area of the DP master. In this case, the DP application is then responsible for reacting to the error.
  • Page 23: Modes Of The Dp Master

    Overview of PROFIBUS DP Modes of the DP Master Overview During communication with the DP slaves, the DP master can adopt the following four modes: OFFLINE STOP CLEAR (or AUTOCLEAR) OPERATE Modes Each of these modes is characterized by defined actions between the DP master and the DP slaves.
  • Page 24 Overview of PROFIBUS DP Setting the Operating Mode When the CP 5613 or CP 5614 is started up, the module runs through the modes OFFLINE -> STOP -> CLEAR -> OPERATE controlled by the user program. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 25: Separation Of The Slave Data From The User Program

    Overview of PROFIBUS DP Separation of the Slave Data from the User Program The process image is separate from the user program and the slaves. To increase efficiency, the DP standard does not include flow control. The timing of the cyclic updating of the process image of the DP master implementation is connected neither to the DP slaves nor to the user program.
  • Page 26 Overview of PROFIBUS DP Remedy If the user program requires a better link to the slave than described above, there are a number of options available: With the hardware events of the CP 5613 and CP 5614, the user program can be informed of changes on the slave.
  • Page 27: Reliability Of Dp

    Overview of PROFIBUS DP Reliability of DP Reliability Concept The DP programming interface provides various mechanisms to limit the effects of the failure of a communication connection or the DP master. A watchdog function can be configured on the DP slave so that if a slave is not accessed for a longer period of time it can change automatically to a safe state.
  • Page 28: Control Frames To One Or More Slaves

    Overview of PROFIBUS DP Control Frames to One or More Slaves Purpose of Control Frames A control frame is a frame that the master sends to one slave, a group, several groups or to all slaves. These frames are not acknowledged by the slaves. Control frames are used to transfer control commands (known as global control commands) to the selected slaves to allow synchronization.
  • Page 29 Overview of PROFIBUS DP Control Commands The following control commands can be sent to DP slaves when necessary during operation: Control Description Commands FREEZE The states of the inputs are read in and frozen. With this function, your user program can achieve consistency over several slaves when reading the input data;...
  • Page 30: Typical Sequences In Dp

    Overview of PROFIBUS DP 2.10 Typical Sequences in DP Basic Sequence on the DP Master A typical sequence run by a DP master when triggered by the user program is shown below: Step Meaning Initial situation: The DP master is in the OFFLINE mode. The DP master changes to the STOP mode.
  • Page 31 Overview of PROFIBUS DP Receiving Diagnostic Data When the slave returns high-priority input data to the master, it indicates that it has diagnostic data. The master then fetches the information and makes it available to the user program. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 32: Dp-V1 As An Extension Of Dp

    Overview of PROFIBUS DP 2.11 DP-V1 As an Extension of DP Overview of the DP Protocol with DP-V1 Extensions Apart from cyclic DP master operation (see Section 2.3), two further extensions are defined as DP-V1: DPC1 and DPC2. The paragraphs below contain an overview of these extensions: PG/PC PG/PC...
  • Page 33 Overview of PROFIBUS DP DP-V1 Master Class 2 (DPC2) An additional DP master that is not operating cyclically can establish connections to slaves and send or read slave data using DPC2, for example,to reassign parameters or for diagnostic purposes. For the software version in which the DPC2 functions are available for the CP 5613/CP 5614, refer to the version table in Section of the Installation Instructions.
  • Page 34: Slave Functionality Of The Cp 5614

    Overview of PROFIBUS DP 2.12 Slave Functionality of the CP 5614 The Slave Functionality (Only CP 5614) The piggy-back module on the CP 5614 provides slave functionality with its second PROFIBUS port. The slave is controlled by another DP master. Controlling DP master PROFIBUS DP (I)
  • Page 35 Overview of PROFIBUS DP The Transfer Software (Only CP 5614) To operate the CP 5614 with master and slave functionality, you can use the sample transfer software. The transfer software transfers data between the master and slave section of the CP 5614. The transfer software includes an access with which additional input, output or diagnostic jobs can be executed.
  • Page 36 Overview of PROFIBUS DP DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 37: Overview Of The Dp Base Interface

    Overview of the DP Base Interface The programming interface of the CP 5613/CP 5614 is known as the DP Base interface. This chapter explains the basic characteristics of the DP Base interface including typical call and access sequences to prepare you for creating your own DP applications.
  • Page 38: Functions And Data

    Overview of the DP Base Interface Functions and Data Basic Structure of the DP Base Interface The interface to the user program is implemented with two mechanisms, as follows: Interface calls of the dp_base.dll or dps_base.dll Direct access to the process image on the CP 5613/CP 5614 The shematic below shows you an overview.
  • Page 39 Overview of the DP Base Interface Direct Access to the Process Image While your user program is running, regularly required data from the CP 5613 and CP 5614 are available directly in a memory area of the CP. These include mainly the input, output, and diagnostic data of the DP slaves but also include mode and configuration data.
  • Page 40: The Importance Of Configuration

    Overview of the DP Base Interface The Importance of Configuration Using the DP Database The DP database contains information about the bus parameters of PROFIBUS and about the slaves on the network. This information is evaluated when the CP 5613/CP 5614 starts up. This means that your user program does not need to contain these details and does not need to be modified (for example,if the data transmission rate is changed).
  • Page 41 Overview of the DP Base Interface Configuring the "Min_Slave_Interval" The "Min_Slave_Interval" time is the minimum time that must elapse after the master accesses a slave before it can access it again. This is calculated automatically based on the GSD data of the slaves. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 42: Consistent Access To The Process Image

    Overview of the DP Base Interface Consistent Access to the process image Conflicts Accessing the Process Image If, for example, your user programis currently reading the data of the DP slave from the process image and at exactly the same time the DP master overwrites this data with new data, your program could read the first few bytes from the previous DP cycle and the remaining bytes from the current cycle.
  • Page 43: Working With Hardware Events

    Overview of the DP Base Interface Working with Hardware Events Reducing Load on the PC CPU To relieve the PC of the computing time required for permanent polling on the DP interface, you can use hardware events. Your user program then decides which events will be reported by the CP 5613/CP 5614.
  • Page 44: Fast Logic

    Overview of the DP Base Interface Fast Logic Purpose With the fast logic property of the CP 5613/CP 5614, you can assign parameters to the CP so that it automatically monitors data from slaves and triggers reactions on other slaves. This has the following advantages: The user program has less to do.
  • Page 45: Overview Of Triggering And Receiving Events

    Overview of the DP Base Interface Overview of Triggering and Receiving Events Properties of Hardware Events The CP 5613/CP 5614 supports hardware events (see Section 3.4) with hardware mechanisms of the CP so that these can be processed extremely quickly. Hardware events (with the exception of fast logic) are activated in the process image of the CP, signaled by semaphores and the details of the event are located in the process image.
  • Page 46 Overview of the DP Base Interface Overview of the Sequence of Events Hardware Events Software Events Initialize required semaphore (during program startup) Send aknowledged call Activate hardware event Event on input data DP_ds_read/write change *) DP_get_actual_cfg Event on diagnostics DP_alarm_ack or notify ready to receive with Event on cycle start DP_enable_event:...
  • Page 47: Typical Sequences

    Overview of the DP Base Interface Typical Sequences 3.7.1 Initializing and Exiting the Master Mode Initialization The typical initialization of a CP 5613 or CP 5614 activates the CP and brings the DP master to the OPERATE mode. The following steps are necessary: Step Action Meaning...
  • Page 48 Overview of the DP Base Interface Shutdown Sequence Shutting down the CP brings the DP master to the OFFLINE mode and is completed by stopping the CP: Step Action Meaning DP_set_mode(Clear) Bring the master to the CLEAR mode, the slaves are reset. Bring the master to the STOP mode, cyclic DP_set_mode(Stop) operation is terminated.
  • Page 49: Typical Sequences In Polling Master Operation

    Overview of the DP Base Interface 3.7.2 Typical Sequences in Polling Master Operation Definition After the CP has been initialized as described above, the user program can use the CP for polling; in other words,for permanent direct access without waiting mechanisms.
  • Page 50 Overview of the DP Base Interface Elements of a Polling Cycle All the steps described below are achieved by direct access to the process image using the C pointer as the result of the "DP_get_pointer" call. Taken together, they represent an example of a polling cycle. Step Action Meaning...
  • Page 51: Typical Sequences For Polling Dpc1 Master Operation

    Overview of the DP Base Interface 3.7.3 Typical Sequences for Polling DPC1 master operation Definition After initializing the CP as described above, the user program can use DPC1 functions during cyclic operation to exchange data with slaves and to respond to alarms.
  • Page 52 Overview of the DP Base Interface Receiving and Responding to a DPC1 Alarm Step Action Meaning Attempt to receive alarm If there is no alarm, this is indicated by (DP_read_alarm) the function result. If received: Send alarm On completion of the function, the job acknowledgment is active.
  • Page 53: Typical Sequences In Master Operation With Hardware Events

    Overview of the DP Base Interface 3.7.4 Typical Sequences in Master Operation with Hardware Events Definition After initializing the CP as described above, the user program can activate hardware events and wait until they arrive with semaphores. This means that polling for new data or diagnostic information can be omitted and it is possible to synchronize with the start of the cycle.
  • Page 54 Overview of the DP Base Interface Using Hardware Events After initializing the required semaphores, the following sequence can be run through to activate and fetch events: Step Action Meaning Optional: Activate The user program indicates that it hardware event for input requires a semaphore to increment if data changes (req_mask, input data change.
  • Page 55 Overview of the DP Base Interface Clearing the Semaphores After the last use of the hardware events, clear your semaphores as follows: Step Action Meaning Clear semaphores for Releases the previously initialized events (function semaphore. DP_delete_sema_object) DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 56: Typical Sequences In Dpc1 Operation With Semaphores

    Overview of the DP Base Interface 3.7.5 Typical Sequences in DPC1 Operation with Semaphores Definition The polling mode for DPC1 described in Section 3.7.3 can also be replaced by operation with semaphores. The initialization of this mode, the elements of continuous operation and canceling the mode are described below.
  • Page 57 Overview of the DP Base Interface Clearing a Semaphore After the last use, clear your semaphore as follows: Step Action Meaning Clear semaphores for Releases the previously initialized events (function semaphore. DP_delete_sema_object) DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 58: Properties Of The Cp 5614 (Slave Functions, Transfer Software)

    Overview of the DP Base Interface Properties of the CP 5614 (Slave Functions, Transfer Software) Interaction Between the Master and Slave Functions The DP master and slave on the CP 5614 can be operated together or singly. "Simple Slave" Mode In this mode, all the data necessary to include the slave module in the data exchange are transferred to the CP when the DPS_open (...
  • Page 59: Typical Sequences For The Cp 5614 Slave Module

    Overview of the DP Base Interface Typical Sequences for the CP 5614 Slave Module 3.9.1 Initialization and Shutdown of the Slave Module in the "Simple" Mode Initialization The initialization of the CP 5614 in the "Simple" mode activates the CP and initializes the slave module so that it can be brought to the productive state by the master.
  • Page 60: Initialization And Shutdown Of The Slave Module In The Dynamic" Mode

    Overview of the DP Base Interface 3.9.2 Initialization and Shutdown of the Slave Module in the Dynamic" Mode Initialization Initializing the CP 5614 in the "Dynamic" mode activates the CP and initializes the slave module so that it responds on the bus. The parameter and configuration frames sent by the master must be checked and acknowledged by the user.
  • Page 61 Overview of the DP Base Interface Polling Productive Operation The user program can access data in the process image but must be prepared to process parameter and configuration frames. This is the case when the master wants to include the slave module in data exchange (for example,when the master starts up or after the bus connector has been removed and reinserted, ...).
  • Page 62 Overview of the DP Base Interface Shutdown Sequence To shut down the CP, the slave module changes to the OFFLINE mode and the CP is stopped: Step Action Meaning DPS_stop Bring the slave to the OFFLINE state DP_release_pointer Enable access to the process image. DPS_close Log off on the slave module DP_reset_cp...
  • Page 63: Typical Sequences With Semaphores On The Slave Module

    Overview of the DP Base Interface 3.9.3 Typical Sequences with Semaphores on the Slave Module Definition The polling mode described in Section 3.7.3 can also be replaced by operation with semaphores. The initialization of this mode, the elements of continuous operation and canceling the mode are described below.
  • Page 64 Overview of the DP Base Interface Clearing the Semaphore After the last use, clear your semaphore as follows: Step Action Meaning Clear semaphores for Releases the previously initialized events (function semaphore. DP_delete_sema_object) DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 65: Multiple Protocols, User Programs, Cpus

    Overview of the DP Base Interface 3.10 Multiple Protocols, User Programs, CPUs Multiple CP Operation For the software version in which the simultaneous operation of multiple CP 5613/CP 5614 modules is supported, refer to the version table in Section of the Installation Instructions.
  • Page 66 Overview of the DP Base Interface DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 67: Description Of The Dp Functions, Data, And Error Codes

    Description of the DP Functions, Data, and Error Codes This chapter describes the individual functions and options for accessing data in the process image of the CP 5613 and CP 5614. The chapter also explains the significance of the possible error codes. The data formats for I/O data and for diagnostics are also described.
  • Page 68: List Of Functions Of The Cp 5613 And Cp 5614

    Description of the DP Functions, Data, and Error Codes List of Functions of the CP 5613 and CP 5614 Conventions in the Text In the descriptions in this chapter, the following conventions are used in the function declaration: Notation Meaning // in The value is provided by the user program as input for the function.
  • Page 69 Description of the DP Functions, Data, and Error Codes Header Files The C header files dp_5613.h and dps_5614.h with the detailed C description of the functions and data structures is in the "prog" subfolder of your software installation. Synchronous and Asynchronous Functions Unless explicitly indicated, the execution of a task is completed at the end of the function (in other words,the function is synchronous).
  • Page 70: Overview Of The Functions

    Description of the DP Functions, Data, and Error Codes 4.1.1 Overview of the Functions Administrative Functions Name Purpose DP_start_cp Downloads the firmware and the database to the CP 5613/CP 5614. DP_open Logs on a DP user program, assigns a user handle. DP_get_pointer Requests a pointer to the process image.
  • Page 71 Description of the DP Functions, Data, and Error Codes Functions for the DP-V1 Master Class 1 (DPC1) Name Purpose DP_ds_read This function sends a "Read Data Record" call to a DP-V1 slave. This function sends a "Write Data Record" call to a DP-V1 DP_ds_write slave.
  • Page 72: Dp_Start_Cp

    Description of the DP Functions, Data, and Error Codes 4.1.2 DP_start_cp Purpose This function initializes the CP 5613/CP 5614. The CP firmware and the database are downloaded. Syntax DPR_DWORD DP_start_cp ( DPR_STRING *cp_name, // in DPR_STRING *database, // in DP_ERROR_T *error );...
  • Page 73: Dp_Reset_Cp

    Description of the DP Functions, Data, and Error Codes 4.1.3 DP_reset_cp Purpose This function resets the CP 5613/CP 5614. Following this, the CP is no longer active on the bus (Token LED is off). If other applications are still using the CP, this function does not reset it, in this case use the "Installation"...
  • Page 74: Dp_Open

    Description of the DP Functions, Data, and Error Codes 4.1.4 DP_open Purpose This function logs on a DP user program for communication. If successful, the function returns a user handle. The user handle must be included in all further function calls. Syntax DPR_DWORD DP_open (...
  • Page 75: Dp_Get_Pointer

    Description of the DP Functions, Data, and Error Codes 4.1.5 DP_get_pointer Purpose With this function, a DP user program obtains the exclusive pointer to the process data of the CP 5613/CP 5614. Using this pointer, the DP user program can then access the data image of the CP 5613/CP 5614.
  • Page 76 Description of the DP Functions, Data, and Error Codes Syntax DPR_DWORD DP_get_pointer ( DPR_DWORD user_handle, // in DPR_DWORD timeout, // in DPR_CP5613_DP_T volatile **dpr, // out DP_ERROR_T *error); // out Parameters Name Description user_handle User handle assigned with the DP_open call. Duration of the maximum wait time (in milliseconds) until timeout the function returns.
  • Page 77: Dp_Release_Pointer

    Description of the DP Functions, Data, and Error Codes 4.1.6 DP_release_pointer Purpose With this function, a DP user program releases the pointer to the process data. Following this, the DP user program can no longer access the data image of the CP 5613/CP 5614 directly.
  • Page 78: Dp_Close

    Description of the DP Functions, Data, and Error Codes 4.1.7 DP_close Purpose With this function, a DP user program logs off for communication at the CP. Note 1 If the logoff was successful, the user handle is no longer valid and must not continue to be used.
  • Page 79 Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK Successful completion of the function other Unsuccessful completion of the function DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 80: Dp_Get_Err_Txt

    Description of the DP Functions, Data, and Error Codes 4.1.8 DP_get_err_txt Purpose This function obtains detailed error information from the return values of the DP_ERROR_T error structure in plain language. Syntax DPR_DWORD DP_get_err_txt ( DP_ERROR_T *error, // in DPR_STRING *language, // in DPR_STRING text[DP_ERR_TXT_SIZE] );...
  • Page 81: Dp_Set_Mode

    Description of the DP Functions, Data, and Error Codes 4.1.9 DP_set_mode Purpose This function sets the required DP mode (OFFLINE, STOP, CLEAR, OPERATE). Warning If you want the master to change from DP_CLEAR to DP_OPERATE, but AUTOCLEAR (see 2.8) is configured and one or more slaves have failed, it cannot change to the DP_OPERATE mode.
  • Page 82 Description of the DP Functions, Data, and Error Codes Syntax DPR_DWORD DP_set_mode (DPR_DWORD user_handle, // in DPR_WORD mst_mode, // in DP_ERROR_T *error ); // out Parameters Name Description user_handle User handle assigned with the DP_open call. mst_mode New mode to be set. The following constants can be used: DP_OFFLINE: OFFLINE mode DP_STOP:...
  • Page 83: Dp_Slv_State

    Description of the DP Functions, Data, and Error Codes 4.1.10 DP_slv_state Purpose With this function, you can change the state of a DP slave while the DP user program is running. The slave can either be taken out of processing or can be activated again.
  • Page 84 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. Address of the slave or 0xFF with the meaning: Activate or slv_add deactivate AUTOCLEAR for all. slv_mode Required slave state: DP_SLV_ACTIVATE Activate the slave DP_SLV_DEACTIVATE...
  • Page 85: Dp_Read_Slv_Par

    Description of the DP Functions, Data, and Error Codes 4.1.11 DP_read_slv_par Purpose This function queries the parameters of a currently active DP slave of the CP 5613/CP 5614. Syntax DPR_DWORD DP_read_slv_par (DPR_DWORD user_handle,// in DPR_WORD slv_add, // in DPR_WORD type, // in DPR_WORD *data_len;...
  • Page 86 Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK Successful completion of the function otherwise if error->error_code == Error: The specified slave does not exist. DP_RET_CP_ADR_NOT_IN_DB other Unsuccessful completion of the function DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 87: Dp_Global_Ctrl

    Description of the DP Functions, Data, and Error Codes 4.1.12 DP_global_ctrl Purpose With this function, a global control command can be sent to one or more slaves. Note Slaves are assigned to a slave group when the DP database is configured. A slave evaluates the global control command only when it is assigned to one of the addressed groups.
  • Page 88 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. Address of the slave or group address slv_add (DP_BROADCAST_ADR) command Here, the following global control commands can be specified (they can also be ORed): DP_SYNC: freeze the output bytes DP_UNSYNC:...
  • Page 89: Dp_Ds_Read

    Description of the DP Functions, Data, and Error Codes 4.1.13 DP_ds_read Purpose This function sends a "Read Data Record" call to a DP-V1 slave. The DP-V1 data are read parallel to cyclic operation. This is, however, not slave input but an additional data packet addressed using the slot and index of a slave.
  • Page 90 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. Pointer to DP-V1 structure DPC1_REQ_S with entries for Request the read data record job. typedef struct DPC1_REQ_S DPR_WORD order_id; // in DPR_DWORD c_ref;...
  • Page 91 Description of the DP Functions, Data, and Error Codes Table continued from previous page Name Description "Request" The order_id is a job identifier assigned by the user continued program. The identifier is returned unchanged in the asynchronous confirmation and can be used to identify the job to which the confirmation belongs.
  • Page 92: Dp_Ds_Write

    Description of the DP Functions, Data, and Error Codes 4.1.14 DP_ds_write Purpose With this function, the master can send data to a slave. The data is sent parallel to cyclic operation. This does not involve the slave output but rather an additional data packet with addressing using the slot and index of a slave.
  • Page 93 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. Pointer to DP-V1 structure DPC1_REQ_S with entries for request the write data record job. typedef struct DPC1_REQ_S DPR_WORD order_id; // in DPR_DWORD c_ref;...
  • Page 94 Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK_ASYNC Execution of the function was activated successfully. other Unsuccessful completion of the function DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 95: Dp_Read_Alarm

    Description of the DP Functions, Data, and Error Codes 4.1.15 DP_read_alarm Purpose DPC1-compliant slaves can send alarms and status messages. This function reads the current alarm data or the current status message of a DP slave. Depending on the slave type and the configuration, a DP slave can send up to 32 alarms to the CP 5613/CP 5614.
  • Page 96 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. Address of the slave (0-126 or DP_NEXT_ALARM for the slv_add next message of any slave (seen chronologically)) alarm Pointer to the DP_ALARM_S structure with the alarm or status data.
  • Page 97 Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK Successful completion of the function; the entry in DP_ALARM_T is valid. Unsuccessful completion of the function; the entry in other DP_ALARM_T is invalid. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 98: Dp_Alarm_Ack

    Description of the DP Functions, Data, and Error Codes 4.1.16 DP_alarm_ack Purpose In certain situations, slaves with DPC1 functionality can signal alarms. These alarms are received by the DP master as part of the diagnostic data and buffered. Each alarm must be acknowledged by the master DP user program explicitly using the DP_alarm_ack function.
  • Page 99 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. Pointer to DP-V1 structure DPC1_REQ_S with entries for request the acknowledge alarm job. typedef struct DPC1_REQ_S DPR_WORD order_id; // in DPR_DWORD c_ref;...
  • Page 100 Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK_ASYNC Execution of the function was activated successfully. other Unsuccessful completion of the function DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 101: Dp_Get_Actual_Cfg

    Description of the DP Functions, Data, and Error Codes 4.1.17 DP_get_actual_cfg Purpose This function can be used to read out the current configuration data from a slave. The data is requested from the slave using a special DP frame. With this function, you can check whether the expected configuration (database) matches the actual configuration.
  • Page 102 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. Pointer to DP-V1 structure DPC1_REQ_S with entries for request the DP_get_actual_cfg job. typedef struct DPC1_REQ_S DPR_WORD order_id; // in DPR_DWORD c_ref;...
  • Page 103 Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK_ASYNC Execution of the function was activated successfully. other Unsuccessful completion of the function DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 104: Dp_Enable_Event

    Description of the DP Functions, Data, and Error Codes 4.1.18 DP_enable_event Purpose Calling this function means that the following important events (software events) on the DP master can be signaled explicitly to the DP application: Diagnostic data, alarms and status messages can be fetched Slaves are included in the cyclic DP processing (operational) or have dropped out The mode of the master has changed...
  • Page 105 Description of the DP Functions, Data, and Error Codes Note 4 If the event DP_SLAVE_ENTER or DP_SLAVE_EXIT is signaled in consecutive DP_enable_event confirmations (with no DP_SLAVE_EXIT or DP_SLAVE_ENTER in the meantime), this means the following: Multiple DP_SLAVE_ENTER: The slave changed to the NOT READY state and back to the READY state.
  • Page 106 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. Pointer to DP-V1 structure DPC1_REQ_S with entries for the Request event mechanism. typedef struct DPC1_REQ_S DPR_WORD order_id; // in DPR_DWORD c_ref;...
  • Page 107 Description of the DP Functions, Data, and Error Codes Description of the Elements of request->req.dp_enable_evt Element Description selector The selector element selects the type of events to be signaled. The values can be specified singly or “ORed". DP_DIAG_ALARM notify if diagnostic information or alarms occur DP_SLAVE_STATE notify when the slave enters or exits processing...
  • Page 108 Description of the DP Functions, Data, and Error Codes Table continued from previous page Element Description event On completion of the job, the event array contains an element for every slave address with the events involving the specific slave. event[5] , for examplecontains information about slave The following event IDs can be returned per slave address, and if required, several can be “ORed".
  • Page 109: Dp_Disable_Event

    Description of the DP Functions, Data, and Error Codes 4.1.19 DP_disable_event Purpose With this function, an earlier DP_enable_event call can be canceled. This ends the previous ready to receive state without the relevant event having occurred. The result of the terminating call must be fetched with DP_get_result. Following this, DP_enable_event, for example,can be called again with changed conditions.
  • Page 110: Dp_Get_Result

    Description of the DP Functions, Data, and Error Codes 4.1.20 DP_get_result Purpose This function fetches the confirmation (result) of an asynchronous job. The result of every asynchronous job must be fetched with this function. Depending on the transferred timeout time, the function returns immediately or after the monitoring time has elapsed.
  • Page 111 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. Duration of the maximum wait time (in milliseconds) until the timeout function returns. Limit values: no wait time - the function returns immediately 0x7FFFFFFE: maximum wait time...
  • Page 112 Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK A confirmation was received. The values in req_type and result are valid and identify the job. The corresponding job was completed without errors. DP_ ERROR_EVENT_NET and No confirmation available.
  • Page 113: Dp_Get_Cref

    Description of the DP Functions, Data, and Error Codes 4.1.21 DP_get_cref Purpose This function obtains the c_ref from the slave address and the user_handle for DPC1 functions. c_ref must be entered in these functions in the DPC1_REQ_S structure as a job-defining parameter. Note The c_ref for a slave only needs to be obtained once.
  • Page 114: Dp_Init_Sema_Object

    Description of the DP Functions, Data, and Error Codes 4.1.22 DP_init_sema_object Purpose This function initializes a semaphore for an event from the CP 5613/CP 5614 . With Win32 API functions (WaitForMultipleObjects, WaitForSingleObject, MsgWaitForMultipleObjects), a user program can wait at these semphores until an event arrives.
  • Page 115 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. sema_type Type of semaphore: DP_OBJECT_TYPE_INPUT_CHANGE - Hardware event when slave input data changes. DP_OBJECT_TYPE_DIAG_CHANGE - Hardware event when diagnostic data changes. DP_OBJECT_TYPE_CYCLE_INT - Hardware event at the start of a new DP cycle (reserved for later expansions)
  • Page 116: Dp_Delete_Sema_Object

    Description of the DP Functions, Data, and Error Codes 4.1.23 DP_delete_sema_object Purpose This function deletes a previously initialized semaphore. Syntax DPR_DWORD DP_delete_sema_object ( DPR_DWORD user_handle, // in DPR_DWORD sema_handle, // in DP_ERROR_T *error ); // out Parameters Name Description user_handle User handle assigned with the DP_open call.
  • Page 117: Dp_Fast_Logic_On

    Description of the DP Functions, Data, and Error Codes 4.1.24 DP_fast_logic_on Purpose With this function, a DP master user program can activate the "Fast Logic" functionality of the CP 5613/CP 5614. With this function, an input byte of a slave X can be linked with an output byte of a slave Y.
  • Page 118 Description of the DP Functions, Data, and Error Codes Note 3 Section 4.3.10 “Querying the Fast Logic Status" describes how the user program can query the current status of the fast logic trigger. Just as with other events, there is a semaphore for fast logic that is switched to enable when a fast logic trigger occurs.
  • Page 119 Description of the DP Functions, Data, and Error Codes Table continued from previous page fast_logic Pointer to the DP_FAST_LOGIC_S structure with which the trigger condition can be set. typedef struct DP_FAST_LOGIC_S DPR_BYTE slave_addr_in_byte; // in DPR_BYTE index_in_byte; // in DPR_BYTE cmp_value_in_byte;...
  • Page 120 Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK The fast logic trigger was activated. Others Unsuccessful completion of the function. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 121: Dp_Fast_Logic_Off

    Description of the DP Functions, Data, and Error Codes 4.1.25 DP_fast_logic_off Purpose This function deactivates a fast logic trigger of the CP 5613/CP 5614 again. Syntax DPR_DWORD DP_fast_logic_off ( DPR_DWORD user_handle, // in DPR_WORD fast_logic_id, // in DP_ERROR_T *error ); // out Parameters Name...
  • Page 122: Dp_Watchdog

    Description of the DP Functions, Data, and Error Codes 4.1.26 DP_watchdog Purpose This function starts or stops a watchdog on the CP 5613/CP 5614 that monitors the activity of the DP master user program. After this function has been called, if the DP master user program no longer accesses the watchdog element in the dual-port RAM due to an error (for example an endless loop), this is detected by the CP 5613/CP 5614 after the set time has elapsed.
  • Page 123 Description of the DP Functions, Data, and Error Codes Note 4 The elapsing of the watchdog can be queried at the wd_state structure element of the DPR_WD_S structure (wd_state == DP_WD_TIMEOUT; see Section 4.3.11 “Reading and Triggering User Watchdog in the Dual-Port RAM"). DP_WD_TIMEOUT is reset to DP_WD_STOPPED by calling DP_watchdog or DP_close, Note 5...
  • Page 124 Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK The watchdog was activated or deactivated successfully other Unsuccessful completion of the function. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 125: Additional Functions Of The Cp 5614

    Description of the DP Functions, Data, and Error Codes Additional Functions of the CP 5614 This section describes the additional functions required for the slave module. The functions of the slave module are located in "dps_base.dll", the prototypes and data structures are in the file "dps_base.h" in the "prog" subfolder of your software installation.
  • Page 126: Overview Of The Slave Module Functions

    Description of the DP Functions, Data, and Error Codes 4.2.1 Overview of the Slave Module Functions Administrative Functions The following table lists the functions common to the master and slave modules. These begin with DP_ . Name Purpose DP_start_cp Downloads the firmware and the database to the (Section 4.1.2) CP 5614 - Use the function of the master.
  • Page 127 Description of the DP Functions, Data, and Error Codes Standard DP Functions Name Purpose DPS_get_baud_rate This function queries the current data transmission rate. DPS_get_gc_ This function queries the last received global control command command. DPS_get_state This function queries the current slave state. DPS_set_diag This function sets new diagnostic data.
  • Page 128: Dps_Open

    Description of the DP Functions, Data, and Error Codes 4.2.2 DPS_open Purpose With this function, a DPS user program logs on at the driver and sets the slave parameters. If successful, the function returns a user handle. The user handle must be included in all further function calls.
  • Page 129 Description of the DP Functions, Data, and Error Codes Parameters Name Description cp_name Configured name of the CP 5614, for example,"CP5613_5614_1" for the first inserted CP. Pointer to the user handle variable - if successful, the user user_handle handle assigned to the user program is entered here. slave_mode Setting for the slave mode (the individual flags are logically linked in bits):...
  • Page 130 Description of the DP Functions, Data, and Error Codes Table continued from previous page Name Description init_data Pointer to a structure with information on the extended slave data. Typedef union DPS_INIT_DATA_S struct DPS_SIMPLE_S DPR_WORD user_prm_data_len; // in DPR_BYTE user_prm_data [DPS_MAX_PDU_LEN]; // in DPR_WORD cfg_data_len;...
  • Page 131 Description of the DP Functions, Data, and Error Codes Table continued from previous page Name Description max_data Pointer to a structure with the maximum buffer lengths for input and output data, for user diagnostics, for user parameter assignment data and configuration data and also for the user set slave address data.
  • Page 132: Dps_Close

    Description of the DP Functions, Data, and Error Codes 4.2.3 DPS_close Purpose With this function, a DP user program logs off for communication at the slave module. Note 1 If the logoff was successful, the user handle is no longer valid and must not continue to be used.
  • Page 133: Dps_Start

    Description of the DP Functions, Data, and Error Codes 4.2.4 DPS_start Purpose This function can be used to switch the slave ONLINE. This is necessary after initialization. After switching the slave OFFLINE with DPS_stop, the slave module can be switched online again with DPS_start. Syntax DPR_DWORD DPS_start(...
  • Page 134: Dps_Stop

    Description of the DP Functions, Data, and Error Codes 4.2.5 DPS_stop Purpose This function is used to deactivate the slave module. The slave module then no longer reacts on the bus. Syntax DPR_DWORD DPS_stop (DPR_DWORD user_handle, // in DP_ERROR_T *error ); // out Parameters Name...
  • Page 135: Dps_Get_Baud_Rate

    Description of the DP Functions, Data, and Error Codes 4.2.6 DPS_get_baud_rate Purpose Using this function, your user program can query the current data transmission rate of the slave module. Syntax DPR_DWORD DPS_get_baud_rate( DPR_DWORD user_handle // in DPR_WORD *state, // out DPR_WORD *baud_rate, // out...
  • Page 136 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DPS_open call. DPS_BAUD_SEARCH: no data transmission rate state found. DPS_BAUD_FOUND: data transmission rate found, bus watchdog not activated. DPS_BAUD_FOUND_WD: data transmission rate found, bus watchdog activated.
  • Page 137: Dps_Get_Gc_Command

    Description of the DP Functions, Data, and Error Codes 4.2.7 DPS_get_gc_command Purpose This function queries the last received global control command sent by the master controlling this slave. This function simply provides information for the user program and no reaction is required by the user program to process the global control frame.
  • Page 138 Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK Successful completion of the function other Unsuccessful completion of the function DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 139: Dps_Get_State

    Description of the DP Functions, Data, and Error Codes 4.2.8 DPS_get_state Purpose This function queries the current DP slave state. The function simply provides information for the user program. Note 1 During operation, the slave runs through the states: OFFLINE, waiting for parameter assignment data, waiting for configuration data and finally data exchange.
  • Page 140 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DPS_open call. • DPS_OFFLINE the slave module has not started up. dps_state • DPS_WAIT_PRM the slave module is waiting for a parameter assignment frame from the remote master.
  • Page 141: Dps_Set_Diag

    Description of the DP Functions, Data, and Error Codes 4.2.9 DPS_set_diag Purpose This function transfers diagnostic data to the DP slave module. The CP 5614 slave module passes on the data to the master that controls it. Note The length of the diagnostic data can vary during operation! The 6 standard diagnostic bytes are managed by the CP 5614 slave module itself.
  • Page 142 Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DPS_open call. Pointer to the user diagnostic data from the 7th byte user_diag_data onwards. The first 6 bytes contain the standard information added by the slave module hardware.
  • Page 143: Dps_Get_Ind

    Description of the DP Functions, Data, and Error Codes 4.2.10 DPS_get_ind Purpose This function is used to fetch an indication (message from the controlling master). Note 1 In the call, name the indications you want to receive. You will then receive exactly one indication as the result.
  • Page 144 Description of the DP Functions, Data, and Error Codes Syntax DPR_DWORD DPS_get_ind( DPR_DWORD user_handle, // in DPR_DWORD *ind_ref, // out DPR_DWORD timeout, // in DPR_DWORD *indication, // inout DPR_WORD *data_len // inout DPR_BYTE *data_blk // out DP_ERROR_T *error ); // out Parameters Name Description...
  • Page 145 Description of the DP Functions, Data, and Error Codes Table continued from previous page Name Description indication In this address, the user enters the indications it wants to be informed of. These are bits that can be ORed bit by bit. When the function returns, it contains the current indication type (always one indication only).
  • Page 146 Description of the DP Functions, Data, and Error Codes Table continued from previous page Name Description data_len Maximum length of the data_blk array when the function is called, number of bytes entered when the function returns - The constant DPS_MAX_PDU_LEN should be used for the call. data_blk The indication data for the particular indication are entered in this array (see next section: Data Structure).
  • Page 147 Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK Successful completion of the function other Unsuccessful completion of the function DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 148: Dps_Set_Resp

    Description of the DP Functions, Data, and Error Codes 4.2.11 DPS_set_resp Purpose With this function, the user program provides the response data of an indication obtained previously with DPS_get_ind. This is necessary for the indications that require information from the user to control internal processing (DPS_CHK_PRM, DPS_CHK_CFG and DPS_NEW_SSA).
  • Page 149 Description of the DP Functions, Data, and Error Codes Data Structure (for data_blk parameter) Indication Content of the data_blk Data Structure DPS_CHK_PRM DPR_WORD status Value Meaning DPS_PRM_OK Parameter assignment data accepted. DPS_PRM_FAULT Parameter assignment not accepted, the slave does not enter data exchange. DPS_CHK_CFG DPR_WORD status formatting Value...
  • Page 150: Dps_Calc_Io_Data_Len

    Description of the DP Functions, Data, and Error Codes 4.2.12 DPS_calc_io_data_len Purpose This function calculates the input/output data length from any configuration frame. This function is intended to provide information for the user program, so that it does not need to evaluate the ID bytes of the configuration frame itself. Any configuration frame can be evaluated.
  • Page 151: Access To The Process Image Of The Cp 5613/Cp 5614

    Description of the DP Functions, Data, and Error Codes Access to the Process Image of the CP 5613/CP 5614 Overview of the Existing Data The following table provides you with an overview of the data available to your user program in the process image of the CP 5613/CP 5614. Category Data DP process data...
  • Page 152: Reading The Input Data Of A Dp Slave

    Description of the DP Functions, Data, and Error Codes 4.3.1 Reading the Input Data of a DP Slave Consistent Reading There is a fixed data area in the process image of the CP 5613/CP 5614 for the input data of each individual slave. To allow the input data of a slave to be read consistently, your user program first locks this data area to prevent it being updated by the DP master, then accesses the area, and releases it again.
  • Page 153 Description of the DP Functions, Data, and Error Codes Reading without Consistency To read without consistency, the locking and release of the data area are simply omitted. Warning The lock is canceled by the following: Locking a different slave to read its data, Locking a different slave to read its diagnostic information (Section 4.3.2) Or by triggering a write job using the corresponding control register (Section 4.3.3).
  • Page 154: Reading The Diagnostic Data Of A Dp Slave

    Description of the DP Functions, Data, and Error Codes 4.3.2 Reading the Diagnostic Data of a DP Slave Consistent Reading of the Diagnostic Data Each individual slave has a fixed data area in the process image of the CP 5613/CP 5614 (for more information on the data format see Section 4.6). To allow the diagnostic data of a slave to be read consistently, your user program first locks this data area to prevent it being updated by the DP master, then accesses the area, and releases it again.
  • Page 155 Description of the DP Functions, Data, and Error Codes Reading without Consistency To read without consistency, the locking and release of the data area are simply omitted. General Notes Warning The lock is canceled by the following: Locking a different slave to read its input data (Section 4.3.1) Locking a different slave to read its diagnostic information Triggering a job to write the output data of a slave using the corresponding control register (Section 4.3.3)
  • Page 156: Writing The Output Data Of A Dp Slave

    Description of the DP Functions, Data, and Error Codes 4.3.3 Writing the Output Data of a DP Slave Writing is always consistent There is a fixed data area in the process image of the CP 5613/CP 5614 for the output data of each individual slave. To write the output data of a slave consistently, your user program writes the data to the data area and then triggers the acceptance of the data in the next DP cycle by writing the slave number to a control register in the process image of the CP.
  • Page 157 Description of the DP Functions, Data, and Error Codes Example of Consistent Writing "p" is a pointer to the process image that your user program obtained with the "DP_get_pointer" call. Then 200 bytes from a local buffer "buf" are written to slave 5 as follows: /* Copy data */ memcpy(&p->pi.slave_out[5].data[0], buf, 200);...
  • Page 158: Checking The Slaves For Changed Data

    Description of the DP Functions, Data, and Error Codes 4.3.4 Checking the Slaves for Changed Data Uses of the Data Changed Information The process image of the CP 5613/CP 5614 contains a memory area where you can see which slave data have changed. You can use this property to quickly check where data have changed without having to use semaphores.
  • Page 159 Description of the DP Functions, Data, and Error Codes General Notes Warning Your user program must first lock the input data of a slave (D_lock_in_slave_addr, Section 4.3.1), then reset "req_mask" if data changes (DPR_DATA_INT_CLEAR_AND_UNMASK), and then read the data itself. Otherwise if events overlap, this may mean that the next data change goes unnoticed.
  • Page 160: Querying The State Of A Dp Slave

    Description of the DP Functions, Data, and Error Codes 4.3.5 Querying the State of a DP Slave Uses of the Slave State Before accessing data, your user program should check the state of a slave, to find out whether or not the data to be read are valid. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 161 Description of the DP Functions, Data, and Error Codes Example "p" is a pointer to the process image that your user program obtained with the "DP_get_pointer" call. To count, for example,how many slaves are in the READY state, you would write a program like that shown below, where "sum" contains the result: unsigned short sum = 0;...
  • Page 162: Querying Information About The Dp Master

    Description of the DP Functions, Data, and Error Codes 4.3.6 Querying Information about the DP Master Uses of the DP Master Information The process image of the CP 5613/CP 5614 contains a memory area where you can read out the following information about the DP master: Mode (OFFLINE, STOP, CLEAR, AUTOCLEAR, OPERATE) Identification number of the certification Hardware version...
  • Page 163: Querying The Current Bus Parameters Of The Master

    Description of the DP Functions, Data, and Error Codes 4.3.7 Querying the Current Bus Parameters of the Master Uses of the Bus Parameter Query In the process image of the CP 5613/CP 5614, there is a memory area from which you can read out the current bus parameters, for example,to display them in your user program.
  • Page 164 Description of the DP Functions, Data, and Error Codes Description of the Bus Parameters Name Meaning Local station address baud_rate Data transmission rate Value Meaning DP_M_BAUDRATE_9K6 Kbps DP_M_BAUDRATE_19K2 19.2 Kbps DP_M_BAUDRATE_93K75 93.75 Kbps DP_M_BAUDRATE_187K5 187.5 Kbps DP_M_BAUDRATE_500K Kbps DP_M_BAUDRATE_750K Kbps DP_M_BAUDRATE_1M5 Mbps DP_M_BAUDRATE_3M...
  • Page 165: Querying Information About Dp Slaves

    Description of the DP Functions, Data, and Error Codes 4.3.8 Querying Information about DP Slaves Uses of the DP Slave Information In the process image of the CP 5613/CP 5614, there is a memory area from which you can read out the configuration data for DP slaves, for example,to display it in your user program.
  • Page 166: Reading Profibus Statistical Data

    Description of the DP Functions, Data, and Error Codes 4.3.9 Reading PROFIBUS Statistical Data Overview In the process image of the CP 5613/CP 5614 there is a memory area in which the CP stores statistical data of the connected PROFIBUS network allowing, for example,diagnostic programs to read them.
  • Page 167 Description of the DP Functions, Data, and Error Codes Description of the Available Statistics Counters All elements are unsigned 16-bit counters that count the occurrences of a specific event. The first four events are particularly important. Counter Name Meaning off_ts_adr_error Another station with the same name was detected.
  • Page 168: Querying The Fast Logic Status

    Description of the DP Functions, Data, and Error Codes 4.3.10 Querying the Fast Logic Status Overview In the process image of the CP 5613/CP 5614, there is a memory area in which you can check whether a fast logic trigger was triggered. DP master user programs can use the fast logic semaphore (see function DP_init_sema_object) to be informed of the triggering of a fast logic trigger.
  • Page 169 Description of the DP Functions, Data, and Error Codes Example of Querying a Fast Logic Trigger "p" is a pointer to the process image that your user program obtained with the "DP_get_pointer" call. To monitor the fast logic trigger in your user program, you require a program section similar to that shown below: /* Check whether fast logic trigger 0 is activated */ if(p->info_watch.activated_fast_logic[0] ==...
  • Page 170: Reading And Triggering User Watchdog In The Dual-Port Ram

    Description of the DP Functions, Data, and Error Codes 4.3.11 Reading and Triggering User Watchdog in the Dual-Port RAM Overview The process image of the CP 5613/CP 5614 contains a memory area where you can trigger and check the user watchdog. The user watchdog is initialized with the DP_watchdog call (see Section 4.1.26 “DP_watchdog").
  • Page 171 Description of the DP Functions, Data, and Error Codes Example of Access "p" is a pointer to the process image that your user program obtained with the "DP_get_pointer" call. The parameter idx is the value that the DP_watchdog function returned as the index. For example, to read out the current count of the watchdogs and to trigger the watchdog, you require a program section like that shown below: /* Output current count of the watchdog */...
  • Page 172: Activating/Deactivating The Generation Of Hardware Events

    Description of the DP Functions, Data, and Error Codes 4.3.12 Activating/Deactivating the Generation of Hardware Events Overview In the process image of the CP 5613/CP 5614, there is a memory area in which you can activate the triggering of hardware events for a new DP cycle, data changes, or the arrival of diagnostic data.
  • Page 173 Description of the DP Functions, Data, and Error Codes Example of Deactivation The following activation sequence would be canceled by your user program as follows: /* Deactivate event for cycle start */ p->ctr.D_cycle_start_mask = 1; /* Deactivate event for slave 5 data change */ p->ef.input[5].req_mask = DPR_DATA_INT_CLEAR_AND_MASK;...
  • Page 174: Sending Data With The Cp 5614 As Dp Slave

    Description of the DP Functions, Data, and Error Codes 4.3.13 Sending Data with the CP 5614 as DP Slave Integration in the Process Image of the CP 5613/CP 5614 The send data of the slave module are in the output image with slave index 127. Writing the output data area with slave index 127 supplies the slave module with new data that the controlling master reads as inputs.
  • Page 175: Receiving Data With The Cp 5614 As Dp Slave

    Description of the DP Functions, Data, and Error Codes 4.3.14 Receiving Data with the CP 5614 as DP Slave Integration in the Process Image of the CP 5613/CP 5614 The received data of the slave module are stored in the input image with slave index 127.
  • Page 176: Sending Diagnostic Data With The Cp 5614 As Dp Slave

    Description of the DP Functions, Data, and Error Codes 4.3.15 Sending Diagnostic Data with the CP 5614 as DP Slave Integration in the CP 5613/CP 5614 The slave module of the CP 5614 can transfer its diagnostic data to the controlling master.
  • Page 177: Error Codes

    Description of the DP Functions, Data, and Error Codes Error Codes Uniform Error Structure DP_ERROR_T The error identifiers for the individual jobs have a uniform structure DP_ERROR_T. If an error occurs, the various elements return the exact description of the error. typedef struct DP_ERROR DPR_DWORD error_class;...
  • Page 178 Description of the DP Functions, Data, and Error Codes error_class Structure Element The error_class structure element specifies the general error class. The entry in error_class is identical to the return value of the function call. A DP application can therefore evaluate either the error_class structure element or the return value of the function call.
  • Page 179 Description of the DP Functions, Data, and Error Codes error_code Structure Element The error_code structure element is relevant in the error classes: DP_ERROR_EVENT_NET DP_ERROR_REQ_PAR DP_ERROR_CI DP_ERROR_RES DP_ERROR_USR_ABORT error_decode, error_code_1, error_code_2 The error_decode, error_code_1 and error_code_2 structure elements are only relevant in the DP_ERROR_EVENT error class. In this case, all three elements must be evaluated.
  • Page 180 Description of the DP Functions, Data, and Error Codes Meaning of the Errors The "5613_ret.h" file contains an overview of the error messages. A detailed description is displayed when the function DP_get_err_txt is called. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 181: Elements

    Description of the DP Functions, Data, and Error Codes 4.4.1 Entries in the error_decode, error_code_1 and error_code_2 Structure Elements Description This section describes the entries in the following structure elements: error_decode error_code_1 error_code_2 Entries are only relevant in the error class DP_ERROR_EVENT. All three parameters must be evaluated together.
  • Page 182 Description of the DP Functions, Data, and Error Codes ® Error_Decode = PROFIBUS_FMS, HART ® The Error_Decode values PROFIBUS FMS and HART indicate that the parameters Error_Code_1 and Error_Code_2 must be interpreted as defined in the relevant protocols. With PROFIBUS FMS: Error_Code Parameter Meaning Error_ Class _FMS...
  • Page 183 Description of the DP Functions, Data, and Error Codes Error_Code_1 The possible values of code and class are shown in the following table: Byte Structure Meaning Class Code Class Code 0 to 9 reserved reserved application read error write error module failure 3 to 7 reserved...
  • Page 184 Description of the DP Functions, Data, and Error Codes Structure of Error_Code_2 with DP-V1 The Error_Code_2 parameter is user-specific. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 185: Formats Of The Slave Data

    Description of the DP Functions, Data, and Error Codes Formats of the Slave Data Order of the Slave Data The order of the data corresponds to the configured input/output ports of the DP slaves. For example, the input ports of an ET 200B 16DI station are stored as follows: port 0 in the first byte, port 1 in the 2nd byte etc.
  • Page 186: Formats Of The Slave Diagnostic Data

    Description of the DP Functions, Data, and Error Codes Formats of the Slave Diagnostic Data Explanation In some cases, in the following data structures single bits in the bytes are significant. The bits are numbered as follows: the least significant bit has the number 0 and the most significant bit has the number 7.
  • Page 187: Overview Of The Entire Structure

    Description of the DP Functions, Data, and Error Codes 4.6.1 Overview of the Entire Structure Possible Length The typical length of diagnostic data is between 6 and 32 bytes. The maximum possible length is 244 bytes. Header and up to Three Following Fields Diagnostic data have a fixed header and up to three further fields: Always exists, Header...
  • Page 188: Format Of The Diagnostic Data Header

    Description of the DP Functions, Data, and Error Codes 4.6.2 Format of the Diagnostic Data Header Overall Structure of the Header Byte Meaning Byte Stationstatus_1 Byte Stationstatus_2 Byte Stationstatus_3 Byte Diag.Master_Add Byte 5 and 6 Ident_Number DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 189 Description of the DP Functions, Data, and Error Codes Byte 1 (Stationstatus_1) Each bit in byte 1, the "stationstatus_1“ byte has a special meaning. Name and Meaning Diag. Master_Lock - The DP slave has already had parameters assigned by a different master,in other words, the local master cannot currently access this slave.
  • Page 190 Description of the DP Functions, Data, and Error Codes Byte 2 (Stationstatus_2) Each bit in byte 2, the "station_status_2“ byte has a special meaning. Meaning Diag. Deactivated - This bit is set as soon as the DP slave is indicated as inactive in the local parameter record and was taken out of cyclic processing.
  • Page 191 Description of the DP Functions, Data, and Error Codes Bytes 5 and 6 (Ident_Number) The vendor ID for a DP slave type is assigned in bytes 5 and 6, the "Ident_Number“ byte. This identifier can be used on the one hand for test purposes and on the other for precise identification of the slave.
  • Page 192: Format Of The Device-Related Diagnostic Data (Standard Dp Slave)

    Description of the DP Functions, Data, and Error Codes 4.6.3 Format of the Device-Related Diagnostic Data (Standard DP Slave) Meaning With standard DP slaves (without the DPC1 extensions), this field contains general diagnostic information such as overtemperature, undervoltage or overvoltage. The coding is specified by the slave vendor.
  • Page 193: Extensions)

    Description of the DP Functions, Data, and Error Codes 4.6.4 Format of the Device-Related Diagnostic Data (Slaves with DP-V1 Extensions) Meaning With these slaves, the device-related diagnostic data contains alarm data or status messages. The status messages also include the variant "module status". Entire Structure with Two Variants The device-related diagnostic data exists in two variants: alarms and status messages.
  • Page 194 Description of the DP Functions, Data, and Error Codes Byte 2 (Alarm_Type Variant) Meaning Value Meaning Alarm Alarm_Type 6 to 0 = reserved = Diagnostic alarm = Process alarm = Pull alarm = Plug alarm = Status alarm = Update alarm 7-31 = reserved 32-126 = Vendor-specific...
  • Page 195 Description of the DP Functions, Data, and Error Codes Byte 4 (Alarm Specifier Variant) Meaning 7 to 3 Seq_Nr Unique identifier of an alarm message If this bit is set, the DP-V1 master indicates that in Add_Ack addition to the DPC1 Alarm Acknowledge, a separate user confirmation(for example in the form of a Write service) is required.
  • Page 196 Description of the DP Functions, Data, and Error Codes Byte 5-63 User-Specific Information These bytes contain data with additional user-specific information. The format is described in the slave documentation. With the "status messages" variant and the "Module_Status" setting (see byte 2), two bits are assigned to each module/slot.
  • Page 197 Description of the DP Functions, Data, and Error Codes Example of Device-Related Diagnostic Data with Status Message The following diagram shows status diagnostic data based on the scheme outlined above. Device-related diagnostics: Status type: status message 1 Slot number 2 Specifier: no further information User diagnostic data: 5...
  • Page 198: Format Of Id-Related Diagnostics

    Description of the DP Functions, Data, and Error Codes 4.6.5 Format of ID-Related Diagnostics Meaning Module-specific diagnostics is possible for modular slaves with an ID byte per module. The DP master sends ID bytes to the slave in a configuration frame during the startup phase.
  • Page 199: Format Of Channel-Related Diagnostics

    Description of the DP Functions, Data, and Error Codes 4.6.6 Format of Channel-Related Diagnostics Meaning A channel is identified by the slot of the module and the channel number. A slot (module) can consist of several channels (for example, analog module with two channels each with 4 bits).
  • Page 200 Description of the DP Functions, Data, and Error Codes Channel Number Meaning 7 and 6 Value Meaning reserved Input Output Input/output 5 to 0 Channel number 0 to 63 Note If ID bytes contain both input and output, the direction of the diagnostic channel is indicated in bit 7 and bit 6 of the channel number.
  • Page 201 Description of the DP Functions, Data, and Error Codes Type of Diagnostics Meaning Channel type 7 and 6 Channel type Meaning reserved 2 bits 4 bits byte word 2 words reserved Error type 5 to 0 Error type Meaning reserved Short circuit Undervoltage Overvoltage...
  • Page 202 Description of the DP Functions, Data, and Error Codes Example: Structure of Diagnostic Information According the Above Scheme The following figure represents diagnostic information arranged according to the scheme listed above. Header 6 bytes long Device-related diagnostics: (Header byte) device-specific The meaning of the bits is diagnostics field, Specified by the vendor...
  • Page 203: Format Of The Slave Parameter Data

    Description of the DP Functions, Data, and Error Codes Format of the Slave Parameter Data Definition This section describes the format of the slave parameter data as obtained by the DP_read_slv_par call described in Section 4.1.11. There are three variants possible that are selected by the value of the "type"...
  • Page 204: Structure Of The General Slave Parameters

    Description of the DP Functions, Data, and Error Codes 4.7.1 Structure of the General Slave Parameters Overview The components are bytes. They are byte-aligned,in other words, they are located one immediately following the other. The parameters shown on a gray background are only relevant for DP slaves with DP-V1 additional functions.
  • Page 205 Description of the DP Functions, Data, and Error Codes Sl_Flag This parameter contains slave-related flags. Each bit in the "SI_Flag“ byte has a special meaning. Meaning Active 0 means: DP slave is not activated 1 means: DP slave is activated New_Prm 0 means: DP slave receives user data...
  • Page 206 Description of the DP Functions, Data, and Error Codes Alarm_Mode This parameter specifies the maximum number of possible active alarms. Value Meaning 1 alarm of each alarm type 2 alarms in total 4 alarms in total 8 alarms in total 12 alarms in total 16 alarms in total 24 alarms in total...
  • Page 207: Structure Of The Parameter Assignment Data

    Description of the DP Functions, Data, and Error Codes 4.7.2 Structure of the Parameter Assignment Data Overview The parameter assignment data consist of bus-specific data and DP slave-specific data. Byte Number Meaning Byte 1 Station_status Byte 2 WD_Fact_1 Byte 3 WD_Fact_2 Byte 4 Min.
  • Page 208 Description of the DP Functions, Data, and Error Codes Byte 1 (Station_status) Byte 1 "Station_status" has the following structure: Each bit in the "station_status“ byte has a special meaning. Meaning Lock_Req and Unlock_Req 7 and 6 Bit 7 Bit 6 Meaning The min T SDR is overwritten when parameters are assigned.
  • Page 209 Description of the DP Functions, Data, and Error Codes Byte 4 (Min. Station Delay Responder) This is the time that the DP slave must wait before it is allowed to send its response frames to the DP master, unit: bit times. Bytes 5 and 6 (Ident_Number) This number is assigned by the vendor.
  • Page 210 Description of the DP Functions, Data, and Error Codes Byte 9 (DPV1_Status_2) Meaning Enable_Pull_Plug_Alarm This bit is set to allow an alarm of the type "Pull_Plug_Alarm" to be signaled. Enable_Process_Alarm This bit is set to allow an alarm of the type "Process_Alarm" to be signaled.
  • Page 211 Description of the DP Functions, Data, and Error Codes Byte 10 DPV1_Status_3 Meaning reserved Alarm Mode Bit 4 Meaning alarm of each type alarms in total alarms in total alarms in total alarms in total alarms in total alarms in total alarms in total Bytes 11 to n Vendor-specific data...
  • Page 212: Structure Of The Configuration Data

    Description of the DP Functions, Data, and Error Codes 4.7.3 Structure of the Configuration Data Overview of the Structure The configuration data contain the range of the input and output data areas and information on data consistency. They consist of a sequence of data fields, each data field having one of two alternative formats: Variant 1 Configuration data...
  • Page 213 Description of the DP Functions, Data, and Error Codes Structure of an ID Byte Each bit has a special meaning. Meaning 0 to 3 Number of data units - 1 3 meansfor example 4 data units of the length specified in bit 6 Input/output 4 and 5 Bit 5...
  • Page 214 Description of the DP Functions, Data, and Error Codes Length Bytes Each bit in the length bytes has a special meaning. Meaning 0 to 5 Number of data units 0 (decimal) means: 1 data unit 63 (decimal) means: 64 data units (for the length of the data units see bit 6) Length 0 means: a data unit is one byte long...
  • Page 215: Faq (Frequently Asked Questions)

    FAQ (Frequently Asked Questions) This chapter contains answers to typical questions ("Frequently Asked Questions") on the programming interface of the CP 5613 and CP 5614 arranged in categories. For information on creating your user program, refer to the sections on structuring user programs and the check list for programmers.
  • Page 216: Faqs About The Range Of Functions Of The Product

    FAQ (Frequently Asked Questions) FAQs about the Range of Functions of the Product Which software versions exist and how do they differ from each other? Please refer to the version table in Section of the Installation Instructions. Which operating systems are supported? Please refer to the version table in Section of the Installation Instructions.
  • Page 217 FAQ (Frequently Asked Questions) Is the user watchdog supported? Please refer to the version table in Section of the Installation Instructions. Are the CP 5613 and CP 5614 OPC-compliant? OPC products that support the CP 5613/CP 5614 are planned. What are the reaction times and data transfer rates available with the CP 5613/CP 5614? Please refer to the numeric data in Section of the Installation Instructions.
  • Page 218: Faqs About Structuring The User Program

    FAQ (Frequently Asked Questions) FAQs about Structuring the User Program Can DP and DPC1 be operated at the same time? Yes. The DP master must, however, already by in the OPERATE mode before DPC1 functions can be used. How many DPC1 jobs can be sent at the same time? Per slave address, up to two DPC1 jobs can be sent at any one time, one for reading or writing and one for alarm acknowledge.
  • Page 219 FAQ (Frequently Asked Questions) What are the disadvantages of simply polling in the user program? If your user program does not restrict itself, the entire available CPU performance of the of the PC will be used to query the process image unnecessarily often. If the program restricts itself too much, on the other hand, the data will no longer be up to date.
  • Page 220 FAQ (Frequently Asked Questions) How do I access the process image with more than one thread? This is not recommended. The control register for consistent reading and writing of slave data can then be overwritten, so that, for example,the consistency of the slave data currently being read by a thread would be jeopardized.
  • Page 221: Faq Check List For Programmers

    FAQ (Frequently Asked Questions) FAQ Check List for Programmers What are the most important aspects of the program structure? Make sure that you keep to the rules below when structuring your program: Begin your user program with a DP_start_cp, DP_open and DP_get_pointer and always complete these with DP_release_pointer, DP_close and DP_reset_cp.
  • Page 222 FAQ (Frequently Asked Questions) What are the most important aspects of accessing data areas? The process image is separate from the user program and the slaves. Note the information in Section 2.7. Use the check list below for your data areas: Select data buffer lengths to match the longest possible data.
  • Page 223 FAQ (Frequently Asked Questions) What should a user programmer take into account? Use unique order_ids for parallel jobs. Remember that a hardware event entering the state deletes its activation condition. You must make sure it is reactivated. Do not use hardware events at the same time as periodic polling on the same slave.
  • Page 224: Faqs About Debugging And Starting Up Your Program

    FAQ (Frequently Asked Questions) FAQs about Debugging and Starting Up Your Program What are the typical errors when a program is first run? Bus malfunctions caused by bad contacts/bad cabling/forgetting the terminator are often the cause of initial problems. Incorrectly configured slave types Using the wrong database Bad bus parameters Wrong station addresses set on the slaves...
  • Page 225: Faqs Miscellaneous Programming Questions

    FAQ (Frequently Asked Questions) FAQs Miscellaneous Programming Questions Can groups of slaves be used for hardware events? You can do this yourself with the software tools, forexample: at the start of each cycle, activate the hardware events of all slaves in the group and, as soon as an event occurs, deactivate them all again until the end of the cycle.
  • Page 226 FAQ (Frequently Asked Questions) What do I need to remember if I use multiple DP master user programs that access the same CP 5613 or CP 5614? With multiple applications, the user programs must be coordinated. This involves, for example, the following important points: As long as a user program is in possession of a pointers to the process image (DP_get_pointer call), no other user program can access it.
  • Page 227 Who can I contact if I have problems? Read the chapter "Where to Get Help" in the Installation Instructions for the product. Further information for programmers is also available from the following address: http://www.ad.siemens.de/net/html_00/index.shtml DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 228 FAQ (Frequently Asked Questions) DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 229: Where To Get Help

    Where to Get Help This Chapter lists contacts for SIMATIC NET: Contacts for technical questions Contacts for training with SIMATIC NET products DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 230: Help With Technical Questions

    PDF files on the SIMATIC NET CD Who to Contact If you cannot find answers to technical questions on the software in the sources listed above, please contact your local Siemens office. You will find the addresses: in our catalog IK 10 on the Internet (http://www.ad.siemens.de)
  • Page 231 +49 (911) -895-7000 Phone: +49 (911) -895-7777 Fax: +49 (911) -895-7002 Fax: +49 (911) -895-7001 E-mail: simatic.support@nbgm.siemens.de Johnson City Singapore SIMATIC BASIC Hotline SIMATIC BASIC Hotline Local time: Mo to Fr 8:00 to 17:00 Local time: Mo to Fr 8:30 to 17:30...
  • Page 232 In its online services, SIMATIC Customer Support provides you with wide-ranging additional information about SIMATIC products: You will find general, up-to-date information: – on the Internet (http://www.ad.siemens.de/simatic) – using fax polling You can obtain the latest product information and downloads: –...
  • Page 233: Contacts For Training With Simatic Net

    Where to Get Help Contacts for Training with SIMATIC NET SIMATIC Training Center Please contact your regional training center or the central training center in D-90327 Nuremberg, Tel. +49-911-895-3154. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 234 Where to Get Help DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 235: Index

    Index Diag. Master_Lock ........189 Diag. Not_Supported......189 Active............. 16 Diag. Prm_Fault ........189 Add_Sl_Flag .........206 Diag. Prm_Req ........190 Alarm ............. 95 Diag. Station_Non_Existent....189 Alarm acknowledge ........ 98 Diag. Station_Not_Ready ......189 Alarm Mode ..........211 Diag. Sync_Mode........190 Alarm specifier ........195 Diag. WD_On........190 Alarm_Mode .........206 Diag.Stat_Diag........190 Alarm_Type ..........194 Diagnostic data ........20...
  • Page 236 Index DPS_start ..........133 DPS_stop..........134 LED ..........72, 73 DP-V1 ............ 32 Lock_Req..........208 DPV1_Enable ........209 DPV1_Status_1........209 Master.............16 DPV1_Status_3........211 modes ..........23 DPV1_Supported ........205 querying information ......162 Min. Station Delay Responder ....209 Empty frame .......... 18 Min_Slave_Interval........41 Enable_Diagnostic_Alarm .....210 Enable_Manufacturer_Specific_Alarm...210 New_Prm..........205 Enable_Process_Alarm ......210 Enable_Pull_Plug_Alarm.......210 Enable_Status_Alarm......210 OFFLINE ..........23 Enable_Update_Alarm ......210...
  • Page 237 Index sending data (CP 5614) .....174 sending diagnostic data (CP 5614) ..176 UNFREEZE ..........29 set diagnostic data (CP 5614)....141 Unlock_Req ..........208 state ........... 83 UNSYNC ..........29 type ...........205 User watchdog ....122, 123, 170, 217 Slot number ..........194 Software event ........45 Vendor-specific data ......211 Statistical Data ........166 Version...
  • Page 238 Index DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 239: Glossary

    Reference to identify connections to slaves in DPC1 calls. COM PROFIBUS Configuration tool for defining communications nodes and the bus parameters. Communications processor - network adapter from Siemens for installation in a computer or PLC. DP Base Programming Interface for CP 5613/CP 5614...
  • Page 240 Glossary C entral P rocessing U nit - here processor of the PC CPU load Load on the CPU of the PC - here: resulting from DP communication Data_Ex The slave is ready for productive operation Data transmission rate Transmission rate on the bus (unit: bps). A bus parameter for PROFIBUS. The data transmission rate used depends on various conditions such as distance.
  • Page 241 Glossary DP Base Name of the DP programming interface of the CP 5613/CP 5614, in contrast to the DP Lib interface of the CP 5412 (A2), CP 5611 and CP 5511. DPC1 DP extended by acyclic read and write jobs and alarms between cyclic DP master and slave.
  • Page 242 Glossary DP subsystem A DP master and all DP slaves with which the master exchanges data. Driver Software that allows data exchange between application programs and the CP client. Dual-port RAM D ual P ort R andom A ccess M emory - allows simultaneous access to one memory area (RAM) by two computer units (CP and CPU).
  • Page 243 Glossary FREEZE mode The FREEZE mode is a DP mode in which the process data are acquired at the same time from all (or a group) of DP slaves. The time at which the data are required is indicated in the FREEZE command (a synchronization control frame). Gap update factor A free address area between two active nodes is checked cyclically by the node with the lower PROFIBUS address to find out whether or not another station is...
  • Page 244 Glossary Input data Here: the data read cyclically by the DP master from the slaves. Intel format Numbers are stored in the Intel format when lower order bytes are stored first ( in other words, at lower addresses). I/O module DP slaves can have a modular structure.
  • Page 245 Glossary Maximum station delay The maximum station delay (max. TSDR) specifies the longest interval required by a node in the subnet between receiving the last bit of an unacknowledged frame and sending the first bit of the next frame. After sending an unacknowledged frame, a sender must wait for the max.
  • Page 246 Here: the data sent cyclically to the slaves by the DP master. P ersonal C omputer Programming device (industrial PC) belonging to the SIMATIC product family from Siemens AG used for programming, configuring and in maintenance and service. PROFIBUS users organization Process image Here: used for a dual-port RAM of the CP 5613/CP 5614 that can be accessed directly by user programs and where the current data of the slaves are located.
  • Page 247 S7 PLC Abbreviation for a programmable logic controller belonging to the SIMATIC product family from Siemens AG. S ervice A ccess P oint - access point to PROFIBUS within a station Semaphore Wait mechanism for synchronizing several programs, for example in Windows NT.
  • Page 248 A PROFIBUS bus parameter - The setup time specifies the minimum time between receiving an acknowledgment and sending a new call. SIMATIC NET Siemens Network and Communication - Product range for networks and network components from Siemens. Slot Time A PROFIBUS bus parameter - The slot time (TSL) is monitoring time between a sender sending a frame and receiving the acknowledgment of the receiver.
  • Page 249 Glossary User watchdog Watchdog for monitoring the DP user program Watchdog A mechanism for monitoring operability of nodes. Watchdog time A monitoring time that can be set on a DP slave to detect failure of the controlling DP master. DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...
  • Page 250 Glossary DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-02...

This manual is also suitable for:

Simatic net cp 5614

Table of Contents