We're programming the E4440A remotely via a C++ device handler. One of the requirements is to provide an estimated time to complete a measurement, then time out if that is exceeded. Our setups can vary most parameters, including resolution BW, video BW, center frequency, span, sweep time, detectors, and number of sweeps. I haven't really found a good source of information for doing this. Any thoughts on how to approach this? I want to come up with defensible values that won't cause erroneous error indications.
Brian
Brian
This is an age-old issue: figuring out how long to set a timeout for a measurement. The typical thing that customers do is to simply find the longest measurement and set their timeout to a little bit larger than that. However, this is not always the best thing to do, and there are other things you can do, too. Perhaps the longest measurement times are for various demodulation measurements that have averaging turned on. These can take more than a minute, and obviously, if you set a timeout of 5 or 30 seconds, your program will timeout before the measurement is complete. For these measurements, there is no rule of thumb for how long they will take, except that the measurement will take x times as long for x averages. Rather than setting a two minute timeout, you can maintain a smaller timeout but instead of holding up the control bus waiting for the results to come back from the analyzer, you can poll the message available status bit every 10 ms or so to determine when the measurement is complete and the results are ready, and then you can read back the results. In the SA application, there are general rules. For example: decreasing the RBW will increase the sweep time by the square of the ratio of RBWs. However, since the analyzer can change its autocoupling between FFT and swept or can change its phase noise optimization to sweep faster over larger spans or can take longer to sweep in high band, you can overlook a parameter that can affect how long a sweep occurs. You need to simply setup the measurement and time it to determine how long it will take. The place where customers run into trouble is when a measurement takes much longer than expected due to the auto alignments kicking in right before a measurement. In this case, we recommend turn the auto-alignment setting to alert (or for the X-Series choosing the “partial” setting for the alignments). Then, when it is convenient to query whether an alignment is needed (perhaps checking this every 10 minutes) and run the alignments if the analyzer indicates that they need to be run. This will keep the alignments for kicking off when you don’t expect them and causing you a timeout.
Regards -