22
TELEMECANIQUE DDE Server for Microsoft Windows and InTouch Applications User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 FIN-00371 Helsinki Finland tel. int. + 358 9 5404940 fax int. + 358 9 5413541 www.klinkmann.com

TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

TELEMECANIQUE DDE

Server

for Microsoft Windows and InTouch Applications

User Manual Ver 1.x Rev 1.4

DR180 15

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: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server i

TELEMECANIQUE DDE Server Ver 1.x User Manual Rev 1.4 180XXM14

Table Of Contents What is DDE?.................................................................................................................... 1 Accessing a Remote DDE Item from TELEMEC............................................................... 1 Installing the TELEMEC DDE Server ................................................................................ 2 Configuring the TELEMEC Server..................................................................................... 3

DDE Server Settings Command .................................................................................... 3 Com Port Settings Command ........................................................................................ 4 Saving TELEMEC Configuration File ............................................................................. 6 Configuration File Location ............................................................................................ 6 Topic Definition Command............................................................................................. 7

Using the TELEMEC Server with InTouch......................................................................... 8 Defining the Access Names........................................................................................... 8 Defining the Tag names............................................................................................... 10 Monitoring the Status of Communication with InTouch................................................ 12 PLC "STATUS" Item .................................................................................................... 13

Item (Point) Naming......................................................................................................... 14 Notes on Using Microsoft Excel....................................................................................... 17

Reading Values into Excel Spreadsheets.................................................................... 17 Writing Values to TELEMEC Points............................................................................. 17

Troubleshooting............................................................................................................... 19 WIN.INI entries ............................................................................................................ 19 Troubleshooting menu ................................................................................................. 19

Page 3: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 1

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

