Extracting Tag Values from ControlLogix

MajorFault

Member
Join Date
Nov 2007
Location
Louisiana
Posts
36
Can anyone tell me how to extract/export tag "values" from a ControlLogix processor? I have used the Tag Upload Download Tool and the Export/Tags and Logic Comments. As most of you know, this exports a list of tags but not their values.
I have a a STRING with an array length of 1000. I am collecting data from various tags in the program, putting this data together, adding a time/date stamp and storing this in one string. I am taking about 300 samples a day. Every two or three days, I would like to extract this data to a CSV file or something I can open in Excel. I did not want to create a DDE/OPC link in a spreadsheet since we are talking about 1000 tags.
Any ideas?
 
I'm not using any. I was looking for a (simple)way to do it through OPC server with RSLinx Classic.
I do use PanelBuilder 32, RSView and WonderWare here at our facility. So I guess I could build an app to collect data from those tags.
Just seems like there should be a simple way to read this tag data and put it in a spreadsheet.
 
I was asking about the HMI because I've setup RSView32 before and had it log data to a SQL express database.

Once in the database you can then run the dts wizard to export the data to an excel file.

Free, not the easiest, but free.

Cost is where the issue is, you can read OPC tags fairly easily, but when it comes to pushing those values to a database or other you'll have to pay for the software to do that.

I'm currently evaluating FactorySQL this purpose.
 
I've looked into FactorySQL a bit myself and liked the product. I used it as part of a proposal to collect production data. Sadly, due to the economy the project was put on hold. If business picks up, we'll probably go ahead with it.
 
You could use VBA within MS Excel to read the data in small chunks so that the DDE/OPC connection does not overwhelm the CPU.

I have only done this with a SLC using borrowed code, but I am sure the concept is similar with controllogix. I have a SLC that logs events to several files which I read with a macro in excel only when the file is opened or the "Update" button is clicked. It works quite well, even though my SLC is connected via a NET-ENI module.

That is why I did what I did, after finding out that I could only read about 120 integers at a time without errors, the DDE link was not the way to go, since my log file is 1024 elements long and each element has a float and two integers.

My vba code looks like this:
Code:
Sub update()
'open dde link
Dim data
RSIchan = DDEInitiate("RSLinx", "SP_ROBOT")
'-------------------------------------
'Handle first column: Timestamp
'-------------------------------------
'First timestammp data file is F74
'-------------------------------------
data = DDERequest(RSIchan, "F74:0,L32,C1")
Worksheets("raw data").Range("A2:A33").Value = data
data = DDERequest(RSIchan, "F74:32,L32,C1")
Worksheets("raw data").Range("A34:A65").Value = data
data = DDERequest(RSIchan, "F74:64,L32,C1")
Worksheets("raw data").Range("A66:A97").Value = data
data = DDERequest(RSIchan, "F74:96,L32,C1")
Worksheets("raw data").Range("A98:A129").Value = data
data = DDERequest(RSIchan, "F74:128,L32,C1")
Worksheets("raw data").Range("A130:A161").Value = data
data = DDERequest(RSIchan, "F74:160,L32,C1")
Worksheets("raw data").Range("A162:A193").Value = data
data = DDERequest(RSIchan, "F74:192,L32,C1")
Worksheets("raw data").Range("A194:A225").Value = data
data = DDERequest(RSIchan, "F74:224,L32,C1")
Worksheets("raw data").Range("A226:A257").Value = data
 
