profibus dp dde server for sinec cp5412 (a2)media.klinkmann.com/servers/docs/07020m16.pdf ·...

29
PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and InTouch Applications User Manual Ver 1.x Rev 1.6 DR 070 20 KLINKMANN AUTOMATION P.O. Box 38 FIN-00371 Helsinki Finland tel. int. + 358 9 5404940 fax int. + 358 9 5413541 www.klinkmann.com

Upload: others

Post on 16-Apr-2020

6 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

PROFIBUS DP DDE Server for SINEC CP5412 (A2)

for Microsoft Windows and InTouch Applications

User Manual Ver 1.x Rev 1.6

DR 070 20

KLINKMANN AUTOMATION P.O. Box 38

FIN-00371 Helsinki Finland tel. int. + 358 9 5404940 fax int. + 358 9 5413541

www.klinkmann.com

Page 2: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) i

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Table Of Contents What is DDE? .....................................................................................................................1 Accessing a Remote DDE Item from Server.......................................................................1 Getting Started Quickly with the Server ..............................................................................2

Installing the Server.........................................................................................................2 Modifying PLC program...................................................................................................3 Configuring the CP5412 (A2) board ................................................................................4 Configuring the Server ....................................................................................................4

Configure DDE Server Settings Command .................................................................5 Board Configuration Command ...................................................................................6 Saving Server Configuration File .................................................................................6 Configuration File Location..........................................................................................7 Topic Definition Command ..........................................................................................7 DP Application Attributes Command ...........................................................................8

Using the Server with InTouch............................................................................................9 Defining the Tagnames .................................................................................................10 Station "STATUS" Item .................................................................................................13

Item/Point Naming ............................................................................................................14 Item/Point Naming for Normal Mode.............................................................................14 Item/Point Naming for Interpreter Mode........................................................................16

Item/Point naming for S7-200 PLC............................................................................16 Item/Point naming for S7-300 PLC............................................................................17

Notes on Using Microsoft Excel ........................................................................................20 Reading Values into Excel Spreadsheets .....................................................................20 Writing Values to DP Points ..........................................................................................20

Error messages ................................................................................................................22 Troubleshooting ................................................................................................................26

Page 3: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 1

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

PROFIBUS DP DDE Server

The PROFIBUS DP DDE Server for SINEC CP5412 (A2) (hereafter referred to as the “PROFIBUS DP DDE Server” or “Server”) is a Microsoft Windows or NT application program that acts as a DDE (Dynamic Data Exchange) Server and allows other Windows application programs (clients) to access input/output data from DP slaves using PROFIBUS DP protocol. In some contexts Server is also called DP application. The Server communicates with DP slaves via CP5412 (A2) communication processor, installed in an IBM PC or compatible computer and connected to the PROFIBUS bus cable via bus terminal. The Server allows access to data in up to 123 DP slaves (addresses 3 ...125). The Server is primarily intended for use with Wonderware InTouch, but it may be used by any Microsoft Windows NT program that is capable of acting as a DDE client.

What is DDE? DDE is a complete communication protocol designed by Microsoft to allow applications in the Windows environment to send/receive data and instructions to/from each other. It implements a client-server relationship between two concurrently running applications. The server application provides the data and accepts requests from any other application interested in its data. Requesting applications are called clients. Some applications such as InTouch and Excel can simultaneously be both a client and server. To obtain data from another application the client program opens a channel to the server application by specifying three things: the server application name, the topic name and the specific item name. For example, in the case of Excel, the application name is "Excel", the topic name is the name of the specific spreadsheet, that contains the data and the item name is the specific cell on the spreadsheet. With InTouch the application name is "View", the topic name is the word "Tagname" when reading/writing to an InTouch tagname and the item name is a specific tagname in the InTouch Data Dictionary. When a client application sets up a link to another DDE program, it requests the server application to advise the client whenever a specific item's value changes. These data links will remain active until either the client or server program terminates the link or the conversation. They are a very efficient means of exchanging data because when the link has been established, no communication occurs until the specified data value changes. InTouch uses DDE to communicate with I/O device drivers and other DDE application programs.

Accessing a Remote DDE Item from Server

Page 4: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 2

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

