EasyManua.ls Logo

Anritsu ML2400A Series - 6-16 PROGRAMMING EXAMPLES

Anritsu ML2400A Series
275 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6-16 PROGRAMMING
EXAMPLES
The fol low ing pro gram ming ex am ples are pro vided as a gen eral guide line on
how to pro gram the ML2400A Se ries Power Me ters us ing GPIB com mands. All
ex am ples are writ ten in Vis ual Ba sic or C lan guage. The GPIB- specific calls
are for the Na tional In stru ments GPIB DLL.
Ref er to the IEEE 488.2-1987 Pro gram ming Ref er ence book for more in for ma -
tion about how to use the 488.2 com mands.
Ou tput Data
Func tion GetReading (ByVal chan nel As In te ger) As Sin gle
' make space for the re sult
Dim re sult As String
re sult = String$(10, 0)
' Set the com mand up
Cmd = “O ” + Str(chan nel) : CmdLength = Len(Cmd)
' Send the com mand to the de vice at ad dress 13
' (de fault ad dress of the power me ter)
Call DLLsend(0, 13, Cmd, CmdLength, NLend, ibsta%,
iberr%, ibcntl&)
' Re ceive the data from ML2400A at ad dress 13
Call DLLreceive(0, 13, re sult, 10, STOPend, ibsta%,
iberr%, ibcntl&)
' Pass re sult back
GetReading = Val(re sult)
End Func tion
ML2400A OM 6-131
GPIB OPERATION PROGRAMMING EXAMPLES

Table of Contents

Related product manuals