2 ''' Demonstrates various uses of GCommand() And basic controller queries.
4 ''' <remarks>The first argument should be the IP Address of a Galil controller.</remarks>
5 Module Commands_Example
8 ''' Main function for the commands example.
10 ''' <returns>The success status Or error code of the function.</returns>
11 ''' <remarks>The first argument should be the IP Address of a Galil controller.</remarks>
12 Function Main() As Integer
13 Dim rc As Integer = Examples.GALIL_EXAMPLE_OK
14 Dim gclib As Gclib = New Gclib()
15 Dim args() As String = Environment.GetCommandLineArgs()
17 If args.Count() <> 2 Then
18 Console.WriteLine("Incorrect number of arguments provided")
19 Console.WriteLine("Usage: commands_example.exe <ADDRESS>")
21 Console.Write(vbCrLf + "Press any key to close the example.")
23 Return Examples.GALIL_EXAMPLE_ERROR
26 Dim address As String = args(1)
30 rc = Examples.Commands(gclib)
32 Examples.PrintError(gclib, ex)
33 rc = Examples.GALIL_EXAMPLE_ERROR
38 Console.Write(vbCrLf + "Press any key to close the example.")