public static async void DoTheThing() { Console.WriteLine("Hello ZArm!"); ZArm robot = new ZArm(59); try { Console.WriteLine("Initializing"); robot.Initialize().Wait(); Console.WriteLine("Set Angular Velocity"); while (!robot.IsAtTarget) { Thread.Sleep(1); } robot.AngularVelocity = 50; Console.WriteLine("Going Home"); await robot.GoHome(TimeSpan.FromSeconds(15)); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
static void Main(string[] args) { ZArm robot2 = new ZArm(59); robot2.Initialize(false).Wait(); robot2.SetAngles(20, 20, 20, -20, 20); while (robot2.IsMoving) { Console.Write("."); Thread.Sleep(50); } robot2.SetAngles(40, 40, 40, -50, 50); //robot2.SetPosition(0, 0, 50, 0, 20, 20, PositionMoveMode.NonLinear); Console.ReadKey(); TcpserverEx.close_tcpserver(); }