You are not registered yet. Please click here to register!

plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!

Go Back - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Thread Tools Display Modes
Old April 28th, 2005, 06:51 AM   #1

AJZ is offline
Join Date: Jul 2003
Location: Ontario
Posts: 261
PLC to Excel communications

I am working on the following test system:
Barcode reader connected to PLC reads label.
The PLC search for this number in Column A of an Excel file (Up to 2000 rows in Excel file)
PLC reads about 10 cells in the row with the matching number to set up system.
Test is performed.
PLC writes number read from label and one measured value to the next row in another Excel file.

I am planning on using either an AB Micrologix 1200 or Siemens S7-226 PLC. How difficult is it to do as mentioned above? Can a Excel VBA macro handle most of it or is extensive PLC logic required?


  Reply With Quote
Old April 28th, 2005, 09:41 AM   #2
United Kingdom

Andybr is offline
Join Date: Oct 2004
Posts: 588
I have often seen this type of thread on this forum and would say that it is perfectly feasible to do what you want using VBA (the ML1200 might be a problem as you would need to connect the BCR and the Excel PC to a single serial port). I would, however, question why so many people feel that they need to use Excel as a database in this kind of application. For a single stand alone system SQL Server is available as a free download (desktop edition) and provides a far more powerful and efficient means of storing data. I would use a DDE server (ie Linx) to get the data from the PLC and ADO to write it into the database. Excel could then be used as a simple front end for viewing the data. I would normally pass the data to the DB via a stored procedure which would query the list of codes and append the resulting data to the log. SQL Server seems to frighten many people but it is not really so difficult to get to grips with.
  Reply With Quote
Old April 28th, 2005, 10:12 AM   #3

AJZ is offline
Join Date: Jul 2003
Location: Ontario
Posts: 261
The ML1200 I am planning on using is a 1762-L40BXBR which supposedly has two communication ports. The reason I am planning on using Excel is that the customer already uses it to store all the information. Their current file has 1641 partnumbers and the file has over 70 columns
  Reply With Quote
Old April 28th, 2005, 10:32 AM   #4
Steve Etter
Lifetime Supporting Member + Moderator
United States

Steve Etter is offline
Steve Etter's Avatar
Join Date: Apr 2002
Location: Morristown, TN
Posts: 945
While I have absolutely no problem with the idea of using Excel directly as your storage medium, I do think Andybr's system is a little better, even for this application, if for only one reason.

By writing directly to the spreadsheet that the customer opens and uses, you run the very real risk of an accidental spreadsheet modification that would render your system inoperable. A hands-off system for storage would be much better. This way, the communications and data gathering would occur regardless of the end-user and the customer is only faced with retrieving the data from the SQL database.

Just my 2-cents.

  Reply With Quote
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Omron PLC and ethernetmodule question wwauters LIVE PLC Questions And Answers 3 February 21st, 2005 11:35 PM
PLC communications cable wiley LIVE PLC Questions And Answers 3 February 19th, 2005 04:22 AM
Communications with TI565 plc andrewuk LIVE PLC Questions And Answers 3 August 9th, 2004 08:24 AM
Is a Patent on Excel to PLC comm possible??????????? Ctrayler LIVE PLC Questions And Answers 10 February 6th, 2004 03:53 AM
PLC data to excel eastkodakguy LIVE PLC Questions And Answers 5 January 6th, 2003 10:50 PM

All times are GMT -5. The time now is 08:31 AM.