Font Size: a A A

Design And Implementation Of Virtual Oscilloscope Based On Windows Platform

Posted on:2021-05-31Degree:MasterType:Thesis
Country:ChinaCandidate:Z GuoFull Text:PDF
GTID:2392330623478318Subject:Applied Physics
Abstract/Summary:PDF Full Text Request
Today in the development and debugging of embedded devices,developers often need to monitor key variables inside the device in real time,and then accurately analyze the current operating state of the device.Due to the limitations of its own structure,traditional oscilloscopes have been difficult to meet the increasingly diversified and efficient testing needs of users.Therefore,the new instrument concept of virtual oscilloscope has entered the developer's vision.Through modularized hardware devices and high-performance platform processing software,virtual oscilloscopes allow developers to freely and flexibly monitor and analyze data within embedded devices.Compared with traditional oscilloscopes,the cost of virtual oscilloscopes is lower,the scope of application is wider,and the functions are more scalable.This project designed a set of virtual oscilloscope system based on Windows platform using data acquisition equipment and platform software architecture,The goal is to collect and draw waveform data from the electronic control system with MCU as the core and monitor the key variables inside.The data acquisition hardware equipment uses the STM32F103 series of single-chip microcomputer as the core control chip,and the platform software uses the MFC framework to develop a dual-window,eightchannel waveform display control based on the scroll mode through the Direct2 D engine by self-drawing method.The specific research contents are as follows:(1)Data acquisition module: responsible for data collection.This module Compares and studies the hardware scheme of the data collection equipment,and formulates a UDP-based communication protocol between the collection equipment and the platform software on the basis of the selected scheme.The time stamp and CRC check mechanism are added to the protocol to ensure the reliability of data transmission.The platform software uses the WSAAsyncSelect asynchronous I / O model to receive UDP messages.At the same time,a two-dimensional ring buffer area is designed for packaging and storing data.(2)Waveform display module: the display window control designed in this project implements waveform drawing,waveform analysis and waveform triggering functions,and gives the interface design of the display window and the processing method of system key messages.In order to ensure the operating efficiency and drawing accuracy of the system,this subject takes a datagram of 1ms as the basic unit of drawing.The collection device packs the data at 1ms intervals,and the platform software selects the datagram to be drawn according to the length of time corresponding to one screen of the window.The thesis analyzes in detail the processing of the sampling points of the waveform data and the coordinate calculation method of the program under different time bases.The waveform analysis function provides two analysis methods: automatic analysis and cursor analysis,the automatic analysis implements the calculation of the waveform time and amplitude parameters of the software,and the cursor analysis realizes the user's fixed point on the waveform data through the vertical cursor and the horizontal cursor Observe.For the trigger function,the software designs two singleshot trigger modes,rising edge and falling edge,and the corresponding trigger judgment process.(3)File processing module: this module formulates the binary file format for data storage,and uses the mmap interface provided by the Windows operating system to implement software I / O operations on large binary files.In this paper,the design of the virtual oscilloscope system is realized through the research of the above three modules.The software accounted for a relatively large part of the overall development,so the system has rich functions and strong scalability.Finally,after a series of tests,it was verified that the various modules of the system can work normally,and the functions required by users have been achieved in general,the expected goals have been completed.
Keywords/Search Tags:Virtual oscilloscope, Windows, MFC, Waveform drawing, Data collection
PDF Full Text Request
Related items