Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Wonderware to Excel

Wonderware to Excel

Wonderware to Excel

I may be in the wrong place, excuse me if I am.  I am creating a wonderware application and I need to create some reports. The reports are already made in Excel. I am able to export the data from wonderware to a .CSV file but I need to move the data to the report every 15 minutes. I have tried to create a macro in VBA to do this but Excel will not export the data more than one time on a time basis. I also need the data to be entered in consecutive lines on the spreadsheet depending on what time it is. I am having trouble getting excel to do this. Should I just have a macro that runs when the spreadsheet is open and have wonderware open the spreadsheet at the given times for the transfer? This seems like a lot of opening and closing of excel and I am trying to limit the amount of extra programs opening and closing due to using up the computer memory for extra functions. My question is is there a way to write a macro that this can take place without having to be proficient in Visual Basic or another language.....any help would be appreciated.......

RE: Wonderware to Excel

seeing this inquiry brought back fading memories...

i understand that the report generator is excel; whereas, wonderware provides the data (csv files).  you want to append to existing data? collected 15 mins earlier?

the statement" excel to export the data more than one time on a time basis" is not clear to me.  perhaps you can clarify.

meanwhile, i seem to recall that wonderware has it own capabilities to generate reports or rather generate data files (csv) containing information to analyze.  a suggestion is to generate the data files (csv) when required (i.e. 15 mins) and run excel to generate the report only 1/day.

please clarify.

RE: Wonderware to Excel

You can achieve want you want or at least something similar.  

Here is what I have done in the past.  I used Wonderware and Excel to create a power plant monitoring system.  I used Wonderware just as a GUI.  I performed all calculations in one Excel Workbook, stored them all in another Excel workbook, and displayed all the calculated points on Wonderware.  

I used a modbus ddeserver to pull the information into my excel calculations workbook, where it updated every 10 seconds based on the settings in the ddeserver.  I then linked the calculated values to the historian workbook which in turn also updated every 10 seconds.  I then used a macro to essentially copy and paste the values every 5 minutes.  I essentially had an open ended loop that would copy and paste the values every five minutes.  This worked well as a crude historian.  I also used dde to pull the information from excel into wonderware and display it.  

I did all of this on old pentium II machines and they had no problem running all of these programs.  The only thing that would slow down the system, was when excel would autosave the historian workbook every 30 minutes.  

I am positive that you can build something that will suit your needs.  Perhaps you could use dde to pull the info from wonderware into excel or from your ddeserver into excel.  Then you could print your reports every 15 minutes or do like I did and create a large table that stored the values.  

Here is the continuous loop Macro that I used to continually copy and paste the values in my historian workbook.  

Sub do_loop()
Application.OnTime Now + TimeValue("00:05:00"), "Macro1"
End Sub

All this does is call Macro1 every 5 minutes.  It worked pretty well.  

Hope this helps.

RE: Wonderware to Excel

We have had good success in small to medium size file application by simply setting the autosave function in Excel to save the file in CSV format and setting  Wonderware to retreive the file as needed. You have to establish a Historian in Wonderware and play around with display formatting but it dramatically cuts down process demands on the host PC and saves storage space since you are simply overwriting the file everytime.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close