Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Communication Drivers

Write values to the communication driver from Excel

Write values to the communication driver from Excel

  • Last UpdatedAug 29, 2024
  • 1 minute read

Values may be written to the Communication Driver 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 Communication Driver) 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 Communication Driver installation media. Also refer to the Microsoft Excel manual for complete details on entering Remote Reference formulas for cells.

TitleResults for “How to create a CRG?”Also Available in