The DDE protocol identifies an element of data by using a three-part address, including: Application, Topic and Item. Application refers to the name of the Windows program (server) that knows how to access the data element. For this Server, the application portion of the DDE address is DP. Topic is an application-specific sub-group of data elements. The Server considers each DP slave to be a separate topic. Up to 123 DP slave stations may be connected, and the user creates a meaningful name for each of them and use this name as the topic name for DDE references. Several topics for each slave are allowed. Item indicates a specific data element within the specified topic. For the Server, an item is an individual data bit, byte, word, double word or string in the DP slave (the item/point names are defined as described in the Item/Point Naming section). Note: In some cases, the term "point" is used interchangeably with the term "item".

Getting Started Quickly with the Server Follow these steps:

1. Install the PROFIBUS DP Server. 2. Modify PLC program. 3. Configure CP5412 (A2) board. 4. Reboot computer. 5. Start MS Windows NT. 6. Start and configure PROFIBUS DP Server. 7. Start Client.

Installing the Server The PROFIBUS DP DDE Server installation package can be supplied: 1. As a self-extracting archive 07020xxx.EXE if downloaded from Klinkmann’s web site

(the xxx is the current (latest) version of the Server). 2. From installation on CD. 3. On two or three distribution disks (floppies). To install the PROFIBUS DP DDE Server from the self-extracting archive, run the 07020xxx.EXE and proceed as directed by the PROFIBUS DP DDE Server Setup program. To install the PROFIBUS DP DDE Server, on MS Windows NT:

1. Insert the CD with Klinkmann Software into CD drive or insert the distribution disk into a drive A: or B:.

2. Select the Run command under the Start menu.

Page 5: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 3

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

3. Run STARTUP.EXE if installing from CD or SETUP.EXE if installing from distribution disks (floppies).

4. If installing from CD: select “Protocol Servers (DDE, SuiteLink, OPC)”, find “PROFIBUS DP DDE Server” and click on “Setup…”.

5. Proceed as directed by the installation program. When installation is finished, the subdirectory specified as a folder where to install the PROFIBUS DP DDE Server will contain the following files: DP.EXE The PROFIBUS DP Server Program. This is a Microsoft

Windows 32-bit application program.

DP.HLP The PROFIBUS DP Server Help file.

DP.CFG An example configuration file.

LICENSE.TXT

Klinkmann Automation software license file.

WWCOMDLG.DLL

Dynamic Link Library necessary for PROFIBUS DP Server.

ADDITION.ZIP Contains additional files (InTouch application examples etc.). For detailed information, how to use these files, read the README.TXT file included.

To uninstall the PROFIBUS DP Server, start Control Panel, select “Add/Remove Programs” and select the “PROFIBUS DP DDE Server” from the list of available software products. Click on “Add/Remove…” and proceed as directed by the UnInstallShield program. Note: The HASP key is needed for full time running of PROFIBUS DP Server. The HASP Driver setup is performed during the Server setup. Without HASP Driver installed, the PROFIBUS DP Server will run only 1 hour (with all features enabled).

Modifying PLC program If your DP slaves are not programmable (for example ET200U DP/FMS) you can skip this section. For PLCs, program must be modified. Changes depend on communication mode to be used: normal mode or interpreter mode. Interpreter mode requires special interpreter function in the PLC and allows direct access to other PLC data areas, not only DP inputs and outputs. This Server version supports interpreter mode only for S7-200 and S7-300 PLCs. To modify S7-200 PLC program for work in normal mode: - Use STEP 7-Micro/Win V2.0 package to set Port 1 (DP port) parameters for CPU 215-2, and assign V memory offset for DP output area (DP input area follows DP output area) to SMW112.

Page 6: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 4

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

To modify S7-200 PLC program for work in interpreter mode: - Use STEP 7-Micro/Win V2.0 package to set Port 1 (DP port) parameters for CPU 215-2. - Include call to interpreter subroutine SBR 0 in PLC program (SBR 0 is supplied with PLC demo program). To modify S7-300 PLC program for work in normal mode: - Configure S7-300 PLC L2-CP module as DP slave and set bus parameters with NCM S7 for PROFIBUS package. - Call FC DP-SEND in PLC program, to send DP inputs to DP master. - Call FC DP-RECV in PLC program, to receive DP outputs from DP master. To modify S7-300 PLC program for work in interpreter mode: - Configure S7-300 PLC L2-CP module as DP slave and set bus parameters with NCM S7 for PROFIBUS package. - Call Interpreter FB 101 in PLC program, to receive data requests and send responses to DP Master.

