FAQs from Rohde & Schwarz

Remote Control: How to read out the Frequencies of a Transducer Set.

Question

No matter which set I select - with the following script, I always get the readout of the set I manually edited. TRANSDUCER:SET 1 TRANSDUCER:SET:RANGES:SELECT 1 TRANSDUCER:SET:RANGES:START? The return value should be the Start value of Range 1 of Set 1, but when I edit Set 2 I get the Start value of Range 1 of Set 2.

Answer

Selecting a range opens the edit mode of the transducer, which produces

wrong values. You have to leave the edit mode with a save command.

Below you will find a program that shows how to read out the frequencies of a range:

Private Sub Connect_Click()

Rem Dimensions

Dim Buffer1 As String * 2000

Dim Buffer2 As String * 2000

Dim Handle As Integer

Me.MousePointer = vbHourglass: DoEvents 'change cursor to hourglass

Rem Select the receiver

ibdev 0, 18, 0, 12, 1, 0, Handle '<<<<<

Rem Select the transducer set 1

ibwrt Handle, "TRANSDUCER:SET 1" '<<<<<

Rem Select the range 1

ibwrt Handle, "TRANSDUCER:SET:RANGES:SELECT 1" '<<<<<

Rem By selecting a range you also select the edit mode,

Rem save the set to leave the edit mode

ibwrt Handle, "TRANSDUCER:SET:SAVE" '<<<<<

Rem read out the start frequency

ibwrt Handle, "TRANSDUCER:SET:RANGES:START?" '<<<<<

ibrd Handle, Buffer1 '<<<<<

Rem Select the transducer set 2

ibwrt Handle, "TRANSDUCER:SET 2" '<<<<<

Rem Select the range 1

ibwrt Handle, "TRANSDUCER:SET:RANGES:SELECT 1" '<<<<<

Rem By selecting a range you also select the edit mode,

Rem save the set to leave the edit mode

ibwrt Handle, "TRANSDUCER:SET:SAVE" '<<<<<

Rem read out the start frequency

ibwrt Handle, "TRANSDUCER:SET:RANGES:START?" '<<<<<

ibrd Handle, Buffer2 '<<<<<

'XXXXXXXXXXXXXXXXXXXXXX

ibloc Handle '<<<<<

InstAnswer0(0).Caption = Buffer1 'write the answer to the form

InstAnswer1(1).Caption = Buffer2 'write the answer to the form

Me.MousePointer = vbDefault: DoEvents 'change cursor to normal status

End Sub