RSLinx DDE Excel data log

Kabir

Member
Join Date
Mar 2004
Posts
107
Problem:
I want to record temperature from a PLC using Excel, with hour intervals. At the end of the week save the file with a different filename for each save.

I already have the data from the PLC transfered to EXCEL in a single cell that gets updated every second.

Hardware:
AB PLC5/40 (Connected to the LAN via a DH+ to LAN gateway)
RTD Module
PC

Software:
RSLinx Pro
MS Excel
Windows 2000 Pro
 
OK...I think I may be able to help...with SOME of this. I think I would use some VBA in excel.

You need to create a module and in it come up with some code to automatically record the data in the single cell and write that data to a log sheet on each hour. ok

so in this module you could put the following code

sub onehour()
Application.OnTime (now) + TimeValue("00:60:00"), "RecordTemp"
end sub

this string will call up a macro every hour which I've named "recordtemp"

then you can create "RecordTemp" and use code similar to the following

sub RecordTemp ()
Dim Rows as Integer
sheets("TempLog").select
range("A3").select
Rows = Sheets("TempLog").Range("a3").currentregion.rows.count
selection.offset(Rows, 0).select
selection.value = sheets("Sheet1").range("a1").value
end sub

In this example your tempature is linked to sheet1 - range A1
and it transfers the tempature value to the next available row in coloumn A of sheet2, which I have named "TempLog"


You'll need to come up with some code to start and maintain the recording process, such as a check box. Also note that in sheet2 "TempLog" you can not put any data in cell A2 or it wont count the rows properly and you're recordings will end up in the wrong place. You can also change the cell addresses in this code to match where you already have the data.

I made this whole excel thing already but my dang PC screwed up and I lost it otherwise it would of been attached.
 
Concerning Rslinx

I just wanna know if Rslinxcan do my application like my friend told me.
I made a program with visual studio in C/C++ , this programm consist of ramp generating(trapeziodal)and preserv all the points in a file(text file),i would like to sent this program to the PLC by Rslinx linking and modify the data(points) by the PLC,and by PLC again(contrologix(Rslogix5000)) modify the curve like I want.
Please tell me if Rslinx can do that and how.

Thanks.
 
Last edited:

Similar Topics

Hi, I'm brand new to the forum and spent some time looking around but could not find an answer to my question. I'm using an excel spreadsheet to...
Replies
3
Views
1,326
Sorry if this is off topic, but this is more of a VBA question. I have some data that needs to be collected weekly. I have an excel sheet so that...
Replies
6
Views
2,062
So I Read about DDE. I've already set up my topic configuration in RSLinx. I'm now trying to move forward in Excel. I see the formulas, but I...
Replies
21
Views
12,991
Hi I have Linx classic and FT View ME and want to create a config sheet so i can send info from excel into my PLC. I have read various things...
Replies
5
Views
3,648
I have the following DDE Topic in Excel from a ControlLogix processor: =RSLINX|'SW123'!'CCip_Rcp[0].FiRns.Vol_Sp,L1,C1' It was created using a...
Replies
0
Views
2,785
Back
Top Bottom