Free SCADA – how to connect Excel to Allen Bradley CompactLogix PLC

If you have Microsoft Excel you can read and write data from Allen Bradley PLC ( CompactLogix or ControlLogix processor) using the DDE/OPC capabilities of RSLinx.
So how this free SCADA works?
In this example I am going to use Allen Bradley CompactLogix PLC 1769-L35E . I have RsLinx Classic ( no Lite – Lite edition does not support DDE ) and of course Microsoft Excel 2007.

First we need to open our RSLogix5000 project and create global tags (controller tags). I am going to use 2 tags from our last article about PLC Ladder Logic programming. Tags ORDER and TEMPERATURE have already some values. For testing purposes you can enter any values too.

They are arrays of 10. Create tags ORDER as DINT[10] and TEMPERATURE as REAL[10].
RSLogix tags

When tags are ready we have to open RSLinx software and create DDE/OPC topic. My PLC topic is OFFICE. Right click on your processor and select Configure New DDE/OPC Topic.

create RSLinx DDE




Remember you topic name (mine is OFFICE) as you need it later to enter in our VB code in Excel. Click apply and close the program. Open Excel and create Command Button. If you cannot find Command Button go to excel options and add it to your toolbar.



Together we need 2 buttons and table like on this picture below. Then right click on button and select View Code.



Enter now VB code for firs Read button.


Next is code for RSLinx communication

connect to RSlinx code

And finally Write button



Our free SCADA is ready to test now. Try to read values from PLC. Mine Excel table looks like this:

Popular posts from this blog

Pengertian Kartu ATM dan Kartu Debit ( Cirrus dan Maestro Logo )

Free OPC Software