Ladder Logic 309: Allen-Bradley DDE/OPC Link to Excel
It’s been a while since I’ve added to the Ladder Logic series, so this post serves several purposes. It serves as the 7th video in the ControlLogix Odyssey series, it will be posted on YouTube as an ad, and it adds to the series here.
Last week I taught a class on ControlLogix, and one of the students mentioned that he was looking for a free or cheap way to monitor data in a PLC. I had done this a long time ago, so I recreated the application in Microsoft Excel as a production counting exercise.
The steps are as follows:
- Open “Who Active” in RSLinx
- Right click on the PLC processor. click “Add New OPC Topic”. Topic name will appear in the topic list, usually it is the name of the processor.
- In the Edit tab, select “Copy DDE/OPC Link”
- Browse for the tag you want and select it.
- Go to the cell you want to paste to in Excel. Right click and “Paste Special”. Select Link and Text.
Despite the fact that nearly everyone has Excel on their computer, this is not the easiest way to collect and save data. If I wanted to capture a data history, I would need to find a way to organize data into columns by time, save files automatically, and make things look a lot better. By the time you were done with all of that you may wish you had used a commercially available package. But it’s a fun exercise in a classroom setting!