36 public static int Main(
string[] args)
49 else if(args.Count() == 2)
51 bool ok =
int.TryParse(args[1], out speed);
55 Console.WriteLine(
"An invalid speed was entered. " +
56 "Please enter a valid integer for speed.");
57 Console.WriteLine(
"Usage: position_tracking_example.exe <ADDRESS> <SPEED=5000>");
59 Console.Write(
"\nPress any key to close the example");
66 Console.WriteLine(
"Incorrect number of arguments provided");
67 Console.WriteLine(
"Usage: position_tracking_example.exe <ADDRESS> <SPEED=5000>");
69 Console.Write(
"\nPress any key to close the example");
74 string address = args[0];
89 Console.Write(
"\nPress any key to close the example");
static void PrintError(gclib gclib, Exception ex)
Prints the exception to the console and queries the controller for the most recent error message.
Provides a class of shared constants and methods for gclib's example projects.
const int GALIL_EXAMPLE_OK
Examples success code.
const int GALIL_EXAMPLE_ERROR
Examples error code.
static int Main(string[] args)
Main function for the position tracking example.
Places controller into position tracking mode. Accepts user-defined positional values at the command ...
void GOpen(string address)
Used to open a connection to Galil hardware.
void GClose()
Used to close a connection to Galil hardware.
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friend...
static int Position_Tracking(gclib gclib, int speed)
Puts controller into Position Tracking Mode and accepts user-entered positions.