gclib 2.0.9
Communications API for Galil controllers and PLCs
 
Loading...
Searching...
No Matches
Jog.vb
Go to the documentation of this file.
3 gclib.GCommand("ST") ' Stop all motors
4 gclib.GMotionComplete("A") ' Wait For motion To complete
5 gclib.GCommand("SHA") ' Set servo here
6 gclib.GCommand("DPA=0") ' Start position at absolute zero
7 gclib.GCommand("JGA=0") ' Start jogging With 0 speed
8 gclib.GCommand("BGA") ' Begin motion On A Axis
9
12
13 Console.WriteLine("Enter a character on the keyboard to change the" +
14 " motor's speed:" + Environment.NewLine +
15 "<q> Quit" + Environment.NewLine +
16 "<a> -2000 counts/s" + Environment.NewLine +
17 "<s> -500 counts/s" + Environment.NewLine +
18 "<d> +500 counts/s" + Environment.NewLine +
19 "<f> +2000 counts/s" + Environment.NewLine +
20 "<r> Direction Reversal" + Environment.NewLine)
21
23 gclib.GCommand("JGA=" + speed.ToString())
24 Console.WriteLine("Jog Speed: " + speed.ToString())
25
26 Select Case Console.ReadKey(True).Key
30 speed -= 2000
32 speed -= 500
34 speed += 500
36 speed += 2000
38 speed *= -1
41
42 gclib.GCommand("ST")
44
45 Return GALIL_EXAMPLE_OK
string GCommand(string Command, bool Trim=true)
Used for command-and-response transactions.
Definition gclib.cs:257
void GMotionComplete(string axes)
Blocking call that returns once all axes specified have completed their motion.
Definition gclib.cs:428
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friend...
Definition gclib.cs:68
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