Suggested by emoned on the EEVblog forum. Thank you!
| Follow | An external sweep followed point by point |
| Measured | 40 of 40 points, 0.09 dB and 0.12 degree from flat |
| LAN | A network generator as the sweep's |
| Script | Any generator, one point at a time |
| SCPI |
The Bode window's Gen button offers Follow. Set the generator to a sine sweep and the window to the same Start, Stop, Log or Linear and sweep time, and Run. The scope waits for the generator's start (the first capture near the start frequency; Start on Run starts at once), reads the frequency In carries in every capture, measures Out against In there and places it on the sweep's grid by that frequency, averaging what falls in one point. It re-picks the time base as the frequency moves, and ends at the stop, when the generator starts over, or at the sweep time plus a margin. The window says the least sweep time the range and points need: at 10 points a decade, 5 s a decade from 100 Hz, 0.5 s from 1 kHz, 0.4 s from 10 kHz up (50 s from 10 Hz, where one capture alone takes 2.5 s).
G1 swept by itself from 1 kHz to 1 MHz in 20 s (a Linear sweep: frequency modulation with an up-ramp, starting over at once) into CH2 and CH3 through a tee, a flat path. Followed from a PC over SCPI with the same code, started 8 s into a sweep: it ignored the mid-sweep captures, caught the start when the generator started over 12 s later (at 5.2 kHz, the first capture after it), read all 40 points from 861 captures and ended at the stop: worst 0.09 dB and 0.12 degree from flat. Our test suite repeats it on the scope (0.088 dB, 0.121 degree).
Choose LAN, the maker and the generator's address (typed on a keypad on the window). The sweep connects, reads the generator's identity, sets channel 1 a sine and its output on, steps it point by point with each maker's own commands (Rigol's port 5555, Siglent's and Keysight's 5025) with the same settle and averaging as the built-in generator, and switches the output off at the end.
Choose Script and Run: at each point the sweep waits for a script to set the generator to the frequency it asks for and say Ready, then settles, measures and asks for the next. :NOVAos:BODeplot:SCRipt:STATe? answers IDLE, WAIT, MEAS or DONE, :SCRipt:FREQuency? and :SCRipt:AMPLitude? the point wanted, :SCRipt:POINt? which point of how many, and :NOVAos:BODeplot:SCRipt:READy says the generator is there. A wait longer than :SCRipt:TIMeout (60 s by default) stops the sweep and says so; the window shows the frequency waited for and the time left. The example below runs on any PC with Python (docs/BODE_EXTERNAL.md).
:NOVAos:BODeplot:GENerator INTernal|FOLLow|LAN|SCRipt chooses the generator; :NOVAos:BODeplot:SWEeptime and :NOVAos:BODeplot:FOLLow:STARt SIGNal|MANual set the followed sweep, :NOVAos:BODeplot:LAN:ADDRess and :NOVAos:BODeplot:LAN:MAKer RIGol|SIGLent|KEYSight the network generator; :BODeplot:RUNStop 1 runs any of them, and every setting is kept across power cycles.
The frequency each capture carries, Out against In there, the sweep's grid, its start and its end, tested on a synthetic 100 Hz .. 100 kHz sweep through an RC low pass (within 0.5 dB and 3 degrees at every point), sweeps armed mid-way, restarts and points out of order.
mho-1 (MHO934), its G1 sweeping by itself through a tee: start caught, 40 of 40 points, 0.09 dB and 0.12 degree from flat; the captures replayed through the scope's own code in a test.
The three makers' commands sent to a stand-in generator in a test, and a whole scripted sweep run from a client over SCPI.
Follow, LAN and Script run on our DHO924S and MHO934 from their screens, with a release.
A Rigol DG or Siglent SDG on our bench for the LAN mode.
Once the DHO install is out, run Follow with your generator's sweep and tell us how it catches the start.
Bode on a scope without a generator (a DHO804): the external generator sweeps by itself, the scope is set to the same sweep and catches its start; A scripted sweep: the scope says which frequency it wants next and measures once told the generator is there.
Could you implement a Bode plot function using an external generator? You would set the minimum and maximum frequencies and the sweep time in scope. The user would configure the same values on their external generator, and the oscilloscope would detect the start signal from the generator. There are several ways to handle this detection, so it might be a matter of testing to see which method works best.
some way to control the function externally (e.g. read the next requested step frequency from the scope, and some way of triggering it once the previous one is done and the sig-gen is adjusted) would allow for a simple script to be run on an external device to control any generator.
Try it and tell us what to change: reply on NovaOS's thread on the EEVblog forum.