Disclosure of Invention
The invention aims to provide a method and a system for controlling a numerical control machine based on a wireless network, thereby overcoming the problems in the prior art.
In order to achieve the aim, the invention provides a numerical control machine control method based on a wireless network, which comprises the following steps:
sending a numerical control machine control message transmission link access request message to a numerical control machine control center by a mobile control terminal;
receiving a numerical control machine control message transmission link access request response message, wherein the numerical control machine control message transmission link access request response message is sent by a numerical control machine control center in response to receiving the numerical control machine control message transmission link access request message;
the mobile control terminal judges the state of the transmission link based on the control message transmission link access request response message;
if the transmission link state is judged to be superior to the given state, the mobile control terminal simultaneously sends a transmission link contention judgment request message and a numerical control machine control message to a numerical control machine control center;
receiving a first type of contention judgment response message by the mobile control terminal, wherein the first type of contention judgment response message is sent by the numerical control machine control center in response to receiving the transmission link contention judgment request message and the numerical control machine control message;
judging whether the transmission link contention judgment request message and the numerical control machine control message are successfully sent or not by the mobile control terminal based on the first type contention judgment response message; and
and if the transmission link contention judgment request message and the numerical control machine tool control message are judged to be unsuccessfully transmitted, the mobile control terminal transmits the transmission link contention judgment request message and the numerical control machine tool control message again after the first preset time.
Preferably, in the above technical solution, the cnc machine control message transmission link access request response message includes a transmission link status indicator, where the transmission link status indicator is generated by the following steps:
monitoring the bandwidth of a transmission link by a numerical control machine control center;
a transmission link status indicator is generated based on the bandwidth of the transmission link.
Preferably, in the above technical solution, the method for controlling a numerically-controlled machine tool based on a wireless network further includes the following steps:
if the transmission link state is judged not to be superior to the given state, the mobile control terminal independently sends a transmission link contention judgment request message to the numerical control machine control center;
receiving a second type of contention resolution response message by the mobile control terminal, wherein the second type of contention resolution response message is sent by the cnc control center in response to receiving the transmission link contention resolution request message;
determining, by the mobile control terminal, whether contention occurs on the transmission link based on the second type contention determination response message;
and if the contention does not occur on the transmission link, the mobile control terminal sends the numerical control machine control message to the numerical control machine control center.
Preferably, in the above technical solution, the method for controlling a numerically-controlled machine tool based on a wireless network further includes the following steps:
receiving, by the mobile control terminal, a numerical control machine tool control message reception confirmation message, wherein the numerical control machine tool control message reception confirmation message is sent by the numerical control machine control center in response to receiving the numerical control machine tool control message;
the mobile control terminal receives the confirmation message based on the numerical control machine tool control message to judge whether the numerical control machine tool control message is successfully sent; and
and if the numerical control machine tool control message is judged not to be successfully sent, the mobile control terminal sends the numerical control machine tool control message to the numerical control machine tool control center again after the second preset time.
Preferably, in the above technical solution, the method for controlling a numerically-controlled machine tool based on a wireless network further includes the following steps:
if it is judged that contention occurs on the transmission link, the mobile control terminal again transmits the data after the third predetermined time;
wherein the third predetermined time is greater than the second predetermined time, and wherein the first predetermined time is greater than the second predetermined time.
The invention also provides a numerical control machine tool control system based on the wireless network, which comprises the following components:
at least one numerical control machine;
at least two mobile control terminals; and
the system comprises a numerical control machine control center, a mobile control terminal and a mobile terminal, wherein the numerical control machine control center is in communication connection with at least one numerical control machine, and is in communication connection with at least two mobile control terminals;
wherein the mobile control terminal is configured to:
sending a numerical control machine control message transmission link access request message to a numerical control machine control center;
receiving a numerical control machine control message transmission link access request response message, wherein the numerical control machine control message transmission link access request response message is sent by a numerical control machine control center in response to receiving the numerical control machine control message transmission link access request message;
judging the state of a transmission link based on the control message transmission link access request response message;
if the transmission link state is judged to be superior to the given state, simultaneously sending a transmission link contention judgment request message and a numerical control machine control message to a numerical control machine control center;
receiving a first type of contention judgment response message, wherein the first type of contention judgment response message is sent by the numerical control machine control center in response to receiving the transmission link contention judgment request message and the numerical control machine control message;
judging whether the transmission link contention judgment request message and the numerical control machine control message are successfully sent or not based on the first type of contention judgment response message; and
and if the transmission link contention judgment request message and the numerical control machine tool control message are judged to be unsuccessfully transmitted, transmitting the transmission link contention judgment request message and the numerical control machine tool control message again after the first preset time.
Preferably, in the above technical solution, the cnc machine control message transmission link access request response message includes a transmission link status indicator, where the transmission link status indicator is generated by the following steps:
monitoring the bandwidth of a transmission link by a numerical control machine control center;
a transmission link status indicator is generated based on the bandwidth of the transmission link.
Preferably, in the above technical solution, the mobile control terminal is further configured to:
if the transmission link state is judged not to be superior to the given state, independently sending a transmission link contention judgment request message to the numerical control machine control center;
receiving a second type of contention judgment response message, wherein the second type of contention judgment response message is sent by the numerical control machine control center in response to receiving the transmission link contention judgment request message;
determining whether contention occurs on the transmission link based on the second type of contention determination response message;
and if the contention does not occur on the transmission link, sending a numerical control machine control message to a numerical control machine control center.
Preferably, in the above technical solution, the mobile control terminal is further configured to:
receiving a NC machine tool control message reception confirmation message, wherein the NC machine tool control message reception confirmation message is sent by the NC machine tool control center in response to receiving the NC machine tool control message;
judging whether the numerically-controlled machine tool control message is successfully sent or not based on the numerically-controlled machine tool control message receiving confirmation message; and
and if the numerical control machine tool control message is judged not to be successfully sent, after second preset time, the numerical control machine tool control message is sent to the numerical control machine tool control center again.
Preferably, in the above technical solution, the mobile control terminal is further configured to:
if the contention occurs on the transmission link, sending a single transmission link contention judgment request message to the numerical control machine control center again after a third preset time;
wherein the third predetermined time is greater than the second predetermined time, and wherein the first predetermined time is greater than the second predetermined time.
Compared with the prior art, the invention has the following beneficial effects: although web browsing, entertainment, streaming media transmission using mobile terminals such as mobile phones and tablet computers have been very common technologies. However, how to use the wireless communication method for industrial control to achieve the goal of Chinese intelligent vision still remains a problem in the prior art. In particular, currently, the prior art still does not establish an effective communication flow to complete the information exchange between the mobile control terminal and the machine tool control center. In order to solve the problems of the prior art, the invention provides a numerical control machine tool control method and a system based on a wireless network, the invention integrates a monitoring mechanism of a channel condition in the method, can self-adaptively adjust the size of a data packet based on a monitoring result, and simultaneously transmits a plurality of information when the channel condition is good, thereby reducing the data transmission time and the channel occupation time and improving the transmission efficiency; when the channel condition is poor, the size of the data packet is reduced, and the success rate of data transmission is improved.
Detailed Description
The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the word "comprise", or variations such as "comprises" or "comprising", will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component.
Fig. 1 is a flow chart of a method according to the present invention, and as shown in the figure, the method for controlling a numerically controlled machine tool based on a wireless network according to the present invention comprises the following steps:
step 101: sending a numerical control machine control message transmission link access request message to a numerical control machine control center by a mobile control terminal;
step 102: receiving a numerical control machine control message transmission link access request response message, wherein the numerical control machine control message transmission link access request response message is sent by a numerical control machine control center in response to receiving the numerical control machine control message transmission link access request message;
step 103: the mobile control terminal judges the state of the transmission link based on the control message transmission link access request response message;
step 104: if the transmission link state is judged to be superior to the given state, the mobile control terminal simultaneously sends a transmission link contention judgment request message and a numerical control machine control message to a numerical control machine control center;
step 105: receiving a first type of contention judgment response message by the mobile control terminal, wherein the first type of contention judgment response message is sent by the numerical control machine control center in response to receiving the transmission link contention judgment request message and the numerical control machine control message;
step 106: judging whether the transmission link contention judgment request message and the numerical control machine control message are successfully sent or not by the mobile control terminal based on the first type contention judgment response message; and
step 107: and if the transmission link contention judgment request message and the numerical control machine tool control message are judged to be unsuccessfully transmitted, the mobile control terminal transmits the transmission link contention judgment request message and the numerical control machine tool control message again after the first preset time.
Preferably, in the above technical solution, the cnc machine control message transmission link access request response message includes a transmission link status indicator, where the transmission link status indicator is generated by the following steps: monitoring the bandwidth of a transmission link by a numerical control machine control center; a transmission link status indicator is generated based on the bandwidth of the transmission link.
Preferably, in the above technical solution, the method for controlling a numerically-controlled machine tool based on a wireless network further includes the following steps: if the transmission link state is judged to be not better than the given state (the bandwidth of the transmission link is smaller than a preset value, the preset value can be obtained through numerical calculation or through experimental estimation), the mobile control terminal independently sends a transmission link contention judgment request message to the numerical control machine control center; receiving a second type of contention resolution response message by the mobile control terminal, wherein the second type of contention resolution response message is sent by the cnc control center in response to receiving the transmission link contention resolution request message; determining, by the mobile control terminal, whether contention occurs on the transmission link based on the second type contention determination response message; and if the contention does not occur on the transmission link, the mobile control terminal sends a numerical control machine control message to the numerical control machine control center.
Preferably, in the above technical solution, the method for controlling a numerically-controlled machine tool based on a wireless network further includes the following steps: receiving, by the mobile control terminal, a numerical control machine tool control message reception confirmation message, wherein the numerical control machine tool control message reception confirmation message is sent by the numerical control machine control center in response to receiving the numerical control machine tool control message; the mobile control terminal receives the confirmation message based on the numerical control machine tool control message to judge whether the numerical control machine tool control message is successfully sent; and if the numerical control machine tool control message is judged not to be successfully sent, the mobile control terminal sends the numerical control machine tool control message to the numerical control machine tool control center again after the second preset time.
Preferably, in the above technical solution, the method for controlling a numerically-controlled machine tool based on a wireless network further includes the following steps: if it is judged that contention occurs on the transmission link, the mobile control terminal again transmits the data after the third predetermined time; wherein the third predetermined time is greater than the second predetermined time, and wherein the first predetermined time is greater than the second predetermined time.
Fig. 2 is a block diagram of a wireless network based numerical control machine tool control system according to the present invention. As shown in the figure, the numerical control machine tool control system based on the wireless network comprises: at least one numerically controlled machine (referenced 202a-202x in FIG. 2); at least two mobile control terminals (labeled 201a-201x in FIG. 2); and a numerically controlled machine tool control center 203, wherein the numerically controlled machine tool control center is in communication connection with at least one numerically controlled machine tool, and wherein the numerically controlled machine tool control center 203 is in communication connection with at least two mobile control terminals (201a-201 x).
Wherein the mobile control terminal is configured to: sending a numerical control machine control message transmission link access request message to a numerical control machine control center; receiving a numerical control machine control message transmission link access request response message, wherein the numerical control machine control message transmission link access request response message is sent by a numerical control machine control center in response to receiving the numerical control machine control message transmission link access request message; judging the state of a transmission link based on the control message transmission link access request response message; if the transmission link state is judged to be superior to the given state, simultaneously sending a transmission link contention judgment request message and a numerical control machine control message to a numerical control machine control center; receiving a first type of contention judgment response message, wherein the first type of contention judgment response message is sent by the numerical control machine control center in response to receiving the transmission link contention judgment request message and the numerical control machine control message; judging whether the transmission link contention judgment request message and the numerical control machine control message are successfully sent or not based on the first type of contention judgment response message; and if the transmission link contention judgment request message and the numerical control machine tool control message are judged to be unsuccessfully transmitted, transmitting the transmission link contention judgment request message and the numerical control machine tool control message again after the first preset time.
Preferably, in the above technical solution, the cnc machine control message transmission link access request response message includes a transmission link status indicator, where the transmission link status indicator is generated by the following steps: monitoring the bandwidth of a transmission link by a numerical control machine control center; a transmission link status indicator is generated based on the bandwidth of the transmission link.
Preferably, in the above technical solution, the mobile control terminal is further configured to: if the transmission link state is judged not to be superior to the given state, independently sending a transmission link contention judgment request message to the numerical control machine control center; receiving a second type of contention judgment response message, wherein the second type of contention judgment response message is sent by the numerical control machine control center in response to receiving the transmission link contention judgment request message; determining whether contention occurs on the transmission link based on the second type of contention determination response message; and if the contention does not occur on the transmission link, sending a numerical control machine control message to a numerical control machine control center.
Preferably, in the above technical solution, the mobile control terminal is further configured to: receiving a NC machine tool control message reception confirmation message, wherein the NC machine tool control message reception confirmation message is sent by the NC machine tool control center in response to receiving the NC machine tool control message; judging whether the numerically-controlled machine tool control message is successfully sent or not based on the numerically-controlled machine tool control message receiving confirmation message; and if the numerical control machine tool control message is judged not to be successfully sent, after second preset time, the numerical control machine tool control message is sent to the numerical control machine tool control center again.
Preferably, in the above technical solution, the mobile control terminal is further configured to: if the contention occurs on the transmission link, sending a single transmission link contention judgment request message to the numerical control machine control center again after a third preset time; wherein the third predetermined time is greater than the second predetermined time, and wherein the first predetermined time is greater than the second predetermined time.
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and its practical application to enable one skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalents.