User manual

Klinkmann Automation SPA Bus Server 32
SPA Server Ver 1.x User Manual Rev 2.3 120XXM23
Notes on Using Microsoft Excel
Data from SPA topics may be accessed from Excel spreadsheets. To do so, enter a
formula like the following into a cell on the spreadsheet.
=SPA|topic!item
Sometimes, Excel requires the topic and/or item to be surrounded by apostrophes.
In the formula, topic must be replaced with one of the valid topic names defined during
the Server configuration process. Replace item with one of the valid item names
described in the Item Names section.
Reading Values into Excel Spreadsheets
Values may be read directly into Excel spreadsheets by entering a DDE formatted
formula into a cell, as shown in the following examples:
=SPA|'topic1'!'SR2.16'
=SPA|'SACO16D1'!'ID0.1'
=SPA|'unit7'!'VI8.5'
Note: Refer to the Microsoft Excel manual for complete details on entering Remote
Reference formulas for cells.
Writing Values to SPA Points
Values may be written to the Server from Microsoft Excel by creating an Excel macro that
uses the POKE command. The proper command is entered in Excel as follows:
channel=INITIATE("SPA","topicname")
=POKE(channel,"itemname", Data_Reference)
=TERMINATE (channel)
=RETURN()
The following describes each of the above POKE macro statements:
channel=INITIATE("SPA ","topicname")
Opens a channel to a specific topic name (defined in the Server) in an application with
name SPA (the executable name less the .EXE) and assigns the number of that opened
channel to channel.
Note: By using the channel=INITIATE statement the word channel must be used in
the =POKE statement instead of the actual cell reference. The "applicationname"
and "topicname" portions of the formula must be enclosed in quotation marks.
=POKE(channel,"itemname", Data_Reference)
POKEs the value contained in the Data_Reference to the specific data element on the
SPA bus via the channel number returned by the previously executed INITIATE function.
Data_Reference is the row/column ID of the cell containing the data value. For
"itemname", use some of the valid item names specified like described in the Item
Names section.