EasyManuals Logo

Omron CX-Supervisor User Manual

Omron CX-Supervisor
334 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #315 background imageLoading...
Page #315 background image
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")

Table of Contents

Other manuals for Omron CX-Supervisor

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-Supervisor and is the answer not in the manual?

Omron CX-Supervisor Specifications

General IconGeneral
BrandOmron
ModelCX-Supervisor
CategorySoftware
LanguageEnglish

Related product manuals