Configuring the CP5412 (A2) board Start COML DP (MS Windows 3.x) or COM PROFIBUS (MS Windows NT) editor from SINEC Setup program. Create database, containing description of DP slaves and bus parameters. Configure CP 5412 (A2) and select created database as a current database for CP 5412 (A2). Restart PC. If MS Windows 3.x is used, then transfer configured parameters to CP 5412 (A2) by running SINECINI.BAT batch file, before starting MS Windows 3.x.

Configuring the Server After the Server is initially installed, some configuration is required. During configuration Server creates a DP.CFG file which contains all entered topic (DP slave) definitions , as well as some board settings. This file will automatically be placed in the same directory as DP.EXE , unless the path where the configuration file will be placed is specified via the /Configure/DDE Server Settings command. To perform the required configuration, start the DP.EXE program. DP main window will appear:

Page 7: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 5

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

To access the commands used for configuration, open the /Configure menu:

Configure DDE Server Settings Command To change Server’s internal parameters, invoke the /Configure/DDE Server Settings command. The "DDE Server Settings" dialog box will appear:

The following describes each field in this dialog box: Protocol Timer Tick This field is used to set the frequency at which the Server checks for work to do. The minimum value is 50 milliseconds for Windows 3.x and 10 milliseconds for Windows NT. NetDDE being used Select this option if you are networking using NetDDE. Configuration File Directory This field is used to specify the path (disk drive and directory) in which Server will save its current configuration file. Server will use this path to load the configuration file the next time it is started.

Page 8: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 6

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Note: Only the "path" may be modified with this field. The configuration file is always named DP.CFG. There is no limit to the number of configuration files created, although each must be in a separate directory. When using the Server with InTouch, it is a good practice to place the configuration file in the application directory. Board Configuration Command This command is used to configure board, that will communicate with DP slaves. Invoke the /Configure/Board Configuration command. A list of configured boards will appear:

Select a board and click on Modify to examine the characteristics of the selected Board. The "Board Configuration" dialog box will appear:

The following describes each field in this dialog box: Board Name This field is used to enter the board name. Watchdog Time This field is used to enter watchdog time. If Server, for some reason, does not access board (CP5412 (A2)) for time, longer than the specified watchdog time (for example, protocol was suspended with Protocol Suspend option in DP window control menu), board will send output data with value 0 to all attached DP slaves. If watchdog time is equal to 0, watchdog function for the board is not activated. Saving Server Configuration File If the configuration file does not currently exist, or a new configuration path has been specified, the Server will display the "Save Configuration" dialog box:

Page 9: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 7

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

This dialog box displays the path where the Server is going to save the current configuration file. The path may be changed if necessary. Also, the path can optionally be recorded in the WIN.INI file by selecting the "Make this the default configuration" option. Doing so it will allow the Server to find the configuration file automatically each time it is started. Configuration File Location When the Server starts up, it first attempts to locate its configuration file by, first checking the WIN.INI file for a path which was previously specified. If the path is not present in the WIN.INI file, the Server will assume that the current working directory is to be used. To start the Server with configuration file other than the default configuration file a special switch (/d:) is used. For example, invoke the File/Run command and enter the following command: DP /d:c:\path Note: There is no limit to the number of configuration files that may be created, although each must be in a separate directory. Topic Definition Command The following steps are taken to define the Topics attached to the DP slave stations: 1. Invoke the /Configure/Topic Definition command. The list of configured topics will appear:

2. To modify an existing topic, select the topic name and click on Modify. To define a

new topic, click on New. The Topic Definition dialog box will appear:

Page 10: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 8

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

3. Enter Topic Name which corresponds to the DDE Topic Name. (The DDE Topic

Name is entered in the "Add DDE Access Name" dialog box described in the Using the Server with InTouch section).

4. Select board from Board Name list. 5. Set DP Slave Address.

Note: Each DP slave station must have an address from 3 to 125. 6. Set Maximum Supported Points for topic. Set this value equal to number of

actually used (polled) items/points - this will reduce the amount of memory used by the Server.

7. Set Update Interval, to indicate the frequency the items/points on this topic will be

read (polled). 8. Set Interpreter FB check box, if DP slave uses Interpreter function for

