
APPENDIX F – Obsolete Features
OMRON
Page 318
Release 2.0
2) 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")
‘Request a column of cells from Excel and copy into Array2, using
‘the return ‘flag
Array2 = DDERequest(chan, "R1C2:R3C2", bReturnFlag)
‘Request a cell value from Excel and copy into element 2 of
‘Array1’
Array1[2] = DDERequest(chan, "R3C2")
ENDIF
Note:
All the above points must have DDE Read/Write access set.
DDE Server Array Points
The value of an array point named ‘ddearray’ in a CX-Supervisor project called ‘ddetest.srt’ can be
read from a Microsoft Excel worksheet by entering the following formula format into a cell.
=<Server>|<Topic>!<item>.<index>
Example
=SCS|Point!ddearray.3
‘access ddearray[3] using ‘Point’ topic
or
=SCS|ddetest.srt|ddearray.0
‘access ddearray[0] using ‘Project’
topic
Note:
Microsoft Excel accepts the square brackets ‘[ ]’ used in CX-Supervisor to
reference an array index in a formula; use ‘.’ instead.
Note:
The index must always be specified if an individual array element is required.
Note:
CX-Supervisor supports ‘Hot’ DDE links, if Microsoft Excel has the link option
automatic set, then the value in Microsoft Excel are updated whenever
ddearray[index] changes.
The above example is the simplest way to access/read single elements of an array from Microsoft
Excel, to read/write whole arrays, it is necessary to use macros (Microsoft Excel Visual Basic
scripts).
The example scripts that follow have all been created using Microsoft Excel and are working
examples. They contain the minimum amount of information required to demonstrate the particular
facility being described; i.e. they do not contain any error-checking code.
Summary of Contents for CX-SUPERVISOR - V2.0
Page 2: ...CX Supervisor User Manual Software Release 2 0...
Page 3: ......
Page 5: ...CX Supervisor User Manual OMRON Page ii Revision 2 0...
Page 7: ...CX Supervisor User Manual OMRON Page iv Revision 2 0...
Page 11: ...CX Supervisor User Manual OMRON Page viii Revision 2 0...
Page 13: ...CX Supervisor User Manual OMRON Page x Revision 2 0...
Page 15: ...CX Supervisor User Manual OMRON Page xii Revision 2 0...
Page 17: ...CX Supervisor User Manual OMRON Page xiv Revision 2 0...
Page 19: ...CX Supervisor User Manual OMRON Page xvi Revision 2 0...
Page 21: ...CX Supervisor User Manual OMRON Page xviii Revision 2 0...
Page 23: ......
Page 67: ......
Page 97: ......
Page 137: ...CHAPTER 7 Graphics Library OMRON Page 114 Release 2 0...
Page 183: ...CHAPTER 9 Animation OMRON Page 160 Release 2 0...
Page 215: ......
Page 263: ......
Page 269: ......
Page 274: ...OMRON CHAPTER 16 Connecting to Omron Industrial Components Release 2 0 Page 251...
Page 275: ......
Page 285: ......
Page 319: ......
Page 331: ......
Page 351: ......
Page 359: ...GLOSSARY OF TERMS CX Supervisor User Manual OMRON Page 336 Release 2 0...