12.4.9         DDEPOKE

Description:   Send value to a DDE server application


Tcl:             DDEPOKE "Server|topic!item=value"

JScript:         DDEPOKE("Server|topic!item=value");

VB Script:      DDEPOKE "Server|topic!item=value" 


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

Returns:        none



Examples:      # Example 1 - Send value of Text50 to EXCEL
# spreadsheet cell named REALDATA

                   # EXCEL must be running and a single Workbook opened.

set x [GETVAL text50]



                                #Example 2 - Send value of tag analog1 to EXCEL

# WORKBOOK NAMED Book1.xls, cell named REALDATA

                                set x [GETVAL analog1]

DDEPOKE "EXCEL|Book1.xls:Sheet1!REMOTESP=$x"

The DDEPOKE command sends data to 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.  If the DDE server is not available, the tag's value will not be changed.

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 - send data to Excel

                                DDEPOKE "EXCEL|sheet!cellname=value"

DDEPOKE "EXCEL|Book.xls:sheet!cellname=value"

Server is EXCEL

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 REALDATA, it will work fine.