RSLogix: Writing Tag Values with Excel

tomizzo11

Member
Join Date
Jul 2013
Location
Michigan
Posts
49
Hello,

I’m currently attempting to write tag values in RSLogix through excel using the DDE/OPC option in RSLinx. I was able to configure everything so that the tag values could be read in excel, but have not been able to find a way to write the tag values using excel. Without using Visual Basic code, how can I make it so that someone could insert values into excel cells and they would update values used in the PLC?
 
Are you talking about having a "live" link to a PLC register from an Excel cell?

I don't know of any way to do this save DDEPoke, which of course is an element of vba code. I always condition my writes off a button press, with some value checking beforehand.

You might be able to use the "Worksheet Change" function, pointed at the cell in question, to call the DDEPoke function to push that cells value. I would still advise having some error checking in place. Again, though, this is still accomplished via VBA code. AFAIK, there is no way around this.
 
I’ll give you a little more info into what exactly I’m trying to do. I’ve written a program that scans text files for certain values and are then exported to an excel file. These values are used in a certain data structure I’ve created in RSLogix. I want an easy way to get all the values to their associated tag within the RSLogix program.

I understand what I’m doing is essentially linking the excel cells to the program tags but I’m mainly just interested in a onetime importation of the values. I’ve looked around a little on how to do this and I saw people implementing VBA code to do it, but I don’t really feel like learning VBA at the moment. If there is VBA code already out there that I could modify to fit my application, I wouldn’t mind that. Is that offered anywhere?

Regarding error checking, would that be necessary if I have no intention to keep the DDE after I’ve loaded the values? All I’m looking for is a simple way to implement a onetime importation of tag values from excel.
 
I had actually stumbled across but was turned off because of the VBA. If I could copy the code listed though, it might be pretty easy to implement.

I just assumed there may be an easier way.

VBA may look intimidating the first time, but if you're wanting to automate in Excel, it'sthe tool you have. For your application, it should be easy to replace the topic name, destination tags and source cells with your own. As long as you have your topic configured and RSLinx, it should be easy to get going. Trust me, you've probably already spent more time dreading using VBA then you would have re-applying the sample code to your application :sick:
 

Similar Topics

Hi. Not the fist time I'm saying this but just to give a background. 95% of my PLC programming has used Schneider over the last 10 years on...
Replies
66
Views
5,073
I am used to using SFC in Schneider unity and we use the step.X bit in the logic to see if the step is active. We don't use parallel branches so...
Replies
2
Views
2,207
Customer has an existing controllogix PLC for a line which is in operation. We will be adding a piece of equipment to the line which will connect...
Replies
11
Views
4,954
M
I am rewriting a program from a PLC5-250 to PLC5 using RSLogix 5000 and I am doing some block transfers right now but on the old program I have a...
Replies
3
Views
5,846
Hello, I am trying to read a barcode scanner input using a cognex dataman 280 barcode reader, store it another string, the compare with another...
Replies
1
Views
94
Back
Top Bottom