communication (this option is supported only for S7-200 and S7-300 PLCs). 9. Select PLC from PLC Name list. This list is enabled only if Interpreter FB is to be

used for communication. This Server version supports interpreter mode only for S7-200 and S7-300 PLCs.

When all entries have been made, select OK to process the configuration for this topic. DP Application Attributes Command Command is not supported in this Server version. Server is an DP application. There can be several DP applications communicating with the board (CP5412 (A2)) simultaneously. DP application attributes determine DP application environment (environment where one of DP applications is an central application or environment where all DP applications have equal rank ) and DP application role (central DP application or not central DP application). In this Server version, attributes are unchangeable and it is assumed that there is no central DP application.

Page 11: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 9

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Using the Server with InTouch To access items/points on the DP slaves from InTouch, the following steps (all performed in WindowMaker) are required: To define the DDE Access Names in WindowMaker for DP slaves invoke the /Special/DDE Access Names command. The "DDE Access Name Definition" dialog box will appear:

Click on Add. The "Add DDE Access Name" dialog box will appear:

Note: If Add is selected, this dialog box will be blank when it initially appears. Data has been entered here to illustrate the entries which are made. The following three fields are required entries when adding a DDE Access Name: DDE Access Name Enter an arbitrary name which will be used by InTouch to refer to the topic (DP slave). For simplicity, it is recommended that the name defined for the topic in Server is also used here.

Page 12: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 10

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

DDE Application/Server Name Enter Server name DP. DDE Topic Name Enter one of topic names defined during Server configuration. Request Initial Data This option may be selected if the Server is other than a Wonderware DDE Server and the Server does not return data values immediately when a window is displayed. This option is not applicable to this Server. Wait for Change This option should be selected when the DDE application is a Wonderware DDE Server. Select it for this Server. Advise all Items This option may be selected if the Server is to poll for all data, regardless whether data are in visible windows, alarmed, logged or trended. The use of the option is not recommended. Advise only active Items Selecting this option will cause the Server to poll only items in visible windows and items that are alarmed, logged or trended.

Defining the Tagnames To define the Tagnames associated with the new "DDE Access Name", invoke the /Special/Tag Name Dictionary command (in WindowMaker). The "Dictionary - Tag Name Definition" dialog box will appear:

Click on New and enter the Tag Name. (The tagname defined here is the name InTouch will use. The Server does not see this name.) Select the tag type by clicking on the Type button. The "Choose tag type" dialog box will appear:

Page 13: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 11

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

To access Server items , the type must be DDE Discrete, DDE Integer, DDE Real or DDE Message. Select the DDE type. The "Details" dialog box for the tagname will appear:

Select the Server topic by clicking on the DDE Access Name button. The "DDE Access Name Definition" dialog box will appear:

Select the appropriate topic name and click on Done. (If the DDE Access Name has not been defined as previously described, click on Add and define the DDE topic now.) The "Details" dialog box will appear displaying the selected DDE Access Name:

Page 14: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 12

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

For integers and reals, fill in the Min EU, Max EU, Min Raw and Max Raw fields. These fields control the range of values which will be accepted from the Server and how the values are scaled. If no scaling is desired, Min EU should be equal to Min Raw and Max EU should be equal to Max Raw. Enter the Server item/point name to be associated with this tagname in the Item field in the "Details" box:

Refer to the Item/Point Naming section below for details. When all entries have been made, click on the Save button (in the top dialogue box) to accept the new tagname. To define additional Tagnames click on the New button. To return to the WindowMaker main screen, select Done.

Page 15: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 13

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Station "STATUS" Item For each DP slave station, there is a built-in discrete item which indicates the state of communication with the station. The discrete item (STATUS) is set to 0 when communication with the station fails and set to 1 when communication is successful. From InTouch the state of communication with the station may be read by defining a DDE Discrete tagname and associating it with the topic configured for the station and using STATUS as the item name.

From Excel, the status of the communication may be read by entering the following formula in a cell: =DP|topic!STATUS

Page 16: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 14

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Item/Point Naming Item/point naming differs, depending on communication mode. Normal mode can be used for all standard DP slaves. Interpreter mode can be used for programmable DP slaves. It requires special Interpreter function in the PLC and allows direct access to other PLC data areas, not only DP inputs and outputs. This Server version supports interpreter mode only for S7-200 and S7-300 PLCs.

