Anritsu operation manual Register zation, It is the ML2430A, read back value

Models: ML2430A

1 271
Download 271 pages 6.82 Kb
Page 217
Image 217

PROGRAMMING EXAMPLES

GPIB OPERATION

Status This function demonstrates how to use the Status Registers to provide synchroni-

Register zation.

Control Uses the TR2 (trigger with settling) command to make a reading.

Function GetTR2Reading (channel) As Single

make space for the result Dim result As String result = String$(10, 0)

Send Status Register setup command + TR0 hold trigger mode

Call DLLsend(0, 13, “*SRE 16; TR2 1", 14, NLend, ibsta%, iberr%, ibcntl&)

Set loop flag Value = -256

Do

Loop until SRQ is asserted. Do

Call DLLTestSRQ(0, SRQ%, ibsta%, iberr%, ibcntl&) Loop Until SRQ%=0

SRQ asserted, read the ML2430As status register

Call DLLReadStatusByte(0, 13, status_byte%, ibsta%, iberr%, ibcntl&)

Check if it is the ML2430A which is requesting

service (SRQ bit + MAV bit)

If (status_byte% And 80) = 80 Then

'It is the ML2430A, read back value

Call DLLreceive(0, 13, result, 10, STOPend, ibsta%, iberr%, ibcntl&)

Value = Val(result)

End If

Loop Until Value <> -256

GetTR2Reading = Value

End Function

6-130

ML2430A OM

 

 

Page 217
Image 217
Anritsu operation manual Register zation, It is the ML2430A, read back value