TELEMECANIQUE DDE Server The TELEMECANIQUE DDE Server ((hereafter also referred to as the “TELEMEC DDE Server” or “TELEMEC” or “Server”) is a Microsoft Windows application program that acts as a DDE (Dynamic Data Exchange) Server and allows other Windows application programs to access the data from the Telemecanique TSX17-20 micro PLC and its I/O extension blocks. Connection requires a TSX 17 ACC8 interface cable and a TSX 17 ACC11 connection kit with the 9 and 25-pin connectors. The data link is established by connecting TSX 17 ACC11 to the 9-pin serial port on the IBM PC and to the 25-pin connector on the TSX 17 ACC8 (RS 485/RS 232 interface). The 15-pin connector of the TSX 17 ACC8 is connected to the programming port of the PLC. The ASCII/Serie 7 switch on the TSX 17 ACC8 is set to the “Serie 7” position. The TELEMEC DDE Server can communicate with one TSX17-20 micro PLC (with 0...3 I/O extension blocks). The TSX17-20 is a master PLC (with address: Station Number - FEH, device number - 0H) and the IBM PC is a slave (with address: Station Number - FEH, device number - 1H). The Server is primarily intended for use with Wonderware InTouch, but it may be used by any Microsoft Windows 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 be both a client and a server simultaneously. 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 tag name, and the item name is a specific tag name 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. These are very efficient means of exchanging the data as when the link has been established no communication occurs until the specified data value changes. InTouch uses DDE in communication with DDE Servers and other DDE application programs.

Accessing a Remote DDE Item from TELEMEC

Page 4: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 2

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

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 the TELEMEC Server, the application portion of the DDE address is TELEMEC. Topic is an application-specific sub-group of data elements. The TELEMEC Server considers micro PLC to be a separate topic. The user creates a meaningful name for micro PLC and uses this name as the topic name for DDE references. Item indicates a specific data element within the specified topic. For the TELEMEC Server, an item is Input bit, Output bit, System bit, Internal word, Constant word, System word, Input Register word, Output Register word, bit of any word, parameter of function block. (The item/point names are described in the Item (Point) Naming section.) Note: In some cases, the term "point" is used interchangeably with the term "item".

Installing the TELEMEC DDE Server The TELEMEC DDE Server installation package can be supplied:

1. As a self-extracting archive 18015xxx.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 TELEMEC DDE Server from the self-extracting archive, run the 18015xxx.EXE and proceed as directed by the TELEMEC DDE Server Setup program. To install the TELEMEC DDE Server from CD or distribution disks (floppies), on MS Windows (NT, 2000, XP or 95 (98)): 1. Insert the CD with Klinkmann Software into CD drive or insert TELEMEC DDE Disk1

into a floppy drive A: or B:. 2. Select the Run command under the Start menu. 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 “TELEMEC

DDE Server” and click on “Setup…”. 5. Proceed as directed by the TELEMEC DDE Server Setup program. When installation is finished, the subdirectory specified as a folder where to install the TELEMEC DDE Server will contain the following files: TELEMEC.EXE The TELEMEC Server Program. This is a Microsoft Windows

32-bit application program.

TELEMEC.HLP The TELEMEC Server Help file.

Page 5: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 3

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

TELEMEC.CFG An example configuration file.

LICENSE.TXT

Klinkmann Automation software license file.

WWCOMDLG.DLL

Dynamic Link Library necessary for TELEMEC Server.

To uninstall the TELEMEC Server, start Control Panel, select “Add/Remove Programs” and select the “TELEMEC 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 TELEMEC Server. The HASP Driver setup is performed during the Server setup. Without HASP Driver installed, the TELEMEC Server will run only 1 hour (with all features enabled).

Configuring the TELEMEC Server After the TELEMEC Server is initially installed, a little of configuration is required. Configuring the Server automatically creates a TELEMEC.CFG file which holds all of the topic definitions entered, as well as the communication port configurations. This file will be placed automatically in the same directory in which TELEMEC.EXE is located unless the path where the configuration file will be placed is specified via the /Configure/DDE Server Settings... command. To perform the required configurations, start the TELEMEC program. If the Server starts up as an icon then double-click on the icon to open the server's window. To access the commands used for various configurations, open the /Configure menu:

DDE Server Settings Command A number of parameters that control the internal operation of the Server can be set. In most cases the default settings for these parameters provide a good performance and do not require changing. However, they can be changed to fine-tune the Server for a specific environment. To change the Server's internal parameters, invoke the DDE Server Settings... command. The "DDE Server Settings" dialog box will appear:

Page 6: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 4

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

The following describes each field in this dialog box: Protocol Timer Tick This field is used to change the frequency at which the Server checks for work to do (at this frequency one message is sent to the network and one reply from network is processed). This should be approximately 2 to 4 times faster than rate desired to update data from the network. 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 TELEMEC will save its current configuration file. The TELEMEC Server will use this path to load the configuration file the next time it is started. Note: Only the "path" may be modified with this field. The configuration file is always named TELEMEC.CFG. Note: There is no limit to the number of configuration files created, although each must be in a separate directory. When using the TELEMEC Server with InTouch, it is good practice to place the configuration file in the application directory. Once all entries have been made, click on OK.

Com Port Settings Command This command is used to configure the communication port that will be used to communicate with PLC. Invoke the Com Port Settings... command. The "Communication Port Settings" dialog box will appear. Select the Com Port and examine the characteristics of the selected Port. To select a necessary Com Port click on the combo box button and make your choice from the list box.

Page 7: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 5

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

The following describes each field in this dialog box: Reply Timeout This field is used to enter the amount of time (in seconds) that a micro PLC using the selected communication port will be given to reply to the commands from the Server. Note: The default value of 3 seconds should be sufficient for most configurations. Baud Rate Select the Baud Rate the Server communicates with micro PLC. The recommended Baud Rates are 9600 and 19200. Smaller Baud Rates (300, 600, 1200, 2400 and 4800) are not good enough to exchange great amount of data. Note: The default Baud Rate is 9600. Note: After power up, the micro PLC communicates only with Baud Rate used for PLC configuration messages. If this Baud Rate differs from settings in the "Communication Port Settings" dialog box then Server tries to configure the PLC to communicate with other appropriate Baud Rate. Usually it will take some amount of time. If PLC does not respond to configuration messages or if there are some problems to establish proper communication with PLC, then corresponding error messages are displayed to Wonderware Logger and the state of communication is set to 0 (bad) for all topics connected to this port (see PLC "STATUS" Item section). Other communication parameters are following: 8 Data Bits, 1 Stop Bit, Odd Parity. These parameters can not be changed. When all entries have been made, click on Done to process the configuration for the communication port.

Page 8: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 6

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

Saving TELEMEC 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:

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 option "Make this the default configuration file". This step will allow the TELEMEC Server to find the configuration file automatically each time it is started.

Configuration File Location When the TELEMEC DDE Server starts up, it first attempts to locate its configuration file by checking the WIN.INI file for a path that 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 from an application directory configuration file other than the default configuration file a special switch (/d:) is used. For example, invoke the File/Run command in File Manager or Program Manager and enter the following: TELEMEC /d:c:\directoryname Note: There is no limit to the number of configuration files that may be created, although each must be in a separate directory.

Page 9: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 7

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

Topic Definition Command The user provides a connected micro PLC with an arbitrary name that is used as the DDE topic for all references to this PLC. The following steps are taken to define the Topic attached to the PLC: 1. Invoke the Topic Definition... command. The "Topic definition" dialog box will

appear:

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

new topic, click on New. To remove an existing topic, click on Delete. The "TELEMEC Topic Definition" dialog box will appear:

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

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

4. Click on the Com Port button to associate a topic with the communication port.

Note: Additional topics may be associated with the same communication port later. 5. Set the Update Interval field to indicate the frequency the items/points on this topic

will be read (polled). Default value is 1000 milliseconds. When all entries have been made, click on OK to process the configuration for this

topic.

Page 10: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 8

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

Using the TELEMEC Server with InTouch To access to items/points on the TSX17-20 micro PLC from InTouch, the Access Names and Tag names should be defined in WindowMaker.

Defining the Access Names InTouch uses Access Names to reference real-time I/O data. Each Access Name equates to an I/O address, which can contain a Node, Application, and Topic. In a distributed application, I/O references can be set up as global addresses to a network I/O Server or local addresses to a local I/O Server. To define the Access Names in WindowMaker node invoke the /Special/Access Names... command. The "Access Names" dialog box will appear.

Click on Add…. The "Add 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 that are made. The following fields are required entries when entering an Access Name Definition:

Page 11: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 9

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

Access Name In the Access Name box type the name you want InTouch to use to this Access Name. (For simplicity, use the same name that you will use for the Topic Name here.) Node Name If the data resides in a network I/O Server, in the Node Name box, type the remote node's name. Application Name In the Application Name box, type the actual program name for the I/O Server program from which the data values will be acquired. In case the values are coming from the TELEMEC Server the TELEMEC is used. Do not enter the .exe extension portion of the program name. Topic Name Enter the name defined for the topic in the TELEMEC Server to identify the topic the TELEMEC Server will be accessing. The Topic Name is an application-specific sub-group of data elements. In the case of data coming from a TELEMEC Server program, the topic name is the exact same name configured for the topic in the TELEMEC Server. Note: This will usually be the same as the "Access Name", although, if desired, they may be different. However, it must be the same name used when the topics were configured in section Configuring the TELEMEC Server. Which protocol to use Select the DDE protocol (TELEMEC DDE Server does not support Wonderware Suite Link protocol). When to advise server Select Advise all items if you want the Server program to poll for all data whether or not it is in visible windows, alarmed, logged, trended or used in a script. Selecting this option will impact performance, therefore its use is not recommended. Select Advise only active items if you want the Server program to poll only points in visible windows and points that are alarmed, logged, trended or used in any script. Click OK to accept the new Access Name and close the “Add Access Name” dialog box. The “Access Names” dialog box will reappear displaying the new Access Name selected in the list. Click Close to close the “Access Names” dialog box.

Page 12: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 10

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

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

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

To access TELEMEC items, the type must be I/O Discrete or I/O Integer. Select the Tag type. The "Details" dialog box for the tag name will appear:

Page 13: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 11

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

Select the Access Name for TELEMEC Server by clicking on the Access Name:… button. The "Access Names" dialog box will appear:

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

For integer data 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 equal to Max Raw. Enter the TELEMEC item name to be associated with this tagname in the Item: field in the "Details" box:

Page 14: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 12

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

(Refer to the Item Names section below for complete details.) Where applicable, the Use Tagname as Item Name option may be selected to automatically enter the tag name in this field. Note: The tag name can only be used if it follows the conventions listed in the Item Names section. Once all entries have been made, click on the Save button (in the top dialog box) to accept the new tagname. To define additional tagnames click on the New button. To return to the WindowMaker main screen, select Close.

Monitoring the Status of Communication with InTouch InTouch supports built-in topic names called DDEStatus and IOStatus, which are used to monitor the status of communication between the Server and InTouch. For more information on the built-in topic names DDEStatus and IOStatus, see your online “InTouch User’s Guide”. The status of communication between the Server and InTouch can be read into Excel by entering the following DDE reference formula in a cell on a spreadsheet (in following examples PLC01 is the Topic Name configured for TELEMEC Server): =view|DDEStatus!PLC01 or =view|IOStatus!PLC01

Page 15: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 13

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

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

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

Page 16: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 14

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

Item (Point) Naming The following are Item/point names supported by the TELEMEC DDE Server: Memory Image of Input bits Ix,n where x - I/O module number (0 - basic micro-PLC, 1, 2, 3 - I/O extension module.) n - Input point number on the module (valid numbers 0...25 for basic micro-PLC, 0...7 for I/O extension modules). Item type - DDE discrete, Read Only. Memory Image of Output bits Ox,n where x - I/O module number (0 - basic micro-PLC, 1, 2, 3 - I/O extension module.) n - Output point number on the module (valid numbers 0...15 for basic micro-PLC, 0...5 for I/O extension modules). Item type - DDE discrete, Read/Write. Internal bits Bn where n - Internal bit number (valid numbers 0...255). Item type - DDE discrete, Read/Write. System bits SYn where n - Internal bit number (valid numbers 0...23). Item type - DDE discrete, Read/Write. Internal Words Wn where n - Internal word number (valid numbers 0...1023). Item type - DDE Integer, Read/Write. Value limit -32768...32767. Bits of Internal Words Wn,i where n - Internal word number (valid numbers 0...1023). i - Bit number in word (valid numbers 0...15). Item type - DDE Discrete, Read Only. Constant Words CWn where n - Constant word number (valid numbers 0...1023). Item type - DDE Integer, Read Only. Value limit -32768...32767. Bits of Constant Words CWn,i where n - Constant word number (valid numbers 0...1023). i - Bit number in word (valid numbers 0...15). Item type - DDE Discrete, Read Only.

Page 17: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 15

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

System Words SWn where n - System word number (valid numbers 0...63). Item type - DDE Integer, Read/Write. Value limit -32768...32767. Bits of System Words SWn,i where n - System word number (valid numbers 0...63). i - Bit number in word (valid numbers 0...15). Item type - DDE Discrete, Read Only. Input Register Words IWx,n where x - I/O module number (0 - basic micro-PLC, 1, 2, 3 - I/O extension module.) n - Input Register word number (valid numbers 0...7). Item type - DDE Integer, Read/Write. Value limit -32768...32767. Bits of Input Register Words IWx,n,i where x - I/O module number (0 - basic micro-PLC, 1, 2, 3 - I/O extension module.) n - Input Register word number (valid numbers 0...7). i - Bit number in word (valid numbers 0...15). Item type - DDE Discrete, Read Only. Output Register Words OWx,n where x - I/O module number (0 - basic micro-PLC, 1, 2, 3 - I/O extension module.) n - Output Register word number (valid numbers 0...7). Item type - DDE Integer, Read/Write. Value limit -32768...32767. Bits of Output Register Words OWx,n,i where x - I/O module number (0 - basic micro-PLC, 1, 2, 3 - I/O extension module.) n - Output Register word number (valid numbers 0...7). i - Bit number in word (valid numbers 0...15). Item type - DDE Discrete, Read Only. Monostable Parameters Mn,R - Monostable Run bit (Monostable Output parameter), DDE Discrete , Read Only. Mn,P - Monostable Preset Value, DDE Integer, Read/Write. Value limit 0...9999. Mn,V - Monostable Current Value, DDE Integer, Read/Write. Value limit 0...9999. where n - Monostable number (valid numbers 0...7).

Page 18: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 16

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

Timer Parameters Tn,D - Timer Done bit (Timer Output parameter), DDE Discrete , Read Only. Tn,R - Timer Run bit (Timer Output parameter), DDE Discrete , Read Only. Tn,P - Timer Preset Value, DDE Integer, Read/Write. Value limit 0...9999. Tn,V - Timer Current Value, DDE Integer, Read/Write. Value limit 0...9999. where n - Timer number (valid numbers 0...31). Counter Parameters Cn,E - Counter Empty bit (Counter Output parameter), DDE Discrete , Read Only. Cn,D - Counter Done bit (Counter Output parameter), DDE Discrete , Read Only. Cn,F - Counter Full bit (Counter Output parameter), DDE Discrete , Read Only. Cn,P - Counter Preset Value, DDE Integer, Read/Write. Value limit 0...9999. Cn,V - Counter Current Value, DDE Integer, Read/Write. Value limit 0...9999. where n - Counter number (valid numbers 0...30). Register Parameters Rn,F - Register Full bit (Register Output parameter), DDE Discrete , Read Only. Rn,E - Register Run bit (Register Output parameter), DDE Discrete , Read Only. Rn,I - Register Input Word, DDE Integer, Read/Write. Value limit -32768...32767. Rn,O - Register Output Word, DDE Integer, Read/Write. Value limit -32768...32767. where n - Register number (valid numbers 0...3). Drum Controller Parameters Dn,F - Drum Full bit (Drum Output parameter), DDE Discrete , Read Only. Dn,S - Current Step Number, DDE Integer, Read Only. Dn,W - Current Step State Word, DDE Integer, Read Only. Value limit 0...65535. Dn,V - Time Envelope, DDE Integer, Read Only. Value limit 0...9999. where n - Drum number (valid numbers 0...7). For each Topic there is also a built-in discrete item (STATUS) which indicates the state of communication with the micro PLC. This discrete item is set to 0 when communication with the micro PLC fails and set to 1 when communication is successful. Item/Point Naming Examples The following examples show the valid item names:

I0,13 memory image of Input bit #13 on the basic micro-PLC. O1,2 memory image of Output bit #2 on the extension module #2. B250 Internal bit #250. CW1020,15 bit #15 of Constant word #1020.

Page 19: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 17

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

OW2,77,04 bit #4 of Output Register word #77 the on the extension module #2.

M3R Run Bit of Monostable #3. C2P Preset value of Counter #2.

Notes on Using Microsoft Excel Data from TELEMEC topics (PLCs) may be accessed from Excel spreadsheets. To do so, enter a formula like the following into a cell on the spreadsheet. =TELEMEC|topic!item Sometimes, Excel requires the topic and/or item 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 names described in the Item Names section.

Reading Values into Excel Spreadsheets Values can be read directly into Excel spreadsheets by entering a DDE formatted formula into a cell, as shown in the following examples: =TELEMEC|plc01!IW1,2,13 =TELEMEC|pc!SY6 =TELEMEC| PLC1!CW88 The status item can be read by entering the following formula in a cell: =TELEMEC|topic!STATUS Note: Refer to the Microsoft Excel manual for complete details on entering Remote Reference formulas for cells.

Writing Values to TELEMEC Points Values may be written to the 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("TELEMEC","topicname") =POKE(channel,"itemname", Data_Reference) =TERMINATE (channel) =RETURN() The following describes each of the above POKE macro statements:

Page 20: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 18

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

channel=INITIATE("TELEMEC","topicname") Opens a channel to a specific topic name (defined in the Server) in an application with name TELEMEC (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 (actual location in the TSX17-20 micro PLC) 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 specified like described in the Item Names section. =TERMINATE(channel) 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 PLC01 item SW30: PokeMacro –Ctrl a =INITIATE("TELEMEC","PLC01") =POKE(A2,"SW30",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 21: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 19

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

Troubleshooting

WIN.INI entries The first time you run the TELEMEC Server configuration, most of the items in the following list will automatically appear in the WIN.INI file. It is usually in the C:\WINDOWS directory. It is an ASCII file and can be altered manually if you wish with any text editor, e.g. MS Windows Notepad (do not use a program that formats text, such as MS Word or Write unless the file is saved as DOS text). The following is a typical entry for the TELEMEC Server: [TELEMEC] ProtocolTimer=50 RequestTimer=1000 ValidDataTimeout=60000 DDEBlockSize=4096 ConfigurationFile=D:\TELEMEC\ WinIconic=0 WinFullScreen=0 WinTop=112 WinLeft=0 WinWidth=200 WinHeight=168 ShowSend=0 ShowReceive=0 ShowErrors=1

Troubleshooting menu The following debugging choices are appended to the Server’s System Menu (the menu that appears when you click on the “-” box in the upper left hand corner of the Server window): Suspend Protocol / Resume Protocol - these choices permit you to turn protocol processing on and off, what allows you to suspend access to the micro PLC. Show Send - if checked then all outgoing data is displayed in hexadecimal format. Show Receive - if checked then all incoming data is displayed in hexadecimal format. Show Errors - if checked then all information about errors is displayed. Verbose - if checked then some additional debugging information is displayed. Dump - displays all information about opened ports, active topics and data

items. All debug information is displayed via the Wonderware Logger, which must be active for these commands to work. Warning: if you check Show Send and/or Show Receive and/or Verbose then the debug output grows very fast.

Page 22: TELEMECANIQUE DDE Server - Klinkmannmedia.klinkmann.com/servers/docs/180XXM14.pdf · User Manual Ver 1.x Rev 1.4 DR180 15 KLINKMANN AUTOMATION P.O. Box 38 ... programs to access the

Klinkmann Automation TELEMECANIQUE DDE Server 20

TELEMECANIQUE DDE Server Ver 1.X User Manual Rev 1.4 180XXM14

KLINKMANN AUTOMATION TELEMECANIQUE DDE Server

Revision History

Feb 96 Rev 1.0 First Release Oct 96 Rev 1.1 Modification of manual contents Chapters: Files on the TELEMEC Distribution Disk Installing the TELEMEC DDE Server Sep 97 Rev 1.2 Manual file name changed. Minor changes. Jan 99 Rev 1.3 32-bit version added. Minor changes in manual text. Mar 2002 Rev 1.4 Installation from CD information added.