Item/Point Naming for Normal Mode DP slaves can have Inputs and Outputs. Inputs/Outputs can be addressed as bytes or words. In both cases byte number is used in the item/point name. If word is addressed and byte number m is specified in item/point name, byte m will be word’s high byte and byte m+1 will be word’s low byte. The following tables describe item/point naming conventions:

Inputs Data Format Item Suffix DDE Tag

Type Range

Bit In.b En.b

Discrete Discrete

0 or 1 0 or 1

Byte IBn EBn

KF

Integer Integer Integer

0 to 255 0 to 255

-128 to 127 Word IWm

EWm

KF

Integer Integer Integer

0 to 65535 0 to 65535

-32768 to 32767 Inputs are Read Only . n - byte number (0 to 254). m - byte number (0 to 253). b - bit number (0 to 7) .

Page 17: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 15

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Outputs Data Format Item Suffix DDE Tag

Type Range

Bit Qn.b An.b

Discrete Discrete

0 or 1 0 or 1

Byte QBn ABn

KF

Integer Integer Integer

0 to 255 0 to 255

-128 to 127 Word QWm

AWm

KF

Integer Integer Integer

0 to 65535 0 to 65535

-32768 to 32767 Outputs are Read/Write . n - byte number (0 to 254). m - byte number (0 to 253). b - bit number (0 to 7) . Item/Point Naming Examples: I2.7 - bit 7 of input byte 2 IB3 - input byte 3 as unsigned integer IB3KF - input byte 3 as signed integer IW3 - input word (bytes 3 and 4) as unsigned integer IW3KF - input word (bytes 3 and 4) as signed integer Q3.0 - bit 0 of output byte 3 QB4 - output byte 4 as unsigned integer QB4KF - output byte 4 as signed integer QW4 - output word (bytes 4 and 5) as unsigned integer QW4KF - output word (bytes 4 and 5) as signed integer

Page 18: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 16

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Item/Point Naming for Interpreter Mode Item/Point naming for S7-200 PLC The following data areas are supported: - Variable Memory, - Bit Memory, - Inputs, - Outputs. The following table describes item/point naming conventions:

Data Format Item Suffix DDE Tag Type

Range

Bit {PREFIX}x.b Discrete 0 or 1 Byte {PREFIX}Bx

KF Integer Integer

0 to 255 -128 to 127

Word {PREFIX}Wn KF

BCD

Integer Integer Integer

0 to 65535 -32768 to 32767

0 to 9999 Double Word

{PREFIX}Dk

BCD KG

Integer

Integer Real

-2147483648 to 2147483647

0 to 99999999 Floating point

String {PREFIX}Sx.z Message 1 to 56 Notes: 1. x - specifies byte address, n - specifies word address, k - specifies double word address. 2. For Bit data: bit number b = 0 to 7. 3. For Strings z = length of character string; z = 1 to 56. 4. For Variable Memory: - all Data Formats are supported; - all Variable Memory data are Read/Write; - {PREFIX} is V; - x = 0 to 5119, n = 0 to 5118, k = 0 to 5116. 5. For Bit Memory: - all Data Formats are supported; - all Bit Memory data are Read/Write; - {PREFIX} is M or F; - x = 0 to 31, n = 0 to 30, k = 0 to 28.

Page 19: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 17

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

6. For Inputs and Outputs: - all Data Formats are supported; - all Inputs and Outputs are Read Only; - {PREFIX} is I or E (for Inputs) and Q or A (for Outputs); - x = 0 to 7, n = 0 to 6, k = 0 to 4. Item/Point Naming Examples: V1000.7

bit 7 of variable byte 1000 VW1000KF

variable word 1000 (bytes 1000,1001) value in the PLC is binary and has a range of -32768 to 32767

VW1000BCD

variable word 1000 value in the PLC is in BCD format and has a range of 0 to 9999

VS1000.8

value in the PLC is character string containing maximum 8 bytes and starting at variable byte 1000

MB10

Bit memory byte 10 value in the PLC is binary and has a range of 0 to 255

I0.3

bit 3 of input byte 0 Item/Point naming for S7-300 PLC The following data areas are supported: - Data Blocks, - Bit Memory, - Inputs, - Outputs, - Peripheral Inputs and Outputs, - Counters, - Timers. The following table describes item/point naming conventions:

Page 20: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 18

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Data Format Item Suffix DDE Tag Type

