w w w . u q d e v i c e s . c o m
L o g i c 1 6 U s e r M a n u a l
| 54
'count events for 1 sec:
'take a first snapshot of counters
mylogic.ReadLogic()
'delay thread for about 1sec
Threading.Thread.Sleep(1000)
'take second snapshot of counters
mylogic.ReadLogic()
'how long was the true measurement time between the two
ReadLogic comands? Given in multiples of 5ns,
therfore we multiply by this unit to obtain sec
TimerCounter = mylogic.GetTimeCounter() * 0.000000005
'retrive observed counts for singles 1,2 and
coincidences 12
singles1 = mylogic.CalcCountPos(1)
singles2 = mylogic.CalcCountPos(2)
coincidences = mylogic.CalcCountPos(3)
'show data
MsgBox("Measurment Time: " & vbTab & vbTab &
TimerCounter.ToString("F4") & " s" & vbCrLf & _
"Singles Channel 1:" & vbTab & vbTab &
Singles1.ToString & vbCrLf & _
"Singles Channel 2:" & vbTab & vbTab &
Singles2.ToString & vbCrLf & _
"Coincidences Chs 1&2: " & vbTab & Coincidences.ToString)
Close()
End Sub
Private Sub Form1_FormClosing(sender As Object, e As
FormClosingEventArgs) Handles Me.FormClosing
MsgBox("Thanks for testing the counter. Bye")
' close connection to device
myTagger.Close()
End Sub
End Class