You are on page 1of 2

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

You might also like