Interesting, I did this and yes, code just kicks thing off, you have to wait for scope to complete:
print("Pre Armed => State: "+Scope.State.text+" Running: "+Scope.State.running()); // Done, false
Scope.single();
print("Post Armed => State: "+Scope.State.text+" Running: "+Scope.State.running()); // Config, true
Wavegen.Channel1.run();
print("Post Wavegen T1 => State: "+Scope.State.text+" Running: "+Scope.State.running()); // Config, true
while (Scope.State.running() == true) {
wait(0.1)
}
print("Post Wavegen T2 => State: "+Scope.State.text+" Running: "+Scope.State.running()); // Done, false
var ptp = Scope.Filter1.measure("Peak2Peak");
print("Post measure => State: "+Scope.State.text+" Running: "+Scope.State.running()); // Done, false
Does this makes sense?