Range

Bit {PREFIX}x.b Discrete 0 or 1 Byte {PREFIX}Bx

KF Integer Integer

0 to 255 -128 to 127

Word {PREFIX}Wn KF

BCD KT

Integer Integer Integer

Message

0 to 65535 -32768 to 32767

0 to 9999 0.0 to 999.3

Double Word

{PREFIX}Dk

BCD KG

Integer

Integer Real

-2147483648 to 2147483647

0 to 99999999 Floating point

String {PREFIX}Sx.z Message 1 to 70 Notes: 1. x - specifies byte address, n - specifies word address, k - specifies double word address. 2. For Bit data: bit number b = 0 to 7. 3. For Strings z = length of character string; z = 1 to 70. 4. For Data Blocks: - all Data Formats are supported; - all Data Blocks are Read/Write; - {PREFIX} is DBmD where m = 1 to 127; - x = 0 to 8191, n = 0 to 8190, k = 0 to 8188. 5. For Bit Memory: - all Data Formats are supported; - all Bit Memory data are Read/Write; - {PREFIX} is M or F; - x = 0 to 255, n = 0 to 254, k = 0 to 252. 6. For Inputs and Outputs: - all Data Formats are supported; - all Inputs and Outputs are Read Only; - {PREFIX} is I or E (for Inputs) and Q or A (for Outputs); - x = 0 to 127, n = 0 to 126, k = 0 to 124. 7. For Peripheral Inputs and Outputs: - all Data Formats are supported, excepting bit format; - all Peripheral Inputs and Outputs are Read Only; - {PREFIX} is P; - x = 0 to 755, n = 0 to 754, k = 0 to 752. 8. For Counters: - only Word Format is supported; - all Counters are Read Only; - {PREFIX} is C;

Page 21: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 19

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

9. For Timers: - only Word Format is supported; - all Timers are Read Only; - {PREFIX} is T; - n = 0 to 127. 10. Suffix KT is used to view timer value in text format. Item/Point Naming Examples: DB10D20.7

data block 10 bit 7 of data byte 20

DB10DW20KF data block 10 data word 20 value in the PLC is binary and has a range of -32768 to 32767

DB10DW20BCD

data block 10 data word 20 value in the PLC is in BCD format and has a range of 0 to 9999

DB10DS20.8

data block 10 value in the PLC is character string containing maximum 8 bytes and starting at data byte 20

MB100

Bit memory byte 100 value in the PLC is binary and has a range of 0 to 255

I4.0

bit 0 of input byte 4

TW0KT timer word 0 in text format

CW10

counter word 10

Page 22: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 20

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Notes on Using Microsoft Excel Data from Server topics (DP slaves) may be accessed from Excel spreadsheets. To do so, enter a formula like the following into a cell on the spreadsheet. =DP|topic!item Sometimes, Excel requires the topic and/or item/points to be surrounded by apostrophes. In the formula, topic must be replaced with one of the valid topic names defined during the Server configuration process. Replace item with one of the valid item/point names described in the Item/Point Naming section.

Reading Values into Excel Spreadsheets Values may be read directly into Excel spreadsheets by entering a DDE formatted formula into a cell, as shown in the following examples: = DP|Slave01!I2.7 = DP|PLC2!QB3 = DP|Controller5!IW0KF

Writing Values to DP Points Values may be written to the DP Server from Microsoft Excel by creating an Excel macro that uses the POKE command. The proper command is entered in Excel as follows: channel=INITIATE("DP","topicname") =POKE(channel,"itemname", Data_Reference) =TERMINATE (channel) =RETURN() The following describes each of the above POKE macro statements: channel=INITIATE("DP","topicname") Opens a channel to a specific topic name (defined in the Server) in an application with name DP (the executable name less the .EXE) and assigns the number of that opened channel to channel. Note: By using the channel=INITIATE statement the word channel must be used in the =POKE statement instead of the actual cell reference. The "applicationname" and "topicname" portions of the formula must be enclosed in quotation marks. =POKE(channel,"itemname", Data_Reference) POKEs the value contained in the Data_Reference to the specified item name (some actual address on DP slave) via the channel number returned by the previously executed INITIATE function. Data_Reference is the row/column ID of the cell containing the data value. For "itemname", use some of the valid item names described in the Item (Point) Naming section. =TERMINATE(channel)

