DDE
Appendix F Obsolete Features
316
'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
F.4.3.5 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.
Example requesting CX-Supervisor array values from Microsoft Excel
Sub RequestingArrayValues()
Dim chan As Integer
chan = DDEInitiate("SCS", "Point")
If chan <> 0 Then
'Request "Array1" from CX-Supervisor and store in
a row starting at R1C1
Range(Cells(1,1), Cells(1,3)) = DDERequest(chan,
"Array1")
'Request "Array2" from CX-Supervisor and store in
a column starting at R2C1
Range(Cells(2,1), Cells(4,1)) = DDERequest(chan,
"Array2:col")
'Request elements [2] and [3] from "Array2" and
store in R3C1 &
'R3C2
Note:
DDE Requests are one-shot request, i.e. they are not part of a 'Hot' link.
Содержание 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...