All of the electronics total-station instrument because its function is strong and operate convenience and consumedly raised an open country homework efficiency. Therefore it just and gradually replace traditional diagraph instrument and it is expanded for an application. Although making use of the system menu function of total-station instruments can immediately complete normal regulations diagraph, monitor in the big dam safety, side the ascent transform a monitor etc. this kind of data is a little bit greatly and need solid the applied situation of processing data, it is will not satisfy demands only by function and amount of memory of instrument. The data at this time can be output a computer by the instrumental data exportation port, and the data can be processed and saved by software. Along with the extensive usage of calculator, many local open country digatial measure diagram method also need to carry out real-time transport. VB is released by the Microsoft company of according to visual programming language, its adoption faces to the program design method that object, affairs drives and operate simple, therefore doubly be subjected to program design personnel's favor.Underneath with Leica Tc 2002 whole station instrument for example, introduce how to carry out the communication between computer and total-station in the VB 6. 0 environment by making use of mscomm and the function of Windows API 31573
One,usage MSComm control a piece VB 6.0
provided an ActiveX to control Communication of a Microsoft Control, brief name MS Common controlled a piece, customer can at own of imbed MSComm to control a piece in the applied procedure, should control a piece to deliver and receive a data through a string of line port, for applied the procedure provide a string of line communication function. Choose VB 6.0"engineering" menus, open "parts" dialog box, pick out Microsoft Comm Control 6.0, can immediately control the piece to the mscomm and add a box of controlling of person VB. The mscomm that may use controls the attribute of piece to have several followings:
The CommPort: the constitution string go slogan;
Settings: constitution string the line communication parameter;
Portpopen: constitution or return to a string of communication appearance of;
InputMode: the constitution put off to a later time blunt area to read numeral format;
Input: from receive buffer area to read data;
Output: Write a number toward the buffer area according to:
In Buffer Size: receive the size of buffer area;
Out Buffer Size: send out the size of buffer area;
Out Buffer Count: send out the word stanza of buffer area number;
Input Len: constitution or return to Input to read the word stanza of each time number;
MS Comm controls the way that the piece provided two kinds of processings string communication: search method and affairs drive I/O method. Searching a way is direct and be easy to comprehension, but take up for a great deal of CPU time;The affairs drives a way from Windows 98 notice applied the procedure some affairs when take place, then according to the matter taken place The feeling comes to carries on an operation to the string. These two kinds of methods each beneficial fraud and oneself apply of realm, so in the different correspondence system, can according to the dissimilarity's requesting adoption different technique. In the middle of monitoring system, because of the contingency and request transmission data of affairs of solid sex, the calculator often adopts affairs to drive I/O method to carry on the spot monitor. It uses a step for:
1, open the port that needs to carry on communication, accept for communication and send out a data brigade the row assign memory area.
2, carry on a beginning to start to turn to the communication port, lead especially such as the wave, strange accidentally the school check, data, stop etc..
3, carry on reading and writing an operation to the communication port.
- 上一篇:网上电影票预订英文文献和中文翻译
- 下一篇:Linux网络时间协议英文文献和中文翻译
-
-
-
-
-
-
-
java+mysql车辆管理系统的设计+源代码
大众媒体对公共政策制定的影响
杂拟谷盗体内共生菌沃尔...
酸性水汽提装置总汽提塔设计+CAD图纸
河岸冲刷和泥沙淤积的监测国内外研究现状
乳业同业并购式全产业链...
十二层带中心支撑钢结构...
当代大学生慈善意识研究+文献综述
电站锅炉暖风器设计任务书
中考体育项目与体育教学合理结合的研究