Page 23: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 21

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Closes the channel at the end of the macro. Some applications have a limited number of channels. Therefore they should be closed when finished. Channel is the channel number returned by the previously executed INITIATE function. =RETURN() Marks the end of the macro. The following is an example of Excel macro used to poke value from cell B2 to topic Slave01 item MB10: PokeMacro -Ctrl a =INITIATE("DP","Slave01") =POKE(A2,"MB10",B2) =ON.TIME(NOW()+0.01,"TerminateDDEChannel") =RETURN() TerminateDDEChannel =TERMINATE(A2) =RETURN() Note: Refer to the Microsoft Excel manual for complete details on entering Remote Reference formulas for cells.

Page 24: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 22

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Error messages Messages about errors detected by Server can be output either in Server window or in WWLogger window. As a rule, messages about errors detected during Server configuration dialog are output in Server window, but messages about errors detected during communication are output in WWLogger window. Most of communication errors are detected by board (CP5412 (A2)) and corresponding error codes are returned to Server. Some of these errors cannot be caused by Server user and are given here only for completeness. Below is a list of most important error messages with some commentary. The rest of error messages are self-explanatory and does not require commentary. Error: DP - access error Server does not have right of access to the function or to the slave. For example, some other DP application has logged on before Server, and defined Write access to the slave. When Server tries to log on and define Write access to the same slave, it will receive this error code. Only one DP application may have Write access to the DP slave. Error: DP - application limit error The maximum permitted number of DP applications in the multi user mode has been exceeded. Error: DP - central application error The function can only be called by a central DP application. Note: This Server version can not be configured as a central DP application. Error: DP - close error Error logging off a Server. Error: DP - length error DP structure element “length” is outside the permitted range of values. The data length does not match configured value. Error: DP - not enough free memory on the CP Error: DP - not enough free memory on the host Error: DP - mode error The function call can not be processed in the current mode or a status was skipped when changing the mode.

Page 25: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 23

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Error: DP - no or incorrect entries in DP database Error: DP - open error Error logging on a Server (e.g. TF-NET L2 driver (for MS Windows 3.x) or SINEC CP5412A2 driver (for MS Windows NT) not loaded, board not plugged in). Error: DP - receive error Error transferring an acknowledgement from the board to the Server. Error: DP - reference error DP structure element “reference” is not valid. Error: DP - different reference error Error in multi-user mode. The Server’s DP structure element “reference” for initialisation does not match initialisation of other DP applications that have logged on at the same board. (Server is an DP application too). For example, some other DP application has logged on before Server, and defined application environment as an environment with central DP application. When Server tries to log on and define environment as an environment without central DP application, it will receive this error code. Error: DP - send error Error transferring function call to board. Error: DP - slave state error DP structure element “slave state” is not valid. Error: DP - slave station number error DP structure element “station number” is not valid. For example, there is a topic created during Server configuration with field “DP slave address” set equal to 5, but the slave with address (station number) 5 does not exist in the database created with COML DP editor. Error: DP - user data error One or more elements of user data array in DP structure are invalid. Error: DP - wrong board error DP structure element “board” is not valid.

Page 26: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 24

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Error: DP - system state error DP structure element “system state” is not valid. Error: DP - global control error Invalid range of values for control command. Error: DP - CP error Error on CP5412 (A2) board. Error: DP - watchdog timer expired Function could not be executed because the watchdog of the Server detected timeout and watchdog timer is not yet reset. Error: Station #<station number> - DP slave is offline The DP slave is not in the data transfer phase (CP starting up). Error: Station #<station number> -- DP slave is not active The DP slave is not activated in the local database. Error: Station #<station number> -- DP slave is not ready The DP slave is not in the data transfer phase . Error: Station #<station number> -- DP slave is not ready & diagnostic The DP slave is not in the data transfer phase and diagnostic data exist (diagnostic data will be written to WWLogger window if mode Verbose is on, in DP window control menu). Error: DP system is in OFFLINE mode There is no DP communication. Error: DP system is in STOP mode Only communication with DP master Class 2 is possible. There is also no communication with DP slaves. Error: DP system is in CLEAR mode The DP slaves are in the parameter assignment/configuration phase. In the data transfer phase that follows, bytes with value 0 are sent to the DP slave outputs. Warning: Access by DP master Class 2

