RsLogix 5000 to excel database

If you want to try a test create a workbook and put some values on Sheet1.
Right click on the Sheet tab at the bottom and select Sheet code (i think) VBA code for that sheet copy some code from here:
https://docs.microsoft.com/en-us/office/vba/api/excel.worksheet.change
So basically, if you change one of the values on sheet 1 it will create an event and run the code (note: once you have tried it manually you could then set up a DDE link), you could modify the code to do what you want for example append a CSV file with the data. Make sure your data on sheet 1 is not changing too often as events do take a lot of processing.
An example could be:
A value changes via DDE on sheet 1, the event triggers, In the code loop through the cells and compare it with a snapshot taken on the last event and compare the cells on sheet 1 with sheet 2, if one of the values has changed then write a line to the CSV file something like 02062013:43,"Operator has changed the setpoint to", xxxx The first bit is the date & time xxxx is the cell value.
Then copy all the cells from Sheet 1 to sheet 2 so you have a snapshot of the data ready for the next change event.
You will need to read up on Excel VBA there are plenty of examples on the net like the site above.
Things to think about.
Only read the data you need.
When an event is triggered you will need to check if the CSV file exists, if so append, if not create a new CSV file & first time write it.
Update the snapshot of the data so that you have some reference of which data has changed. you do not want to write all data to the CSV only the changed ones.
your filename could be Date& time for example 02052020.csv so each file is based on a day. so every day (or week for that matter) could be a new file.
This is just an example but I would populate an SQL database and store the information.
 
I created a simple app using Visual Basic .Net that uses a trigger bit and logs the data when the trigger bit goes true in the PLC. The app then resets the trigger bit. It uses a DLL driver to communicate with the PLC. I created it to log data from 5 different controllers on the same network.

Data_Logger.jpg
 

Similar Topics

Hi, I'm just looking for a simple way to make a button in excel (via VBA I presume) to toggle a bit in RSLogix 5000. I just got FactoyTalkLinx...
Replies
9
Views
545
Hello, I have an offline copy of a controller in RSLogix 5000; I want to export all of the information I see in Controller Tags, Properties, and...
Replies
3
Views
5,566
='\\OMK-MAINT-VM01\NDDE$'|[HT_Data_Collection]REAL_Array1[4],L1,C1 Where "OMK-MAINT-VM01 in a VM on the company network [HT_Data_Collection] is...
Replies
0
Views
1,046
Hi I am using compactlogix and I would like to view the some of the plc setting like running times ect back in our office, I have Ethernet going...
Replies
15
Views
10,253
Hi All, I have a huge data array in rslogix 5000 that I would like to move across to excel. I know DDE is an option but I only have the lite...
Replies
9
Views
16,218
Back
Top Bottom