Klinkmann Automation Omron Ethernet DAServer
55
Omron Ethernet DAServer Ver 1.x User Manual Rev 1.4 17014m14
In this example, each time the value of <tagname> changes in the PLC, the DAServer
will automatically send the new value to the cell containing the formula in Excel.
Note: Refer to the Microsoft Excel manual for complete details on entering Remote
Reference formulas for cells.
Writing Values to the DAServer from Excel
Values may be written to the DAServer from Microsoft Excel by creating an Excel macro
that uses the POKE command. The proper command is entered in Excel as follows:
channel=INITIATE("applicationname","topicname")
=POKE(channel,"itemname", Data_Reference)
=TERMINATE (channel)
=RETURN()
The following describes each of the above POKE macro statements:
channel=INITIATE("applicationname","topicname")
• Opens a channel to a specific topic name (defined in the DAServer) in a particular
application name (the executable name less the .exe).
• 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 "application name" and
"topic name" 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 specified item name (actual
location in the PLC), 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.
=TERMINATE(channel)
• Closes the channel at the end of the macro.
• Some applications have a limited number of channels; therefore, they should be closed
when finished.
• Channel is the channel number returned by the previously executed INITIATE function.
=RETURN()
• Marks the end of the macro.
Note: Refer to the .xlm sample Excel poke macro provided on the DAServer CD. Also
refer to the Microsoft Excel manual for complete details on entering Remote Reference
formulas for cells.