Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
10
Добавлен:
11.10.2020
Размер:
3.39 Mб
Скачать

268 DDE Interface

DDE Communication with WAGO-I/O-PRO 32

9 DDE Interface

9.1 DDE Communication with WAGO-I/O-PRO 32

WAGO-I/O-PRO 32 has a DDE (dynamic data exchange) interface for reading data. WAGO-I/O-PRO 32 uses this interface to provide other applications that also use a DDE Interface with the contents of control variables and IEC addresses

If the GatewayDDEServer is used, which works with symbols, WAGO-I/O- PRO 32 is not needed to read variables values from the PLC and to transfer them to applications with an DDE interface.

Attention:

Direct addresses cannot be have to define variables in desired addresses (AT).

read over the DDE server ! For this case you WAGO-I/O-PRO 32 which are assigned to the

Attention:

The DDE interface has been tested with Word 97 and Excel 97 on Windows NT 4.0. If the DDE communication fails caused by a mismatch of other versions or additionally installed programs on a computer, WAGO Kontakttechnik GmbH cannot take any responsibility.

9.2DDE interface of the WAGO-I/O-PRO 32 programming system

9.2.1 Activating the DDE Interface

The DDE interface becomes active as soon as the PLC (or the simulation) is logged in.

9.2.2 General Approach to Data

A DDE inquiry can be divided into three parts:

1.Name of the program (here: WAGO-I/O-PRO 32),

2.File name and

3.Variable name to be read.

Name of the program: WAGO-I/O-PRO 32

File name:complete project path (c:\example\example.pro).

Variable name: The name of a variable as it appears in the Watch and Receipt Manager .

WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32

DDE Interface 269

DDE interface of the WAGO-I/O-PRO 32 programming system

9.2.3 Which variables can be read?

All addresses and variables are readable. Variables or addresses should be entered in the format used in the Watch and Receipt Manager

Examples:

 

%IX1.4

(* Reads the input 1.4*)

PLC_PRG.TEST

(* Reads the variable TEST from the POU PLC_PRG*)

.GlobVar1

(* Reads the global variable GlobVar1 *)

9.2.4 Linking variables using WORD

In order to get the current value of the variable TEST from the POU PLC_PRG through the DDE interface in Microsoft WORD, a field (e.g., the date) must be inserted in WORD ('Insert' "Field"). Now when you click on the field with the right mouse button and select the command "Toggle Field Codes" you can change the field function for the chosen text. In our example, this would look as follows:

{ DDEAUTO WAGO-I/O-PRO 32 "C:\WAGO-I/O-PRO 32\PROJECT\IFMBSP.PRO" "PLC_PRG.TEST" }

Click on the field with the right mouse button again, then click on "Update Field" and the desired variable content appears in the text.

9.2.5 Linking variables using EXCEL

The following must be entered in Microsoft EXCEL before you can assign a variable to a cell.

=WAGO-I/O-PRO 32|'C:\WAGO-I/O-PRO 32\PROJECT\IFMBSP.PRO'!PLC_PRG.TEST'

When you click on 'Edit' then "Links", the result for this link will be:

Type:

WAGO-I/O-PRO 32

Source file:

C:\WAGO-I/O-PRO 32\PROJECT\IFMBSP.PRO

Element: PLC_PRG.TEST

9.2.6 Accessing variables with Intouch

Link with your project a DDE Access Name <AccessName> with the application name WAGO-I/O-PRO 32 and the DDE topic name C:\WAGO- I/O-PRO 32\PROJECT\IFMBSP.PRO.

WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32

270 DDE Interface

DDE interface of the WAGO-I/O-PRO 32 programming system

Now you can associate DDE type variables with the access name <AccessName>. Enter the name of the variable as the Item Name (e.g., PLC_PRG.TEST).

WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32