Help - Search - Members - Calendar
Full Version: capture CDM from plc5/60 through rslinks
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
zarky44
Is it possible to use VNC to log on to a computer running RSlinks and capture an already configured CDM from a PLC5/60B and export it or copy it to excel or access.

Thanks,

John

I looked at several of the examples in download section. I think the SampleDDE posted by BobLfoot is close to what I was thinking. I guess I need guidance on Setting up DDE and Rslinks.

lookaround.gif Too tired to learn new tricks, not to old!

O.K. I am using rslinks 2.40.01(Build 16) I read in one of these post you had to have PRO version. VNC is not a problem. I just need a little guidance on DDE topic configuration. Most of the samples are good just leave out a little detail like step by step directions. :)
zarky44
Now that I have uninstalled RSlinx Lite and installed Rslinx Pro, it was to easy to do. Just one thing I need to figure out. I want a cold link, I mean I want it to update only once when spreadsheet is opened.

BobLfoot
QUOTE(zarky44 @ Feb 16 2009, 12:39 PM) [snapback]78920[/snapback]

Now that I have uninstalled RSlinx Lite and installed Rslinx Pro, it was to easy to do. Just one thing I need to figure out. I want a cold link, I mean I want it to update only once when spreadsheet is opened.


The easiest way to use a cold link as you call it is with VBA code and not a link in the cell. Check out the VBA behind my sample you mentioned. The READ Subroutine will contain the basic logic to read a variable from a pLC and palce it in a cell on the sheet. Call your Read Subroutine from the Workbook open event and you'll have what you ar looking for.
zarky44
QUOTE(BobLfoot @ Feb 16 2009, 03:52 PM) [snapback]78926[/snapback]
QUOTE(zarky44 @ Feb 16 2009, 12:39 PM) [snapback]78920[/snapback]

Now that I have uninstalled RSlinx Lite and installed Rslinx Pro, it was to easy to do. Just one thing I need to figure out. I want a cold link, I mean I want it to update only once when spreadsheet is opened.


The easiest way to use a cold link as you call it is with VBA code and not a link in the cell. Check out the VBA behind my sample you mentioned. The READ Subroutine will contain the basic logic to read a variable from a pLC and palce it in a cell on the sheet. Call your Read Subroutine from the Workbook open event and you'll have what you ar looking for.


First, thanks for reply. I appreciate the skill and know how required in todays controls systems. I am an electrical support technician not an engineer, but I am normally a pretty fair hacker :)

I got the "cold link" from help files in Rslinx, which I have been studying here lately.

Copy From RSlinx Help:
There are three types of DDE links: hot, warm, and cold.

A hot link is the type of a link in which the server updates the client whenever the server sees the data change. Once established, this type of link remains intact until it is shut down. The Copy to Clipboard feature of RSLinx can be used to quickly establish hot links to applications that support a Paste Link.
With a warm link, the server monitors the data, and when the data changes, the server sends a signal to the client telling the client that the data has changed, but the server does not send the actual data itself. At this point the client has the option of asking for the data or doing nothing. RSLinx does not currently support warm links.

A cold link is established upon a request for data. Once the request is filled the link is broken. The next time data is required a link from the client to the server must be re-established. For example, a Microsoft Excel macro can be used to establish a cold link. All DDE writes are done through cold links.
Until a request for data is made from an application program, such as Microsoft Excel, RSLinx waits for an application to make a request for some data from a processor. Once a request for data is made RSLinx builds up the required communications packet to acquire the data and begins communications.

So what you are saying is in order to to break a READ request in Excel I will have to use a MACRO.
I see in the sampleDDE.xls that the Workbook open triggers a search and start for RSlinks. Then when this is true it gets a go to sheet7(controls). Here it waits for either command button which will envoke the clock_subs module.

I really like the simplicity of using the Data Monitor in RSlinx and copy/paste function to excel. Much easier for my seasoned (old) brain to do. I just need it for short run information anyway, like say how many times a pump comes on and avg time on in a 12 hour period for example.

Thanks,

John

BobLfoot
QUOTE(zarky44 @ Feb 16 2009, 08:55 PM) [snapback]78935[/snapback]

Copy From RSlinx Help:
There are three types of DDE links: hot, warm, and cold.

A hot link is the type of a link in which the server updates the client whenever the server sees the data change. Once established, this type of link remains intact until it is shut down. The Copy to Clipboard feature of RSLinx can be used to quickly establish hot links to applications that support a Paste Link.
With a warm link, the server monitors the data, and when the data changes, the server sends a signal to the client telling the client that the data has changed, but the server does not send the actual data itself. At this point the client has the option of asking for the data or doing nothing. RSLinx does not currently support warm links.

A cold link is established upon a request for data. Once the request is filled the link is broken. The next time data is required a link from the client to the server must be re-established. For example, a Microsoft Excel macro can be used to establish a cold link. All DDE writes are done through cold links.
Until a request for data is made from an application program, such as Microsoft Excel, RSLinx waits for an application to make a request for some data from a processor. Once a request for data is made RSLinx builds up the required communications packet to acquire the data and begins communications.

So what you are saying is in order to to break a READ request in Excel I will have to use a MACRO.
I see in the sampleDDE.xls that the Workbook open triggers a search and start for RSlinks. Then when this is true it gets a go to sheet7(controls). Here it waits for either command button which will envoke the clock_subs module.

I really like the simplicity of using the Data Monitor in RSlinx and copy/paste function to excel. Much easier for my seasoned (old) brain to do. I just need it for short run information anyway, like say how many times a pump comes on and avg time on in a 12 hour period for example.

Thanks,

John


You have a definite handle on the hot / cold links issue. If you're using the spreadsheet sporaically and processor traffic load is not an issue, I see no reason not to use the simpler hot link.

By the way I was a tech myself when I first started hacking macros and such.

If you decide to teach yourseld or be taught how to program macros and links to RA processor, I'd recommend learning the OPC protocols and version not the DDE ones. They both work for right now, but Microsoft has been saying it was going to phase out DDE in favor of pure OPC. You'll find OPC has more overhead and a longer learning curve, but once you master it the adbantages are many.

Old dog that I am I'll cross that OPC bridge when the DDE one collapses assuming I didn't drown in the process.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.