0

I working with siemens s7-1200 web server. I'm trying to read data from 1200 so i made jsnop file and place it on 1200, and on my pc i made a web page to read that file. I've tested the code on web server on my virtual machine and it worked just fine. When i try to do the same on 1200 web server i get "GET" error.

My json file:

    callback(
     {'poz1': ':="DB_timerji".DU_stroj_sum:', 
     'poz2': ':="DB_timerji".DU_stroj_servis:', 
     'poz3': ':="DB_recept_1".R1_S1_blast_3:', 
     'poz4': ':="DB_recept_1".R1_S1_blast_4:'}
      );

and my html:

    <body>
    <p id="p1"></p>

    <p id="p2"></p>

    <p id="p3"></p>

    <p id="p4"></p>
    <script>
        function callback(json){
       document.getElementById("p1").innerHTML = json.poz1;
       document.getElementById("p2").innerHTML = json.poz2;
       document.getElementById("p3").innerHTML = json.poz3;
       document.getElementById("p4").innerHTML = json.poz4;
    }

    </script> 
    <script type="text/javascript" src="http://192.168.10.39/test.json"> </script>


    </body>

the ip is correct. Like i said this worked fine when i placed json file on my virtual machine web server and read it on friends pc.

ZF007
  • 3,708
  • 8
  • 29
  • 48
ledenko
  • 1
  • 2

1 Answers1

0

You have to add the ".json" extension to the "Files with dynamic content" in the advanced configuration settings of the user defined web-pages.