Using Variables and Traces
Formatting
20 | ASSIGN @Sa TO 723 |
|
30 | ASSIGN @Sa_fast TO 723;FORMAT OFF | Assign fast I/O path to 723. |
40 | OUTPUT @Sa;"MDS W;" | Dene data size as one word. |
50 | OUTPUT @Sa;"TDF B;" | Activate binary data format. |
60 | OUTPUT @Sa;"TRA?;" | Return amplitude of all trace elements |
|
| in measurement units . |
70 | ENTER @Sa_fast USING "#,W";Z(*) | Load binary values into array Z. \#" |
|
| species that line execution is termi- |
nated when last ENTER item is termi- nated. \W" species that items loaded are words (two bytes).
To return trace data in
1 | OUTPUT | 723;"SNGLS;SP 1MHZ;CF 300MHZ;" | Activate | |||||||
|
|
|
| measurement range . | ||||||
5 | OUTPUT | 723;"TS;" |
| Sweep trace A. |
|
|
|
|
|
|
10 | INTEGER Pounda,Num_bytes | Declare integer | array. | |||||||
20 | ASSIGN | @Sa TO 723 |
|
|
|
|
|
|
| |
30 | ASSIGN @Sa_fast TO 723;FORMAT OFF | Assign fast I/O path to 723. | ||||||||
40 | OUTPUT | @Sa;"MDS | W;" | Dene data size as one word. | ||||||
50 | OUTPUT | @Sa;"TDF | A;" | Activate absolute | ||||||
60 | OUTPUT | @Sa;"TRA?;" | Return amplitude of all trace elements. | |||||||
70 | ENTER @Sa_fast;Pounda,Num_bytes | Assign #A to Pounda. Assign length, | ||||||||
|
|
|
| that is, the number of bytes re- | ||||||
|
|
|
| turned to computer, to Num |
| bytes . | ||||
|
|
|
| (Temporary variables.) | ||||||
80 | ALLOCATE INTEGER A(1:Num_bytes/2) | Declare array with length of Num |
| bytes/2. | ||||||
90 | ENTER @Sa_fast; | A(*) | Store contents of trace A in an | |||||||
|
|
|
| integer array . |
|
|
|
|
|
|
100 OUTPUT | @Sa;"TRDSP TRA,OFF;" | Stop display of trace A. | ||||||||
110 OUTPUT @Sa;"TRC"; | This line and the next line store | |||||||||
|
|
|
| the contents of the integer array in | ||||||
|
|
|
| trace C. The semicolon is required | ||||||
|
|
|
| to suppress | ||||||
|
|
|
| so that the | ||||||
|
|
|
| is not terminated prematurely . | ||||||
120 OUTPUT | @Sa_fast;Pounda;Num_bytes;A(*) | Send #A and length to OSA, fol- | ||||||||
|
|
|
| lowed by contents of integer array. | ||||||
|
|
|
| As required by the | ||||||
|
|
|
| syntax, the @Sa |
| fast format removes | ||||
|
|
|
| commas that separate the numbers | ||||||
|
|
|
| inside the integer array . | ||||||
130 OUTPUT 723;"VIEW TRC;" | View trace C. |
|
|
|
|
|
|