I created a DDE application some time ago using the examples found in the DDE help files in RS Linx.
My program basically pulls tags out of the plc, and gives the user the option to write values back to the plc. It is relatively simple with just a few push buttons to read and write the data as well as to clear the screen. Long stretches of my code look like this (for the read at least).
data = DDERequest(Import, "OptionAutoStartControlMethod")
Range("[COOPERPLC.XLS]Sheet1!A21").Value = data
data = DDERequest(Import, "SetptAutoReloadPressureOffset")
Range("[COOPERPLC.XLS]Sheet1!A22").Value = data
I have about 500 tags to read and write to. It takes about 3 minutes to read, and then 3 minutes to write all of the tags. Recently I saw another application similar to mine that read and wrote much faster, and Im not sure why. I believe he was able to use For statements to make his code a bit cleaner than repeating the DDE code as I did above (unfortunately I cant since the tags are not similar). He was reading a similar number of tags, and using the same technique as above with the for statements, but his collected the data much faster.
Does anyone know how to increase the speed of the data collection from DDE? Maybe a setting that I am missing in Linx or Excel? Or perhaps a suggestion that would speed things up a bit.