当前位置:网站首页>LabVIEW或MAX下的VISA测试面板中串口无法工作
LabVIEW或MAX下的VISA测试面板中串口无法工作
2022-06-10 22:30:00 【LabVIEW开发】
LabVIEW或MAX下的VISA测试面板中串口无法工作
什么串口设备在超级终端中工作,但不在LabVIEW或Measurement& Automation Explorer (MAX)下的VISA测试面板中工作?
解答: 串口设备可能在超级终端中工作但不在LabVIEW或MAX下的VISA测试面板中工作的原因有两个:终止符不同和字符传输速度不同。使用下面的方法来解决与这两个原因相关的问题。
确保超级终端与LabVIEW中使用的终止符相匹配
一般情况下,超级终端在其发送的每条信息之后添加一组 \r\n,它对应于一个回车符后紧跟着一个换行符。
在LabVIEW中可以使用字符型输入和显示控件的 \代码显示项来检查终止符是否一致。例如,可以使用loopback测试方法(关于loopback测试说明请参见下面链接中的NI开发者园地指南)从超级终端发出一个字符串,然后在LabVIEW中读回。这会帮助确定超级终端使用了什么终止符。然后,再次使用loopback测试,从LabVIEW中发出相同的字符串并在LabVIEW中读回。对比这些值即可决定两者的终止符是否相匹配。
降低向设备发送命令字符串的速度。(如果串口设备较旧,并且/或者其没有硬件控制它,因此LabVIEW和/或MAX中的VISA测试面板以多快的速度向其发送串行数据就是一个问题
一旦向超级终端中输入字符,超级终端就会将向串口写入这些字符。因此,当输入字符串时,超级终端将在字符串结束后发送6个独立的终止字符:首先是s, 然后是t, 最后是r等等。

编辑
添加图片注释,不超过 140 字(可选)
然而,LabVIEW则会获取所有字符串并一次性写入设备,且各字符间没有延迟。可以使用一个for循环来进行测试,将该字符串输出到设备中且每次只输出一个字符,在循环内为每个字符间的输出设置一个短暂的延时。附件中的Basic Serial Write and Read_1 bit.vi就是一种实现方法
更详细的内容,参加如下附件的介绍。
LabVIEW、LabVIEW开发、LabVIEW编程、LabVIEW程序
上文中提到的例子和资料,均在word中的附件里,可点击下载。进一步了解,可联系们。
LabVIEW或MAX下的VISA测试面板中串口无法工作 - 北京瀚文网星科技有限公司 (bjcyck.com)
边栏推荐
- R 语言绘制二维正态分布的密度曲面图;
- Introduction to Wireshark capturing RTP load TS stream (UDP multicast)
- Unity 脚本无法显示C#源码的中文注释 或者VS创建的脚本没有C#源码的注释
- 300 questions on behalf of the first lecture on determinant
- flutter 如何去掉listview顶部空白的问题
- 掌握高性能计算前,我们先了解一下它的历史
- Is it safe to open an account for tongdaxin stock? How to open an account?
- Which securities company does qiniu's securities belong to? Is it safe?
- LeetCode 501 :二叉搜索树中的众数
- Simple impedance matching circuit and formula
猜你喜欢

Prefer "big and small weeks", only write 200 lines of code every day, and the monthly salary of 8k-17k people will rise again

Before we learn about high-performance computing, let's take a look at its history

300题 线代第一讲行列式

Leetcode 501: mode in binary search tree

Dell r730 RAID5 installation server 2016 (disk larger than 2t)

Executor - Shutdown、ShutdownNow、awaitTermination 详解与实战

300 questions on behalf of the first lecture on determinant

LeetCode+ 16 - 20

Model Workshop

Ma8601 pin √ pin replaces Tang Ming fe1.1s without changing the circuit board | perfectly replaces fe1.1s scheme
随机推荐
Build TAR model using beersales data set in TSA package
Two debugging techniques in embedded software development
Wireshark抓取rtp负载ts流介绍(UDP组播)
Solve access denied for user 'root' @ 'localhost' (using password: yes)
What are the common methods of object
This article introduces you to j.u.c's futuretask, fork/join framework and BlockingQueue
MySQL learning child query
Project training 13 - Interface supplement
Executor - Shutdown、ShutdownNow、awaitTermination 详解与实战
LeetCode 501 :二叉搜索樹中的眾數
Data and information resource sharing platform (6)
30 | 怎么重设消费者组位移?
Chapter 6 - branch and bound method
Why is the kotlin language not popular now?
[flutter problem series Chapter 6] how to achieve the scrolling effect of list messages in flutter
Dell R730 raid5 安装Server 2016(解决磁盘大于2T)
细数十大信息安全原则
Development and implementation of AI intelligent video analysis easycvr platform device channel batch deletion function
Ride the storm and explore the secret behind the open source of flyfish, a data visualization development platform!
leetcode 130. Surrounded Regions 被围绕的区域(中等)