Here, "data receiving" refers to the data sent from the lower computer to the upper computer. There are two methods for "Timing": 1. When the upper computer requests data from the lower computer, the lower computer passively sends data to the upper computer; 2. The lower computer actively sends data to the upper computer.
The following describes the application scenarios of these two methods.
Method 1> there are two implementation methods. A> on the host computer interface, the user actively triggers the send request command, such as clicking the button. B> the host computer regularly sends the Request command. Use method 1>:
A> usage method 2> the data transmission frequency is too high, resulting in a high pressure on the serial port buffer; or there is no need to use the method 2> the host computer data is updated frequently.
B> A host machine is mounted with multiple lower computers and communicates with each other through a single serial port. As a result, the lower computer cannot control the sending time. Therefore, the upper computer must control the sending progress and request data from lower computer, blocking waits for lower machine A to return data and then requests data from lower machine B ······
Method 2> Implementation Method: A> send data to the upper computer when the lower computer data changes; B> If the lower computer is composed of the control panel and the Collector, the control panel can control timing, the lower computer can send data to the upper computer at regular intervals. Use method 2>:
A> the data change frequency of the lower computer is slow, while the data is wasted when the upper computer regularly requests too quickly. The data update is not timely when the lower computer data changes.
Scenario 1:
The data of the lower computer sometimes changes 2-5 times in one second, and sometimes changes once in five minutes. Send when data is changed from the lower computer.
Scenario 2:
The data of the lower computer sometimes changes 20 times in one second. If a> too fast update causes the refreshing pressure on the serial port and pc ui, B> the data is sent instead of the accumulated data, but the complete data is sent. The scheduled request is sent by the PC.
Case 3:
The progress cannot be controlled by the upper computer, which may easily lead to problems such as the pressure on the serial port. Use the upper computer to make a scheduled request or send a request when the user triggers the request.