Using DDE To Read - Write Data From Excel To A Controller
Using DDE To Read - Write Data From Excel To A Controller
(/app/answers/detail/a_id/31017/page/1#)
Question
Can I use Excel to reading and/or writing data Excel to a Controller using DDE?
Answer
This TechNote provide pseudo code to perform Read and Write data from Controller using Excel VB (Visual Basic) Code, via DDE commands per RSLink Training
Guide.
data=DDERequest(RSIchan,"T4:0.acc")
DDETerminate(RSIchan)
End Sub
data=DDERequest(RSIchan,"N7:30,L5,C1")
DDETerminate(RSIchan)
End Sub
Sub Write_Word()
DDEPoke RSIchan, "T4:0.acc",Range("Sheet1!C7") 'Match the sheet name to your excel document
DDETerminate(RSIchan)
End Sub
Top (/app/answers/detail/a_id/31017/page/1#top)
DDEPoke RSIchan, "N7:30,L5,C1",Range("Sheet1!A7:A11") 'Match the sheet name to your excel document
https://rockwellautomation.custhelp.com/app/answers/detail/a_id/31017/page/1 1/2
14/07/2017 31017 - Using DDE to Read/Write Data from Excel to a Controller
DDETerminate(RSIchan)
End Sub
DISCLAIMER
This knowledge base web site is intended to provide general technical information on a particular subject or subjects and is not an exhaustive treatment of such
subjects. Accordingly, the information in this web site is not intended to constitute application, design, software or other professional engineering advice or services.
Before making any decision or taking any action, which might affect your equipment, you should consult a qualified professional advisor.
ROCKWELL AUTOMATION DOES NOT WARRANT THE COMPLETENESS, TIMELINESS OR ACCURACY OF ANY OF THE DATA CONTAINED IN THIS WEB SITE
AND MAY MAKE CHANGES THERETO AT ANY TIME IN ITS SOLE DISCRETION WITHOUT NOTICE. FURTHER, ALL INFORMATION CONVEYED HEREBY IS
PROVIDED TO USERS "AS IS." IN NO EVENT SHALL ROCKWELL BE LIABLE FOR ANY DAMAGES OF ANY KIND INCLUDING DIRECT, INDIRECT, INCIDENTAL,
CONSEQUENTIAL, LOSS PROFIT OR DAMAGE, EVEN IF ROCKWELL AUTOMATION HAVE BEEN ADVISED ON THE POSSIBILITY OF SUCH DAMAGES.
ROCKWELL AUTOMATION DISCLAIMS ALL WARRANTIES WHETHER EXPRESSED OR IMPLIED IN RESPECT OF THE INFORMATION (INCLUDING
SOFTWARE) PROVIDED HEREBY, INCLUDING THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, AND NON-
INFRINGEMENT. Note that certain jurisdictions do not countenance the exclusion of implied warranties; thus, this disclaimer may not apply to you.
This page is best viewed in Internet Explorer 11, Edge, Firefox 41, Chrome 46, Safari 9 or newer.
(http://www.rockwellautomation.com/global/blog/overview.page)
(https://www.facebook.com/ROKAutomation)
(https://plus.google.com/+RockwellautomationInc)
(https://www.linkedin.com/company/rockwell-
(http://www.slideshare.net/RockwellAutomation)
(http://twitter.com/ROKAutomation)
(http://www.youtube.com/rokautomation)
automation)
Top (/app/answers/detail/a_id/31017/page/1#top)
https://rockwellautomation.custhelp.com/app/answers/detail/a_id/31017/page/1 2/2