完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
祝大家好,我目前正致力于一个简单的项目,使用vb程序与我的e3633a电源进行通信。
我的问题是我无法从设备上读取。 当我发送命令行来设置电压和/或电流值时,它工作正常但是当我发送状态和测量命令如* idn? 或者测量:伏特:直流? 等,它没有响应...但是在我发送另一个命令后,错误410(查询中断)从电源发出蜂鸣声。 我已经将这个程序与其他电源一起使用,并且它完美无缺。 我还使用超级终端与所述e3633a进行通信,但仍然会出现同样的问题。 我面临的问题可能是什么。 谢谢。编辑:Ditch08于2013年10月28日下午6:22 以上来自于谷歌翻译 以下为原文 Good day to all, I am currently working on a simple project to communicate with my e3633a power supply using a vb program. My problem is i can't read from the device. When i send command lines to set voltages and/or current values, it is working properly but when i send status and measurement commands like *idn? or meas:volt:dc? etc., it doesn't respond... but after i send another command, the error 410 (Query INTERRUPTED) beeps out from the power supply. I already used this program with other power supplies and it worked flawlessly. I also used hyper terminal to communicate with the said e3633a but the same problem still occurs. What could be the problem i am facing. Thanks. Edited by: Ditch08 on Oct 28, 2013 6:22 PM |
|
相关推荐
5个回答
|
|
嗨,我不是专家,但我认为测试电源通信的最佳方法是使用“Agilent Connection Expert”(IOlibrairies)或National Instruments的NIMAX作为第一步。
如果通讯正常,您将确保与E3633A的通讯正常。 我使用IOlibrairies16.3在Windows 7下使用vb.net 2010和签证命令(附带模块visa32.bas)测试了我的E3633A。 我用这个简单的代码来测试:Public Function readVoltage_E3633A()As String Dim rdgs As System.Text.StringBuilder = New System.Text.StringBuilder(16)Dim SCPIcmd As String Dim Voltage As String SCPIcmd =“MEAS:VOLT:DC? “ &安培; vbLf errorStatus = visa32.viPrintf(viPowerSupply,SCPIcmd)errorStatus = visa32.viScanf(viPowerSupply,“%t”,rdgs)电压= rdgs.ToString返回电压结束函数 以上来自于谷歌翻译 以下为原文 Hi, I'm not an expert but I think the best way to test your power supply communication, is use "Agilent Connection Expert" (IOlibrairies) or NIMAX from National instrument as the first step. If communication is OK, you will be sure that communication with your E3633A is working fine. I tested my E3633A with vb.net 2010 and visa command (attached module visa32.bas) under Windows 7 with IOlibrairies16.3. I used this simple code to test: Public Function readVoltage_E3633A() As String Dim rdgs As System.Text.StringBuilder = New System.Text.StringBuilder(16) Dim SCPIcmd As String Dim Voltage As String SCPIcmd = "MEAS:VOLT:DC?" & vbLf errorStatus = visa32.viPrintf(viPowerSupply, SCPIcmd) errorStatus = visa32.viScanf(viPowerSupply, "%t", rdgs) Voltage = rdgs.ToString Return Voltage End Function |
|
|
|
Tussi 发表于 2018-11-23 10:04 我在这里很好 它已经在工作.. :)但在此之前我也尝试了你的建议。 我的问题与硬件有关。 我的电缆没有DSR / DTR连接,只有rx / tx和cts / rts握手。 但是,我仍然想知道PS如何接收但不会在没有DSR / DTR的情况下将数据发送回我的程序。 也许是因为连接了其他发送引脚。 不管怎样,谢谢你的回复:)经验教训:“仔细阅读手册以确保设备与电脑使用的握手协议”:D编辑:Ditch08于2013年11月4日5:02 PM编辑:Ditch08于11月4日, 2013年5:02 PM 以上来自于谷歌翻译 以下为原文 I'm good here. It's already working.. :) But before that i tried your suggestions also. My problem was hardware-related. My cable doesn't have a DSR/DTR connection, only rx/tx and cts/rts handshakes. However, i still wonder how can the PS receive but not send back a data to my program in the past without DSR/DTR. Maybe because of the other transmit pins connected. Anyways, Thanks for the reply :) Lesson learned: "Read the manual carefully to ensure what handshake protocol the device use with the pc" :D Edited by: Ditch08 on Nov 4, 2013 5:02 PM Edited by: Ditch08 on Nov 4, 2013 5:02 PM |
|
|
|
Tussi 发表于 2018-11-23 10:04 顺便说一下,我还没有使用签证命令尝试你的代码..我怎么能附上visa32.bas文件? 我应该导入这个吗? 或制作一个模块然后复制/粘贴这个? http://svn.icmb.utexas.edu/svn/repository/trunk/zpub/sdkpub/VXIPNP/WinNT/include/visa32.bas fyi:我正在使用与Visual Basic 2010 express的rs-232连接,这样做 任何差异。 我还能用我的程序申请吗? 对不起问题:)编辑者:Ditch08于2013年11月4日下午6:17编辑:Ditch08于2013年11月4日下午6:27 以上来自于谷歌翻译 以下为原文 By the way, i haven't tried your code using visa commands yet.. how can i attached the visa32.bas file? should i import this? or make a module then copy/paste this? http://svn.icmb.utexas.edu/svn/repository/trunk/zpub/sdkpub/VXIPNP/WinNT/include/visa32.bas fyi: i am using a rs-232 connection with visual basic 2010 express, does this make any difference. Can i still apply this with my program? sorry for the questions :) Edited by: Ditch08 on Nov 4, 2013 6:17 PM Edited by: Ditch08 on Nov 4, 2013 6:27 PM |
|
|
|
第三代的年均卡上 发表于 2018-11-23 10:34 嗨,抱歉,visa32.bas适用于vb6,适用于vb.net 2010使用visa32.vb。 要附上visa32.vb,请使用菜单PROJET和ADD MODULE,您将在IVI基础目录中找到visa32.vb(例如C: Program Files(x86) IVI Foundation VISA WinNT include)。 您必须在计算机上安装IOlibraries。 我附在zip文件中,这是用rs-232通信和E3633A测试的vb.net 2010程序的一个例子。 用于我的E3633A的VISA地址是“ASRL1 :: INSTR”,使用Agilent Connection Expert确定仪器的正确地址。 关注Yves 6 nov 2013 以上来自于谷歌翻译 以下为原文 Hi, Sorry, visa32.bas is for vb6, for vb.net 2010 use visa32.vb. To attach visa32.vb, use menu PROJET and ADD MODULE, and you will find visa32.vb in the IVI foundation directory (for example C:Program Files (x86)IVI FoundationVISAWinNTinclude). You must have IOlibraries installed on your computer. I attached in zip file, an example of vb.net 2010 program tested with rs-232 communication and E3633A. VISA address used for my E3633A was "ASRL1::INSTR", use Agilent Connection Expert to determine the right address for your instrument. Regards Yves 6 nov 2013 附件
|
|
|
|
Tussi 发表于 2018-11-23 10:51 你好,我明白了..我认为你给我的这些说明就足够了。 感谢您的示例程序。 我马上就到了。 :) 以上来自于谷歌翻译 以下为原文 Hello, i see.. I think these instructions you given me is enough. Thanks for this sample program also. I'll get to it right away. :) |
|
|
|
只有小组成员才能发言,加入小组>>
2091 浏览 1 评论
1850 浏览 1 评论
1707 浏览 5 评论
2577 浏览 3 评论
将设备连接到PC并通过asic格式读取数据然后我的网络分析仪挂起
1558 浏览 4 评论
497浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
355浏览 0评论
1405浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
268浏览 0评论
2254浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-19 18:58 , Processed in 1.003266 second(s), Total 74, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号