1. Technical Field
The disclosure relates to motion control devices and methods, and more particularly to an electronic device for controlling motions of a mechanical arm and method using the electronic device.
2. Description of Related Art
Mechanical arms are frequently used in an industrial setting and are controlled by computer numerical control machine. The mechanical arm may include three principal axes of control: an x-axis, a y-axis, and a z-axis. The three principal axes are linear (i.e. they move in a straight line rather than rotate) and are at right angles to each other. Because of the linear principal axes, the mechanical arm has a limited range of motion for controlling an end-effecter attached to the arm. Generally the end-effecter cannot rotate a large range, such as 360 degrees or more than 360 degrees. This limitation causes, for example, inaccuracy in controlling the end-effecter, such as a probe, to measure a workpiece. Therefore, there is room for improvement within the art.
In general, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a program language. In an exemplary embodiment, the program language may be Java or C. One or more software instructions in the modules may be embedded in firmware, such as an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other non-transitory storage device.
In an exemplary embodiment, a rotating arm 5 has a fixed end EE1 and a free end EE2, the fixed end EE1 connects to one of the three principal axes (such as the z-axis) via a connector 4. In one example, as illustrated in
The computer 1 is further connected to a motor controller 6. In an exemplary embodiment, the motor controller 6 may be used for converting pulse signals from the computer 1 into binary signals, and controlling a motor driver 7 to drive a motor 8 according to the binary signals. The motor 8 is installed in line with the z-axis, but is not one of the previously mentioned motors used to control the three principal axes. In the exemplary embodiment, an axis of the motor 8 is connected to the rotating arm 5. The motor 8 drives the rotating arm 5 to manipulate the end effecter 9, to execute a predetermined action, such as taking a measurement. A graph of the path of the rotating arm 5 moving through 360 degrees of rotation, is illustrated in
In an exemplary embodiment, the motor 8 can be a servo motor or a step motor with the corresponding motor driver 7. The motor controller 6 is a digital input/output controller. In the exemplary embodiment, the motor 8 is the servo motor, and the motor driver 7 is the servo motor driver.
The setting module 100 is operable to set motion control parameters, and predefine angles of rotation as reference points regarding orientation of the rotating arm 5 when rotated. In the exemplary embodiment, the motion control parameters include a step angle of the motor 8, in other words the angle of rotation the motor 8 turns when taking a single step, a step number of the motor 8, in other words how many steps must the motor 8 take to rotate the rotating arm 5 360 degrees, and a length of the rotating arm 5 (shown as the radius R in
In the exemplary embodiment, the step angle is a rotation angle of the motor 8 taking a single step when the motor 8 receives a corresponding current pulse signal. For example, if the motor 8 must take two-hundred steps to rotate 360 degrees, then the step angle of the motor 8 can be calculated as: 360/200=1.8 degrees.
Upon the condition that the rotating arm 5 rotates and the fixed end EE1 of the rotating arm 5 is orientated to the first target point (see the point O in
In detail, continuing with the example illustrated in
For example, as illustrated in
To enhance motion control accuracy, the pole origin position in the polar coordinate system can be corrected. Before correcting the pole origin position, the calculation module 102 calculates an offset correction value of the pole origin position according to the calculated rotation angle and the coordinate motions. Details of calculating the offset correction value are described below and illustrated in
As illustrated in
The calculation module 102 calculates a vector of the line L1 as: {R(cos(iW))−R(cos(A+iW)), R(sin(iW))−R(sin(A+iW))}, and calculates a vector of the line L2 as: {R(cos(iW))−R[cos((i+1)W−B], R(sin(iW))−R[ sin((i+1)W−B)]}. Each of the vectors of the lines L1 and L2 can be considered as the offset correction value of the pole origin position. For example, if the step angle of the motor 8 is 1.8 degrees, to rotate the rotating arm 5 to the second target point (such as the point g, the calculated rotation angle is 17.8 degrees), the motor 8 can control the rotating arm 5 to rotate 18 degrees or 16.2 degrees, which are multiples of the step angle. If the rotating arm 5 rotates 18 degrees to the second target point g, the offset correction value of the pole origin position equals the vector of the line L1. If the rotating arm 5 rotates 16.2 degrees to the second target point g, the offset correction value of the pole origin position equals the vector of the line L2.
The correction module 104 corrects the pole origin position of the polar coordinate system, and corrects each of the coordinate motions using the offset correction value.
The output module 106 outputs the motion control parameters to the mechanical arm 3, controls the mechanical arm 3 to move according to the corrected coordinate motions, generates pulse signals according to the multiple of the step angle (i.e., 16.2 degrees or 18 degrees), and outputs the pulse signals to the motor controller 6. The motor controller 6 converts the pulse signals into a binary signal, and transmits the binary signal to the motor driver 7. The motor driver 7 drives the motor 8 for controlling the rotating arm 5 to rotate according to the binary signal.
In coordination with the rotation of the rotating arm 5, the end effecter 9 can execute a predetermined action such as taking a measurement.
In block S300, the setting module 100 sets motion control parameters, and predefines angles of rotation as reference points regarding orientation of the rotating arm 5 when rotated. In the exemplary embodiment, the motion control parameters include a step angle of the motor 8, a step number of the motor 8, and a length of the rotating arm 5. The reference points include at least two target points, such as a first target point (the point O in
In block S302, the calculation module 102 calculates a rotation angle of the rotating arm 5 in a polar coordinate system, and calculates coordinate motions of the x-axis and the y-axis upon the condition that a fixed end EE1 of the rotating arm 5 orientates to the first target point (see the point O in
Actually, in the block S302, the free end EE2 of the rotating arm 5 may not be able to rotate to the second target point because the motor 8 can only control the rotating arm 5 to rotate to a degree that is a multiple of the step angle. to control the free end EE2 of the rotating arm 5 to actually reach the second target point, the pole origin position in the polar coordinate system is corrected in following step.
In block S304, the calculation module 102 calculates an offset correction value of the pole origin position of the polar coordinate system according to the calculated rotation angle, the step angle of the motor 8, and the coordinate motions. Details of calculating the offset correction value have been previously described. The correction module 104 corrects the pole origin position and each of the coordinate motions using the offset correction value.
In block S306, the output module 106 outputs the motion control parameters to the mechanical arm 3, generates pulse signals according to a multiple of the step angle, and outputs the pulse signals to the motor controller 6. The motor controller 6 converts the pulse signals into a binary signal, and transmits the binary signal to the motor driver 7.
In block S308, the mechanical arm 3 moves according to the corrected coordinate motions, and the motor driver 7 drives the motor 8 for controlling the rotating arm 5 to rotate according to the binary signal. Upon the rotating arm 5 rotates, the end effecter 9 can execute a predetermined action such as taking a measurement, for example.
Although certain inventive embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
99126704 A | Aug 2010 | TW | national |
Number | Name | Date | Kind |
---|---|---|---|
20030208302 | Lemelson et al. | Nov 2003 | A1 |
20040054441 | Stamps et al. | Mar 2004 | A1 |
20060067464 | Clinthorne et al. | Mar 2006 | A1 |
20090095526 | Lane et al. | Apr 2009 | A1 |
Number | Date | Country | |
---|---|---|---|
20120041598 A1 | Feb 2012 | US |