Thanks to visit codestin.com
Credit goes to github.com

Skip to content

get JSON #2

@rksaha333

Description

@rksaha333

I am working in a project of PLC programing with web interface. Idea is to control the production process through the web page .So i used couple of boolean input and output in my web page.I need to get the Analog sensor value from PLC to my web page ...I give thze following code in .Please give correction

<script type="text/javascript"> $(document).ready(function(){ $.ajax({ cache: false }); setInterval(function() { $.getJSON("IO_ims3_1.html", function(data) { if(data.sen5 >=0) { var output = document.getElementById("sensor5"); output.innerHTML = this.value; } else{document.getElementById("sensor5").style.backgroundColor = "black";} }); },1000); }); </script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions