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.")
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.")
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
45 Console.Write(vbCrLf + "Press any key to close the example.")
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friend...
GCLIB_DLL_EXPORTED GReturn GCALL GClose(GCon g)
Closes a connection to a Galil Controller.
GCLIB_DLL_EXPORTED GReturn GCALL GOpen(GCStringIn address, GCon *g)
Open a connection to a Galil Controller.
void PrintError(Gclib gclib, Exception ex)
Prints the exception to the console And queries the controller for the most recent error message.