Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a TCP quick pick-up method based on a Siemens TECNOMATC platform.
The purpose of the invention can be realized by the following technical scheme:
a TCP fast pick-up method based on a Siemens TECNOMATC platform comprises the following steps:
step 1: extracting relevant basic information data of the virtual industrial robot based on a Siemens TECNOMATC platform, and further processing the relevant basic information data to obtain respective basic position information of the industrial robot and the TCP;
step 2: data processing is carried out on the respective basic position information of the industrial robot and the TCP through mathematical models established by vectors and matrixes;
and step 3: and obtaining and outputting a corresponding TCP value converted by the virtual industrial robot through the vector and the corresponding matrix after data processing.
Further, the step 1 comprises the following sub-steps:
step 11: searching a bottom API (application programming interface) of Siemens TECNOMATC platform software, and reading original state information of all the digital modules;
step 12: acquiring TCP original state information of the virtual industrial robot by searching for the feature codes aiming at all the digital and analog original state information;
step 13: analyzing the storage type of TCP original state information to obtain a data combination rule;
step 14: and separating the TCP original state information based on a data combination rule to obtain the basic position information of the industrial robot and the basic position information of the TCP.
Further, the step 2 comprises the following sub-steps:
step 21: carrying out data preprocessing on the respective basic position information of the industrial robot and the TCP obtained in the step 1;
step 22: describing respective basic position information of the industrial robot and the TCP subjected to data preprocessing in a form of a vector and a corresponding matrix;
step 23: verifying respective basic position information of the industrial robot and the TCP subjected to data preprocessing and described in the form of vectors and corresponding matrixes based on a relevant mathematical equation rule;
step 24: and obtaining a corresponding TCP value converted by the virtual industrial robot through the vector and the corresponding matrix after the verification is passed.
Further, the step 21 specifically includes: and arranging the respective basic position information of the industrial robot and the TCP according to the distances from the corresponding points to the three coordinate axes of the reference coordinate system and the sequence of the angles of the corresponding points around the three coordinate axes of the reference coordinate system.
Further, the step 22 includes the following sub-steps:
step 221: describing points corresponding to respective basic position information of the industrial robot and the TCP subjected to data preprocessing by a space vector, and obtaining a vector equation between the two points based on a mathematical rule;
step 222: the distance between two points is taken as a translation matrix, the angle between the two points is taken as a rotation matrix, and the vector equation is taken as a translation equation.
Further, the translation equation in step 222 describes the formula as:
in the formula (I), the compound is shown in the specification,
is the position vector of the point corresponding to the basic position information of the industrial robot relative to the origin of the reference coordinate system,
is the position vector of the point corresponding to the basic position information of the TCP relative to the origin of the reference coordinate system,
is a position vector of a point corresponding to the basic position information of the industrial robot relative to a point corresponding to the basic position information of the TCP,
and a rotation matrix of a point corresponding to the basic position information of the industrial robot relative to the origin of the reference coordinate system.
Further, a rotation matrix of a point corresponding to the basic position information of the industrial robot relative to an origin of the reference coordinate system is described by the formula:
in the formula, alpha is the Z-axis rotation angle of the reference coordinate system, beta is the Y-axis rotation angle of the reference coordinate system, and gamma is the X-axis rotation angle of the reference coordinate system.
Further, the step 3 comprises the following steps:
step 31: obtaining a corresponding TCP value of the virtual industrial robot converted by the vector and the corresponding matrix after data processing;
step 32: keeping a specific three-axis coordinate value in a TCP value corresponding to the virtual industrial robot with a multi-digit effective decimal;
step 33: converting a deflection angle in a TCP value corresponding to the virtual industrial robot from a radian into an angle;
step 34: and outputting a final TCP value pickup result after the whole conversion is finished.
The invention also provides a terminal device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, and is characterized in that the processor realizes the steps of the TCP fast pick-up method based on the Siemens TECNOMATC platform when executing the computer program.
The present invention also provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the siemens TECNOMATIC platform based TCP fast pick-up method.
Compared with the prior art, the invention has the following advantages:
(1) the method comprises the following steps: step 1: extracting relevant basic information data of the virtual industrial robot based on a Siemens TECNOMATC platform, and further processing the relevant basic information data to obtain respective basic position information of the industrial robot and the TCP; step 2: data processing is carried out on the respective basic position information of the industrial robot and the TCP through mathematical models established by vectors and matrixes; and step 3: the corresponding TCP value converted by the virtual industrial robot through the vector and the corresponding matrix is obtained and output after data processing, a mathematical model is established through the vector and the matrix, the position information of the robot is converted into matrix data, and the TCP value of the industrial robot can be rapidly and accurately output conveniently;
(2) in the method, specific three-axis coordinate values in TCP values corresponding to the virtual industrial robot are reserved with multi-digit effective decimals; converting a deflection angle in a TCP value corresponding to the virtual industrial robot from a radian into an angle; and after the whole conversion is finished, a final TCP value pickup result is output, and the accuracy is higher.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
Detailed description of the preferred embodiment
Fig. 1 and fig. 2 show an overall method flowchart of a TCP fast pick-up method based on siemens TECNOMATIC platform in the present invention, which includes:
step 1, extracting original state data of a digital model of a virtual industrial robot;
step 2, processing the data;
step 3, outputting a corresponding value;
specifically, the step 1 specifically comprises the following steps:
step 11, searching a software bottom API (application programming interface) and reading digital-analog original state information;
step 12, acquiring original state information of the virtual robot TCP by searching for the feature code;
step 12, analyzing the storage type of the original data and finding out a rule of data combination;
step 13, separating the original data according to the combination rule of the original data to separate the position information of the industrial robot; basic position information of the TCP;
specifically, the step 2 specifically includes the following steps:
step 21, obtaining basic information of the industrial robot and basic information of the TCP according to the step 1;
step 22, converting the basic information into a mathematical model;
step 23, observing the characteristics of the mathematical model, and the relation between the position information of the robot and the TCP basic information;
step 24, obtaining a corresponding solution through model conversion;
specifically, the method comprises the following steps: the step 21 specifically comprises the following steps:
step 211, acquiring basic information of the robot and basic information of the TCP in a random state;
step 212, finding out the position information of the center of the shaft flange of the robot 6 from the separated information;
step 213, arranging the robot position information according to the sequence of X, Y, Z, RX, RY and RZ;
step 214, arranging the position information of the TCP in the order of X, Y, Z, RX, RY and RZ;
specifically, the method comprises the following steps: the step 22 specifically comprises the following steps:
step 221, converting the center point information of the 6-axis flange of the robot and the original position information of the TCP into space coordinates;
step 222, establishing a mathematical model of the space state;
step 223, converting the data into a matrix form through a mathematical model;
specifically, the method comprises the following steps: the step 3 specifically comprises the following steps:
step 31, reserving 2 effective decimal places for the obtained specific three coordinate values;
step 32, converting the unit of the deflection angle obtained finally from radian into angle;
step 33, outputting data according to the following table:
robot name
|
NAME
|
X axis coordinate (mm)
|
x.xx
|
Y axis coordinate (mm)
|
y.yy
|
Z axis coordinate (mm)
|
z.zz
|
Angle of rotation (degree) about the X-axis
|
γ.γγ
|
Angle of rotation about the Y axis (°)
|
β.ββ
|
Angle of rotation (degree) about the Z axis
|
α.αα |
With reference to fig. 3, there is a tool TCP for each industrial robot with a tool. The position information of the center point of the shaft flange of the robot 6 can be easily acquired by picking up the robot information through software. Two points of TCP (X1, Y1, Z1, rx1, ry1, rz1, where X1, Y1, Z1 are the distances from the TCP points to the reference coordinate system, rx1, ry1, rz1 are the angles of the TCP points around the reference coordinate system in the X, Y and Z directions) and flag (X2, Y2, Z2, rx2, ry2, rz2) are defined in the three-dimensional space, namely the center points of the tool TCP and the robot 6-axis FLANGE, respectively, where the O point is the origin of the reference coordinate system.
Referring to fig. 4, the flag point is abbreviated as point a and the TCP is abbreviated as point B for convenience of writing. By modeling mathematically, it can be concluded that the OA vector plus the AB vector is equal to the OB vector. However, the space vector has both distance and direction, and is very cumbersome to process, so that a matrix can be introduced, and data can be processed relatively conveniently. The distance between two points is taken as a translation matrix, and when the reference coordinate system is the origin, the angle between the two points is taken as a rotation matrix. The vector equation can thus be formulated as a translation equation:
in the formula (I), the compound is shown in the specification,
is the position vector of the point corresponding to the basic position information of the industrial robot relative to the origin of the reference coordinate system,
is the position vector of the point corresponding to the basic position information of the TCP relative to the origin of the reference coordinate system,
is a position vector of a point corresponding to the basic position information of the industrial robot relative to a point corresponding to the basic position information of the TCP,
and a rotation matrix of a point corresponding to the basic position information of the industrial robot relative to the origin of the reference coordinate system.
Because the final output value is a collection of position plus angle values, we need to convert the scalar in the rotation angle into an angle relation, assuming that γ is rotated according to the X-axis of the reference coordinate system, β is rotated according to the Y-axis of the reference coordinate system, and α is rotated according to the Z-axis of the reference coordinate system, each scalar in the rotation angle matrix can be represented by a corresponding angle relation:
according to the characteristics of the matrix, assuming that the rotation sequence is fixed, namely firstly rotating gamma according to the X axis of the reference coordinate system, then rotating beta according to the Y axis of the reference coordinate system, and then rotating alpha according to the Z axis of the reference coordinate system;
in the formula, alpha is the Z-axis rotation angle of the reference coordinate system, beta is the Y-axis rotation angle of the reference coordinate system, and gamma is the X-axis rotation angle of the reference coordinate system.
Due to the special nature of the matrix, the equations hold only if the rotation order satisfies the assumed order.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.