2. Beschreibung der Datenstrukturen

2.1. Datentyp für Gelenkpositionen

 1/**
 2* @brief Datentyp für Gelenkpositionen.
 3*/
 4public class JointPos
 5{
 6  double J1;
 7  double J2;
 8  double J3;
 9  double J4;
10  double J5;
11  double J6;
12
13  public JointPos(double j1, double j2, double j3, double j4, double j5, double j6)
14  {
15    J1 = j1;
16    J2 = j2;
17    J3 = j3;
18    J4 = j4;
19    J5 = j5;
20    J6 = j6;
21  }
22
23  public JointPos()
24  {
25
26  }
27}

2.2. Datentyp für Positionen im kartesischen Raum

 1/**
 2* @brief Datentyp für Positionen im kartesischen Raum.
 3*/
 4public class DescTran
 5{
 6  public double x = 0.0;    /* x-Achsen-Koordinate, Einheit mm  */
 7  public double y = 0.0;    /* y-Achsen-Koordinate, Einheit mm  */
 8  public double z = 0.0;    /* z-Achsen-Koordinate, Einheit mm  */
 9  public DescTran(double posX, double posY, double posZ)
10  {
11    x = posX;
12    y = posY;
13    z = posZ;
14  }
15
16  public DescTran()
17  {
18
19  }
20
21}

2.3. Datentyp für Euler-Winkel-Ausrichtung

 1/**
 2* @brief Datentyp für Euler-Winkel-Ausrichtung.
 3*/
 4public class Rpy
 5{
 6  public double rx = 0.0;   /* Rotationswinkel um die feste X-Achse, Einheit: deg  */
 7  public double ry = 0.0;   /* Rotationswinkel um die feste Y-Achse, Einheit: deg  */
 8  public double rz = 0.0;   /* Rotationswinkel um die feste Z-Achse, Einheit: deg  */
 9  public Rpy(double rotateX, double rotateY, double rotateZ)
10  {
11    rx = rotateX;
12    ry = rotateY;
13    rz = rotateZ;
14  }
15}

2.4. Datentyp für Posen im kartesischen Raum

 1/**
 2* @brief Datentyp für Posen im kartesischen Raum.
 3*/
 4public class DescPose
 5{
 6  public DescTran tran = new DescTran(0.0, 0.0, 0.0);      /* Position im kartesischen Raum  */
 7  public Rpy rpy = new Rpy(0.0, 0.0, 0.0);                  /* Ausrichtung im kartesischen Raum  */
 8
 9  public DescPose()
10  {
11
12  }
13
14  public DescPose(DescTran descTran, Rpy rotateRpy)
15  {
16    tran = descTran;
17    rpy = rotateRpy;
18  }
19
20  public DescPose(double tranX, double tranY, double tranZ, double rX, double ry, double rz)
21  {
22    tran.x = tranX;
23    tran.y = tranY;
24    tran.z = tranZ;
25    rpy.rx = rX;
26    rpy.ry = ry;
27    rpy.rz = rz;
28  }
29
30  public String toString()
31  {
32    return String.valueOf(tran.x) + "," +  String.valueOf(tran.y) + "," +String.valueOf(tran.z) + "," +String.valueOf(rpy.rx) + "," +String.valueOf(rpy.ry) + "," +String.valueOf(rpy.rz);
33  }
34}

2.5. Datentyp für Positionen der Erweiterungsachse

 1/**
 2* @brief Datentyp für Positionen der Erweiterungsachse.
 3*/
 4public class ExaxisPos
 5{
 6  public double axis1 = 0.0;
 7  public double axis2 = 0.0;
 8  public double axis3 = 0.0;
 9  public double axis4 = 0.0;
10
11  public ExaxisPos()
12  {
13
14  }
15  public ExaxisPos(double[] exaxisPos)
16  {
17    axis1 = exaxisPos[0];
18    axis2 = exaxisPos[1];
19    axis3 = exaxisPos[2];
20    axis4 = exaxisPos[3];
21  }
22
23  public ExaxisPos(double pos1, double pos2, double pos3, double pos4)
24  {
25    axis1 = pos1;
26    axis2 = pos2;
27    axis3 = pos3;
28    axis4 = pos4;
29  }
30}

