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