Lol, I hate to burst your bubble, but here goes. You've taken the next step in a progression that outgrows the architecture. When I constantly recommend against using Excel as a datalogging application, it's not because it's
hard to set up, it's because it's a
bad idea in terms of scalability. Let's count the reasons:
1. There's a
65k row limit. You wouldn't want to go much bigger since everything is running in memory. This will slow down.
1a. Unless you want to cycle or delete logged data, this means that you have to
separate files. Besides the obvious point of not being able to query a spreadsheet, data mining is nearly impossible with a bunch of separate text files.
2.
Excel must be running and probably running a Macro. That means that a user must be logged into Windows (can be auto), Excel must be running, and the process started. Very clunky compared to a Windows service.
3.
Maintenance sucks. Large changing text files are very prone to file corruption. Tracking, backing up, and maintaining lots of large text files doesn't work well.
4.
Concurrent access doesn't work well. File locks prevent writes - reads for files that aren't being modified are OK.
5. Concurrent updates are nasty. Best case scenario (in terms of confliction/traffic) each user has their own separate copy of the spreadsheet running. Now each user is
slamming the PLC with the same DDE requests.
As you suggested SQL Server is a much better idea. Any SQL database is designed to support:
1.
concurrent traffic
2.
large amounts of data
3.
queries against all the data - this leads into dynamic reporting and graphing.
4.
managability in terms of backups and maintenance
In fact, you'll probably want to use Excel as a tool to work on snapshots of the data from the SQL database. It's worth mentioning that the "Enterprise" (expensive) or "Historian" (meant for datalogging) versions of all the major vendors use SQL Databases - many favor SQL Server because they're in bed with MS in some way that will be reflected in the price tag.
Vendors "distributed" package aim to provide concurrent users access to data. Key points here are:
1.
Centralized communication - you don't want each client to communicate with devices directly. This doesn't scale - PLCs can't handle that.
2.
Centralized project configuration - you want to be able to change your project, what you're logging, etc in one place and have that reflect itself on all clients. The better packages automatically push software version upgrades to clients.
3.
Ease of client installation and configuration. An "install-less" web page would be the easiest, the most complicated would require a program install that had clunky server/PLC configuration, project configuration, etc. Obviously, the whole spectrum exists here.
Will a program written in Visual Basic do this? It could do it perfectly or not at all - that depends on how you write the program. Writing a solid distributed app from scratch is challenging and time consuming at best - that's an understatement! There are standard technologies to be leveraged.
For example, "
Internet" technologies, I use the term loosely, were designed to be lightweight and allow concurrent access. This can include: server side scripting web pages (ASP, PHP, Cold Fusion, Perl, Java Servlets, etc), client side web apps (Java, Flash, ActiveX, etc), or whatever you want. The bottom line is that they work over TCP/IP, typically Ethernet, use standard protocols (particularly for security), and utilize SQL databases. They should also utilize "modern" techniques and standards - XML, web services, SSL, be "firewall friendly" (work over a small definable port range), etc.
Internet technologies are really the pinnacle of lightweight distributed applications. The more you deviate from this model (particularly in a custom code approach), the more you'll be "re-writing the wheel"
insert shameless, but highly relevant advertising...
Inductive Automation specializes in this sort of thing. I'd request a live
web demo for more info.
FactorySQL would be used for datalogging to any SQL database,
FactoryPMI is a Java web based HMI client. You also can launch an
online example.
Kyle Grathwol said:
I have successfully created a DDE project that will dump live data into an Excel spreadsheet. Is there a way for multiple people on the LAN to view the document with live data coming in? Will a program written for SQL Server or Visual Basic do this?
Thanks for your time.