How do I take a triggered scan programmatically?

It is possible to take triggered scans programmatically just like in the WaveAnalyzer software. This is achieved by exposing the trigger column on calls to the data command:

http://<​ip>/wanl/data/text?triggerin=on

By including triggerin=on, the returned data will feature an additional column. The trigger-in column consists of either a zero or a one corresponding to the state of the trigger-in signal at each section of the scan. It then can be used to mark or highlight time-critical measurement regions. See the following excerpt of scan data:

...
192617870	-62334	-67544	-63224	0
192617970	-60288	-62480	-62934	1
192618070	-61834	-64770	-63806	1
192618170	-61462	-64616	-63270	1
192618270	-61272	-64454	-63064	1
192618370	-59372	-61554	-62036	0
192618470	-64762	-66152	-68622	0
...

The fifth and final column contains the trigger-in signal. It shows that the trigger-in port measured a high signal while the WaveAnalyzer scanned over frequencies 192.617970 THz to 192.618270 THz, but a trigger-low signal at other frequencies.

By tracking the trigger-in column over consecutive scans, it is possible to progressively build up a scan containing measurement data that was taken only when the trigger-in signal was high (or low).

The following flowchart details a helpful guide to taking triggered scans:

Triggered Measurement Algorithm
Triggered Scan Algorithm

 

Please rate this article