Reference Manual
Chapter
6
Ruler E
Examples
' Start data acqusition.
res = ruler.StartRuler()
If
res <> ErrorCodes.E_ALL_OK
Then
Console.WriteLine("Error starting Ruler: " & res.ToString())
End
If
' Request data forever.
While
True
' Check if there is any buffers available.
If
ruler.AvailableBuffers >= 0
Then
res = ruler.RequestDataSeparate(id, status,
Nothing
,
x, range, intensity,
Nothing
)
If
res = ErrorCodes.E_ALL_OK
Then
' .... (Do data processing here)
ElseIf
res = ErrorCodes.E_TIMEOUT
Then
' ... Timeout occured.
Else
Console.WriteLine("Error requesting data: " & res.ToString())
End
If
End
If
End
While
End
Sub
End
Module
SICK IVP • Industrial Sensors • www.sickivp.com • All rights reserved
51