
OMRON
APPENDIX F – Obsolete Features
Release 2.0
Page 319
Sending Arrays to CX-Supervisor via DDEPoke()
In order to write to an CX-Supervisor array point using the DDEPoke() function, it must first be
given DDE Read/Write access, via the Advanced Point Settings dialog when adding or modifying the
point. The following script shows how to send arrays of values from Microsoft Excel to CX-
Supervisor via DDEPoke().
1) Example sending array values from Microsoft Excel to CX-Supervisor
Sub SendArrayValues()
Dim chan As Integer
chan = DDEInitiate(“SCS”, “Point”)
If chan <> 0 Then
‘Send a row of data to an array point named “Array1”
DDEPoke chan, “Array1”, Range(Cells(1,1), Cells(1,3))
‘Send a column of data to an array point named “Array2”
DDEPoke chan, “Array2”, Range(Cells(2,1), Cells(4,1))
‘Send individual array element values to “Array3”
‘The ‘[ ]’ or ‘.’ format can be used to delimit the array index
DDEPoke chan, “Array3[0]”, Cells(1,1)
DDEPoke chan, “Array3.1”, Cells(1,2)
DDEPoke chan, “Array3[2]”, Cells(1,3)
End If
End Sub
Requesting Arrays from CX-Supervisor via DDERequest()
Requesting arrays from CX-Supervisor and storing them in Microsoft Excel is a little more
complicated than sending, in that both CX-Supervisor and Microsoft Excel need to know if the array
is to be stored in rows or columns. CX-Supervisor is informed of the row/col requirement by
specifying either ‘row’ or ‘column’ after the array points name. The default is ‘row’ if nothing is
specified. The following are all valid examples of specifying names for “Array1” in a
DDERequest():
“Array1”, “Array1:Row”, Array1:r” ‘Valid ways to specify a row
“Array1:Column”, “Array1:col”, Array1:C” ‘Valid ways to specify a
‘column
Microsoft Excel is informed of the row/col requirement by specifying a Range of cells in either row
or column format. Both the Microsoft Excel and CX-Supervisor specifications must match in order
for the call to be successful. It is not necessary to specify rows or columns if a single element of an
array is required.
Note:
DDE Requests are one-shot request, i.e. they are not part of a ‘Hot’ link.
1) Example requesting CX-Supervisor array values from Microsoft Excel
Sub RequestingArrayValues()
Dim chan As Integer
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...