'-------------------------------------
'Next timestammp data file is F75
'-------------------------------------
data = DDERequest(RSIchan, "F75:0,L32,C1")
Worksheets("raw data").Range("A258:A289").Value = data
data = DDERequest(RSIchan, "F75:32,L32,C1")
Worksheets("raw data").Range("A290:A321").Value = data
data = DDERequest(RSIchan, "F75:64,L32,C1")
Worksheets("raw data").Range("A322:A353").Value = data
data = DDERequest(RSIchan, "F75:96,L32,C1")
Worksheets("raw data").Range("A354:A385").Value = data
data = DDERequest(RSIchan, "F75:128,L32,C1")
Worksheets("raw data").Range("A386:A417").Value = data
data = DDERequest(RSIchan, "F75:160,L32,C1")
Worksheets("raw data").Range("A418:A449").Value = data
data = DDERequest(RSIchan, "F75:192,L32,C1")
Worksheets("raw data").Range("A450:A481").Value = data
data = DDERequest(RSIchan, "F75:224,L32,C1")
Worksheets("raw data").Range("A482:A513").Value = data
'-------------------------------------
'Next timestammp data file is F76
'-------------------------------------
data = DDERequest(RSIchan, "F76:0,L32,C1")
Worksheets("raw data").Range("A514:A545").Value = data
data = DDERequest(RSIchan, "F76:32,L32,C1")
Worksheets("raw data").Range("A546:A577").Value = data
data = DDERequest(RSIchan, "F76:64,L32,C1")
Worksheets("raw data").Range("A578:A609").Value = data
data = DDERequest(RSIchan, "F76:96,L32,C1")
Worksheets("raw data").Range("A610:A641").Value = data
data = DDERequest(RSIchan, "F76:128,L32,C1")
Worksheets("raw data").Range("A642:A673").Value = data
data = DDERequest(RSIchan, "F76:160,L32,C1")
Worksheets("raw data").Range("A674:A705").Value = data
data = DDERequest(RSIchan, "F76:192,L32,C1")
Worksheets("raw data").Range("A706:A737").Value = data
data = DDERequest(RSIchan, "F76:224,L32,C1")
Worksheets("raw data").Range("A738:A769").Value = data
'-------------------------------------
'Next timestammp data file is F77
'-------------------------------------
data = DDERequest(RSIchan, "F77:0,L32,C1")
Worksheets("raw data").Range("A770:A801").Value = data
data = DDERequest(RSIchan, "F77:32,L32,C1")
Worksheets("raw data").Range("A802:A833").Value = data
data = DDERequest(RSIchan, "F77:64,L32,C1")
Worksheets("raw data").Range("A834:A865").Value = data
data = DDERequest(RSIchan, "F77:96,L32,C1")
Worksheets("raw data").Range("A866:A897").Value = data
data = DDERequest(RSIchan, "F77:128,L32,C1")
Worksheets("raw data").Range("A898:A929").Value = data
data = DDERequest(RSIchan, "F77:160,L32,C1")
Worksheets("raw data").Range("A930:A961").Value = data
data = DDERequest(RSIchan, "F77:192,L32,C1")
Worksheets("raw data").Range("A962:A993").Value = data
data = DDERequest(RSIchan, "F77:224,L32,C1")
Worksheets("raw data").Range("A994:A1025").Value = data
'-------------------------------------
'Handle next column: Event Code
'-------------------------------------
'First Event Code data file is N78
'-------------------------------------
data = DDERequest(RSIchan, "N78:0,L64,C1")
Worksheets("raw data").Range("B2:B65").Value = data
data = DDERequest(RSIchan, "N78:64,L64,C1")
Worksheets("raw data").Range("B66:B129").Value = data
data = DDERequest(RSIchan, "N78:128,L64,C1")
Worksheets("raw data").Range("B130:B193").Value = data
data = DDERequest(RSIchan, "N78:192,L64,C1")
Worksheets("raw data").Range("B194:B257").Value = data
'-------------------------------------
'Next Event Code data file is N79
'-------------------------------------
data = DDERequest(RSIchan, "N79:0,L64,C1")
Worksheets("raw data").Range("B258:B321").Value = data
data = DDERequest(RSIchan, "N79:64,L64,C1")
Worksheets("raw data").Range("B322:B385").Value = data
data = DDERequest(RSIchan, "N79:128,L64,C1")
Worksheets("raw data").Range("B386:B449").Value = data
data = DDERequest(RSIchan, "N79:192,L64,C1")
Worksheets("raw data").Range("B450:B513").Value = data
'-------------------------------------
'Next Event Code data file is N80
'-------------------------------------
data = DDERequest(RSIchan, "N80:0,L64,C1")
Worksheets("raw data").Range("B514:B577").Value = data
data = DDERequest(RSIchan, "N80:64,L64,C1")
Worksheets("raw data").Range("B578:B641").Value = data
data = DDERequest(RSIchan, "N80:128,L64,C1")
Worksheets("raw data").Range("B642:B705").Value = data
data = DDERequest(RSIchan, "N80:192,L64,C1")
Worksheets("raw data").Range("B706:B769").Value = data
'-------------------------------------
'Next Event Code data file is N81
'-------------------------------------
data = DDERequest(RSIchan, "N81:0,L64,C1")
Worksheets("raw data").Range("B770:B833").Value = data
data = DDERequest(RSIchan, "N81:64,L64,C1")
Worksheets("raw data").Range("B834:B897").Value = data
data = DDERequest(RSIchan, "N81:128,L64,C1")
Worksheets("raw data").Range("B898:B961").Value = data
data = DDERequest(RSIchan, "N81:192,L64,C1")
Worksheets("raw data").Range("B962:B1025").Value = data
'-------------------------------------
'Handle next column: Event Data
'-------------------------------------
'First Event Data file is N82
'-------------------------------------
data = DDERequest(RSIchan, "N82:0,L64,C1")
Worksheets("raw data").Range("C2:C65").Value = data
data = DDERequest(RSIchan, "N82:64,L64,C1")
Worksheets("raw data").Range("C66:C129").Value = data
data = DDERequest(RSIchan, "N82:128,L64,C1")
Worksheets("raw data").Range("C130:C193").Value = data
data = DDERequest(RSIchan, "N82:192,L64,C1")
Worksheets("raw data").Range("C194:C257").Value = data
'-------------------------------------
'First Event Data file is N83
'-------------------------------------
data = DDERequest(RSIchan, "N83:0,L64,C1")
Worksheets("raw data").Range("C258:C321").Value = data
data = DDERequest(RSIchan, "N83:64,L64,C1")
Worksheets("raw data").Range("C322:C385").Value = data
data = DDERequest(RSIchan, "N83:128,L64,C1")
Worksheets("raw data").Range("C386:C449").Value = data
data = DDERequest(RSIchan, "N83:192,L64,C1")
Worksheets("raw data").Range("C450:C513").Value = data
'-------------------------------------
'First Event Data file is N84
'-------------------------------------
data = DDERequest(RSIchan, "N84:0,L64,C1")
Worksheets("raw data").Range("C514:C577").Value = data
data = DDERequest(RSIchan, "N84:64,L64,C1")
Worksheets("raw data").Range("C578:C641").Value = data
data = DDERequest(RSIchan, "N84:128,L64,C1")
Worksheets("raw data").Range("C642:C705").Value = data
data = DDERequest(RSIchan, "N84:192,L64,C1")
Worksheets("raw data").Range("C706:C769").Value = data
'-------------------------------------
'First Event Data file is N85
'-------------------------------------
data = DDERequest(RSIchan, "N85:0,L64,C1")
Worksheets("raw data").Range("C770:C833").Value = data
data = DDERequest(RSIchan, "N85:64,L64,C1")
Worksheets("raw data").Range("C834:C897").Value = data
data = DDERequest(RSIchan, "N85:128,L64,C1")
Worksheets("raw data").Range("C898:C961").Value = data
data = DDERequest(RSIchan, "N85:192,L64,C1")
Worksheets("raw data").Range("C962:C1025").Value = data
 
'close dde link
DDETerminate (RSIchan)
End Sub
 

Similar Topics

Hi, I've got data captured in a tag data base on a Comactlogix L32E controller. Is there a way to get the tag values (~2500 tags with 7 datapoints...
Replies
1
Views
7,521
I am attempting to access HMI tag properties (Description, Minimum, Maximum values) to populate a numeric input. Is there a clean way to do this...
Replies
0
Views
360
Is there a way to export PIDE tag settings into an excel spreadsheet? Also EUMAX,EUMIN etc. This is in RSlogix 5000 . If not if anyone is...
Replies
0
Views
1,202
Hello I am able to read tag values from a PLC after providing the tag name using an open source Ethernet/IP library. I wanted to know if it is...
Replies
7
Views
3,668
I want to export the controller Tags from the Monitor Tag tab in RSLogix 5000, ver 13. If I export, I get everything except the Values. What I...
Replies
3
Views
1,661
Back
Top Bottom