2.6. Datentyp für Kraft-/Drehmomentsensor

 1/**
 2* @brief Kraftkomponenten und Drehmomentkomponenten des Kraftsensors.
 3*/
 4public class ForceTorque
 5{
 6  public double fx;  /* Kraftkomponente entlang der x-Achse, Einheit N  */
 7  public double fy;  /* Kraftkomponente entlang der y-Achse, Einheit N  */
 8  public double fz;  /* Kraftkomponente entlang der z-Achse, Einheit N  */
 9  public double tx;  /* Drehmomentkomponente um die x-Achse, Einheit Nm */
10  public double ty;  /* Drehmomentkomponente um die y-Achse, Einheit Nm */
11  public double tz;  /* Drehmomentkomponente um die z-Achse, Einheit Nm */
12  public ForceTorque(double fX, double fY, double fZ, double tX, double tY, double tZ)
13  {
14    fx = fX;
15    fy = fY;
16    fz = fZ;
17    tx = tX;
18    ty = tY;
19    tz = tZ;
20  }
21}

2.7. Datentyp für Spiralparameter

 1/**
 2* @brief Datentyp für Spiralparameter.
 3*/
 4public class SpiralParam
 5{
 6    public int circle_num;           /* Anzahl der Windungen  */
 7    public double circle_angle;      /* Neigungswinkel der Spirale  */
 8    public double rad_init;          /* Anfangsradius der Spirale, Einheit mm  */
 9    public double rad_add;           /* Radiusinkrement  */
10    public double rotaxis_add;       /* Inkrement in Richtung der Drehachse  */
11    public int rot_direction;        /* Drehrichtung, 0-im Uhrzeigersinn, 1-gegen Uhrzeigersinn  */
12    public int velAccMode;           /* Modus für Geschwindigkeit/Beschleunigung: 0-Winkelgeschwindigkeit konstant; 1-Lineargeschwindigkeit konstant */
13    public SpiralParam(int circleNum, double circleAngle, double radInit, double radAdd, double rotaxisAdd, int rotDirection, int vel_AccMode)
14    {
15        circle_num = circleNum;
16        circle_angle = circleAngle;
17        rad_init = radInit;
18        rad_add = radAdd;
19        rotaxis_add = rotaxisAdd;
20        rot_direction = rotDirection;
21        velAccMode = vel_AccMode;
22    }
23}

2.8. Datentyp für Erweiterungsachsen-Status

 1/**
 2* @brief Datentyp für den Status der Erweiterungsachse.
 3*/
 4public class EXT_AXIS_STATUS
 5{
 6 public double pos = 0;        // Erweiterungsachsenposition
 7 public double vel = 0;        // Erweiterungsachsengeschwindigkeit
 8 public int errorCode = 0;     // Fehlercode der Erweiterungsachse
 9 public int ready = 0;         // Servo bereit
10 public int inPos = 0;         // Servo in Position
11 public int alarm = 0;         // Servoalarm
12 public int flerr = 0;         // Folgefehler
13 public int nlimit = 0;        // Negative Endlage erreicht
14 public int pLimit = 0;        // Positive Endlage erreicht
15 public int mdbsOffLine = 0;   // Antriebs-485-Bus offline
16 public int mdbsTimeout = 0;   // Kommunikationstimeout zwischen Steuerkarte und Steuerschrank (485)
17 public int homingStatus = 0;  // Referenzpunktfahrt-Status der Erweiterungsachse
18}

2.9. Sensortyp

 1/**
 2* @brief Sensortyp.
 3*/
 4public class DeviceConfig
 5{
 6  int company = 0;          // Hersteller
 7  int device = 0;           // Typ / Gerätenummer
 8  int softwareVersion = 0;  // Softwareversion
 9  int bus = 0;              // Montageposition (Bus)
10
11  public DeviceConfig()
12  {
13
14  }
15
16  public DeviceConfig(int company, int device, int softwareVersion, int bus)
17  {
18    this.company = company;
19    this.device = device;
20    this.softwareVersion = softwareVersion;
21    this.bus = bus;
22  }
23}

