Instructions
Strona 659 z 659
Dystrybucja Conrad Electronic Sp. z o.o., ul. Kniaźnina 12, 31-637 Kraków, Polska
Copyright © Conrad Electronic 2012, Kopiowanie, rozpowszechnianie, zmiany bez zgody zabronione.
www.conrad.pl
www.conrad.pl
$("#CursorX2").css("display", s=="1" && bShowX ? "" : "none" );
$("#CursorY1").css("display", s=="1" && bShowY ? "" : "none" );
$("#CursorY2").css("display", s=="1" && bShowY ? "" : "none" );
$("#CursorX1").text( "x1: " + results[2] );
$("#CursorX2").text( "x2: " + results[3] );
var y1 = (bTrac ? results[6] : results[4]);
var y2 = (bTrac ? results[7] : results[5]);
$("#CursorY1").text( "y1: " + y1 );
$("#CursorY2").text( "y2: " + y2 );
// Set checkbox state
$("#CursorStateButton").prop("checked",s == "1" );
updateCanvas(parseFloat(+y1),parseFloat(+y2));
setTimeout( "doUpdate()", 0); // Prepare for next update
} );
}
$(document).ready(function() {
var initCmd =
"*RST;" +
":CURS:FUNC TRAC;" +
":CURS:STAT ON;"+
":TRIG:MODE SING;"
;
scpi.init( initCmd, doUpdate ); // when initCmd is complete start updates
$("#CursorStateButton").click(function(){
var state = $("#CursorStateButton").prop("checked");
var param = state ? "1" : "0";
var serialData = "CURS:STAT " + param;
scpi.post( serialData, function(){} );
bInit = true;
});
});
</script>
</body>
</html>