DDE
Appendix F Obsolete Features
314
Example CX-Supervisor Script demonstrating client array points:
chan = DDEInitiate("Excel", "Book1.xls")
IF chan > 0 THEN
'Establish data transfers between point 'DDEArray'
and Excel
'the initial values of DDEArray is sent to Excel
DDEOpenLinks(chan)
'The array is initialised with the value 5 and
sent to Excel in one operation.
InitArray(DDEArray, 5)
'The contents of 'MemoryArray' are copied into
'DDEArray' and the
'array are sent to Excel in one operation.
MemoryArray[0] = 100
MemoryArray[1] = 34
MemoryArray[2] = 89 * 6
CopyArray(MemoryArray, DDEArray)
'Sets element 2 of the array to 6 and sends the
whole array to Excel
'Note: Use 'On Request' option and 'OutputPoint'
to send the array
'after 'setting several elements of a large array.
DDEArray[2] = 6
ENDIF
F.4.3.2 DDE Script Functions
The existing DDE Script functions DDEPoke() and DDERequest() can be used
with any array points as the following example CX-Supervisor Scripts show:
Example CX-Supervisor Script demonstrating DDEPoke() with arrays:
chan = DDEInitiate("Excel", "Book1:Sheet2")
IF chan > 0 THEN
'Send element 1 of 'RealArray' to Excel
DDEPoke(chan, "R16C1", RealArray[1])
'Send IntegerArray to Excel as a column (note:
range and column must 'be 'specified)
DDEPoke(chan, "R1C1:R3C1[column]", IntegerArray)
'Send TextArray to Excel as a row (default only
range required)
DDEPoke(chan, "R1C2:R1C4", TextArray)
ENDIF
Example CX-Supervisor Script demonstrating DDERequest() with arrays:
chan = DDEInitiate("Excel", "Book1:Sheet3")
IF chan > 0 THEN
'Request a row of cells from Excel and copy into
'Array1
Array1 = DDERequest(chan, "R1C1:R1C3")
Содержание CX-Supervisor
Страница 1: ...CX Supervisor Software Cat No W10E EN 01 User Manual Software Release 3 1...
Страница 3: ...Copyright Notice 2...
Страница 16: ...15...
Страница 17: ...16...
Страница 27: ...Tip of the Day SECTION 1 Graphics Editor 26...
Страница 35: ...CX Supervisor Preferences SECTION 2 Pages 34...
Страница 79: ...Responding to Events SECTION 5 ActiveX Objects 78...
Страница 115: ...Printing the Graphics Library SECTION 7 Graphics Library 114...
Страница 181: ...Data Logging SECTION 11 Data Logging 180...
Страница 201: ...Examples SECTION 12 Databases 200...
Страница 243: ...Performance Monitor SECTION 16 Application Analysis Performance Monitor 242...
Страница 253: ...Using with Omron s CX Server OPC SECTION 17 Using CX Supervisor as an OPC Cli 252...
Страница 259: ...Creating a CX Supervisor Client application SECTION 18 Connecting to a remote CX 258...
Страница 263: ...Adding a Point Linked to a Parameter SECTION 19 Connecting to Omron Industrial 262...
Страница 271: ...Data Logging SECTION 20 Best Practices 270...
Страница 275: ...Configuring a Server PC running Windows NT or 2000 Appendix A Configuring a PC 274...
Страница 277: ...Appendix B Frequently Asked Questions 276...
Страница 296: ...Appendix B Frequently Asked Questions 295...
Страница 297: ...Appendix B Frequently Asked Questions 296...
Страница 298: ...Appendix B Frequently Asked Questions 297...
Страница 299: ...Appendix B Frequently Asked Questions 298...
Страница 333: ...Revision history 332...