static void Main(string[] args) { KukaRsi.MessageSerialization <AgilusMessageToRobot, AgilusMessageFromRobot> ms = new KukaRsi.MessageSerialization <AgilusMessageToRobot, AgilusMessageFromRobot>(); AgilusMessageToRobot msg = new AgilusMessageToRobot(); String s = ms.Serialize(msg); double velocity = 100; double acceleration = 100; //AxisPosition target = new AxisPosition(0, -50, 90, 0, 90, 0); TcpCoordinate tcpTarget1 = new TcpCoordinate(445, 0, 900, -180, 0, -180); TcpCoordinate tcpTarget2 = new TcpCoordinate(445, 0, 800, -180, 0, -180); /* msg.DoubleParameters.Values[0] = tcpTarget.X; * msg.DoubleParameters.Values[1] = tcpTarget.Y; * msg.DoubleParameters.Values[2] = tcpTarget.Z; * msg.DoubleParameters.Values[3] = tcpTarget.A; * msg.DoubleParameters.Values[4] = tcpTarget.B; * msg.DoubleParameters.Values[5] = tcpTarget.C;*/ //IPAddress ipAddress = new IPAddress(2252147995); // für 134.61.13.28, 2252147996 //Testen 127.0.0.1 //IPAddress ipAddress = new IPAddress(new byte[4] { 134, 61, 13, 30}); IPEndPoint ipEndPoint = new IPEndPoint(IPAddress.Any, 41975); Robot agilus = new Robot(ipEndPoint); //agilus.MoveAbsoluteLinear(tcpTarget); //agilus.movePTP(1, new List<double> { 0, -50, 90, 0, 90, 0 }, 10, 100); agilus.MoveAbsoluteLinear(tcpTarget1); agilus.Start(); //agilus.MoveAbsoluteLinear(tcpTarget); //agilus.MoveAbsolutePTP(target, velocity, acceleration); /*agilus.MoveAbsolutePTP(target, velocity, acceleration); * agilus.MoveAbsolutePTP(target, velocity, acceleration); * agilus.MoveAbsolutePTP(target, velocity, acceleration); * agilus.MoveAbsolutePTP(target, velocity, acceleration);*/ //agilus.AgilusMessageToRobot.Command.set = 100; int i = 0; Thread.Sleep(10); while (true) { i++; agilus.MoveAbsoluteLinear(tcpTarget2); Thread.Sleep(1000); agilus.MoveAbsoluteLinear(tcpTarget1); Thread.Sleep(1000); //agilus.MoveAbsoluteLinear(tcpTarget); } //agilus.Stop(); }
/// <summary> /// Moves the robot linearly for a specified delta /// </summary> /// <param name="delta">The delta as relative TCP coordinate</param> public void MoveRelativeLinear(TcpCoordinate delta) { // Perform linear movement in mode 6 (relative) this.moveLinear(6, delta.EnumerateValues()); }
/// <summary> /// Moves the robot linearly to a specified target position /// </summary> /// <param name="target">The target as TCP coordinate</param> public void MoveAbsoluteLinear(TcpCoordinate target) { // Perform linear movement in mode 5 (absolute) this.moveLinear(5, target.EnumerateValues()); }
/// <summary> /// Moves the robot PTP for a specified delta /// </summary> /// <param name="delta">The delta as relative TCP coordinate</param> /// <param name="velocity">The velocity as percentage</param> /// <param name="acceleration">The acceleration as percentage</param> public void MoveRelativePTP(TcpCoordinate delta, double velocity, double acceleration) { // Perform PTP movement in mode 4 (relative position) this.movePTP(4, delta.EnumerateValues(), velocity, acceleration); }
/// <summary> /// Moves the robot PTP to a specified target position /// </summary> /// <param name="target">The target as TCP coordinate</param> /// <param name="velocity">The velocity as percentage</param> /// <param name="acceleration">The acceleration as percentage</param> public void MoveAbsolutePTP(TcpCoordinate target, double velocity, double acceleration) { // Perform PTP movement in mode 3 (absolute position) this.movePTP(3, target.EnumerateValues(), velocity, acceleration); }