News:

  • October 14, 2025, 08:57:10 AM

Login with username, password and session length

Author Topic: Using external XML Data  (Read 4766 times)

dieseltwitch

  • Full Member
  • ***
  • Posts: 23
Using external XML Data
« on: June 15, 2009, 01:02:12 PM »
Is there any way to use externally supplied XML data to make changes in the program?

My problem is the program Im writing could be much simpler (and cheaper) if i could use weather data for the local area to drive the program. Im using it to control a solar thermal system and a snowmelt system. I have found a source of XML formated weather data to supply the needed data.... but here is a few questions I have....
-how do i get that information to the PLC or HMI (what ever way works the best)?
-how do i control a V#### with any of that data?
-has any one ever done any thing like this?

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Using external XML Data
« Reply #1 on: June 15, 2009, 02:57:26 PM »
You would have to write a program to interpret the XML data extracting that which is meaningful then communicate to the PLC appropriate rrgister values.

You could use Microsoft Visual Basic Express (free - actually from Microsoft) to read the data and interpret it. Then you need the MODBUS access. Since the protocol is public you could write your own. Or you could look for a free (possibly) or lo cost implementation for VB.

An output is a PLC's way of getting its inputs to change.

dieseltwitch

  • Full Member
  • ***
  • Posts: 23
Re: Using external XML Data
« Reply #2 on: June 16, 2009, 12:18:17 PM »
Could all that be done in the back ground of the HMI?
On the ADC Forum some one said i should look into a XML - Modbus Gateway device. I did and I think while it will help my application, it just adds the need more hardware.

My goal is to have the PLC/HMI retrieve the XML file on the internet on its own at set intervals. is this something the large C-more HMIs Can do? can i build the VB program and place it the back ground of the HMI or am I gona need to add another small computer. I still have some work to do to understand every thing the system is capable of.

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Using external XML Data
« Reply #3 on: June 16, 2009, 12:30:33 PM »
I'm not sure what the poster on the ADC forum was thinking. XML is a file/data format. MODBUS is a communication protocol. A gateway is a protocol-protocol convertor. You have XML data available at some weather site. But you have to retrieve that information via the Internet, interpret it, then send it to the PLC. I don't see how you can avoid have a PC somewhere. Maybe others will know more.
An output is a PLC's way of getting its inputs to change.

dieseltwitch

  • Full Member
  • ***
  • Posts: 23
Re: Using external XML Data
« Reply #4 on: June 16, 2009, 12:45:58 PM »
I was wondering the same thing! lol the only thing i could think of was that the Gateway would some how be able to retrieve an xml file from the internet and transport it to the plc via the modbus.

Can any thing run in the background of an HMI?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3761
    • Host Engineering
Re: Using external XML Data
« Reply #5 on: June 16, 2009, 01:52:08 PM »
If the HMI is a PC, definitely!  Not sure about c-more.  But this is definitely "roll your own".