Réponse
La sélection d'une plage a pour effet d'ouvrir le mode édition du transducteur, qui produit
de mauvaises valeurs. Vous devez quitter le mode édition au moyen d'une commande "save".
Vous trouverez ci-dessous un programme qui montre comment lire les fréquences d'une plage :
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