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 #317 background imageLoading...
Page #317 background image
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.

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