Data from Excel to PLC

angi

Member
Join Date
Jan 2010
Location
us
Posts
361
Hi guys

I know how to import the data from PLC(AB) to Excel using RSlinx, the question for you guys is how to import the data from Excel to PLC?

Thanks
 
Search DDE Poke, your answer is there. I learned this in a PLC class, but have since forgotten the exact code needed for this to work in Excel, would love to see it again though.
 
This is how I do it:

Private Sub Download_Click()
Svar = MsgBox("Ønsker du at Downloade værdier til PLC !", vbOKCancel, " Procestype 1")
If Svar = vbOK Then
RSIchan = DDEInitiate("RSLinx", "B1")
DDEPoke RSIchan, "Sekvens[1,0,0],L90,C2", Range("[B1Recepter.xls]ProcesType1!C2:D46")
DDETerminate (RSIchan)
End If
End Sub

My data is 2-dimentional, or 3 really but the first digit is the step in the sequence.

Michal_dk
 
Kepware has a DDE Client driver that you can use in its OPC Server to get data from an excel spread sheet to an OPC Client and you can then write the data back down to the PLC. Use the LinkMaster product and you can read the data from the DDE Client driver and write it down to the PLC through RSLinx. The LinkMaster can be configured using drag and drop so the whole process can be completed in a few minutes.

Sorry for the sales like pitch but I think the products will solve your problem.
 
DDEPoke RSIchan, "Sekvens[1,0,0],L90,C2", Range("[B1Recepter.xls]ProcesType1!C246")

I am confused on what does L90 and C2 mean after tag name, please explain
 
L90 is the length and C2 is the "dimention"

So basically the code will transfer 90 values from Excel and take the data from two rows.

Sadly the emoji hides the true code, it should be:
ProcessType1! C2 : D46, so starting at Cell C2 and ending at Cell D46 = 90 values
 
Hello, I am a beginner, want to write "0" to B3:0.0 and "1" to B3:0.1, and so on, I am using Visual Basic 6.0 (Rslinx 2.41, Rslogix500, Topic:WML1500) Is it posible not to use Excel to do this kind of DDEPoke? could someone write the vba syntax and an example ??? Thank you.
 
Last edited:

Similar Topics

Hey guys, I am looking for a low cost solution to log data from PLC to excel directly.Is this possible without utilizing any software?...My...
Replies
6
Views
6,835
Hello friends I have a PLC5/20, I need to save 2 tags to a excel datasheet. This tags are: barcode, press force. I need to save the barcode and...
Replies
10
Views
3,512
Hi, Is it possible and how to get automated data transfer, what works real-time all the time, from Siemens S7-300PLC to MS excel spreadsheet...
Replies
11
Views
12,955
I was able to read a tag in excel from a Controllogix PLC using =RSLINK|'Topic_name'!'Item' Am I using DDE or OPC ? How can I write value back...
Replies
4
Views
5,920
I am in the process of putting a few rungs together to track operation time of the motors in our plant. I have been directed to assign the...
Replies
8
Views
9,926
Back
Top Bottom