Instructions

Table Of Contents
User Scripting (R&S RTH-K38)
R&S
®
Scope Rider RTH
525User Manual 1326.1578.02 ─ 15
$("#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>
Demo App