Agilent Technologies 86100-90086 Sprinkler User Manual


 
3-5
Common Commands
*LRN? (Learn)
*LRN? (Learn)
Query *LRN?
The *LRN? query returns a string that contains the analyzer's current setup. The analyzer's
setup can be stored and sent back to the analyzer at a later time. This setup string should be
sent to the analyzer just as it is. It works because of its embedded ":SYStem:SETup" header.
The *LRN query always returns :SYSTem:SETup as a prefix to the setup block. The SYS-
Tem:HEADer command has no effect on this response.
Returned Format :SYSTem:SETup <setup><NL>
<setup> This is a definite length arbitrary block response specifying the current analyzer setup. The
block size is subject to change with different firmware revisions.
Example This example sets the scope’s address and asks for the learn string, then determines the
string length according to the IEEE 488.2 block specification. It then reads the string and the
last EOF character.
10 ! Set up the scope’s address and
20 ! ask for the learn string...
30 ASSIGN @Scope TO 707
40 OUTPUT @Scope:"*LRN?"
50 !
60 ! Search for the # sign.
70 !
80 Find_pound_sign: !
90 ENTER @Scope USING "#,A";Thischar$
100 IF Thischar$<>"#" THEN Find_pound_sign
110 !
120 ! Determine the string length according
130 ! to the IEEE 488.2 # block spec.
140 ! Read the string then the last EOF char.
150 !
160 ENTER @Scope USING "#,D";Digit_count
170 ENTER @Scope USING "#,"&VAL$(Digit_count)&"D";Stringlength
180 ALLOCATE Learn_string$[Stringlength+1]
190 ENTER @Scope USING "-K";Learn_string$
200 OUTPUT 707;":syst:err?"
210 ENTER 707;Errornum
220 PRINT "Error Status=";Errornum
See Also SYSTem:SETup command and query. When HEADers and LONGform are ON, the SYS-
Tem:SETup command performs the same function as the *LRN query. Otherwise, *LRN and
SETup are not interchangeable.
*OPC (Operation Complete)
Command *OPC
The *OPC command sets the operation complete bit in the Standard Event Status Register
when all pending device operations have finished.