SIMATIC NET Preface, Contents DP Base Programming Interface for CP 5613/CP 5614 Basic Steps in Creating a DP Application 1 Overview of PROFIBUS DP 2 Overview of the DP Base Interface 3 Description of the DP Functions, Data, and Error Codes 4 Manual FAQ (Frequently Asked Questions) Where to Get Help, Index, Glossary C79000-G8976-C108-01 Release 1 1999 5
Safety Guidelines This manual contains notices which you should observe to ensure your own personal safety, as well as to protect the product and connected equipment. These notices are highlighted in the manual by a warning triangle and are marked as follows according to the level of danger: ! Danger ! Warning ! Caution indicates that death, severe personal injury or substantial property damage will result if proper precautions are not taken.
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: x CP 5613/CP 5614 (DP Base V1.0) x CP 5613/CP 5614 (DP Base V1.
Preface 4 DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-01
Contents 1 Basic Steps in Creating a DP Application ......................................................................9 2 Overview of PROFIBUS DP ...........................................................................................13 3 2.1 Where Does PROFIBUS DP Fit In? .....................................................................14 2.2 The Master-Slave Concept of PROFIBUS DP......................................................16 2.3 Cyclic Polling by the Master................
Contents 4 6 Description of the DP Functions, Data, and Error Codes ............................................65 4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.1.10 4.1.11 4.1.12 4.1.13 4.1.14 4.1.15 4.1.16 4.1.17 4.1.18 4.1.19 4.1.20 4.1.21 4.1.22 4.1.23 4.1.24 4.1.25 List of Functions of the CP 5613 and CP 5614.....................................................66 Overview of the Functions ...................................................................................
Contents 4.3.13 Receiving Data with the CP 5614 as DP Slave ..................................................165 4.3.14 Sending Diagnostic Data with the CP 5614 as DP Slave....................................166 5 6 4.4 4.4.1 Error Codes.......................................................................................................167 Entries in the error_decode, error_code_1 and error_code_2 Structure Elements ....................................................................................
Contents 8 DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-01
Basic Steps in Creating a DP Application 1 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. The DP Base programming interface allows direct access to the DP process image in the dual-port RAM of the module.
Basic Steps in Creating a DP Application Procedure The steps outlined below represent the fastest and simplest way of achieving your aims: Step Description 1 Familiarize yourself with the basic principles of PROFIBUS DP. Read the following chapter 2 (“Overview of PROFIBUS DP"). 2 Familiarize yourself with the basic characteristics of the DP Base programming interface of the CP 5613 and CP 5614. Read the following chapter 3 (“Overview of the DP Base Interface").
Basic Steps in Creating a DP Application Table continued from previous page Step Description 9 Now create your own DP user program. You can use the "ExamComp" sample as a basis. 10 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.
Basic Steps in Creating a DP Application 12 DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-01
Overview of PROFIBUS DP 2 This chapter will familiarize you with the basic principles of PROFIBUS DP.
Overview of PROFIBUS DP 2.1 Where Does PROFIBUS DP Fit In? PROFIBUS - The Worldwide Fieldbus Strategy The trend towards reducing costs in automation engineering has meant that programmable controllers (PLCs), PCs, drives, transducers and sensors are being networked more and more. This has resulted in greater distribution of these field devices using a fieldbus as the common communications medium for exchanging information.
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. The use of PROFIBUS DP means a considerable reduction in cabling compared to previous direct wiring of components.
Overview of PROFIBUS DP 2.2 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. Node Classes PROFIBUS DP defines two classes of bus nodes. Slaves as peripheral devices are passive nodes. Masters (class 1) are active nodes and control the slaves.
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. Figure 1 illustrates the basic structure and the components of a PROFIBUS DP system controlled by a computer with a PROFIBUS master installed (CP 5613/CP 5614).
Overview of PROFIBUS DP 2.3 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. The next polling cycle starts as soon as the last slave has been addressed. This ensures that the data is up to date.
Overview of PROFIBUS DP 2.4 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. This means that the DP application is not involved in polling the slaves. Figure 3 shows an overview of the data areas on the DP master.
Overview of PROFIBUS DP Data Areas There are three different data areas on the DP master for each configured DP slave, as follows: x Input data from the DP slave x Output data to the DP slave x 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. DP application Input data Output data Diag.
Overview of PROFIBUS DP 2.
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.
Overview of PROFIBUS DP 2.6 Modes of the DP Master Overview During communication with the DP slaves, the DP master can adopt the following four modes: x OFFLINE x STOP x CLEAR (or AUTOCLEAR) x OPERATE Modes Each of these modes is characterized by defined actions between the DP master and the DP slaves. Master Mode Meaning OFFLINE No communication between the DP master and DP slaves. This is the startup mode of the DP master.
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.
Overview of PROFIBUS DP 2.7 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.
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: x With the hardware events of the CP 5613 and CP 5614, the user program can be informed of changes on the slave. x With the DP protocol expansion DP-V1 master class 1 (DPC1), the user program can read and write data with a confirmation and can confirm alarms (if this is supported by the slaves).
Overview of PROFIBUS DP 2.8 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. x 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.
Overview of PROFIBUS DP 2.9 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.
Overview of PROFIBUS DP Control Commands The following control commands can be sent to DP slaves when necessary during operation: Control Commands Description 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; in other words, it is certain that the values read were all set at the same time. UNFREEZE The freezing of the inputs is canceled. SYNC Output is frozen.
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 1 Initial situation: The DP master is in the OFFLINE mode. 2 The DP master changes to the STOP mode. 3 The DP master changes to the CLEAR mode.
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.
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 DP master class 1 PG/PC DP master class 2 User program User program DP/DPC1 prog. interface DPC2 prog. interface DPC1 DPC2 DP Cycl. operation MSCY C1 Acycl. operation MSAC_C1 Acycl.
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.
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.
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. Your user program can use this access to add additional functions to the transfer program.
Overview of PROFIBUS DP 36 DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-01
Overview of the DP Base Interface 3 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. For a detailed description of the function calls and data access, please refer to Section 3.10.
Overview of the DP Base Interface 3.1 Functions and Data Basic Structure of the DP Base Interface The interface to the user program is implemented with two mechanisms, as follows: x Interface calls of the dp_base.dll or dps_base.dll x Direct access to the process image on the CP 5613/CP 5614 The schematic below shows you an overview. DP user program C pointer dp_base.dll dps_base.dll Drivers Process image CP 5613/CP 5614 Functions of the dp_base.dll and dps_base.
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. Your user program can access the process image directly using a C pointer.
Overview of the DP Base Interface 3.2 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).
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.
Overview of the DP Base Interface 3.3 Consistent Access to the process image Conflicts Accessing the Process Image If, for example, your user program is 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. The data would then be corrupted and inconsistent.
Overview of the DP Base Interface 3.4 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. Possible Hardware Events Hardware events can be triggered by the following criteria: x The input data of a DP slave have changed. The hardware event can be activated separately for each slave.
Overview of the DP Base Interface 3.5 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: x The user program has less to do. x The data transfer is faster due to separating the functions from the PC software. x By being independent of the PC software, the reaction to the input signal is guaranteed.
Overview of the DP Base Interface 3.6 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.
Overview of the DP Base Interface Overview of the Sequence of Events Hardware Events Software Events Initialize required semaphore (during program startup) Activate hardware event x Event on input data change *) x Event on diagnostics x Event on cycle start x Fast logic on Send aknowledged call x DP_ds_read/write x DP_get_actual_cfg x DP_alarm_ack or notify ready to receive with DP_enable_event: x for alarms/diagnostics x for status changes Wait at semaphore (optional for software events) Fetch even
Overview of the DP Base Interface 3.7 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 1 DP_start_cp CP is initialized. 2 DP_open Logon at the CP. 3 DP_get_pointer Exclusive access to the process image. 4 DP_set_mode(Stop) Change the master to the STOP mode.
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 48 Action Meaning 1 DP_set_mode(Clear) Bring the master to the CLEAR mode, the slaves are reset. 2 DP_set_mode(Stop) Bring the master to the STOP mode, cyclic operation is terminated. 3 DP_set_mode(Offline) Bring the master to the OFFLINE mode. 4 DP_release_pointer Enable access to the process image. 5 DP_close Log off.
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. A cycle for reading and writing the process data can be implemented with the tools described below.
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 50 Action Meaning 1 Check the mode of the master in the process image (USIF_state, Section 4.3.6) Input data are only valid in the OPERATE and CLEAR modes. Output data can only be sent in the OPERATE mode.
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. This section describes how these services are used in the polling mode; in other words, when continuously querying slaves without waiting mechanisms. Individual pairs of jobs and confirmations can be used parallel to each other.
Overview of the DP Base Interface Receiving and Responding to a DPC1 Alarm Step 52 Action Meaning 1 Attempt to receive alarm (DP_read_alarm) If there is no alarm, this is indicated by the function result. 2 If received: Send alarm acknowledgment (DP_alarm_ack) On completion of the function, the job is active. 3 Poll final result (DP_get_result) until the job is completed The result can be recognized by the order_id in the request field.
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. This mode can replace or supplement the polling described in Section 3.7.2.
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: 54 Step Action Meaning 1 Optional: Activate hardware event for input data changes (req_mask, Section 4.3.11) With this, the user program indicates that it requires a semaphore to increment if input data change. 2 Optional: Activate hardware event for diagnostic data (req_mask, Section 4.3.
Overview of the DP Base Interface Clearing the Semaphores After the last use of the hardware events, clear your semaphores as follows: Step Action 1 Clear semaphores for events (function DP_delete_sema_object) DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-01 Meaning Releases the previously initialized semaphore.
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.
Overview of the DP Base Interface Clearing a Semaphore After the last use, clear your semaphore as follows: Step Action 1 Clear semaphores for events (function DP_delete_sema_object) DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-01 Meaning Releases the previously initialized semaphore.
Overview of the DP Base Interface 3.8 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 (... slave_mode=DPS_SM_SIMPLE ...) function is called.
Overview of the DP Base Interface 3.9 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. The following steps are necessary: Step Action Meaning 1 DP_start_cp CP is initialized.
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.
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, ...). The following sequence must be executed cyclically in a main program loop.
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.
Overview of the DP Base Interface Clearing the Semaphore After the last use, clear your semaphore as follows: Step Action 1 Clear semaphores for events (function DP_delete_sema_object) DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-01 Meaning Releases the previously initialized semaphore.
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. Multiple Application Programs For the software version in which the simultaneous operation of multiple application programs is supported, refer to the version table in Section of the Installation Instructions.
Description of the DP Functions, Data, and Error Codes 4 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. The chapter is primarily intended as a source of reference when you are writing your user programs.
Description of the DP Functions, Data, and Error Codes 4.1 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. // out The value is returned to the user program by the function. // inout The value must be initialized and is updated on completion of the function.
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). Some functions (for example, DP_ds_read) only trigger execution and are then completed.
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. DP_init_sema_object This function initializes a semaphore at which your user program can wait for the arrival of events. DP_delete_sema_object This function clears a semaphore again.
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. DP_ds_write This function sends a "Write Data Record" call to a DP-V1 slave. DP_read_alarm This function fetches a DPC1 alarm or a DPC1 status message. DP_alarm_ack This function sends an "Alarm Acknowledge" call to a DPV1 slave.
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 DPR_STRING DP_ERROR_T *cp_name, *database, *error ); // in // in // out Parameters Name Description cp_name Name of the CP 5613/CP 5614 (for example, "CP5613_5614_1" for the first inserted 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" diagnostic tool in the start menu. Note To use the CP again, your user program must use the DP_start_cp call.
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 ( DPR_STRING DPR_DWORD DP_ERROR_T *cp_name, *user_handle, *error ); // in // out // out Parameters Name Description cp_name Configured name of the CP 5613/CP 5614, (for example, "CP5613_5614_1" for the first inserted CP).
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. General Notes Note 1 Only one program can be in possession of a pointer to the process image at any one time.
Description of the DP Functions, Data, and Error Codes Syntax DPR_DWORD DP_get_pointer ( DPR_DWORD DPR_DWORD DPR_CP5613_DP_T DP_ERROR_T user_handle, // in timeout, // in volatile **dpr, // out *error); // out Parameters Name Description user_handle User handle assigned with the DP_open call. timeout Duration of the maximum wait time (in milliseconds) until the function returns.
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. Note This function requires a relatively long run-time and if it is called often, can be detrimental to the real-time properties of your user program.
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. The pointer to the dual-port RAM obtained with the DP_get_pointer function is also no longer valid. Note 2 To shut down the DP master, your user program should first change the master to the OFFLINE mode with the DP_set_mode function.
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-01 77
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 DPR_STRING DPR_STRING *error, // in *language, // in text[DP_ERR_TXT_SIZE] ); // out Parameters Name Description error Address of a structure provided by the user program of the type DP_ERROR_T.
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. Instead of this, it changes to DP_AUTOCLEAR which has the identical significance to DP_CLEAR.
Description of the DP Functions, Data, and Error Codes Syntax DPR_DWORD DP_set_mode (DPR_DWORD DPR_WORD DP_ERROR_T user_handle, mst_mode, *error ); // in // in // 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: error DP_OFFLINE: OFFLINE mode DP_STOP: STOP mode DP_CLEAR: CLEAR mode DP_OPERATE: OPERATE mode Address of a structure provided by the user program of the type DP_ERROR_T.
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. You can also change the AUTOCLEAR property of a slave. Using the slave address 0xFF and slv_mode == DP_SLV_ACTIVATE/ DP_SLV_DEACTIVATE you can activate or deactivate the AUTOCLEAR property.
Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. slv_add Address of the slave or 0xFF with the meaning: Activate or deactivate AUTOCLEAR for all. slv_mode Required slave state: DP_SLV_ACTIVATE DP_SLV_DEACTIVATE AUTOCLEAR setting: DP_AUTOCLEAR_ON DP_AUTOCLEAR_OFF Activate the slave Deactivate the slave Activate Deactivate The values can also be ORed.
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 DPR_WORD DPR_WORD DPR_WORD DPR_BYTE DP_ERROR_T user_handle,// slv_add, // type, // *data_len; // *data; // *error ); // in in in out out out Parameters Name Description user_handle User handle assigned with the DP_open call.
Description of the DP Functions, Data, and Error Codes Return Value Name 84 Description DP_OK Successful completion of the function otherwise if error->error_code == DP_RET_CP_ADR_NOT_IN_DB Error: The specified slave does not exist.
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. Syntax DPR_DWORD DP_global_ctrl( DPR_DWORD DPR_WORD DPR_BYTE DPR_BYTE DP_ERROR_T user_handle, slv_add, command, group, *error ); // in // in // in // in // out Parameters Name Description user_handle User handle assigned with the DP_open call.
Description of the DP Functions, Data, and Error Codes Return Value Name 86 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-01
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. The structure and meaning of the data can vary depending on the slave type. Note Reading is executed asynchronously (DP_OK_ASYNC). The result must be fetched with DP_get_result.
Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. Request Pointer to DP-V1 structure DPC1_REQ_S with entries for the read data record job.
Description of the DP Functions, Data, and Error Codes Table continued from previous page Name "Request" continued Description The order_id is a job identifier assigned by the user program. The identifier is returned unchanged in the asynchronous confirmation and can be used to identify the job to which the confirmation belongs. The c_ref element specifies the slave. The value of c_ref can be obtained using the function DP_get_cref(user_id, slv_add).
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. The structure and meaning of the data can vary depending on the slave type. Note Writing is executed asynchronously. The result must be fetched with DP_get_result.
Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. request Pointer to DP-V1 structure DPC1_REQ_S with entries for the write data record job.
Description of the DP Functions, Data, and Error Codes Return Value Name 92 Description DP_OK_ASYNC Execution of the function was activated successfully.
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. The structure and the meaning of the alarms or status message can vary depending on the slave type.
Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. slv_add Address of the slave (0-126 or DP_NEXT_ALARM for the next message of any slave (seen chronologically)) alarm Pointer to the DP_ALARM_S structure with the alarm or status data.
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. other Unsuccessful completion of the function; the entry in DP_ALARM_T is invalid.
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. Note Sending is executed asynchronously. The result must be fetched with DP_get_result.
Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. request Pointer to DP-V1 structure DPC1_REQ_S with entries for the acknowledge alarm job.
Description of the DP Functions, Data, and Error Codes Return Value Name 98 Description DP_OK_ASYNC Execution of the function was activated successfully.
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. The function can be used with modular slaves to detect the actual module configuration. Note Reading is executed asynchronously.
Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. request Pointer to DP-V1 structure DPC1_REQ_S with entries for the DP_get_actual_cfg job.
Description of the DP Functions, Data, and Error Codes Return Value Name Description DP_OK_ASYNC Execution of the function was activated successfully.
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: x Diagnostic data, alarms and status messages can be fetched x Slaves are included in the cyclic DP processing (operational) or have dropped out x The mode of the master has changed The function does not wait for the events but simply registers its program for notification.
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. Multiple DP_SLAVE_EXIT: The slave changed to the READY state and then back to the NOT READY state.
Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. Request Pointer to DP-V1 structure DPC1_REQ_S with entries for the event mechanism.
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 DP_MST_STATE notify when the master has or changes to a status other than that in the parameter mst_state.
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 example, contains information about slave 5. The following event IDs can be returned per slave address, and if required, several can be “ORed". 0 no event DP_DIAG diagnostic information arrived.
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.
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. If the timeout time "forever" is entered, DP_get_result waits until the confirmation has arrived.
Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DP_open call. timeout Duration of the maximum wait time (in milliseconds) until the function returns. Limit values: 0: no wait time - the function returns immediately 0x7FFFFFFE: maximum wait time DP_TIMEOUT_FOREVER: "Endless" wait time req_type Address of a variable for the job type.
Description of the DP Functions, Data, and Error Codes Return Value Name 110 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 error->error_code == DP_RET_TIMEOUT No confirmation available. DP_ERROR_EVENT, other DP_ERROR_EVENT_NET or DP_ERROR_RES A confirmation was received. The values in req_type and result are valid and identify the job.
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. It is not necessary to call DP_get_cref again before each DPC1 function.
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. Semaphores are synchronization objects that Win32 API interface also supports. Using semaphores, it is possible to wait for the arrival of events in threads or processes.
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: x DP_OBJECT_TYPE_INPUT_CHANGE Hardware event when slave input data changes. x DP_OBJECT_TYPE_DIAG_CHANGE Hardware event when diagnostic data changes.
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, DPR_DWORD sema_handle, DP_ERROR_T *error ); // in // in // out Parameters Name Description user_handle User handle assigned with the DP_open call.
Description of the DP Functions, Data, and Error Codes 4.1.24 DP_fast_logic_on Purpose This function activates the "fast logic" functionality of the CP 5613/CP 5614. With this function, an input value of a slave X can be linked with an output value of a slave Y. When the specified trigger condition occurs, the CP 5613/14 firmware automatically writes a specified output value to the output buffer of a slave.
Description of the DP Functions, Data, and Error Codes 4.1.25 DP_fast_logic_off Purpose This function deactivates the "fast logic" functionality of the CP 5613/CP 5614 again. For the software version in which this function is available, refer to the version table in Section in the Installation Instructions.
Description of the DP Functions, Data, and Error Codes 4.2 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. Functions that begin with "DP_" have general and master module functionality.
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 DP_start_cp (Section 4.1.2) Purpose Downloads the firmware and the database to the CP 5614 - Use the function of the master. DPS_open Logs on a DPS user program, assigns a user handle. DP_get_pointer (Section 4.1.
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_ command This function queries the last received global control command. DPS_get_state This function queries the current slave state. DPS_set_diag This function sets new diagnostic data. DPS_get_ind Receive asynchronous events. DPS_set_resp Confirm asynchronous events.
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. Note 1 In the slave mode DPS_SM_SIMPLE, the input data are taken automatically from the default data of the slave module.
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. user_handle Pointer to the user handle variable - if successful, the user handle assigned to the user program is entered here.
Description of the DP Functions, Data, and Error Codes Table continued from previous page Name init_data Description Pointer to a structure with information on the extended slave data.
Description of the DP Functions, Data, and Error Codes Table continued from previous page Name max_data Description 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.
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. Note 2 To shut down the DP slave, your user program should first change the slave module to the OFFLINE mode with the DPS_stop function.
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( DPR_DWORD DP_ERROR_T user_handle, *error); // in // out Parameters Name Description user_handle User handle assigned with the DPS_open call.
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, DP_ERROR_T *error ); // in // out Parameters Name Description user_handle User handle assigned with the DPS_open call. error Address of a structure provided by the user program of the type DP_ERROR_T.
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.
Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DPS_open call. state DPS_BAUD_SEARCH: baud_rate error Address of a structure provided by the user program of the type DP_ERROR_T. If an error occurred, the structure contains details for troubleshooting (see Section 4.4). no data transmission rate found. DPS_BAUD_FOUND: data transmission rate found, bus watchdog not activated.
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.
Description of the DP Functions, Data, and Error Codes Return Value Name 130 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-01
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. In its default state it is OFFLINE. After DPS_start, it first expects a parameter assignment frame (DPS_WAIT_PRM).
Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DPS_open call. dps_state • DPS_OFFLINE the slave module has not started up. • DPS_WAIT_PRM the slave module is waiting for a parameter assignment frame from the remote master. • DPS_WAIT_CFG the slave module is waiting for a configuration frame from the remote master. • DPS_DATA_EX the slave module is taking part in data exchange (productive phase).
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. For more information on the structure and formats of diagnostic information see Section 4.6.
Description of the DP Functions, Data, and Error Codes Parameters Name Description user_handle User handle assigned with the DPS_open call. user_diag_data Pointer to the user diagnostic data from the 7th byte onwards. The first 6 bytes contain the standard information added by the slave module hardware. (Format see Section 4.6). user_diag_len Length of the user diagnostic data.
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. DPS_CHK_PRM is also signaled if user parameter assignment data length of the remote master is 0. This allows the slave module to reject a set of parameters without user data.
Description of the DP Functions, Data, and Error Codes Syntax DPR_DWORD DPS_get_ind( DPR_DWORD DPR_DWORD DPR_DWORD DPR_DWORD DPR_WORD DPR_BYTE DP_ERROR_T user_handle, *ind_ref, timeout, *indication, *data_len *data_blk *error ); // // // // // // // in out in inout inout out out Parameters Name Description user_handle User handle assigned with the DPS_open call. timeout Duration of the maximum wait time (in milliseconds) until the function returns.
Description of the DP Functions, Data, and Error Codes Table continued from previous page Name indication Description 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). DPS_NO_IND: DPS_CHK_PRM: No indication occurred. New parameter assignment frame was received and must be checked by the host software (only for the dynamic mode, i.e.
Description of the DP Functions, Data, and Error Codes Table continued from previous page Name Description data_blk The indication data for the particular indication are entered in this array (see next section: Data Structure). error Address of a structure provided by the user program of the type DP_ERROR_T. If an error occurred, the structure contains details for troubleshooting (see Section 4.4).
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-01 139
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).
Description of the DP Functions, Data, and Error Codes Data Structure (for data_blk parameter) Indication DPS_CHK_PRM Content of the data_blk Data Structure DPR_WORD status Value DPS_CHK_CFG Meaning DPS_PRM_OK Parameter assignment data accepted. DPS_PRM_FAULT Parameter assignment not accepted, the slave does not enter data exchange. DPR_WORD status formatting Value DPS_NEW_SSA Meaning DPS_CFG_OK Configuration data accepted.
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.
Description of the DP Functions, Data, and Error Codes 4.3 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.
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.
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).
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.
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.
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.
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); /* Trigger transfer */ p->ctr. D_out_slave_adr = 5; ! Warning The lock is canceled by the following: Locking a different slave to read its input data (Section 4.3.
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. Example "p" is a pointer to the process image that your user program obtained with the "DP_get_pointer" call.
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. Note 1 Your user program must reset the mask itself (DPR_DATA_INT_CLEAR_AND_UNMASK).
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.
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; unsigned short i; for (i = 0; i< DPR_MAX_SLAVE_ADDR; i++) { if (p->info_watch.slave_info[i].
Description of the DP Functions, Data, and Error Codes 4.3.
Description of the DP Functions, Data, and Error Codes 4.3.7 Querying 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. Example "p" is a pointer to the process image that your user program obtained with the "DP_get_pointer" call.
Description of the DP Functions, Data, and Error Codes Description of the Bus Parameters Name Meaning ts Local station address baud_rate Data transmission rate Value Meaning DP_M_BAUDRATE_9K6 9.6 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 500 Kbps DP_M_BAUDRATE_750K 750 Kbps DP_M_BAUDRATE_1M5 1.5 Mbps 3 Mbps DP_M_BAUDRATE_6M 6 Mbps DP_M_BAUDRATE_12M 12 Mbps DP_M_BAUDRATE_31K25 31.
Description of the DP Functions, Data, and Error Codes Note Writing these values is not permitted and does not change the bus parameters actually used.
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. Example "p" is a pointer to the process image that your user program obtained with the "DP_get_pointer" call.
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. Example of Access "p" is a pointer to the process image that your user program obtained with the "DP_get_pointer" call.
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 160 Meaning off_ts_adr_error Another station with the same name was detected. in_ring Indicates how often the CP entered the ring of the active PROFIBUS master.
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 data exchange with fast logic has taken place. For the software version in which this property is available, refer to the version table in Section in the Installation Instructions.
Description of the DP Functions, Data, and Error Codes 4.3.11 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. Hardware events for changes in slave input data and diagnostic data can be set separately for each individual slave. The events are indicated by incrementing semaphores.
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; /* Deactivate event if diagnostic data arrive from slave 5 p->ef.diag[5].
Description of the DP Functions, Data, and Error Codes 4.3.12 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. Example of Consistent Writing "p" is a pointer to the process image that your user program obtained with the "DP_get_pointer" call.
Description of the DP Functions, Data, and Error Codes 4.3.13 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. This allows the user program to read the data sent by the controlling master as outputs to the slave module by reading the input data area with slave index 127.
Description of the DP Functions, Data, and Error Codes 4.3.14 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. The diagnostic data area with slave index 127 is not used (since this functions only in the receive direction), but rather a C function. For information on the format of the diagnostic data, see Section 4.6.
Description of the DP Functions, Data, and Error Codes 4.4 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.
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. The table describes the possible error classes and shows which of the other structure elements of DP_ERROR_T are valid for the individual error classes.
Description of the DP Functions, Data, and Error Codes error_code Structure Element The error_code structure element is relevant in the error classes: x DP_ERROR_EVENT_NET x DP_ERROR_REQ_PAR x DP_ERROR_CI x DP_ERROR_RES x 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.
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.
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: x error_decode x error_code_1 x error_code_2 Entries are only relevant in the error class DP_ERROR_EVENT. All three parameters must be evaluated together. They contain error information sent by the DP-V1 slave.
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.
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 Class Code 0 to 9 any 10 0 Meaning Class reserved reserved application read error 1 write error 2 module failure 3 to 7 reserved 8 version conflict 9 feature not supported 10 to 15 11 12 13 to 15 Code 0 user specific access invalid access 1 write length error 2 invalid slot 3 type conflict 4 invalid area 5 state confl
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.
Description of the DP Functions, Data, and Error Codes 4.5 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.
Description of the DP Functions, Data, and Error Codes 4.6 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.
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.
Description of the DP Functions, Data, and Error Codes 4.6.2 Format of the Diagnostic Data Header Overall Structure of the Header Byte 178 Meaning Byte 1 Stationstatus_1 Byte 2 Stationstatus_2 Byte 3 Stationstatus_3 Byte 4 Diag.
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. Bit Name and Meaning 7 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. 6 Diag. Prm_Fault - This bit is set by the slave if the last parameter assignment frame was incorrect (for example wrong length, wrong ident number, invalid parameters).
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. Bit Meaning 7 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. 6 reserved 5 Diag. Sync_Mode - This bit is set by the DP slave as soon as it receives the Sync control command. 4 Diag.
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. The value is in Motorola format, in other words the higher order part is in byte 5.
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. For further evaluation, the Ident_Number of the slave is required.
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. Some components therefore have different codings.
Description of the DP Functions, Data, and Error Codes Byte 2 (Alarm_Type Variant) Bit 7 6 to 0 Meaning Value Meaning 0 Alarm Alarm_Type 0 1 2 3 4 5 6 7-31 32-126 127 = = = = = = = = = = reserved Diagnostic alarm Process alarm Pull alarm Plug alarm Status alarm Update alarm reserved Vendor-specific reserved Byte 2 (Status_Type Variant) Bit 7 6 to 0 Meaning Value Meaning 1 Status message Status_Type 0 1 2 3-31 32-126 127 = = = = = = reserved Status message Module status reserved Vendor-spec
Description of the DP Functions, Data, and Error Codes Byte 4 (Alarm Specifier Variant) Bit 7 to 3 2 1 to 0 Meaning Seq_Nr Unique identifier of an alarm message Add_Ack If this bit is set, the DP-V1 master indicates that in addition to the DPC1 Alarm Acknowledge, a separate user confirmation(for example in the form of a Write service) is required. Alarm specifier 0 1 = no further information = 2 = 3 = Alarm enters state, slot problem The slot generates an alarm due to an error/fault.
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. The module status is byte-oriented, unused bits are set to 0.
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.
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. In the ID-related diagnostic data each module is assigned a bit in the data field. If a bit is set, this means that there is diagnostic information on the corresponding module.
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). Here, the data organization of the channel and messages such as "undervoltage" or "short-circuit" are supplied for the individual channels of a module. Note Refer to the example later in the section.
Description of the DP Functions, Data, and Error Codes Channel Number Bit 7 and 6 5 to 0 Meaning Value Meaning 00 reserved 01 Input 10 Output 11 Input/output 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.
Description of the DP Functions, Data, and Error Codes Type of Diagnostics Bit 7 and 6 Meaning Channel type Channel type 5 to 0 Meaning 000 reserved 001 bit 010 2 bits 011 4 bits 100 byte 101 word 110 2 words 111 reserved Error type Error type Meaning 0 reserved 1 Short circuit 2 Undervoltage 3 Overvoltage 4 Overload 5 Overtemperature 6 Wire break 7 Upper limit value exceeded 8 Below lower limit value 9 Error 10 - 15 reserved 16 - 31 Specified by the vendor DP
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.
Description of the DP Functions, Data, and Error Codes 4.7 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.
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. Where necessary the parameters are described in more detail later in the section. Name Meaning (see below) Sl_Flag Activates fail-safe mechanisms etc.
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.
Description of the DP Functions, Data, and Error Codes Alarm_Mode This parameter specifies the maximum number of possible active alarms.
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.
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. Bit 7 and 6 5 Meaning Lock_Req and Unlock_Req Bit 7 Bit 6 Meaning 0 0 The min TSDR is overwritten when parameters are assigned. All other parameters remain unchanged. 0 1 The DP slave is released for other masters.
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. The DP slave only accepts parameter assignment frames when the Ident_Number transferred with the parameter assignment data matches its own Ident_Number.
Description of the DP Functions, Data, and Error Codes Byte 9 (DPV1_Status_2) Bit 7 Meaning Enable_Pull_Plug_Alarm This bit is set to allow an alarm of the type "Pull_Plug_Alarm" to be signaled. 6 Enable_Process_Alarm This bit is set to allow an alarm of the type "Process_Alarm" to be signaled. 5 Enable_Diagnostic_Alarm This bit is set to allow an alarm of the type "Diagnostic_Alarm" to be signaled.
Description of the DP Functions, Data, and Error Codes Byte 10 DPV1_Status_3 Bit Meaning 7-3 reserved 2-0 Alarm Mode Bit 4 Meaning 0 1 alarm of each type 1 2 alarms in total 2 4 alarms in total 3 8 alarms in total 4 12 alarms in total 5 16 alarms in total 6 24 alarms in total 7 32 alarms in total Bytes 11 to n User_Prm_Data This byte can be used for parameters specific to a DP slave (for example, diagnostic filter, controller parameters).
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: Configuration data Data field 1 Variant 1 ID byte Data field 2 ... Data field n Variant 2 Special ID byte 1. Length byte (optional) 2.
Description of the DP Functions, Data, and Error Codes Structure of an ID Byte Each bit has a special meaning.
Description of the DP Functions, Data, and Error Codes Length Bytes Each bit in the length bytes has a special meaning.
FAQ (Frequently Asked Questions) 5 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. You should also read the FAQ list in the Installation Instructions of the product.
FAQ (Frequently Asked Questions) 5.1 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. Which compilers and programming languages are supported? Please refer to the version table in Section of the Installation Instructions.
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.
FAQ (Frequently Asked Questions) 5.2 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.
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. We recommend that you restrict polling using a time control suitable for your system.
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. To avoid this, some form of interlock would be necessary so that only one thread can access the process image at any one time. You could do this using semaphores, mutexes etc.
FAQ (Frequently Asked Questions) 5.3 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: x 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. x Evaluate all errors and check all the diagnostic data.
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: x Select data buffer lengths to match the longest possible data. x Link job fields with valid data buffers in the startup phase of your program. x If you use multiple threads, each thread should have its own job fields and data buffers.
FAQ (Frequently Asked Questions) What should a user programmer take into account? x Use unique order_ids for parallel jobs. x Remember that a hardware event entering the state deletes its activation condition. You must make sure it is reactivated. x Do not use hardware events at the same time as periodic polling on the same slave.
FAQ (Frequently Asked Questions) 5.4 FAQs about Debugging and Starting Up Your Program What are the typical errors when a program is first run? x Bus malfunctions caused by bad contacts/bad cabling/forgetting the terminator are often the cause of initial problems.
FAQ (Frequently Asked Questions) 5.5 FAQs Miscellaneous Programming Questions Can groups of slaves be used for hardware events? You can do this yourself with the software tools, for example: 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. What names are given to the modules when they are installed? The modules are given the names "CP5613_5614_1", "CP5613_5614_2" etc. by the driver.
FAQ (Frequently Asked Questions) 216 DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-01
Where to Get Help 6 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-01 217
Where to Get Help 6.1 Help with Technical Questions Documentation You will find information on the use of this software in the following sources: x in the corresponding paper documentation x in the online help (F1 key) x in the text files on the product diskettes x in text and 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.
Where to Get Help SIMATIC Customer Support Hotline Available at all times worldwide: Johnson City Nuremberg Singapore SIMATIC Basic Hotline Nuremberg SIMATIC BASIC Hotline SIMATIC Premium Hotline (charged, only with SIMATIC card) Local time: Mo to Fr 7:00 to 17:00 (CET) Phone: +49 (911) -895-7000 Fax: +49 (911) -895-7002 E-mail: simatic.support@nbgm.siemens.
Where to Get Help SIMATIC Customer Support Online Services In its online services, SIMATIC Customer Support provides you with wide-ranging additional information about SIMATIC products: x You will find general, up-to-date information: – on the Internet (http://www.ad.siemens.de/simatic) – using fax polling x You can obtain the latest product information and downloads: – on the Internet (http://www.ad.siemens.de/support/html-00).
Where to Get Help 6.2 Contacts for training with SIMATIC NET SIMATIC Training Center Please contact your regional training center or the central training center in D90327 Nuremberg, Tel. +49-911-895-3154.
Where to Get Help 222 DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-01
Index 7 D Data transfer rates ................................207 Database ............................................... 40 Delphi ...................................................206 Diag. Cfg_Fault .....................................179 Diag. Deactivated..................................180 Diag. Ext_Diag ......................................179 Diag. Ext_Diag_Overflow ......................180 Diag. Freeze_Mode...............................180 Diag. Invalid_Slave_Response ..............
Index DPS_start .............................................125 DPS_stop..............................................126 DP-V1 .................................................... 32 DPV1_Enable .......................................199 DPV1_Status_1.....................................199 DPV1_Status_3.....................................201 DPV1_Supported ..................................195 E Empty frame .......................................... 18 Enable_Diagnostic_Alarm .....................
Index set diagnostic data (CP 5614)............133 state ................................................... 81 type ...................................................195 Slot number ..........................................184 Software event ....................................... 45 Statistical Data ......................................159 Status_Type..........................................184 STOP..................................................... 23 SYNC..........................................
Index 226 DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-01
Glossary 8 AUTOCLEAR 1. Configuration property of a DP slave - the master changes to the AUTOCLEAR mode if this slave drops out. 2. This is the same as the DP_CLEAR mode of a DP master, when it changes to the mode due to the AUTOCLEAR property of a slave. Bit time Time required by a bit for transmission on the bus, this is the reciprocal of the data transmission rate.
Glossary CPU Central Processing Unit - 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. DB Here: Database - The local database describes the communications network from the view of the local system.
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. DPC2 DP extended by connection control and read and write jobs from a non-cyclic master.
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 Dual Port Random Access Memory - allows simultaneous access to one memory area (RAM) by two computer units (CP and CPU). Event Here: an event that the CP 5613/CP 5614 can signal to the user program. There are hardware events and software events.
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 requesting to enter the logical ring.
Glossary Indication Message from a remote node. 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. A DP slave has at least one DP I/O module. I/O type The DP I/O type identifies a DP I/O module.
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. TSDR to elapse before sending a further frame. Minimum station delay The minimum station delay (min.
Glossary Network A network consists of one or more interconnected subnets with any number of nodes. Several networks can exist one beside the other. For each subnet, there is a common node table. Output data Here: the data sent cyclically to the slaves by the DP master. PC Personal Computer PG Programming device (industrial PC) belonging to the SIMATIC product family from Siemens AG used for programming, configuring and in maintenance and service.
Glossary Protocol Rules governing the transmission of data - The rules specify not only the formats of the messages but also the data flow during data transmission. 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. READY time A PROFIBUS bus parameter- The READY time is the time within which an active node must be ready to receive an acknowledgment or response after sending a call.
Glossary Setup time A PROFIBUS bus parameter - The setup time specifies the minimum time between receiving an acknowledgment and sending a new call. Sign of life monitoring A monitoring time that can be set on a DP slave to detect failure of the controlling DP master. SIMATIC NET Siemens Network and Communication - Product range for networks and network components from Siemens.
Glossary Thread A subprocess running parallel. User watchdog Watchdog for monitoring the DP user program Watchdog A mechanism for monitoring operability of nodes.
Glossary T 238 DP Base Programming Interface for CP 5613/CP 5614 C79000-G8976-C108-01