Anritsu ML2430A Instrukcja Użytkownika Strona 215

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 271
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 214
6-16
PROGRAMMING
EXAMPLES
The following programming examples are provided as a general guideline on how
to program the ML2430A Series Power Meters using GPIB commands. All exam
-
ples are written in Visual Basic or C language. The GPIB-specific calls are for the
National Instruments GPIB DLL.
Refer to the IEEE 488.2-1987 Programming Reference book for more information
about how to use the 488.2 commands.
Output Data
Function GetReading (ByVal channel As Integer) As Single
'
make space for the result
Dim result As String
result = String$(10, 0)
'
Set the command up
Cmd = “O ” + Str(channel) : CmdLength = Len(Cmd)
'
Send the command to the device at address 13
'
(default address of the power meter)
Call DLLsend(0, 13, Cmd, CmdLength, NLend, ibsta%,
iberr%, ibcntl&)
'
Receive the data from ML2430A at address 13
Call DLLreceive(0, 13, result, 10, STOPend, ibsta%,
iberr%, ibcntl&)
'
Pass result back
GetReading = Val(result)
End Function
6-128 ML2430A OM
PROGRAMMING EXAMPLES GPIB OPERATION
Przeglądanie stron 214
1 2 ... 210 211 212 213 214 215 216 217 218 219 220 ... 270 271

Komentarze do niniejszej Instrukcji

Brak uwag