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> Instrument Functions<br />

' Set up connection to measuring instrument<br />

ud = RSDLLibfind("89.10.38.97", ibsta, iberr, ibcntl)<br />

If (ud < 0) Then<br />

Call MsgBox("Device with address 89.10.38.97 could" & _<br />

"not be found", vbExclamation)<br />

End<br />

End If<br />

' Determine maximum peak in the range 1-2MHZ<br />

Call RSDLLibwrt(ud, "*RST", ibsta, iberr, ibcntl)<br />

Call RSDLLibwrt(ud, "INIT:CONT OFF", ibsta, iberr, ibcntl)<br />

Call RSDLLibwrt(ud, "FREQ:START 1MHZ", ibsta, iberr, ibcntl)<br />

Call RSDLLibwrt(ud, "FREQ:STOP 2MHZ", ibsta, iberr, ibcntl)<br />

Call RSDLLibwrt(ud, "INIT:IMM;*WAI", ibsta, iberr, ibcntl)<br />

Call RSDLLibwrt(ud, "CALC:MARK:MAX;Y?", ibsta, iberr, ibcntl)<br />

Response = Space$(100)<br />

Call RSDLLibrd(ud, Response, ibsta, iberr, ibcntl)<br />

Response = RTrim(Response)<br />

' Cut off space<br />

' Insert value in current document (Winword)<br />

Selection.InsertBefore (Response)<br />

Selection.Collapse (wdCollapseEnd)<br />

' Terminate connection to measuring instrument<br />

Call RSDLLibonl(ud, 0, ibsta, iberr, ibcntl)<br />

End Sub<br />

4.11.2.3 C / C++<br />

RSIB Interface Functions<br />

The entry of the peak value in the Winword document can be replaced as follows for<br />

Excel:<br />

' Insert value in current document (Excel)<br />

ActiveCell.FormulaR1C1 = Response<br />

Programming tips<br />

Access to the functions of the RSIB32.DLL (Windows platforms)<br />

The functions of the RSIB32.DLL are declared in the header file RSIB.H. The DLL<br />

functions can be linked to a C/C++ program in different ways.<br />

• Enter one of the supplied import libraries (RSIB.LIB or RSIB32.LIB) into the<br />

linker options.<br />

• Load the library using the function LoadLibrary() during runtime and<br />

determine the function pointers of the DLL functions using GetProcAddress().<br />

Before the end of the program, the RSIB.DLL must be unloaded again using the<br />

function FreeLibrary().<br />

Operating Manual 1313.9681.12 - 01 4.269

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

Saved successfully!

Ooh no, something went wrong!