设计 任务书 文档 开题 答辩 说明书 格式 模板 外文 翻译 范文 资料 作品 文献 课程 实习 指导 调研 下载 网络教育 计算机 网站 网页 小程序 商城 购物 订餐 电影 安卓 Android Html Html5 SSM SSH Python 爬虫 大数据 管理系统 图书 校园网 考试 选题 网络安全 推荐系统 机械 模具 夹具 自动化 数控 车床 汽车 故障 诊断 电机 建模 机械手 去壳机 千斤顶 变速器 减速器 图纸 电气 变电站 电子 Stm32 单片机 物联网 监控 密码锁 Plc 组态 控制 智能 Matlab 土木 建筑 结构 框架 教学楼 住宅楼 造价 施工 办公楼 给水 排水 桥梁 刚构桥 水利 重力坝 水库 采矿 环境 化工 固废 工厂 视觉传达 室内设计 产品设计 电子商务 物流 盈利 案例 分析 评估 报告 营销 报销 会计
 首 页 机械毕业设计 电子电气毕业设计 计算机毕业设计 土木工程毕业设计 视觉传达毕业设计 理工论文 文科论文 毕设资料 帮助中心 设计流程 
垫片
您现在所在的位置:首页 >>文科论文 >> 文章内容
                 
垫片
   我们提供全套毕业设计和毕业论文服务,联系微信号:biyezuopin QQ:2922748026   
Design and realization of serial communication interface based on LabVIEW
文章来源:www.biyezuopin.vip   发布者:毕业作品网站  

Design and realization of serial communication interface

based on LabVIEW

Guo Jie, Wang Zhaoba

National Key Laboratory For Electronic Measurement Technology  (Taiyuan Division),

North University of China, Taiyuan, Shanxi, China

Email: guojie@nuc.edu.cn


Abstract: Serial communication is the common communication way of industry locale instrument or equipment, and in the application of low data rate demands, serial communication is still comparatively low-priced communication way. In this paper the author mainly studies the serial communication interface drive in LabVIEW, and uses virtualinstrument standard API which is VISA to practice programming. VISA does not have the programming ability, and it is a high-layer API, realizing the instrument programming by the bottom drive and accomplishing serial communication interfaceprogram of long-range data collection terminal superordination machine based on 8051 monolithic machine, which is used for such following functions:(1) to set up baud rate, data form, verification form and the control of data stream and the document saving route according to different needs, (2) after the program operating, in the nobody's post condition, waiting for receive data from the data collection at any moment, and saving the data under the form to the document being appointed, and waiting for data handling. (3) When uploading data, according to the prescriptive order format, entering the initiation andtermination moment in the order window, pressing down sending order, waiting for the data from the monolithic machine data collect system, and saving the data, thereby, to observe the transformation of data.

Keywords: LabVIEW, serial communication, VISA

I. Instruction

The serial communication is the commonly used communication mode in industry spot instrument ordata gathering system. In the development data gathering system, the serial communication is the**simplest and commonly used instrumentcommunication interface on computer and the *monolithic integrated circuit. On the serial communication application, LabVIEW has the corresponding modules to allow the user to set up hisown application system rapidly, the LabVIEW programming may get rid of the tedious first level order , and may realize the communication of PC and the instrument easily.  II. VISA summary

2.1 The origin of VISA

In order to impel the standardization process of virtual instrument software, The VPP (VXI Plug & Play,which is called VPP) alliance completed the development of the standard of VISA , and issued each function prototype by standard form in 1996 . According to the VPP system specification definition, the virtual instrument system software architecture should contain three parts, as chart 2shows. The I/Ointerface software which use VPP’s standard is VISA.API (Application Program Interface) is the application software development interface, it is a group of functions of collections essentially, through it can visit the computer hardware equipment directly .VISA isthe standard API used in virtual instrument system.VISA does not have the programming ability itself, it is high level API, and it realizes the instrumentprogramming through transfering the first floor drivers. Its level as shows chart 1.

2.1.1 Input/output (I/O) interface software

The input/output (I/O) interface software between the instrument (namely I/O interface equipment) and theinstrument driver, it is a first level software level whichcompletes the direct data

access operation of instrument interior register unit and provides the information         transmission for the instrument and the instrumentdriver the, it is the foundation and the core to realize theopen and the unification virtual instrument system. TheVPP system specification stipulate the characteristic, the composition, the internal structure and therealization standard of the virtual instrument system input/output (I/O) interface software detailed , and willdefine the virtual instrument system input/output (I/O)interface software which is up to the VPP standard to beVISA software.

Chart 1 VISA interior mechanism

the software develop

environment  applying

The software

applying

Instrument driver

I/O Interface software

Chart 2 the virtual instrument system software architecture

2.1.2 Programme of instrument driver

Each instrument module has its own instrument driver.The essence of instrument driver was provides for the users more abstract operation function collection which is used in the instrument operated. As for the application procedure, it through the instrument driver to realize the operation of instrument; Instrumentdriver program call the unified foundation and stylefunction storehouse (the VISA storehouse) which provided by input/output (I/O) software to realize operation and management of regarding instrument,also is and the form which s through. Once the application programmer had the instrument driver program he can enter into the design work of virtual instrument system even he is not extremelyunderstands the instrument built-in function process.The instrument driver program is the link and bridge to connect the upper application software and the first floor input/output (I/O) software.

