12.4.10    DDEREQUEST

Description:   Requests the value of item from a DDE-aware application and sends the data to the WebAccess tag.

Syntax:        

Tcl:              DDEREQUEST "tag=Server|topic!item"

JScript:         DDEREQUEST("tag=Server|topic!item");

VB Script:       DDEREQUEST "tag=Server|topic!item"                                                 

 

Arguments:    tagname, DDE Server name, DDE topic name, DDE item name, value

 

Returns:        value of item to tag

See Also:       DDEPOKE, DDEEXECUTE

Examples:              # TCL Example 1 - Get value from EXCEL spreadsheet

# from cell named REALSP

# EXCEL must be running and a single Workbook opened.

DDEREQUEST "text70=EXCEL|Sheet1!REMOTESP"

 

# TCL Example 2 Get value from EXCEL spreadsheet

# from cell named REALSP

# WORKBOOK NAMED Book1.xls

DDEREQUEST "text70=EXCEL|Book1.xls:Sheet1!REMOTESP"

 

The DDEREQUEST command gets data from a DDE application.  You must know the DDESERVER name, the Topic Name and the Item name used in the DDE Server application.  The DDE server application must be running.

WebAccess DDE Script and keymacro commands (which act as DDE Clients) must have access to the DDE Server they are reading or writing; the 3rd Party DDE Server application must be running on the SCADA Node PC or have a Network DDE connection (NetDDE) to the SCADA node.  

Note   The DDE Server and DDE client is disabled without the Hardkey.  You cannot test or train or simulate with DDE.

Excel example - read data from spreadsheet

                                DDEREQUEST "tagname=EXCEL|Sheet!cellname"

DDDEREQUEST "tagname=EXCEL|Book.xls:Sheet!cellname"

Server is EXCEL.  EXCEL must be running.

Topic is the name of the sheet.  Default for Sheet1 is Sheet1. If you rename the sheet, the topic must match. If you have only one workbook open, then only the sheet name is needed.

If you have more than one workbook then item is in form |Book.xls:Sheetname!

Item is the name of the cell. You must rename the cell in EXCEL for this to work. for example, B10 won't work, but if you rename B10 to REALSP, it will work fine.