Manual

C
HAPTER
T
WO
:
Control by GPIB
WM-RCM-E Rev D ISSUED: February 2005
27
Timing and Synchronization
Depending on how your remote program is written, it may be affected by timing changes between different
DSO series, even between Waverunner DSOs and WavePro DSOs. In X-Stream DSOs, these effects may be
even more pronounced than in previous scopes, for several reasons. Firstly, X-Stream DSOs are faster than our
earlier scopes. Secondly, X-Stream DSOs support faster interfaces. That is, the standard network interface is
100Base-T instead of 10Base-T. Secondly, and more significantly, for the most part our earlier scope series
processed remote commands sequentially. That is, they would not start executing any command until execution
of the previous one had finished. This meant that many operations were automatically synchronous by default,
and remote control programs which did not use status bytes or *OPC?, may have worked "by luck." That is not
the case in X-Stream DSOs. Since they use multitasking , you must be much more diligent in programming.
Most timing and synchronization problems are related to changing acquisitions, or the completion of analysis
after an acquisition occurs. For example, if you change the offset of channel 1 while the scope is in Auto
trigger mode, and then you use the PAVA? query to read a parameter computed on channel 1, in the older
scopes, you would almost always get the results after the data has been acquired with the new offset. However,
in X-Stream DSOs, the processing is overlapped with the next acquisition and, as a consequence, the PAVA?
result may have come from the acquisition prior to the offset change.
There are several ways of ensuring that your program gives the correct results when controlling the scope
remotely. To simplify the synchronization issue, in most cases you can put the scope into single trigger mode.
Then you can use either the status registers available in the scope, or the *OPC? query and the WAIT
command to detect completion when the acquisition and any processing are done.
Note that when you arm the scope by sending the TRMD SINGLE command, the scope will automatically
perform any necessary calibrations before actually starting to acquire data. These calibrations may take several
seconds, so if you query the status immediately after sending TRMD SINGLE, you need to have the GPIB (or
remote) timeout set to be at least 10 seconds to prevent a timeout before getting the correct results.
Calibrations are performed if your program changes some control settings (e.g., volts/div, number of active
channels, etc.) or if the temperature of the scope has changed significantly. You can disable the calibrations by
sending the AUTO_CALIBRATE OFF command. However, the scope performance may be degraded if the
temperature changes and it does not get a chance to self calibrate. A calibration of the X-Stream DSO can be
"forced" by issuing a *CAL? command. This technique allows you to control the timing of calibrations so that
they will not interfere with the acquisition of important data.
One case when you may need to use "normal" or "auto" trigger mode is the accumulation of many acquisitions
for functions such as averaging or histogramming. In this case, it is best to stop the acquisitions, set up the
scope, and then set the trigger mode to NORMAL to acquire the data. (A possible alternative is to use
sequence mode. It is faster, but does require that you know how many acquisitions to accumulate. That number
can be specified and captured in sequence mode).