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网络时间协议英文文献和中文翻译

AngularJS技术介绍英文文献和中文翻译

开关电源水冷却系统英文文献和中文翻译

减数分裂和基因重组英文文献和中文翻译

太阳能最大功率点追踪和...

移动码头的泊位分配问题英文文献和中文翻译

虚拟船舶装配集成建模方...

中学生科学探究中对等论...

上海居民的社会参与研究

酵母菌发酵生产天然香料...

浅谈高校行政管理人员的...

浅论职工思想政治工作茬...

基于Joomla平台的计算机学院网站设计与开发

STC89C52单片机NRF24L01的无线病房呼叫系统设计

压疮高危人群的标准化中...

从政策角度谈黑龙江對俄...

AES算法GPU协处理下分组加...

提高教育质量,构建大學生...