166 lines
5.1 KiB
C#
166 lines
5.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text.RegularExpressions;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DownLoadProgram
|
|
{
|
|
public class DownLoadRobotProgram
|
|
{
|
|
|
|
public string pathName { get; set; } = "";//CraftName
|
|
|
|
public string robotId { get; set; } = "";//ModelCode
|
|
public string robotName { get; set; } = "";//ModelName
|
|
public string robotType { get; set; } = "IRB6640";
|
|
|
|
public string rcsVersion { get; set; } = "IRC5";
|
|
|
|
public List<PathTag> tags { get; set; } = new List<PathTag>() { new PathTag(), new PathTag() };
|
|
|
|
}
|
|
|
|
|
|
|
|
public class PathTag
|
|
{
|
|
public string tagName { get; set; } = "";
|
|
|
|
public string tagId { get; set; } = "";
|
|
public string moveType { get; set; } = "MoveJ";
|
|
public string storageType { get; set; } = "PERS";
|
|
|
|
public TagLocationConf location { get; set; } = new TagLocationConf();
|
|
|
|
public TagJoint joint { get; set; } = new TagJoint();
|
|
public TagTool tool { get; set; } = new TagTool();
|
|
|
|
public TagSpeed speed { get; set; } = new TagSpeed();
|
|
public TagZone zone { get; set; } = new TagZone();
|
|
public Wobj wobj { get; set; } = new Wobj();
|
|
public List<String> olpCommand { get; set; } = new List<String>() { "WaitDI DI1,1", "SetDO DO1,1" };
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public class TagLocationConf
|
|
{
|
|
public TagPosition position { get; set; } = new TagPosition();
|
|
public TagQuaternion quaternion { get; set; } = new TagQuaternion();
|
|
public List<String> robotConf { get; set; } = new List<String>() { "0", "0", "0", "0" };
|
|
|
|
|
|
}
|
|
|
|
public class TagLocation
|
|
{
|
|
public TagPosition position { get; set; } = new TagPosition();
|
|
public TagQuaternion quaternion { get; set; } = new TagQuaternion();
|
|
|
|
}
|
|
|
|
|
|
public class TagPosition
|
|
{
|
|
public string x { get; set; } = "0";
|
|
public string y { get; set; } = "0";
|
|
public string z { get; set; } = "0";
|
|
}
|
|
public class TagQuaternion
|
|
{
|
|
public string x { get; set; } = "0";
|
|
public string y { get; set; } = "0";
|
|
public string z { get; set; } = "0";
|
|
public string w { get; set; } = "1";
|
|
}
|
|
|
|
public class TagJoint
|
|
{
|
|
public List<String> robotJoint { get; set; } = new List<String>() { "0", "0", "0", "0", "0", "0" };
|
|
public List<String> externalJoint { get; set; } = new List<String>() { "9000000000", "9000000000", "9000000000", "9000000000", "9000000000", "9000000000" };
|
|
|
|
}
|
|
|
|
public class TagTool
|
|
{
|
|
|
|
public string toolId { get; set; } = Guid.NewGuid().ToString().ToUpper();
|
|
|
|
public string toolName { get; set; } = "t1";
|
|
|
|
public string robotHold { get; set; } = "1";
|
|
public string storageType { get; set; } = "PERS";
|
|
|
|
public TagLocation toolFrame { get; set; } = new TagLocation();
|
|
public TagLocation centerOfGravity { get; set; } = new TagLocation();
|
|
public LoadParameter loadParameter { get; set; } = new LoadParameter();
|
|
|
|
|
|
}
|
|
|
|
public class LoadParameter
|
|
{
|
|
public string mass { get; set; } = "0.001";
|
|
public string inertiaX { get; set; } = "0";
|
|
public string inertiaY { get; set; } = "0";
|
|
public string inertiaZ { get; set; } = "0";
|
|
}
|
|
|
|
|
|
public class TagSpeed
|
|
{
|
|
public string speedId { get; set; } = Guid.NewGuid().ToString().ToUpper();
|
|
public string speedName { get; set; } = "s1";
|
|
public string storageType { get; set; } = "CONST";
|
|
public string tcpSpeed { get; set; } = "5";
|
|
public string orientation { get; set; } = "500";
|
|
public string linearExternalAxis { get; set; } = "5000";
|
|
public string rotationalExternalAxis { get; set; } = "1000";
|
|
}
|
|
|
|
public class TagZone
|
|
{
|
|
public string zoneId { get; set; } = "";
|
|
public string zoneName { get; set; } = "z1";
|
|
public string storageType { get; set; } = "CONST";
|
|
public string finePoint { get; set; } = "0";
|
|
|
|
public TcpMovement tcpMovement { get; set; } = new TcpMovement();
|
|
public NoTcpMovement noTcpMovement { get; set; } = new NoTcpMovement();
|
|
|
|
}
|
|
public class TcpMovement
|
|
{
|
|
public string tcpPath { get; set; } = "50";
|
|
public string orientation { get; set; } = "75";
|
|
public string externalAxis { get; set; } = "75";
|
|
}
|
|
public class NoTcpMovement
|
|
{
|
|
public string orientation { get; set; } = "7.5";
|
|
public string linearExternalAxis { get; set; } = "75";
|
|
public string rotationalExternalAxis { get; set; } = "7.5";
|
|
}
|
|
|
|
public class Wobj
|
|
{
|
|
public string wobjId { get; set; } = "";
|
|
public string wobjName { get; set; } = "w1";
|
|
public string robotHold { get; set; } = "0";
|
|
public string userFrameProg { get; set; } = "1";
|
|
public string mechanicalUnit { get; set; } = "";
|
|
public string storageType { get; set; } = "PERS";
|
|
public TagLocation userFrame { get; set; } = new TagLocation();
|
|
public TagLocation objectFrame { get; set; } = new TagLocation();
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|