Respuesta
Al seleccionar un rango, se abre el modo de edición del transductor y se generan
valores incorrectos. Tiene que salir del modo de edición con un comando de guardar.
A continuación se incluye un programa que muestra cómo se leen las frecuencias de un rango:
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