1. Field of the Invention
Embodiments of the present disclosure relate to communication protocols and, particularly, to an auto-detection system and method for a communication protocol between a human-machine interface circuit and a driving device.
2. Description of Related Art
Driving devices require adjustment in different applications to achieve optimum motor performance. The communication protocol between a human-machine interface circuit and the driving device, along with transmission speeds therebetween, often determines the quality of communication. At present, a commonly used communication protocol is MODBUS. The MODBUS protocol includes an American Standard Code for Information Interchange (ASCII) transmission mode and a Remote Terminal Unit (RTU) transmission mode. The ASCII transmission mode includes six subprotocols, and the RTU transmission mode includes three subprotocols. The number of combinations between the subprotocols and the transmission modes is nine. The number of transmission speeds of the driving device is six. Therefore, the number of combinations between the transmission modes and the transmission speeds is fifty-four. When a specification of the driving device is lost or controls of a control panel are damaged, the setting value between the transmission modes and the transmission speeds cannot be acquired, necessitating a time-consuming manual search among the fifty-four combination forms.
Accordingly, an auto-detection system and a method for communication protocol are desired in order to overcome the described limitations.
The human-machine interface circuit 30 transmits a detection signal to the switching circuit 50. The detection signal includes transmission speed identification (hereinafter referred to as TSI), transmission mode identification (hereinafter referred to as TMI), and communication mode identification (hereinafter referred to as CMI). In the exemplary embodiment, the effective value of the TSI is A, and effective values of the TMI and the CMI equal zero. The invalid values of the TMI and the CMI equal one.
The switching circuit 50 sets the communication mode between the driving device 10 and the human-machine interface circuit 30 according to the value of the CMI. If the value of the CMI equals zero, the communication mode between the driving device 10 and the human-machine interface circuit 30 is determined as full-duplex communication. The human-machine interface circuit 30 transmits the detection signal to the driving device 10 through the switching circuit 50 and the conversion circuit 40. If the value of the CMI equals one, the communication mode between the driving device 10 and the human-machine interface circuit 30 is determined as half-duplex communication. The human-machine interface circuit 30 transmits the detection signal to the driving device 10 through the switching circuit 50.
The driving device 10 determines whether the detection signal is effective. If the value of TSI of the detection signal is A, the detection signal is effective. The driving device 10 initializes auto-detection of the transmission speed of the human-machine interface circuit 30 and sets the transmission speed as its transmission speed. Otherwise, the detection signal is invalid. The driving device 10 transmits a feedback signal to the human-machine interface circuit 30. The human-machine interface circuit 30 receives the feedback signal and then continuously transmits the detection signals to the driving device 10 until the received detection signal is determined as effective. The driving device 10 determines whether the TMI of the detection signal equals zero. If so, the driving device 10 sets its transmission mode as ASCII mode. If the value of the TMI of the detection signal equals one, the driving device 10 sets its transmission mode as RTU mode.
After the transmission mode and the transmission speed of the driving device 10 have been set, the human-machine interface circuit 30 detects the communication protocol of the driving device 10 according to the transmission mode. If the transmission mode of the driving device 10 is ASCII mode, the human-machine interface circuit 30 sets its communication protocol to be the first communication protocol chosen from any of the six communication protocols of ASCII mode. After the communication protocol has been set, the human-machine interface circuit 30 transmits a control signal to the driving device 10. The control signal includes a default signal. The driving device 10 receives the control signal and transmits the feedback signal to the human-machine interface circuit 30. If the feedback signal and the default signal are identical, the protocol set by the human-machine interface circuit 30 and the communication protocol of the driving device 10 are determined as identical. Automatic detection of the communication protocol of the driving device 10 is complete. Otherwise, the protocol set by the human-machine interface circuit 30 and the communication protocol of the driving device 10 are not identical. The human-machine interface circuit 30 can continues to set its communication protocol as the second communication protocol by choosing one from the rest of the six communication protocols of ASCII mode and transmits the control signal to the driving device 10, and keeps on repeating the process until the feedback signal and the default signal are identical.
The auto-detection system 1 for communication protocol sets the transmission mode and the transmission speed of the driving device 10. Human-machine interface circuit 30 is able to try to set its communication protocol determining the communication protocol of the driving device 10 fewer than six times. Similarly, if the transmission mode of the driving device 10 is RTU mode, the human-machine interface circuit 30 sets its communication protocol determining the communication protocol of the driving device 10 fewer than three times.
2B are flowcharts of an embodiment of an auto-detection method for communication protocol.
In step S101, the human-machine interface circuit 30 transmits the detection signal to the switching circuit 50.
In step S102, the switching circuit 50 determines whether the value of the CMI of the detection signal equals zero. If so, S103 is implemented. If the value of the CMI of the detection signal equals one, step S104 is implemented.
In step S103, the communication mode between the human-machine interface circuit 30 and driving device 10 is determined to be full-duplex communication, and step S105 is implemented.
In step S104, the communication mode between the human-machine interface circuit 30 and driving device 10 is determined to be half-duplex communication, and step S105 is implemented.
In step S105, the driving device 10 receives the detection signal and determines whether the value of the TSI of the detection signal is A. If so, step S107 is implemented. If not, step S106 is implemented.
In step S106, the driving device 10 transmits the feedback signal to the human-machine interface circuit 30, and step S101 is repeated.
In step S107, the driving device 10 initializes auto-detection the transmission speed of the human-machine interface circuit 30 and sets the detected transmission speed as its transmission speed.
In step S108, the driving device 10 determines whether the value of the TMI of the detection signal equals zero. If so, step S109 is implemented. If not, step S114 is implemented.
In step S109, the driving device 10 sets its transmission mode as ASCII mode and sets a variable i to one.
In step S110, the human-machine interface circuit 30 sets its communication protocol to be the ith communication protocol of ASCII mode and transmits the control signal to the driving device 10. The control signal includes a default signal.
In step S111, the driving device 10 receives the control signal and transmits the feedback signal to the human-machine interface circuit 30.
In step S112, the human-machine interface circuit 30 determines whether the feedback signal and the default signal are identical. If so, step S117 is implemented, the communication protocol of the driving device 10 and the human-machine interface circuit 30 are identical, and detection of the communication protocol of the driving device 10 is complete. If not, when the transmission mode of the driving device 10 is ASCII mode, step S113 is implemented, and when the transmission mode of the driving device 10 is RTU mode, step S115 is implemented.
In step S113, one is added to the variable i, and step S110 is implemented.
In step S114, the driving device 10 sets its transmission mode as RTU mode and sets a variable k to one, and step S116 is implemented.
In step S115, one is added to the variable k, and step S116 is implemented.
In step S116, the human-machine interface circuit 30 sets its communication protocol to the kth communication protocol of RTU mode and transmits the control signal to the driving device 10, and step S111 is implemented. The control signal includes a default signal.
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
Number | Date | Country | Kind |
---|---|---|---|
2008 1 0303620 | Aug 2008 | CN | national |
Number | Name | Date | Kind |
---|---|---|---|
4771417 | Maxwell et al. | Sep 1988 | A |
5200949 | Kobayashi | Apr 1993 | A |
5222081 | Lewis et al. | Jun 1993 | A |
5226121 | Spenik et al. | Jul 1993 | A |
5408421 | Prest et al. | Apr 1995 | A |
5490209 | Kennedy et al. | Feb 1996 | A |
5631952 | O'Barr et al. | May 1997 | A |
5654983 | Sauser, Jr. | Aug 1997 | A |
5684864 | Shibata | Nov 1997 | A |
5687174 | Edem et al. | Nov 1997 | A |
5938731 | Schreiter | Aug 1999 | A |
6072827 | Krulce | Jun 2000 | A |
6097754 | Fitch et al. | Aug 2000 | A |
6157689 | Petty et al. | Dec 2000 | A |
6169746 | Ueda et al. | Jan 2001 | B1 |
6198785 | Flynn | Mar 2001 | B1 |
6349331 | Andra et al. | Feb 2002 | B1 |
6366632 | Noh | Apr 2002 | B1 |
6614796 | Black et al. | Sep 2003 | B1 |
6792337 | Blackett et al. | Sep 2004 | B2 |
6798869 | Sidhu et al. | Sep 2004 | B1 |
6813525 | Reid et al. | Nov 2004 | B2 |
6880015 | Siders | Apr 2005 | B1 |
7333536 | Sinha et al. | Feb 2008 | B2 |
7676592 | Coffey | Mar 2010 | B2 |
7752280 | Wei | Jul 2010 | B2 |
20040246919 | Larsson | Dec 2004 | A1 |
20050287963 | Ikeda | Dec 2005 | A1 |
20070147251 | Monsen | Jun 2007 | A1 |
20080240142 | Belgaied et al. | Oct 2008 | A1 |
20080316048 | Abdallah | Dec 2008 | A1 |
Number | Date | Country |
---|---|---|
918421 | May 1999 | EP |
2003298614 | Oct 2003 | JP |
WO 9851120 | Nov 1998 | WO |
WO 9960760 | Nov 1999 | WO |
WO 0010292 | Feb 2000 | WO |
WO0284469 | Oct 2002 | WO |
Number | Date | Country | |
---|---|---|---|
20100033351 A1 | Feb 2010 | US |