0

I'm searching for a way to make a graph on a user web page on a plc with data from the plc (datablocks or log files). The log files can be converted to CSV files.

I get data per our and day from the plc and want to put this into a dynamic chart.

What I want is that when there is new data from the plc, the graph should automatically change.

The plc is a siemens S7-1200.

ZF007
  • 3,708
  • 8
  • 29
  • 48

4 Answers4

2

You said that you want to "make a graph on a user web page on a plc with data from the plc ". Is this the same PLC, or did you mean a PC (Personal computer)?

You also said you are already getting the data from the PLC. How are you storing it, and are you storing it on your webserver?

You also said that you want to 'make a graph on a user web page on a plc with data from the plc '. Is this the same PLC, or did you mean a PC (Personal computer)?

For example, you could be storing the data in some form of SQL server. You would then need to program a dynamic web page that regenerates using whatever server side programming tool you like. This could be ASP and MS-SQL, PHP and MY-SQL, whatever tools you have available.

Bill J.
  • 163
  • 8
  • i meant the same plc ;) and the data is stored on the plc but i don't know how – user3032631 Mar 13 '15 at 00:32
  • It sounds like you have a Human Machine interface (HMI), as a S7 does not have an integral display that I am aware of. You would have to have the HMI software to build and display the graph. Do you know what brand HMI you have? – Bill J. Jun 10 '15 at 12:42
1

did you look on this article? https://www.dmcinfo.com/latest-thinking/blog/id/8567/siemens-s7-1200-web-server-tutorial--from-getting-started-to-html5-user-defined-pages.

You should use a javaScript or JQuery library.. If you have some questions about PLC of Simatic S7-1200 u can contact me.

<div id="g1"></div>
<div id="g2"></div>

<script type="text/javascript">
$(document).ready(function(){
    var g1, g2;
    var g1 = new JustGage({
      id: "g1",
      value: getRandomInt(-100, 100),
      min: -100,
      max: 100,
      title: "Triangle Wave",
      label: "Value"
    });

    var g2 = new JustGage({
      id: "g2",
      value: getRandomInt(0, 100),
      min: 0,
      max: 100,
      title: "random data",
      label: ""
    });

    $.ajaxSetup({ cache: false });
        setInterval(function() {
            g2.refresh(getRandomInt(50, 100));
            $.get("IOtriangleWave.htm", function(result){
                g1.refresh(parseInt(result));
                g2.refresh(getRandomInt(50, 100));
            });
        },1500);
});
</script>
Peter
  • 21
  • 2
  • please post an answer, then reference. – Sachith Muhandiram Jan 03 '17 at 23:59
  • 1
    The asnwer is in that upper link .. there is a whole tutorial how to make a graph with jQuery library with code .. You can make interval loading with Ajax and jQuery nad you can use internal function block for logging CSV data. – Peter Jan 04 '17 at 11:51
  • yes, when you post again.use this format.so user doesn't need to go to link and check, answer is here for more details can use the reference. – Sachith Muhandiram Jan 04 '17 at 12:59
0

What about using 1200 logging in csv? Then take it from plc with webserver and open with excel.

Oskar Groth
  • 28
  • 2
  • 5
0

You can try the amChart Libraries. They provide both a free (with some ads) and a paid (adfree) version of Javascript dynamic charts. The data to fill in the charts can be provided via CSV from the same S7-1200 PLC where you are storing your data.

There's a Siemens forum entry covering this issue with an example: https://support.industry.siemens.com/tf/ww/en/posts/charts-from-datalog-files-directly-used-in-webserver/83762/?page=0&pageSize=10#pagetop