gclib 2.0.9
Communications API for Galil controllers and PLCs
 
Loading...
Searching...
No Matches
Vector_Mode_Example.vb
Go to the documentation of this file.
1Module Vector_Mode_Example
2
4 Dim rc As Integer = Examples.GALIL_EXAMPLE_OK
5 Dim gclib As Gclib = New Gclib()
7 Try
8 If args.Count() <> 3 Then
10 Console.WriteLine("Usage: vector_mode_example.exe <ADDRESS> <FILE>")
11
12 Console.Write(vbCrLf + "Press any key to close the example.")
14 Return Examples.GALIL_EXAMPLE_ERROR
15 End If
16
18 Dim file = args(2) 'Retrieve file from command line
19
21
22 rc = Examples.Vector_Mode(gclib, file)
23 Catch ex As Exception
24 Examples.PrintError(gclib, ex)
25 rc = Examples.GALIL_EXAMPLE_ERROR
28 End Try
29
30 Console.Write(vbCrLf + "Press any key to close the example.")
32
35
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friend...
Definition gclib.cs:68
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.
GReturn vector(GCon g, char *file)
Puts controller into Vector Mode and accepts a file defining vector points.
Definition vector.cpp:36
int Main()
Main function for the commands example.