3 Record_Position(
gclib,
fileA,
fileB)
'Record positional data on Axis A and B
5 Dim positions_A = System.IO.File.ReadAllText(fileA).Split(",").ToList()
6 Dim positions_B = System.IO.File.ReadAllText(fileB).Split(",").ToList()
13 gclib.
GCommand(
"CD 0,0")
'Pre load buffer With zeros To prevent under buffering
15 gclib.
GCommand(
"CD 0,0")
'Pre load buffer With zeros To prevent under buffering
18 Dim capacity = 0
'Holds the capacity of the contour buffer
22 Console.WriteLine(
"Error: The two datasets are not the same size")
27 'Sleep while buffer is emptying
28 System.Threading.Thread.Sleep(400)
36 Return Examples.GALIL_EXAMPLE_OK
40 Private Function Load_Buffer(gclib As Gclib, positions_A As List(Of String), positions_B As List(Of String),
41 capacity As Integer, ByRef cmd As Integer)
42 For i = capacity To 1 Step -1
43 If cmd + 1 < positions_A.Count() Then
47 'Subtract previous position from new position to get how for of a move to make
48 Dim cdB = Double.Parse(positions_B(cmd + 1)) - Double.Parse(positions_B(cmd))
50 gclib.GCommand($"CD {cdA},{cdB}")
string GCommand(string Command, bool Trim=true)
Used for command-and-response transactions.
Int16 GCmdI(string Command)
Used for command-and-response transactions.
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friend...
GReturn contour(GCon g, char *fileA, char *fileB)
Record user's training and plays back training through contour mode.
GReturn vector(GCon g, char *file)
Puts controller into Vector Mode and accepts a file defining vector points.