×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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

How do I get SLC500 information into an excel sheet?

How do I get SLC500 information into an excel sheet?

How do I get SLC500 information into an excel sheet?

(OP)
Actually I'm trying to use VBA commands available in excel and I've got some results, but my problem is how can I get the macro working every, lets say 60 seconds, by itself and bringing data into the excel worksheet.
Could anybody help me?

RE: How do I get SLC500 information into an excel sheet?

With a DDE driver formula in a cell you do not need to reschedule the reading from PLC since it is performed permanently.
For writing to PLC, which is performed by a macro subroutine execution, you can use vba "OnTime" method to schedule the next execution of the macro.

See also Thread791-58495

RE: How do I get SLC500 information into an excel sheet?

(OP)
Thanks for your reply
With this method I'll be able to refresh the data value into a single cell.
What I'm trying to do is perform a historical report of many variables in the excel datasheet.
Does anybody know how to do this?

RE: How do I get SLC500 information into an excel sheet?

What exactly do you call a historical report?
Looks like your macro (working every 60 sec) will have nothing with reading from the PLC, but be a kind of data  transfer to report area.
And the reading from PLC will still be performed by cells formulas permanently.

RE: How do I get SLC500 information into an excel sheet?

(OP)
What I trying to mean by historical report is to bring data from the PLC (integers, floating, bits) via DDE into excel datasheet every 60 secs.
Every reading (performed every 60 secs) should be paste in the next row found empty by the macro in the excel datasheet.
I hope, I made my self clear.
Thank in advance

RE: How do I get SLC500 information into an excel sheet?

maxipaz,
I suggest you the following.
Create a sheet in your Excel workbook named Report or History (or whatever you prefer).
Use row 1 for headers and fill row 2 with any necessary formulas, including DDE links and real time clock/calendar for report records marking.
Determine the last row (n) for your report sheet, up to maximum 65536.
Create a macro that will:
1. Delete the last row n of the report.
2. Shift down rows 3 to n-1.
3. Copy values from row 2 to row 3.
Execute this macro at any time by any method, OnTime being the most straightforward for scheduling.
As a result, you will have the Report/History of n-2 records in reverse chronological order.

RE: How do I get SLC500 information into an excel sheet?

btw.  Have you tried posting this question on the Tek-Tips site?

TTFN

RE: How do I get SLC500 information into an excel sheet?

I've done this before. See my download posted here:

http://www.mrplc.com/dl/index.php?action=view&view=entry&entryid=74

Basically I used a worksheet all by itself and used the VBA command "ON CHANGE" to launch the macro. So my PLC wrote data to a sheet all by itself, when the data on the sheet "changed" or "ON CHANGE" event, then I excuted a macro. Check out my download above.

Good Luck

Chris Elston
Automation & Controls Engineer
http://www.mrplc.com
Download Sample PLC Ladder Logic Code
at MrPLC.com

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


Resources

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