2.10. 485-Erweiterungsachsen-Konfiguration

 1/**
 2* @brief 485-Erweiterungsachsen-Konfiguration.
 3*/
 4public class Axis485Param
 5{
 6  int servoCompany;           // Hersteller des Servoantriebs, 1-DYNATEC
 7  int servoModel;             // Modell des Servoantriebs, 1-FD100-750C
 8  int servoSoftVersion;       // Softwareversion des Servoantriebs, 1-V1.0
 9  int servoResolution;        // Encoderauflösung
10  double axisMechTransRatio;  // Mechanisches Übersetzungsverhältnis
11
12  public Axis485Param(int company, int model, int softVersion, int resolution, double mechTransRatio)
13  {
14    servoCompany = company;
15    servoModel = model;
16    servoSoftVersion = softVersion;
17    servoResolution = resolution;
18    axisMechTransRatio = mechTransRatio;
19  }
20
21  public Axis485Param()
22  {
23
24  }
25}

2.11. Servocontroller-Status

 1/**
 2* @brief Servocontroller-Status.
 3*/
 4public class ROBOT_AUX_STATE
 5{
 6  public int servoId = 0;           // Servoantriebs-ID-Nummer
 7  public int servoErrCode = 0;      // Fehlercode des Servoantriebs
 8  public int servoState = 0;        // Status des Servoantriebs
 9  public double servoPos = 0;       // Aktuelle Position des Servos
10  public float servoVel = 0;        // Aktuelle Geschwindigkeit des Servos
11  public float servoTorque = 0;     // Aktuelles Drehmoment des Servos
12}

2.12. Schweißunterbrechungsstatus

1/**
2* @brief Schweißunterbrechungsstatus.
3*/
4public class WELDING_BREAKOFF_STATE
5{
6  public int breakOffState = 0;  // Schweißunterbrechungsstatus
7  public int weldArcState = 0;   // Lichtbogenunterbrechungsstatus beim Schweißen
8}

2.13. UDP-Erweiterungsachsen-Kommunikationsparameter

 1/**
 2* @brief UDP-Erweiterungsachsen-Kommunikationsparameter.
 3*/
 4public class UDPComParam
 5{
 6  public String ip = "192.168.58.88";// IP-Adresse
 7  public int port = 2021;            // Portnummer
 8  public int period = 2;             // Kommunikationszyklus (ms, Standard 2, diesen Parameter nicht ändern)
 9  public int lossPkgTime = 50;       // Paketverlust-Erkennungszeit (ms)
10  public int lossPkgNum = 2;         // Anzahl der Paketverluste
11  public int disconnectTime = 100;   // Bestätigungsdauer für Kommunikationsunterbrechung
12  public int reconnectEnable = 0;    // Automatische Wiederverbindung bei Kommunikationsunterbrechung aktivieren? 0-deaktivieren, 1-aktivieren
13  public int reconnectPeriod = 100;  // Wiederverbindungsintervall (ms)
14  public int reconnectNum = 3;       // Anzahl der Wiederverbindungsversuche
15  public int selfConnect = 0;        // Automatische Verbindung nach Neustart? 0-keine Verbindung; 1-Verbindung herstellen
16}

