digiBASE
®
PMT Base with Integrated Bias Supply, Preamplifier and Digital Multichannel Analyzer
931003E / 0620
For i = 1 To lstMCBs.ListCount
If lstMCBs.Selected(i - 1) Then
uConn21(i - 1).Comm “START”
End If
Next i
‘
‘ Loop Collecting data
‘
bStop = False
Dim oldtime
oldtime = Timer
While Not bStop
For i = 1 To lstMCBs.ListCount
If lstMCBs.Selected(i - 1) Then
lData = uConn21(i - 1).GetRawData(0, 16384)
ReDim Preserve lData(lData(0) \ 4) As Long
Put #1, , lData
TotalCounts(i - 1) = TotalCounts(i - 1) + lData(0) \ 4
End If
Next i
DoEvents
If Timer - oldtime > 3 Then
For i = 1 To lstMCBs.ListCount
If lstMCBs.Selected(i - 1) Then
rtbStatus.SelText = “MCB “ & i & “ Total Conversions=” & TotalCounts(i - 1) &
Chr$(10)
End If
Next
oldtime = Timer
End If
If oldtime > Timer Then oldtime = Timer
Wend
StopTime = Time()
rtbStatus.SelText = “Started: “ & StartTime
rtbStatus.SelText = “ Finished:” & StopTime
Dim Elapsed
Elapsed = (StopTime - StartTime) * 3600 * 24
rtbStatus.SelText = “ Elapsed=” & Format$(Elapsed, “0s”) & Chr$(10)
For i = 1 To lstMCBs.ListCount
If lstMCBs.Selected(i - 1) Then
rtbStatus.SelText = “MCB “ & i & “ Got “ & TotalCounts(i - 1) & “ Conversions = “ &
Format$(TotalCounts(i - 1) / Elapsed, “0.0") & “ cps” & Chr$(10)
RestoreMCB i - 1
End If
Next i
Close #1
End Sub
50
Summary of Contents for ORTEC digiBASE
Page 6: ...vi...