Website Data Logging to PLC

AutoNub

Member
Join Date
Oct 2011
Location
USA
Posts
11
Hello Everyone,

I have a project some of you might find interesting and I could use some assistance. In a nutshell, I'm attempting to figure out a way to use my Schneider XBTGC2230T to retrieve data from a website using an Ethernet (RJ45)connection.

The PLC needs to communicate with a microcontroller containing proprietary software, which means I don't have access to the actual program on the microcontroller (32-bit pic chip). I don't believe there's any way to retrieve the raw program from the chip. However, one of the microcontroller's program functions is to stream information to a website page hosted by microcontroller. Fortunately, this information being streamed is everything I need to know in my PLC program. So I'm thinking there must be a way to use some sort of data logger to retrieve the details from the website hosted by the microcontroller and use that information in my PLC logic.

Currently I am connecting my laptop to the microcontroller via ethernet, and I can type the IP address of the host microcontroller in a browser to load the HTML page which shows constantly updating data (streaming accomplished from javascript, css, and/or external DTD declaration). I'm not sure if this is helpful or not, but the information being sent can at least partially be acquired using WireShark to perform a live capture. This at the very least might help me to identify what specifically I need to look for when data logging.

Once I have the information I need in the PLC program, the intent is to then use this information to dictate discrete outputs (on or off), and also to relay this information via messages on the HMI screen (the HMI and PLC are a single unit in this case).

So the first goal will be to find a way of acquiring the desired information from the microcontroller. The last goal will be to somehow transfer this information to the PLC so it can be used in ladder logic.

I have never used anything but ladder logic in PLC programming, so these tasks are new to me. Any assistance anyone can provide would be greatly appreciated.

Sincerest Thanks.
 
Auto,
I have done something similar. In my situation I needed to allow a group of (non-technical) people to control some lighting loads at various geographic locations when they are not at the location.
The lighting relays are controlled by a Schneider Twido PLC.
The process goes something like this:

1.) The user sends a normal text message from their smartphone to an email address. The text message follows a very specific format which is (command [On|Off]) @ (location). The actual text you would see in the message is something like " On @ Plant3 "
2.) My web server checks the mailbox once per minute. If there is a message in the inbox, the web server downloads it and parses the text.
3.) Delete the email in the inbox
4.) Take the parsed text and match it to a database that lists the location and the Red Lion data tag.
5.) Using an HTTP POST function in my web programming language (ColdFusion in my case) I send the On/Off command to the Red Lions web interface.
6.) The Red Lion changes the bit value on the Twido via the network device block function
7.) Lights come on

I know there is probably a more elegant and simple way to accomplish this but it works for me.

Hope this helps.
 
I've never used a data acquisition device before. Thank you for the idea. I sent an email to Red Lion and one of their local distributors with more questions.

I was hoping to avoid having to add another part to the parts list but it doesn't appear data acquisition from a website is possible using only the PLC.

Too bad they don't have this built in capability on PLCs already, with a unique ladder logic function where you could simply enter the URL or IP address, the start keyword or code (to identify what to search for and when to begin data acquisition), and the number of characters to acquire before transferring. I'll bet it could be done if the demand were there to warrant it.
 
There is something else I didn't mention before. The program on the microcontroller is also written to submit a .csv file to USB periodically, with all the information I require for my PLC logic. This .csv file should be viewable using Microsoft Excel, but I'm not sure if PLCs can use .csv files.
 
It would be a bit convoluted but you could potentially use a DDE connection from Excel to populate data from the CSV files in the PLC.

You might need to set up an OPC server in between to get any protocol conversions that the PLC requires but that would be one way to do it.

The Red Lion route would also work. I have used their Data Station Plus units before with great success although they were set up as a data collection point that sent CSV files that I imported into SQL server to build an ad-hoc historian instead of being used as an intermediary device.
 
I took at look at the OPC server option and it appears too expensive. I saw one quote of $800.00 just for the software. That doesn't even take into account the workstation or other device we'd need to install the OPC software on. Thanks for the idea though.

On a side note, this microcontroller's pic has a username and password. What is the username and password likely used for? Is it just to enable rewriting? Would having the username and password allow you to see the code on it? I've never used a login on a pic chip before so I'm not sure it would be worth my time trying to crack it.
 
Last edited:

Similar Topics

Wondering if there is a way to parse data from an embedded website on a controller (Quincy Air Compressor) to the PLC to display as status and/or...
Replies
5
Views
2,103
Hello, Is there any easy way of displaying data available on a SCADA system on a website. I would like to build an actual webpage rather than...
Replies
6
Views
3,923
Is the Rockwell website down as I cannot connect to ab.com or rockwellautomation.com they both give me a gateway timeout message.
Replies
17
Views
4,081
Some time back Citect users were discussing how bad the Aveva website is to navigate compared to the old Schneider one. if i remember correctly...
Replies
4
Views
2,318
a long time ago somewhere on here, i saw a post about how you can control your plc over the internet. i looked through it and someone posted a...
Replies
2
Views
2,110
Back
Top Bottom