2.14. Strukturtyp für Roboterstatus-Rückmeldung

 1/**
 2* @brief Strukturtyp für die Roboterstatus-Rückmeldung.
 3*/
 4public class ROBOT_STATE_PKG
 5{
 6  public short frame_head = 0;            // Frame-Header 0x5A5A
 7  public byte frame_cnt = 0;              // Frame-Zähler
 8  public short data_len = 0;              // Datenlänge
 9  public int program_state = 0;           // Programmausführungsstatus, 1-gestoppt; 2-läuft; 3-pausiert
10  public int robot_state = 0;             // Roboterbewegungsstatus, 1-gestoppt; 2-läuft; 3-pausiert; 4-Ziehemodus (Drag)
11  public int main_code = 0;                // Hauptfehlercode
12  public int sub_code = 0;                 // Unterfehlercode
13  public int robot_mode = 0;               // Robotermodus, 0-Automatikmodus; 1-Handmodus
14  public double[] jt_cur_pos  = new double[6];                  // Aktuelle Gelenkpositionen
15  public double[] tl_cur_pos = new double[6];                  // Aktuelle Werkzeugpose
16  public double[] flange_cur_pos = new double[6];              // Aktuelle Pose des Endflansches
17  public double[] actual_qd = new double[6];                   // Aktuelle Gelenkgeschwindigkeiten des Roboters
18  public double[] actual_qdd = new double[6];                  // Aktuelle Gelenkbeschleunigungen des Roboters
19  public double[] target_TCP_CmpSpeed = new double[2];         // Resultierende TCP-Sollgeschwindigkeit des Roboters
20  public double[] target_TCP_Speed = new double[6];            // TCP-Sollgeschwindigkeit des Roboters (Komponenten)
21  public double[] actual_TCP_CmpSpeed = new double[2];         // Resultierende TCP-Istgeschwindigkeit des Roboters
22  public double[] actual_TCP_Speed = new double[6];            // TCP-Istgeschwindigkeit des Roboters (Komponenten)
23  public double[] jt_cur_tor = new double[6];                  // Aktuelle Drehmomente
24  public int tool = 0;                        // Werkzeugnummer
25  public int user = 0;                        // Werkstücknummer
26  public int cl_dgt_output_h = 0;            // Digitalausgänge 15-8
27  public int cl_dgt_output_l = 0;            // Digitalausgänge 7-0
28  public int tl_dgt_output_l = 0;            // Werkzeug-Digitalausgänge 7-0 (nur bit0-bit1 gültig)
29  public int cl_dgt_input_h = 0;              // Digitaleingänge 15-8
30  public int cl_dgt_input_l = 0;              // Digitaleingänge 7-0
31  public int tl_dgt_input_l = 0;              // Werkzeug-Digitaleingänge 7-0 (nur bit0-bit1 gültig)
32  public short[] cl_analog_input = new short[2];          // Analogeingänge des Steuerschranks
33  public short tl_anglog_input = 0;                       // Analogeingang des Werkzeugs
34  public double[] ft_sensor_raw_data = new double[6];     // Rohdaten des Kraft-/Drehmomentsensors
35  public double[] ft_sensor_data = new double[6];         // Verarbeitete Daten des Kraft-/Drehmomentsensors (im Referenzkoordinatensystem)
36  public int ft_sensor_active = 0;           // Aktivierungsstatus des Kraft-/Drehmomentsensors, 0-Reset, 1-aktiviert
37  public int EmergencyStop = 0;              // Not-Halt-Flag
38  public int motion_done = 0;                 // In-Position-Signal
39  public int gripper_motiondone = 0;         // Greifer-Bewegungsabschluss-Signal
40  public int mc_queue_len = 0;                // Länge der Bewegungswarteschlange
41  public int collisionState = 0;             // Kollisionserkennung, 1-Kollision; 0-keine Kollision
42  public int trajectory_pnum = 0;             // Trajektorienpunktnummer
43  public int safety_stop0_state = 0;          /* Sicherheitsstopp-Signal SI0 */
44  public int safety_stop1_state = 0;          /* Sicherheitsstopp-Signal SI1 */
45  public int gripper_fault_id = 0;             /* Fehlerhafte Greifernummer */
46  public short gripper_fault = 0;              /* Greiferfehler */
47  public short gripper_active = 0;             /* Greifer-Aktivierungsstatus */
48  public int gripper_position = 0;             /* Greiferposition */
49  public int gripper_speed = 0;                /* Greifergeschwindigkeit */
50  public int gripper_current = 0;              /* Greiferstrom */
51  public int gripper_tmp = 0;                   /* Greifertemperatur */
52  public int gripper_voltage = 0;               /* Greiferspannung */
53  public ROBOT_AUX_STATE auxState = new ROBOT_AUX_STATE(); /* Status der 485-Erweiterungsachse */
54  public EXT_AXIS_STATUS extAxisStatus0 = new EXT_AXIS_STATUS();
55  public EXT_AXIS_STATUS extAxisStatus1 = new EXT_AXIS_STATUS();
56  public EXT_AXIS_STATUS extAxisStatus2 = new EXT_AXIS_STATUS();
57  public EXT_AXIS_STATUS extAxisStatus3 = new EXT_AXIS_STATUS();
58  public short[] extDIState = new short[8];        // Erweiterte DI-Eingänge
59  public short[] extDOState = new short[8];        // Erweiterte DO-Ausgänge
60  public short[] extAIState = new short[4];        // Erweiterte AI-Eingänge
61  public short[] extAOState = new short[4];        // Erweiterte AO-Ausgänge
62  public int rbtEnableState = 0;                   // Roboter-Aktivierungsstatus (Enable)
63  public double[] jointDriverTorque  = new double[6];       // Aktuelles Drehmoment der Gelenkantriebe
64  public double[] jointDriverTemperature = new double[6];  // Aktuelle Temperatur der Gelenkantriebe
65  public ROBOT_TIME robotTime = new ROBOT_TIME();
66  public int softwareUpgradeState = 0;   // Roboter-Software-Upgrade-Status 0-im Leerlauf oder Upgrade-Paket wird hochgeladen; 1~100: Upgrade-Fortschritt in Prozent; -1: Upgrade fehlgeschlagen; -2: Prüfsummenfehler; -3: Versionsprüfung fehlgeschlagen; -4: Entpacken fehlgeschlagen; -5: Benutzerkonfigurations-Upgrade fehlgeschlagen; -6: Peripherie-Konfigurations-Upgrade fehlgeschlagen; -7: Erweiterungsachsen-Konfigurations-Upgrade fehlgeschlagen; -8: Roboter-Konfigurations-Upgrade fehlgeschlagen; -9: DH-Parameter-Konfigurations-Upgrade fehlgeschlagen
67  public int endLuaErrCode;                         // LUA-Ausführungsstatus am Endeffektor
68
69  public int[] cl_analog_output = new int[2];  // Analogausgänge des Steuerschranks
70  public int tl_analog_output;                  // Analogausgang des Werkzeugs
71  public float gripperRotNum;                   // Aktuelle Umdrehungszahl des Drehgreifers
72  public int gripperRotSpeed;                    // Aktueller Rotationsgeschwindigkeitsprozentsatz des Drehgreifers
73  public int gripperRotTorque;                       // Aktueller Rotationskraftprozentsatz des Drehgreifers
74
75  public  WELDING_BREAKOFF_STATE weldingBreakOffstate = new WELDING_BREAKOFF_STATE(); // Schweißunterbrechungsstatus
76
77  public double[] jt_tgt_tor = new double[6];    // Gelenk-Solldrehmomente
78  public int smartToolState;                      // SmartTool-Griff-Tastenstatus
79
80  public float wideVoltageCtrlBoxTemp;            // Temperatur des Weitbereichs-Steuerschranks
81  public int wideVoltageCtrlBoxFanVel;            // Lüfterstrom des Weitbereichs-Steuerschranks (mA)
82
83  public double[] toolCoord = new double[6];           // Werkzeugkoordinatensystem
84  public double[] wobjCoord = new double[6];                   // Werkstückkoordinatensystem
85  public double[] extoolCoord = new double[6];                 // Externes Werkzeugkoordinatensystem
86  public double[] exAxisCoord = new double[6];                 // Erweiterungsachsen-Koordinatensystem
87  public double load;                                    // Nutzlastmasse
88  public double[] loadCog = new double[3];              // Nutzlastschwerpunkt
89
90  public double[] lastServoTarget = new double[6];      // Letzte servoJ-Zielposition in der Warteschlange
91  public int servoJCmdNum;                               // servoJ-Befehlszähler
92
93  public short check_sum = 0;                             /* Summenprüfung */
94
95  public ROBOT_STATE_PKG()
96  {
97
98  }
99}