RsView and Excel with DDE link

N

Thread Starter

Nic_Gump

Does anybody know how to do a DDE link between RsView and Excel? I use NT4, I doesn't know if my problem is the configuration of RsView or Excel.

Do I need another sofware between them?

Thanks in advance
 
A

Alan Rimmington

If you are using RSview through RSlinx (Allen-Bradley network) then RSlinx has DDE. Open RSlinx and look for DDE in the help files, it contains an excel example
 
R
Dear Friend,

You do not need another software.You would have already chosen the DDE option while installing RSview.
Though I have not interfaced RS View with Excel,I have done it with another SCADA ie FIX 32.I guess it should be similar. I shall narrate the procedure.

1.Go to system configuration and select DDE as the current driver.

2.Select two tasks,in FIX they are ddeclnt and dmdde.Look for such names in your tasks list along with historical trends,recipes etc.

3.Create a Register Tag on your SCADA screen
Choose DDE as the driver. Address it as =excel[book name]|sheet name!rownumber column number

or accordingly first application name ,then document number and finally the data element(r1c1,r2c1 etc).Try out similar syntax on RS View.

If this does not work you could mail me at
"[email protected]", mailto:[email protected]

Regards
Raj...
 
Depends on whether you are trying to read RSView from Excel, or Excel from RSView. I don't know if RSView is a DDE server or not, one would assume it is. It is definitely a DDE client, and Excel is a DDE server.

The typical DDE Link goes something like this:
APPLICATION|TOPIC!ITEM
where APPLICATION is the name of the application, TOPIC is the name of the topic, and ITEM is the name of the item. The characters in between are the PIPE symbol (usually above your backwards slash), and an exclamation point.

Using this method, the DDE link to read out of Excel is
EXCEL|Sheet1!R1C1
This link reads from an Excel worksheet titled "Sheet1", from cell A1 (or row 1, column 1). Obviously if you want a different sheet or a different cell you have to change things slightly. In RSView you have to set up a DDE node to connect to Excel - I assume you know how to do this.

If RSView is a DDE Server it should be possible to go the other way. I don't know if it is, but you would have to determine the application name, topic name, and item name. One would assume that the application name would be RSVIEW, and the item name would probably be the name of the tag you want to read. Not sure what the Topic name would be. It's not always easy to figure out. Wonderware InTouch has an application name of VIEW, a topic name of TAGNAME, and the item name is whatever tag you are interested in.

Hope this is somewhat useful....

Jason Greff
Instrument Control Systems
 
J

Jeremy Pollard

RSLinx is theonly DDE server that Rockwell has (as such) So you need that too.
I would use the object model of RSView and VBA to write diredctly to an Excell spreadsheet. No need for DDE at all.
Just a thought:)

Cheers from:

Jeremy Pollard, CET
The Crazy Canuckian!
Integration, Automation, and Training

On The Web - http://www.tsuonline.com
PLCopen North America - [email protected] www.PLCopen.org

8 Vine Crescent, Barrie, Ontario L4N 2B3
705.739.7155
 
T

T.SELVARAJAN

Its easy Mic,
STEP1: Select OPC/DDE Server check box in the Startup configuration
STEP2: Configure your STARTUP macro to have RTDataServerOn command
STEP3: In excel type as
=RTDATA|ProjName!TagName
The DDE syntax is
Application | Topic ! Item
The first sign one is the Pipe sign.
The secong sign is Exclamation Mark.
Sometimes you may have to use double quotes in Item. Best of Luck.
T.SELVARAJAN
 
First you will need to add some dde topic's is RsLinx, (N7_0) from example, then paste in this code below, and go.Paste it into a module.Just make a call to ReadPlcData from a button or other object in VBA, and your all set, you may want to add your own conditional way to stop/shutdown the communications as well.
Sub ReadPlcData()

Dim PlcData1
Dim PauseTime, Start, Finish, TotalTime
Dim RsLinxData1

'Top again loop call.
Topagain:

'Start Rslinx DDE Comms and set DDE Topic.
RsLinxData1 = DDEInitiate("RSLinx", "N7_0")

'Set plc data to variable
PlcData1 = DDERequest(RsLinxData1, "N7:0")
Cells(1, 1).Value = PlcData1

'Timer to reset dummy cell.
PauseTime = 0.5 ' Set duration. In seconds
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer ' Set end time.
TotalTime = Finish - Start ' Calculate total time.

'Goto to of module again to run loop.
GoTo Topagain

End Sub
 
Top