1 Module Position_Tracking_Example
2 Function Main() As Integer
3 Dim rc As Integer = Examples.GALIL_EXAMPLE_OK
4 Dim gclib As Gclib = New Gclib()
5 Dim args() As String = Environment.GetCommandLineArgs()
6 Dim speed As Integer = 0
10 ElseIf args.Count = 3 Then
12 Dim ok As Boolean = Byte.TryParse(args(2), speed)
15 Console.WriteLine("An invalid speed was entered. " +
16 "Please enter a valid integer for speed.")
17 Console.WriteLine("Usage: position_tracking_example.exe <ADDRESS> <SPEED=5000>")
19 Console.Write(vbCrLf + "Press any key to close the example.")
21 Return Examples.GALIL_EXAMPLE_ERROR
25 Console.WriteLine("Incorrect number of arguments provided")
26 Console.WriteLine("Usage: position_tracking_example.exe <ADDRESS> <SPEED=5000>")
28 Console.Write(vbCrLf + "Press any key to close the example.")
30 Return Examples.GALIL_EXAMPLE_ERROR
34 Dim address As String = args(1) 'Retrieve address from command line
35 gclib.GOpen(address) 'Open a connection at the provided address
37 rc = Examples.Position_Tracking(gclib, speed) 'Begin position tracking mode
39 Examples.PrintError(gclib, ex)
40 rc = Examples.GALIL_EXAMPLE_ERROR
45 Console.Write(vbCrLf + "Press any key to close the example.")