YOKOGAWA TA220 User Manual page 136

Digital jitter meter
Table of Contents

Advertisement

10.4 Sample Program
10-46
If (sts < 0) Then
Call DisplayError(sts, msg)
GetStatistics = 1
Exit Function
End If
sts = TmReceive(Dev, qry, 100, length)
If (sts < 0) Then
Call DisplayError(sts, msg)
GetStatistics = 1
Exit Function
End If
temp = Left$(qry, length - 1)
sts = val(temp) And 1
If sts = 1 Then
Exit Do
End If
If count > 100 Then
msg = ":STOP" + term
sts = TmSend(Dev, msg)
If (sts < 0) Then
Call DisplayError(sts, msg)
GetStatistics = 1
Exit Function
End If
Exit Do
End If
count = count + 1
Sleep 100
Loop
msg = ":CALC:AVER?" + term
sts = TmSend(Dev, msg)
If (sts < 0) Then
Call DisplayError(sts, msg)
GetStatistics = 1
Exit Function
End If
sts = TmReceive(Dev, qry, 100, length)
If (sts < 0) Then
Call DisplayError(sts, msg)
GetStatistics = 1
Exit Function
End If
temp = Left$(qry, length - 1)
i = 0
Query(i) = msg + Space$(13 - Len(temp)) + temp
msg = ":CALC:SDEV?" + term
sts = TmSend(Dev, msg)
If (sts < 0) Then
Call DisplayError(sts, msg)
GetStatistics = 1
Exit Function
End If
sts = TmReceive(Dev, qry, 100, length)
If (sts < 0) Then
Call DisplayError(sts, msg)
GetStatistics = 1
Exit Function
End If
temp = Left$(qry, length - 1)
i = i + 1
Query(i) = msg + Space$(13 - Len(temp)) + temp
Call TmFinish(Dev)
Dev = -1
GetStatistics = 0
End Function
'Receive Query
'Stop
'Send Command
'Get Average value
'Send Command
'Receive Query
'Get Standard Deviation value
'Send Command
'Receive Query
IM 704610-01E

Advertisement

Table of Contents
loading

Table of Contents