Page 27: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 25

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

There was an access by a DP master Class 2 (diagnostic master). Error: DP AUTOCLEAR event message received Warning: DP watchdog timer expired Server, for some reason, did not access board (CP5412 (A2)) for time, longer than the specified watchdog time (for example, protocol was suspended with Protocol Suspend option in DP window control menu). In this case, board will automatically send output data with value 0 to all attached DP slaves. Warning: Actual Protocol Timer Tick is considerably longer then requested Time, that passed since Server received control previous time, is considerably longer than requested Protocol Timer Tick. One of possible causes of this warning is some other program, keeping control for a long time. For example, scrolling of a long file in Wonderware Logger window with PgUp, PgDn keys will cause this warning. Note: This warning is written to Wonderware Logger window, only if mode Verbose is on, in DP window control menu. Diagnostic data: Station #<station number> :<diagnostic data> Every DP slave can send diagnostic data to the Server. Diagnostic data will be written to Wonderware Logger window, only if mode Verbose is on, in DP window control menu. Diagnostic data length can be 6 ... 244 bytes. The contents of first 6 bytes are similar for all standard DP slaves, the rest of diagnostic data is slave specific. Reception of diagnostic data does not always mean that something is wrong with the slave. For example, diagnostic data are usually received during startup. If there is an error, diagnostic data will be preceded by error message. Error: Station #<station number> - input byte <input byte number> not found Requested input byte does not exist in DP slave station. Error: Station #<station number> - output byte <output byte number> not found Requested output byte does not exist in DP slave station. Error: Station #<station number> - DB<data block number> DB<data byte number> not found Requested data block does not exist in PLC or does not contain requested data byte. Note: In case of S7-300 PLC, error message is always written if data block exists but is too short. If data block does not exist, “data block not loaded” error must be masked with SFC 36 “MSK_FLT” call (see S7-300 PLC demo program OB1), otherwise PLC will stop with error. If “data block not loaded” error is masked, PLC will continue work and error message about not finding data byte 0 will be written to logger file.

Page 28: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 26

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

Troubleshooting If you experience communication problems, while using the PROFIBUS DP DDE Server, please, try the following suggestions. Minimize your project to a size, at which problem still occurs. It will help us to reproduce your environment and problem. Gradually delete InTouch application topics and items, PLC program blocks (leaving only those, responsible for communication). If InTouch application uses other Servers, delete topics related to these Servers. Delete other communication types (for example PLC-to-PLC communication). Note, what was deleted last, when problem disappeared. Obtain Wonderware Logger file as described below:

- Start Wonderware Logger;

- Start PROFIBUS DP DDE Server. In Control menu (opened by clicking on rectangle in upper left corner of the Server window) select options Show Errors, Show Send, Show Receive, Verbose.

- Start InTouch application; - In Sever Control menu select command Dump;

- Wait, until error occurs. - Close InTouch application and Sever.

Please, send us the obtained logger file, Server configuration file DP.CFG, InTouch application and PLC programs, CP database files (*.TXT and *.LDB) for CP5412 (A2) board, AUTOEXEC.BAT, CONFIG.SYS and SYSTEM.INI files.

Page 29: PROFIBUS DP DDE Server for SINEC CP5412 (A2)media.klinkmann.com/servers/docs/07020m16.pdf · 2011-02-14 · PROFIBUS DP DDE Server for SINEC CP5412 (A2) for Microsoft Windows and

Klinkmann Automation PROFIBUS DP DDE Server for SINEC CP5412 (A2) 27

PROFIBUS DP DDE Server for SINEC CP5412 (A2) Ver 1.x User Manual Rev 1.6 07020m16

KLINKMANN AUTOMATION PROFIBUS DP DDE Server for SINEC CP5412 (A2)

Revision History

Apr 96 Rev 1.0 Release 1.0 Oct 96 Rev 1.1 Interpreter mode added for S7-300 PLC, enabling direct access to PLC’s data areas. Mar 97 Rev 1.2 Minor changes. Aug 97 Rev 1.3 Chapter “Troubleshooting” added. Manual file name changed. Aug 97 Rev 1.4 Minor changes. Oct 97 Rev 1.5 Support for MS Windows NT added. Interpreter mode added for S7- 200 PLC, enabling direct access to PLC’s data areas. Mar 2002 Rev 1.6 Installation from CD information added.