18.12.2012 Views

R&S FSQ Signal Analyzer - Rohde & Schwarz

R&S FSQ Signal Analyzer - Rohde & Schwarz

R&S FSQ Signal Analyzer - Rohde & Schwarz

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

R&S <strong>FSQ</strong> Remote Control – Programming Examples<br />

More Complex Programming Examples<br />

'--------- Definition of data points and threshold ---------xlimit$<br />

= "CALC:LIM5:CONT 120MHZ,126MHZ,127MHZ,128MHZ,129MHZ,130MHz,136MHz"<br />

status = viWrite(analyzer, xlimit$, 63, retCnt) 'Set values for x-axis<br />

status = viWrite(analyzer, "CALC:LIM5:UPP -70,-40,-40,-20,-40,-40,-70", 41,<br />

retCnt)<br />

'Set values for y-axis<br />

status = viWrite(analyzer, "CALC:LIM5:UPP:THR -75DBM", 24, retCnt)<br />

'Set y threshold (only possible for relative y-axis)<br />

'A margin or an x /y offset can be defined here.<br />

'--------- Activate and evaluate the limit line in screen A -status<br />

= viWrite(analyzer, "CALC1:LIM5:UPP:STAT ON", 22, retCnt)<br />

'Activate line 5 in screen A<br />

status = viWrite(analyzer, "CALC1:LIM5:STAT ON", 18, retCnt)<br />

'Activate limit check in screen A<br />

status = viWrite(analyzer, "INIT;*WAI", 9, retCnt)<br />

'Perform sweep with sync<br />

status = viWrite(analyzer, "CALC1:LIM5:FAIL?", 16, retCnt)<br />

'Query result of limit check<br />

status = viRead(analyzer, result$, 100, retCnt)<br />

'Result: 1 (= FAIL)<br />

'--------- Read out result ---------------------------------<br />

Print "Limit Result Line 5: "; result$<br />

'- Evaluate limit line in screen A by means of status register -<br />

status = viWrite(analyzer, "*CLS", 4, retCnt)<br />

'Reset status register<br />

'--------- Measure -----------------------------------------status<br />

= viWrite(analyzer, "INIT;*OPC?", 4, retCnt)<br />

'Perform sweep with sync<br />

status = viRead(analyzer, result$, 100, retCnt)<br />

'Wait for service request<br />

status = Val(result$)<br />

'--------- Read out result ----------------------------------<br />

IF (status% = 1) THEN<br />

status = viWrite(analyzer, "STAT:QUES:LIM1:COND?", 20, retCnt)<br />

'Read out STAT:QUES:LIMit register<br />

status = viRead(analyzer, result$, 100, retCnt)<br />

'Read out result<br />

IF ((Val(result$) And 16) 0) THEN<br />

Print "Limit5 failed"<br />

ELSE<br />

Print "Limit5 passed"<br />

END IF<br />

END IF<br />

END SUB<br />

REM ************************************************************************<br />

Operating Manual 1313.9681.12 - 01 7.13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!