0% found this document useful (0 votes)
1K views1 page

How To Write Data From An Excel Spreadsheet To A ControlLogix Using RSLinx

This document provides instructions for writing data from an Excel spreadsheet to a ControlLogix processor using RSLinx in 4 steps: 1) Create a DDE link to monitor the download. 2) Enter the data to download in the specified cells. 3) Create a button to trigger the download. 4) Create a VBA module with code to initiate the DDE channel, specify the item to write, and poke the range using DDEPoke.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
0% found this document useful (0 votes)
1K views1 page

How To Write Data From An Excel Spreadsheet To A ControlLogix Using RSLinx

This document provides instructions for writing data from an Excel spreadsheet to a ControlLogix processor using RSLinx in 4 steps: 1) Create a DDE link to monitor the download. 2) Enter the data to download in the specified cells. 3) Create a button to trigger the download. 4) Create a VBA module with code to initiate the DDE channel, specify the item to write, and poke the range using DDEPoke.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 1

How to write data from an Excel spreadsheet to a ControlLogix using RSLinx

1. Create a DDE Link to read from the ControlLogix processor (to see the download take place). In this example 10 cells from
A1 through J1 were used to display the first ten elements of a two dimensional double integer array in ControlLogix
processor..
2. Enter data in the cell or cells you wish to download (in this example, 10 cells from A2 through J2 were used).
3. Create a button to trigger the download. If you want to use something else to trigger the download, configure it in VBA.
4. Create a module with the following code and assign it to the button. Substitute your RSLinx topic name and source for the
ones in the example. ("CTLGX" and "DblIntArray1[1,0],L10,C10")

Sub DDE_Write_RSLinx()
DDEChannel = Application.DDEInitiate(app:="RSLinx", topic:="CTLGX")
DDEItem = "DblIntArray1[1,0],L10,C10"
Set RangeToPoke = Worksheets("Sheet1").Range("A2:J2")
'Set RangeToPoke = ActiveCell 'Replace above line of code w/ this one to be
able to highlight the cell w/ the value to poke
Application.DDEPoke DDEChannel, DDEItem, RangeToPoke
Application.DDETerminate DDEChannel
End Sub

=RSLINX|MYTOPIC!'N7:0/11,L1,C1'

You might also like