1 Module Motion_Complete_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()
7 If args.Count <> 2 Then
8 Console.WriteLine("Incorrect number of arguments provided")
9 Console.WriteLine("Usage: motion_complete_example.exe <ADDRESS>")
11 Console.Write(vbCrLf + "Press any key to close the example.")
13 Return Examples.GALIL_EXAMPLE_ERROR
16 Dim address As String = args(1) 'Retrieve address from command line
18 ' Open a connection at the provided address and subcribe to event interrupts
19 gclib.GOpen(address + " --subscribe EI")
21 rc = Examples.Motion_Complete(gclib)
23 Examples.PrintError(gclib, ex)
24 rc = Examples.GALIL_EXAMPLE_ERROR
29 Console.Write(vbCrLf + "Press any key to close the example.")