2.2 Characteristics of VISA

Compares with other extant I/O interface software, VISA has several characteristics as following:

(1) The control function of VISA I/O is suitable foreach kind of instrument. VISA has contained the control operation of VXI instrument, GPIB instrument,RS-232 the serial instrument and so on, and has contained the operation of register component, memory component and so on, its form is unified.

(2) The control function of VISA I/O is suitable foreach kind of instrument hardware interface.  (3) The control function of VISA I/O is suitable forboth the single processor system structure, and the multi-processor structure or the distribution network structure.

(4) The control function of VISA I/O is suitable formany kinds of networks mechanism. Regardless of the virtual instrument system network constitute the VXI engine cases expands network or the Ethernet ,the instrument operation is coincident .

The source program of VISA I/O software storehouse is exclusive, and is foreign to its system andprogramming language, it only provides the standard form API document as the system output.  In the VISA structure, the difference of instrument type show as the different resources name. As a VISA user, the use of different type instrument in the form and the method is the same.

III. System designs

According to the request of the experiment of remotedata gather terminal, in the design the RS-232 communication interface part of computer:

(1) According to different needs design the baud rate,the data format, the verification form as well as the data stream control, and establishes the document path of data storage.

(2) After running the program, when nobody duty, it waits for receiving the data from the data gathering terminal momentarily, and stores the data in the document which assigns in the form of text documents , waiting for the data processing.

(3) When transfering the data, according to stipulated orders form, in command window input the outset and the termination time, presses the transmission command, waiting for the data from the data gathering system of monolithic integrated circuit, and store the data in the text documents which assigned the path, and display the data in the observation window simultaneously to observe change of the signal.  3.1 Initializing serial interface

According to the request of design ,initialize the serial interface as: Baud rate 2400b/s, data position 8 bit, 1 bit stop position, non- parity check position.

3.2 Operation of reading data

After the system initialized, it is waiting for receive the data .The data gathers terminal transmit data time-lapse. The data is storaged in specific folder asthe data and the time are transmitted on together, and record the data history automatically, waiting for the processing of following procedure.

3.3 Operation of writing data

When transmit data of specifically time slice, the computer sends an order (namely value of outset time and termination time) to the monolithic integrated circuit, and withdrawal from record data, transmitting an order string to the serial interface, the order must be written in outset time and the termination timewindow before pressing the transmit button, after transmission wait it for the monolithic integrated circuit process data delayed and  waiting for receiving data . After receiving the data and displaying the data in the observation window close the read data 0 button, the data not be lose as the system will in thecondition of waiting receive the data which transmitted time-lapse .It should be noticed that the control button which send order can be designed as apulse, otherwise the program will send orders circularly ,and cannot return to the condition of waiting for transmit time-lapse.

3.4 Close serial interface

After close the gather system close serial interface, releases the resources which took up by LabVIEW.

IV. Program flow diagram

Program flow diagram like chart 3 shows.

Chart 3 program flow diagram

Start to run. Initialize serial interface. Waiting receive data.Stored datum. The data acquisition system onfixed time passes on the data. Transmit order. Transmit order character. Waits for receive data. Requests some o'clock compartment data whichpasses on. stores data in the document. Confirms the data receive. Whether withdraws from the procedure. Close serial interface.

V. Confirm program

Transmitting time orders to the gather terminal, namely record the returned data in document data.txt, and display the data in the observation window simultaneously. Receiving the data which is from data gather terminal transmit time-lapse, writing in the document DATA1.txt, waiting more data processing.

VI. Conclusion

It has completed the design and realization of serial interface driver through the debugging, the results indicate that the transmission of data is accurate, andthe establishment of parameter is flexible, reach the requirements of design.  REFERENCES

[1] Yang Leping, Li Hai Tao, Yang Lei. LabVIEWprogramming and application [ M ] 2 version Beijing:Publishing House OF Electronics Industry,2005.

[2] Liu Jun hua. Design of virtual instrument Based on LabVIEW [ M ] Beijing: Publishing House of ElectronicsIndustry,2003.

[3] Liu Jun hua. Graph programming language of virtual instrument LabVIEW course Xi'an Publishing House of Electron Technology University


  全套毕业设计论文现成成品资料请咨询微信号:biyezuopin QQ:2922748026     返回首页 如转载请注明来源于www.biyezuopin.vip  

                 

打印本页 | 关闭窗口
本类最新文章
The Honest Guide Sonar Target Cla Process Planning
Research on the Sustainable Land UniCycle: An And
| 关于我们 | 友情链接 | 毕业设计招聘 |

Email:biyeshejiba@163.com 微信号:biyezuopin QQ:2922748026  
本站毕业设计毕业论文资料均属原创者所有,仅供学习交流之用,请勿转载并做其他非法用途.如有侵犯您的版权有损您的利益,请联系我们会立即改正或删除有关内容!