1. Technical Field
Embodiments of the present disclosure relate to a control system and method for motor drivers.
2. Description of the Related Art
In computer numerical control systems, a controller controls a plurality of motor drivers which are at different distances from the controller, which causes timing problems. In other words because of the different distances, a command to control some action of the plurality of motor drivers will not be received by the motor drivers at the same time. As a result, errors may occur in computer numerical control systems.
Therefore, what is needed, is a control system and method for motor drivers which can solve the above problem.
Referring to
The controller 11, the first motor driver 12, and the second motor driver 13 communicate with each other via the first and second connection ports.
In the current embodiment, t1 is defined as a first start time for the first timer 112, t2 is defined as a first stop time for the first timer 112, t3 is defined as a second start time for the first timer 112, and t4 is defined as a second stop time for the first timer 112. A_time is defined as an elapsed time between the first start time t1 and the first stop time t2 of the first timer 112. B_time is defined as an elapsed time between the second start time t3 and the second stop time t4 of the first timer 112. C_time is defined as an elapsed time between a first start time and a first stop time of the second timer 122. D_time is defined as an elapsed time between a first start time and a first stop time of the third timer 132.
T1 is defined as a first delay time of transmitting signals from the controller 11 to the first motor driver 12. T2 is defined as a second delay time of transmitting signals from the first motor driver 12 to the second motor driver 13. The sum of T1 and T2 is defined as a third delay time of transmitting signals from the controller 10 to the second motor driver 13. The value of A_time is two times the value of the first delay time T1. The value of B_time is two times the value of the third delay time (T1+T2).
In block S1, the controller 11 outputs a first signal to the first motor driver 12, and the first timer 112 of the controller 11 starts to time for the first time at the first start time t1.
In block S2, the second timer 122 of the first motor driver 12 returns a first feedback signal to the controller 11 when it receives the first signal from the controller 11. At the same time, the first timer 112 stops timing at t2.
In block S3, the controller 11 divides the value of A_time of the first timer 112 by two to get the value of the first delay time T1.
In block S4, the value of the first delay time T1 is stored in the storing unit 110 of the controller 11.
In block S5, the controller 11 adds the value of the first delay time T1 to the value of A_time of the first timer 112 to get a first sum (T1+A_time), and transfers the first sum (T1+A_time) to the second timer 122. Therefore, a value of C_time of the second timer 122 is equal to the first sum (T1+A_time). As a result, the controller 11 can start the first motor driver 12 precisely at a desired time.
In block S21, the controller 10 outputs a second signal to the second motor driver 13 via the first motor driver 12, and the first timer 112 starts to time for the second time from the second start time t3.
In block S22, the third timer 132 of the second motor driver 13 returns a second feedback signal to the controller 11 when it receives the second signal from the controller 11. At the same time, the first timer 112 stops timing at time t4.
In block S23, the controller 11 divides the value of B_time of the first timer 112 by two to get the value of the third delay time (T1+T2).
In block S24, the value of the third delay time (T1+T2) is stored in the storing unit 110 of the controller 11.
In block S25, the controller 11 adds the value of the third delay time (T1+T2) to the value of B_time of the first timer 112 to get a second sum (T1+T2+B_time), and transfers the second sum (T1+T2+B_time) to the third timer 132. Therefore, a value of D_time of the third timer 132 is equal to the second sum (T1+T2+B_time). As a result, the controller 11 can start the second motor driver 13 precisely at a desired time.
In block P1, the controller 11 transfers the first sum (T1+A_time) to the first buffer 120 of the first motor driver 12.
In block P2, the controller 11 compares the first sum (T1+A_time) with the value of C_time of the second timer 122 to get a first deviation value dt1.
In block P3, the controller 11 determines whether the first deviation value dt1 is equal to 0. If the first deviation value dt2 is equal to 0, the first delay time T1 does not need to be regulated.
In block P4, if the first deviation value dt1 is not equal to 0, the controller 11 replaces the value of the first delay time T1 with a correct value of the first delay time T1. The correct value of the first delay time T1 is equal to the sum of the original value of the first delay time T1 and the first deviation value dt1.
In block P21, the controller 11 transfers the second sum (T1+T2+B_time) to the second buffer 130 of the second motor driver 13.
In block P22, the controller 1 compares the second sum (T1+T2+B_time) with the value of D_time of the third timer 132 to get a second deviation value dt2.
In block P23, the controller 11 determines whether the second deviation value dt2 is equal to 0. If the second deviation value dt2 is equal to 0, the third delay time (T1+T2) does not need to be regulated.
In block P24, if the second deviation value dt2 is not equal to 0, the controller 11 replaces the third delay time (T1+T2) with a correct value of the third delay time (T1+T2). The correct value of the third delay time (T1+T2) is equal to the sum of the original value of the third delay time (T1+T2) and the second deviation value dt2.
The foregoing description of the exemplary embodiments of the invention has been presented only for the purposes of illustration and description and is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to explain the principles of the invention and their practical application so as to enable others skilled in the art to utilize the invention and various embodiments and with various modifications as are suited to the particular use contemplated. Alternately embodiments will become apparent to those skilled in the art to which the present invention pertains without departing from its spirit and scope. Accordingly, the scope of the present invention is defined by the appended claims rather than the foregoing description and the exemplary embodiments described therein.
Number | Date | Country | Kind |
---|---|---|---|
2008 1 0302154 | Jun 2008 | CN | national |
Number | Name | Date | Kind |
---|---|---|---|
4259621 | Jakobsen et al. | Mar 1981 | A |
4289997 | Jung et al. | Sep 1981 | A |
4825133 | Tanuma et al. | Apr 1989 | A |
5136222 | Yamamoto et al. | Aug 1992 | A |
5361260 | Mito | Nov 1994 | A |
5990638 | Aoyama et al. | Nov 1999 | A |
6348774 | Andresen et al. | Feb 2002 | B1 |
6442444 | Matsubara et al. | Aug 2002 | B2 |
6522096 | Roth | Feb 2003 | B1 |
6653810 | Lo | Nov 2003 | B2 |
6686712 | Numaguchi et al. | Feb 2004 | B2 |
6791294 | Kazama et al. | Sep 2004 | B1 |
6792330 | Matsumoto et al. | Sep 2004 | B1 |
6806660 | Fujisaki et al. | Oct 2004 | B2 |
6814546 | Sekiguchi | Nov 2004 | B2 |
6933698 | Miura et al. | Aug 2005 | B2 |
7000125 | Chapuis et al. | Feb 2006 | B2 |
7024257 | Pearce et al. | Apr 2006 | B2 |
7073022 | El-Batal et al. | Jul 2006 | B2 |
7119505 | Komaki et al. | Oct 2006 | B2 |
7143202 | Tehrani et al. | Nov 2006 | B2 |
7456617 | Chapuis et al. | Nov 2008 | B2 |
20020049505 | Heinemann et al. | Apr 2002 | A1 |
20020093303 | Lo | Jul 2002 | A1 |
20020110155 | Pearce et al. | Aug 2002 | A1 |
20030005188 | Tehrani et al. | Jan 2003 | A1 |
20030085674 | Numaguchi et al. | May 2003 | A1 |
20030128007 | Fujisaki et al. | Jul 2003 | A1 |
20040160206 | Komaki et al. | Aug 2004 | A1 |
20040178761 | Miura et al. | Sep 2004 | A1 |
20050289373 | Chapuis et al. | Dec 2005 | A1 |
20060271805 | Pearce et al. | Nov 2006 | A1 |
Number | Date | Country | |
---|---|---|---|
20090309533 A1 | Dec 2009 | US |