iOS下手持虚拟仪器的设计

 2022-05-14 07:05

论文总字数:35582字

摘 要

随着虚拟仪器技术因其在性价比、灵活性及开放性上的优势逐渐得到广泛应用与关注,结合移动智能终端易于携带与移动的优势,同时考虑到iOS移动终端及其应用在日常生活中得到的普遍使用,提出了iOS下手持虚拟仪器的设计,旨在应用于实际测试测量工程场景和工程教育的课程与实验中,提供灵活、高性价比同时具有较高便携性的虚拟电子仪器仪表。

本设计结合虚拟仪器与iOS移动应用开发,基于东南大学自主研发的PocketLab硬件,通过集成开发环境Xcode及Swift语言,设计一个搭载于iOS移动设备上的便携式虚拟实验室,提供示波器与信号发生器的集成功能界面。该应用软件系统在功能上划分为网络通信模块、示波器模块与信号发生器模块,同时纵向划分为网络通信层、数据处理层以及界面交互层。其中,示波器模块提供了双通道信号波形显示以及耦合方式、直流偏置、垂直电压单位与水平时间单位的设置;信号发生器模块则提供了波形、频率、幅度、直流偏置、占空比等参数可调节的独立通道信号与双通道差分信号的设置。在关键技术方面,其通过WIFI无线通信对硬件部分进行控制,并使用异步通信GCDAsyncSocket类实现网络通信与传输;结合代理协议与方法函数,对输入输出数据流中的信息进行处理,并通过Charts类对信号波形进行呈现;此外,还通过多种系统控件与视图组合,完善设计与操作逻辑,呈现出友好的交互界面。

最后,对该iOS下手持虚拟仪器的测试表明,其实现了设计目标与要求,功能较完善,并且用户体验良好,能够在应用场景中提供重要的意义。

关键词:虚拟仪器,PocketLab,iOS,示波器,信号发生器

ABSTRACT

With the advantages of cost performance, flexibility and openness, virtual instrumentation technology has been widely used and paid close attention to. Besides, in combination with mobile smart terminals’ superiority in being easy to carry and move as well as the fact that iOS mobile terminals and their applications have been widely used in people’s daily life, we design an iOS handheld virtual instrument. It is designed to be used in engineering scenarios for practical tests and measurements, and engineering education for courses and experiments, providing flexible and cost-effective virtual electronic instrumentation with high portability.

Combining virtual instrumentation with iOS mobile application development, based on the PocketLab hardware independently developed by Southeast University, through the integrated development environment, Xcode, and the development language, Swift, we design a portable virtual lab on iOS mobile devices, which could provide integrated functional interface of oscilloscope and signal generator. The App system is functionally divided into network communication module, oscilloscope module and signal generator module, and is also vertically divided into network communication layer, data processing layer and interface interaction layer. Among them, oscilloscope module provides dual channel signal waveform display with coupling mode, DC offset, Volts/Div and Time/Div settings; signal generator module provides parameter (waveform, frequency, amplitude, DC offset, duty cycle, etc.)-adjustable separate channel and dual channel differential signal settings. As to the key technologies, the App system controls the hard component through WIFI wireless communication, and uses the asynchronous communication GCDAsyncSocket Class to implement the network communication and transmission; combined with delegate protocols and method functions, it could process the information in the I/O data stream, and then display the signal waveforms with Charts Class; in addition, through a combination of various system controls and views, the design and operation logic are improved, presenting a friendly interface to users.

Finally, the test of the handheld virtual instrumentation on iOS shows that the design goals and requirements are realized with nice functions and user experience, which would show great significance in application scenarios.

KEY WORDS: Virtual Instrumentation, PocketLab, iOS, Oscilloscope, Signal Generator

目 录

摘要 I

ABSTRACT II

第1章 绪论 1

1.1 引言 1

1.2 研究背景与意义 1

1.2.1 虚拟仪器技术 1

1.2.2 虚拟仪器技术的发展与现状 2

1.2.3 基于移动智能终端的虚拟仪器 3

1.3 本设计的主要目标与内容 4

1.4 本章小结 5

第2章 iOS系统的体系架构与开发环境 6

2.1 引言 6

2.2 iOS系统及其架构 6

2.2.1 iOS系统 6

2.2.2 iOS系统架构 6

2.2.3 iOS控件与视图控制器 7

2.3 iOS开发环境 8

2.3.1 Xcode 8

2.3.2 开发语言的选择方案与论证 8

2.4 本章小结 9

第3章 iOS PocketLab系统结构 10

3.1 引言 10

3.2 PocketLab硬件组件及性能 10

3.2.1 功能说明与简要参数 10

3.2.2 基于Windows PC的PocketLab软件 11

3.3 iOS PocketLab系统结构 11

3.3.1 系统架构 12

3.3.2 数据通信方式的选择方案与论证 12

3.4 iOS PocketLab软件架构 13

3.5 PocketLab App的层次结构 14

3.5.1 网络通信 14

3.5.2 数据处理 17

3.5.3 界面交互 18

3.6 第三方开源框架 20

3.7 本章小结 21

第4章 iOS PocketLab功能的实现 22

4.1 引言 22

4.2 iOS PocketLab主界面 22

4.2.1 功能说明 22

4.2.2 程序流图 22

4.2.3 交互界面 23

4.2.4 具体实现 24

4.3 iOS PocketLab示波器 25

4.3.1 功能说明 25

4.3.2 程序流图 26

4.3.3 交互界面 26

4.3.4 具体实现 29

4.4 iOS PocketLab信号发生器 31

4.4.1 功能说明 31

4.4.2 程序流图 31

4.4.3 交互界面 32

4.4.4 具体实现 33

4.5 应用程序测试 35

4.6 本章小结 37

第5章 总结与展望 38

5.1 总结 38

5.2 展望 39

参考文献 40

致 谢 41

绪论

    1. 引言

如示波器、信号发生器等常用电子仪器仪表是电子电气领域必不可少的工具,不仅仅在相关领域的开发、调试或测试场景中有着非常重要的意义,在电类专业的教学、实验和学习过程中也是不可或缺的。

剩余内容已隐藏,请支付后下载全文,论文总字数:35582字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;