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网络时间协议英文文献和中文翻译
-
-
-
-
-
-
-
中国传统元素在游戏角色...
高警觉工作人群的元情绪...
C++最短路径算法研究和程序设计
浅析中国古代宗法制度
现代简约美式风格在室内家装中的运用
g-C3N4光催化剂的制备和光催化性能研究
上市公司股权结构对经营绩效的影响研究
巴金《激流三部曲》高觉新的悲剧命运
江苏省某高中学生体质现状的调查研究
NFC协议物理层的软件实现+文献综述