完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
您好,我对通过USB端口连接到计算机的设备进行了自动测试。
我想将此测试的运行时版本发送到另一个国家/地区的测试站点。 我希望他们能够根据他们在PC上获得的端口号连接到串口。 我的目标是修改程序,使USB端口号可以输入到初始化文本文件中,并由测试程序用来连接,发送命令和从中接收数据。 现在我必须更改每台计算机上设备管理器中的端口号,以匹配仪器管理器中的USB端口号(这是...... !!!)如果有人建议我如何连接到一个,我将不胜感激。 USB端口基于用户输入。 谢谢, 以上来自于谷歌翻译 以下为原文 Hello, I have an automated test for a device which is connected to a computer via USB port. I want to send a runtime version of this test to our test site in another country. I want them to be able to connect to the serial port based on the port number they get on their PC. My goal is to modify the program such that the USB port number can be entered in an initialization text file and used by the test program to connect to, send the commands to and receive the data from. For now I have to change the port number in the device manager on each computer to match the USB port number in instrument manager (which is ...!!!) I would appreciate it if somebody would advice me on how to connect to a USB port based on the user input. Thanks, |
|
相关推荐
2个回答
|
|
嗨HD,有(至少)2种方法这样做。
对于单个设备而言我所说的“正常”方式是使用VISA别名。 在VEE IO管理器中,您为仪器设置别名(名称) - 它往往默认为new_instrument1等(这是一种耻辱,因为在大多数情况下它可以从仪器中读取很多)。 我建议在进行任何编程之前,将名称更改为有用的内容,例如: 示波器,DSO1234,温度监视器等(较短的名称通常更好)。 (可选)在保存运行时时,请使用该程序取消选中save IO config。 当你把它放在只有运行时的机器上时,使用VEE运行时IO配置(抱歉不能完全记住应用程序名称),找到仪器,设置它的程序别名,一切顺利。 警告现在你已经编程了,如果你想改变VISA别名它有点尴尬,但这可能是另一个帖子的主题;-)另一种方法是动态设置VISA地址,即在程序中。 这仍然使用VISA别名,例如 (再次请原谅可能不准确的语法)DSO1235.IO.VisaAddress =“USB0 :: 1234 :: 9876 :: TW890123456 :: 0 :: INSTR”,其中地址可以通过USB端口和仪器详细信息构建。 如果您有多台仪器执行相同类型的操作,这非常有用。 让我们知道您的身体情况如何! 干杯,迈克 以上来自于谷歌翻译 以下为原文 Hi HD, There are ( at least ) 2 ways of doing this. For a single device and what I would say is the 'normal' way of doing this is to use the VISA alias. In the VEE IO manager, you set an alias ( name ) for the instrument - it tends to default to new_instrument1 or the like ( which is a shame as it can read quite a bit from the instrument in most cases ). I would recommend that before doing any programming, change the name to something useful e.g. Oscilloscope, DSO1234, temperature_monitor or the like ( shorter name is generally better ). Optionally, when saving the runtime, uncheck the save IO config with the program. When you put this on a machine with only runtime, use the VEE Runtime IO Configuration ( sorry can't quite remember the application name ), find the instrument, set its alias as for the program and all's well. Caveat is that now you've programmed it, if you want to change the VISA alias it's a bit awkward, but that could be the subject of another post ;-) The other way is to set the VISA address dynamically i.e. in the program. This still uses the VISA alias though e.g. ( again please excuse the potentially non-exact syntax ) DSO1235.IO.VisaAddress="USB0::1234::9876::TW890123456::0::INSTR" where the address can be built from USB port and instrument details. This is really useful where you have multiple instruments doing the same sort of operations. Let us know how you get on! Cheers, Mike |
|
|
|
截图很有用。 我想你可能有一个简单的拼写错误;-) 以上来自于谷歌翻译 以下为原文 Screenshots are useful. I think you might have a simple typo ;-) |
|
|
|
只有小组成员才能发言,加入小组>>
1287 浏览 0 评论
2375 浏览 1 评论
2194 浏览 1 评论
2064 浏览 5 评论
2951 浏览 3 评论
1111浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
753浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
926浏览 0评论
1287浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 23:32 , Processed in 1.213859 second(s), Total 78, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号