当前位置: 首页 > news >正文

LabVIEW控制DO通道输出一个精确定时的数字波形

LabVIEW控制DO通道输出一个精确定时的数字波形

如何使用数据采集板卡的DO通道输出一个精确定时的数字波形?

解答:

产生一个数字波形首先需要创建一个布尔数组,把波形序列信息放到该布尔数组中,然后通过一个布尔数组至数字转换vi来产生数字波形。该布尔数组的列数就是数字波形的个数。如果需要对该数字波形的频率进行定时,需要使用计数器输出时钟作为数字波形生成的时钟源,通过该时钟就可以对数字波形精确定时了。

PW = 1 /Freq = Period

可以参考附件中关于生成单数字波形和双数字波形的范例。

Writea Digital Waveform With a Specific Pulse Width and Digital High/Low Pattern

Overview

Theexample demonstrates how to generate digital waveform defined by the High-Lowpattern control and counter as the width manipulator of the signal (both Singleand Multi works the same)

Description:

Tospecify the pattern of the digital waveform, you must create a boolean arrayand convert it to a digital waveform using the DWDT Boolean Array To Digital.VIThis array will specify the high and low pattern of the digital waveform. Thenumber of columns in the boolean array will correspond to the number of linesthat you are outputting on. Instead of using the internal timebase, use acounter output pulse train as the timing source for the waveform, and this willspecify the pulse width of the digital waveform depending on the frequency ofthe counter pulse train.

Attachedare VIs that will permit one to generate a digital waveform on one line andgenerate a digital waveform on two lines. The block diagrams of each are exactly the same.

The keydifference lies within the controls on the front pannel. Notice in the One_Dig_Wvfrm_Write.vi, thereis only one Digital Output Line; whereas, in the Mult_Dig_Wvfrm_Write.vi, thereare two Digital Output Lines selected. Each column in the Digital High/Low Pattern control corresponds to anindividual digital output line.

Steps toimplement or execute code

Toimplement this example:

Definethe physical channels to be used

(Optional)Set the rest of the parameters as needed

Run theVI

(Optional)Turn on the Highlight Execution to see the flow of the VI

Toexecute this example:

Installthe required software.

Connectthe DAQ hardware that supports the DIO and Counter features

Confirmthe connection with the MAX with TestPanel

Open theVI and refer the Implement Steps

Requirements

Software

LabVIEW2012 or compatible

NI-DAQmx16.0 or compatible

Hardware

cDAQ withC series Digital IO and Counter Module

需要说明的是,上述的例程和文档,都是可以下载的,双击即可打开,其中压缩文件是可以采用粘贴复制的方式,拷贝到硬盘上。这不是图片,各位小伙伴看到后尝试一下,这个问题就不用加微信咨询了。有关LabVIEW编程、LabVIEW开发等相关项目,可联系们。附件中的资料这里无法上传,可去公司网站搜索下载。

http://www.lryc.cn/news/20570.html

相关文章:

  • openpnp - 零碎记录
  • Qt编写微信支付宝支付
  • LeetCode 剑指 Offer 64. 求1+2+…+n
  • Mapper代理开发
  • 为什么在连接mysql时,设置 SetConnMaxIdleTime 没有作用
  • 嵌入式开发利器
  • Qt 的QString类的使用
  • django项目部署(腾讯云服务器centos)
  • 计算机网络笔记、面试八股(一)——TCP/IP网络模型
  • 51单片机入门 - 简短的位运算实现扫描矩阵键盘
  • Mr. Cappuccino的第45杯咖啡——Kubernetes之部署SpringBoot项目
  • vscode在远程服务器提交git的时候无需每次都要输入账号密码的配置
  • 【Spring 基础】
  • 2023年全国最新机动车签字授权人精选真题及答案5
  • 5138: 数字游戏
  • 阅读笔记9——DenseNet
  • PowerAutomation获取邮件附件并删除这个邮件方法
  • websocket报错集锦-不断更新中
  • Spring Cloud Nacos源码讲解(七)- Nacos客户端服务订阅机制的核心流程
  • 【华为OD机试模拟题】用 C++ 实现 - 对称美学(2023.Q1)
  • Go语言内存管理详解-学习笔记
  • Geospatial Data Science (4): Spatial weights
  • JUC-Synchronized相关内容
  • 【c++】文件操作(文本文件、二进制文件)
  • 带你了解IP报警柱的特点
  • 一步步教你电脑变成服务器,tomcat的花生壳设置(原创)
  • Python 卷积神经网络 ResNet的基本编写方法
  • 【索引】什么是索引
  • 【算法刷题】动态规划算法题型及方法归纳
  • PolarDB数据库的CSN机制