Sign in to follow this  
Followers 0
Guest Slick504

Excel To 5/250

2 posts in this topic

I have an integer file in a 5/250 (500 words in length) that holds standard data for a barcode label. I want to duplicate this file in another 5/250 processor, but don't want to have to type all 500 words again. I've setup a DDE link using RSLinx and uploaded all 500 words to an Excel spreadsheet. My problem is......how do I download the 500 words in the Excel file to the other 5/250, do i need to write an Excel DDE Macro in Visual Basic....I've called the Excel file 1N26.exl.....and the DDE topic is 723L....the file i want to write to is 0N109.....I have access to a VB applications Engineer on site, so if any VB code needs writing he can assist. Thanks in advance. Graeme

Share this post


Link to post
Share on other sites
If anyone wants to write values from an excel spreadsheet to a plc using DDE, this is how to do it. First create a DDE Topic in RSLinx Professional....call it...... test_sol Then create an excell spreadsheet and save it as RSLINXXL.xls Then rename the first sheet tab as TEST_DDE Then goto tools on the excell spreadsheet and click on Macro and then Macros, call the Macro dde_write and click create. The code you need to enter is as follows:- Sub DDE_Write() 'open dde link: testsol=DDE Topic RSIchan = DDEInitiate("RSLinx", "test_sol") 'write data thru channel DDEPoke RSIchan, "1N4:141", Range("[RSLINXXL.XLS]test_dde!D7") 'close dde channel DDETerminate (RSIchan) End Sub This will write 1 value from D7 in the spreadsheet to address 1N4:141 in a 5/250. Cheers Graeme

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0