opc da and write values to a xml file and read it from a webpage

420 Views Asked by At

Hi have a OPC Da server which is connected to a softcontroler. both the softcontroller and the OPC da server is created by the program compact control builder(PLC programming software). Now i want to access the variables via a webpage and in order to do this i have planned to write the current values of the OPC Da server to Xml file and then have a webpage that read this one. However i dont now how to write and keep updating the Xml file when the values changes in the OPC Da server. Anyone that has done anything like this before?

1

There are 1 best solutions below

0
On

I have done something similar. I used a third-party library called SLIK-DA to create an OPC client and read the OPC DA information. There are several commercially available ones, this is just the one I happened to use. As far as updating the XML file, there would be many ways to do it. The simplest would be to poll all the values at a fixed time interval with a timer or thread.