Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Captcha Click on image to update the captcha .

Login

Register Now

register content

How to get data from plc to excel

How to communicate with PLC via Excel?

In order to get data from PLC with Excel, we need to use OPC. If you are using Rockwell Allen-Bradley plc, no other tool is required for OPC because we can transfer data from Allen-Bradley PLCs via OPC with the RSlinx application. Note that the RSLinx application we will only use is not the Lite version.
RSLinx Lite versions do not support data transfer such as OPC, DDE, but you can configure drivers to connect to the PLC.
In order to be able to view a tag ready in the PLC in the Excel you created, you need to have your RSLinx program open and create OPC connected to the PLC.

If your Rslinx version looks like the one below, it indicates that your RSLinx version is the Lite version and as I mentioned above, you can’t get data from the PLC.

plc programming img 5ff1d0fcf2e98 plc

The RSLinx version is license related, if you see the version as Lite and you have purchased another license, you must make sure that your RSLinx program is licensed. If you see RSLinx as OEM or RSLinx Gateway as below, there is no problem.

plc programming plc

plc programming RSLinx Launch Control plc plc programming plc

If your RSLinx program is running as a service, it means it is running in the background and the interface of your RSLinx program is not displayed. In these cases, you should stop your application from the RSLinx Launch Control Panel, remove the Always Run As Service option and run it again.

 

 

 

Create DDE OPC Topic

Right-click on your PLC processor in the RSLinx program interface,
After clicking Configure New DDE / OPC Topic, click the Done button by naming DDE / OPC in the window that will appear. Now our communication interface is ready, we can access all tags in our plc processor from anywhere, through this topic.

plc programming OPC 1 plc

 

Since we will read the data from the plc with the excel file for now, we open our excel page and then write the following formula in our cell where we want to see the data. You can organize it according to your own tag name and the DDE / OPC topic title you created.

plc programming img 5ff1d820ef6b6 plc

=RSLINX|PlctrCom_Excel!’Timer_On_Delay.Acc,L1C1′

OPCName: PlctrCom_Excel

PLC Tag : Timer_On_Delay.Acc

plc programming plc

 

The transfer speed between PLC and Excel is set to 1000 ms by default, if you want to read faster data, click the menu below.

plc programming img 5ff1daa8e5f7e plc

You can find the topic name you set from the Topic Configuration window and change it to 100 ms as follows

plc programming img 5ff1dac578c37 plc

You can also write to Excel like reading data from plc.