• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >嵌入式开发 > c#TekScope示波器编程求大虾们给个例子程序参考学习一下

c#TekScope示波器编程求大虾们给个例子程序参考学习一下

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-06-05

佚名通过本文主要向大家介绍了c#TekScope示波器编程求大虾们给个例子程序参考学习一下等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: c# TekScope示波器编程 求大虾们给个例子程序参考学习一下
描述:

c#示波器

最近一个项目需要用c#设置示波器并获取示波器的波形数据,使用了TekScope,文档看了一段时间,但是毫无起色,希望有大神们能给个实例程序 谢谢啦。


解决方案1:

引用 6 楼 u012030603 的回复:
@running_crazy 请问还在关注吗 大神帮帮呀。

这是初始化的代码,其中包括所有的参数设置,包括采集的刻度,采集的记录长度,频率,采集通道这些的, 你可以对照着示波器开发文档看看.  这个是用VB写的, 跟C#差别不大.

Private Sub Initialize() Implements IScopeClass.Initialize
        _Scope.Descriptor = _DevHandle
        _Scope.YMult = 1 / 250
        _Scope.YOffset = _Yoffset
        _Scope.YZero = _Yzero
        'Send RCL command
        _Scope.WriteString("*RST")    '将在示波器重置为出厂默认值
        _Scope.WriteString("ACQ:MOD SAM")  '设置采用模式,SAM默认模式,在示例模式下,所有波形数据有 8 位的精度
        'scope.WriteString("HEAD ON")
        _Scope.WriteString("HEAD OFF")
        _Scope.YModelEnabled = False
        'HOR record lenth
        _Scope.WriteString("HOR:DEL:MOD ON")
        _Scope.WriteString("HOR:DEL:TIM" + Str(OffsetTime)) '设置或返回用于延迟时的水平的延迟时间
        _Scope.WriteString("HOR:SCA " + Str(_HScale))  '设置或返回时间基本水平缩放
        _Scope.WriteString("HOR:RECO " + Str(_RecordLen)) '设置水平的记录长度。此命令的查询表返回,当前水平的记录长度。
        'VER record lenth
        Dim VScale As Single = _VScale / 1000
        _Scope.WriteString("CH1:BAN FUL;COUP AC;TER MEG;OFFS 0;SCA " + Str(VScale))
        'BANdwidth Sets or returns the bandwidth of the specified TWEnty sets the upper bandwidth limit of channel <x> to 20 MHz.
        'COUPling Sets or returns the coupling setting for the specified(CHANNEL) AC sets channel <x> to AC coupling. DC sets channel <x> to DC coupling. GND sets channel<x> to ground.  Only a flat, ground-level waveform will be displayed
        'TERmination Sets the connected-disconnected status of a 50 ?resistor, which may be connected between the specified channel’s coupled input and oscilloscope ground.MEG sets the channel <x> input resistance to 1 M?
        'OFFSet Sets or returns the vertical offset for channel 
        'Scale Sets or returns the vertical scale for the channel specified by <x>, where x is the channel number.
        _Scope.WriteString("CH2:COUP DC;TER MEG;OFFS 1.5;SCA 5E-1")
        'Set up data source and format
        _Scope.WriteString("DAT:SOU CH1;ENC RIB;WIDTH 2")
        'DATa:SOUrce Sets or returns the location of the waveform data transferred from the oscilloscope by the CURVe?  query.
        'DATa:ENCdg Sets or returns the format of outgoing waveform data. This command is equivalent to setting WFMOutpre:ENCdg, WFMOutpre:BN_Fmt, andWFMOutpre:BYT_Or.Setting the DATa:ENGdg value causes the corresponding WFMOutpre values to be updated and conversley. RIBINARY specifies signed integer data point representation with the most significant byte transferred first.
        'WIDTH 2 When the byte width is two, the values range from -32768 to 32767. and positive integer values range from 0 to 65,535
        'Set up data format
        _Scope.WriteString("WFMO:ENCDG BIN")
        'WFMO:ENCDG Sets and queries the type of encoding for outgoing waveforms. 
        'BINary specifies that outgoing data is to be in a binary format whose further specification is determined by WFMOutpre:BYT_Nr, WFMOutpre:BIT_Nr, WFMOutpre:BN_Fmt and WFMOutpre:BYT_Or.
        _Scope.WriteString("WFMO:BN_FMT RI")
        'Sets or returns the format of binary data for outgoing waveforms specified by the DATa:SOUrce command. Changing the value of WFMOutpre:BN_Fmt also changes the value of DATa:ENCdg.
        'RI specifies signed integer data point representation. 
        '_Scope.WriteString("WFMOutpre:NR_Pt 100000")
        'This query returns the number of data points in the waveform record that will
        'be transmitted in response to a CURVe? query. This value is the adjusted
        'range specified by DATA:START and 
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

相关文章

  • 2017-06-05 PC与FPGA通过以太网连接
  • 2017-06-05 WinCE学习想从制作电路板开始
  • 2017-06-05 请问关于磁盘加载执行程序的问题,谢谢
  • 2017-06-05 VC++60中如何获得并口1的地址
  • 2017-06-05 求助!!交叉编译时出错
  • 2017-06-05 嵌入式下蓝牙该如何进行开发,求高手指点
  • 2017-06-17嵌入式操作系统的特点
  • 2017-06-05 dns服务器配置DNS跳转要如何配置
  • 2017-06-05 MFVDasm的破解
  • 2017-06-05 请版主和高手们关注---USB通讯程序中遇到的高难度问题

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • 对IPCAM编程请教
    • 关于台式机和无线路由器的一个小白问题
    • 两个usb转串口不能同时正常工作问题
    • linux虚拟机安装VMwareToolstools出错。
    • 寻求高手指点
    • 哪位DX知道往片子里写程序怎么英文翻译呀
    • ARM流水线技术
    • 请问一下在PROTEL99中放置元件和封装是如何对应起来的
    • 如何利用D触发器或D锁存器构建一个仲裁器
    • 关于Unix驱动的问题

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有