gclib 2.0.9
Communications API for Galil controllers and PLCs
 
Loading...
Searching...
No Matches
Commands.vb
Go to the documentation of this file.
2 ''' <summary>
4 ''' </summary>
5 ''' <param name="gclib">A gclib object with a valid connection.</param>
7 ''' <remarks>See commands_example.cs for an example.</remarks>
8 Function Commands(gclib As Gclib) As Integer
9 Console.WriteLine("*****************************************************************************")
10 Console.WriteLine("*********************** GCommand Trimmed example ***********************")
11 Console.WriteLine("*****************************************************************************")
12
14 Console.WriteLine("The command 'PR ?,?' will return the relative " +
16 Console.WriteLine("<<PR ?,? with no trim: " + gclib.GCommand("PR ?,?", False) + ">>")
17 Console.WriteLine("<<PR ?,? with trim: " + gclib.GCommand("PR ?,?", True) + ">>")
18
19 Console.WriteLine("*****************************************************************************")
20 Console.WriteLine("************************* GCommand Int example *************************")
21 Console.WriteLine("*****************************************************************************")
22
26
28
29 Console.WriteLine("*****************************************************************************")
30 Console.WriteLine("*********************** GCommand Double example ************************")
31 Console.WriteLine("*****************************************************************************")
32
35
36 Console.WriteLine("MG @AN[1] with GCmdD(): " + gclib.GCmdD("MG @AN[1]").ToString())
37
38 Return Examples.GALIL_EXAMPLE_OK
Provides a class of shared constants and methods for gclib's example projects.
Definition commands.cs:16
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 GCommand(GCon g, GCStringIn command, GBufOut buffer, GSize buffer_len, GSize *bytes_returned)
Performs a command-and-response transaction on the connection.
GCLIB_DLL_EXPORTED GReturn GCALL GCmdI(GCon g, GCStringIn command, int *value)
Wrapper around GCommand that provides the return value of a command parsed into an int.
Definition gclibo.c:278
GCLIB_DLL_EXPORTED GReturn GCALL GCmdD(GCon g, GCStringIn command, double *value)
Wrapper around GCommand that provides the return value of a command parsed into a double.
Definition gclibo.c:289
void error(GCon g, GReturn rc)
An example of error handling and debugging information.
Definition examples.h:40
GReturn vector(GCon g, char *file)
Puts controller into Vector Mode and accepts a file defining vector points.
Definition vector.cpp:36
partial Module Examples
Definition Commands.vb:4
int Commands(Gclib gclib)
Demonstrates various uses of GCommand() And basic controller queries.