You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old July 8th, 2009, 03:38 PM   #1
MajorFault
Member
United States

MajorFault is offline
 
MajorFault's Avatar
 
Join Date: Nov 2007
Location: Louisiana
Posts: 36
Extracting Tag Values from ControlLogix

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?
  Reply With Quote
Old July 8th, 2009, 04:17 PM   #2
Paully's5.0
Lifetime Supporting Member
United States

Paully's5.0 is offline
 
Join Date: Jan 2006
Location: WI
Posts: 1,966
What HMI software are you using, if any?
  Reply With Quote
Old July 8th, 2009, 04:33 PM   #3
MajorFault
Member
United States

MajorFault is offline
 
MajorFault's Avatar
 
Join Date: Nov 2007
Location: Louisiana
Posts: 36
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.
  Reply With Quote
Old July 8th, 2009, 04:45 PM   #4
WildeKurt
Member
United States

WildeKurt is offline
 
Join Date: Jun 2009
Location: Keokuk, IA
Posts: 143
I've used Ingear Active X control available from Software Toolbox (http://www.ingearactivex.com/). It does not require RsLinx which is nice. You can use it in VB or VBA as part of an Excel spreadsheet.
  Reply With Quote
Old July 8th, 2009, 05:14 PM   #5
Paully's5.0
Lifetime Supporting Member
United States

Paully's5.0 is offline
 
Join Date: Jan 2006
Location: WI
Posts: 1,966
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.
  Reply With Quote
Old July 9th, 2009, 09:36 AM   #6
WildeKurt
Member
United States

WildeKurt is offline
 
Join Date: Jun 2009
Location: Keokuk, IA
Posts: 143
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.
  Reply With Quote
Old July 9th, 2009, 09:45 AM   #7
dougrb
Member
United States

dougrb is offline
 
Join Date: Oct 2005
Location: Kansas
Posts: 39
In what way did the tag upload download tool not work for you?
  Reply With Quote
Old July 9th, 2009, 09:58 AM   #8
OkiePC
Lifetime Supporting Member
United States

OkiePC is offline
 
OkiePC's Avatar
 
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 9,522
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
__________________
It's not all the variables I am most concerned with, it's the undiscovered constants.
  Reply With Quote
Old July 9th, 2009, 10:22 AM   #9
junior
Member
United States

junior is offline
 
Join Date: Jan 2006
Location: Seattle
Posts: 269
Scada_Dude had a good open source HMI, PVBrowser(http://pvbrowser.de/pvbrowser/index.php). Not sure if it supports contrologix though, but it's worth checking out.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
How to copy data in a tag to another tag in Controllogix cdmeieril LIVE PLC Questions And Answers 3 July 9th, 2008 04:13 PM
Retain Controller Data in an HMI tag (Allen-Bradley) Money4Nothing LIVE PLC Questions And Answers 16 July 19th, 2007 07:38 AM
Transferring tag values from one RSLogix5000 file to another. radfahrer LIVE PLC Questions And Answers 2 December 6th, 2006 04:09 PM
Downloading to ControlLogix without overwriting Tag values ihc LIVE PLC Questions And Answers 5 October 19th, 2006 03:51 PM
RSLogix5000 tag values jshiepe LIVE PLC Questions And Answers 3 August 30th, 2004 08:35 AM


All times are GMT -5. The time now is 08:28 PM.


.