完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我们通常远程操作设备。
我们正在寻找能够让操作员暂停程序的请求,按Local,使用万用表进行手动测量,然后重新启动程序并使设备返回其先前的编程状态。 一个建议是:设置在按下Local按钮时调用的回调函数调用回调函数时,将全局变量“Local”设置为true,使用SSTATE命令保存DMM的当前状态,并发送GPIB GoToLocal命令允许操作员手动控制。 在向DMM发出任何其他IO之前,请检查“Local”全局变量。 如果为true,则使用RSTATE命令恢复DMM的已保存状态,发送GPIB LocalLockout命令,将“Local”变量设置为false并继续执行截获的IO。这看起来可行吗? 我们如何设置Local键的回调? 我环顾四周寻找从特定键设置中断处理程序但没有太多运气的例子。布莱恩 以上来自于谷歌翻译 以下为原文 We normally operate the unit remotely. We're looking into a request to be able to have the operator halt the program, press Local, use the multi-meter for manual measurements, then restart the program and have the unit return to its previous programmed state. One suggestion was: Set up a call back function invoked when the Local button is pressed When the callback function is invoked, set a global variable “Local” to true, save the present state of the DMM Using the SSTATE command, and send the GPIB GoToLocal command to allow the operator manual control. Before issuing any other IO to the DMM, check the “Local” global variable. If true, restore the saved state of the DMM with the RSTATE command ,send the GPIB LocalLockout command, set the “Local” variable false and continue with the intercepted IO. Does this seem doable? How would we set up a callback for the Local key? I looked around for examples of setting interrupt handlers from specific keys but didn't have much luck. Brian |
|
相关推荐
2个回答
|
|
我不认为您可以在转换到本地时生成SRQ。
我能想到的最接近的事情是使用用户定义的密钥来生成SRQ,但是当仪器处于远程时,这将不会处于活动状态,因此您必须首先点击Local然后再调用用户定义的密钥。 这里的缺点是,如果远程程序仍然向仪器发送命令,它可能会在您按下Local键后立即返回远程,因此键盘将保持锁定状态。 因此,这种方法只有在控制器出现某种“中断动作”的情况下才能工作,这样你就可以进入并使用它。 我对此有点生疏,所以你必须尝试一下,但是这里是如何从3458A的前面板生成SRQ(例如HTBasic):OUTPUT 722; “DEFKEY 1,'RQS 4; SRQ'“这将分配命令字符串'RQS 4; SRQ'到用户定义的密钥1(数字密钥1)。 如果用户在键盘空闲时命中'1'键(没有其他菜单项正在进行中),则会提取已定义的命令字符串,然后用户按Enter键执行它。 “RQS 4”命令是启用SRQ命令以实际生成SRQ所必需的。 当用户完成前面板工作时,此机制可用于生成第二个SRQ,因此控制器必须跟踪它已部署的事件数。 如果有效,请告诉我 以上来自于谷歌翻译 以下为原文 I don’t think you can generate an SRQ on a transition to Local. The closest thing I can think of is using a user-defined key to generate an SRQ, but this wouldn’t be active when the instrument is in remote, so you would have to hit Local first and then invoke the user-defined key. The drawback here is that, if the remote program is still sending commands to the instrument, it will probably go back to remote right after you hit the Local key, so the keyboard will stay locked out. Thus, this approach will only work if there is some sort of “break in the action” from the controller so you can get in and use it. I’m a little rusty on this, so you’ll have to try it out, but here’s how to generate an SRQ from the 3458A’s front panel (example is HTBasic): OUTPUT 722; “DEFKEY 1, ‘RQS 4; SRQ’” This will assign the command string ‘RQS 4; SRQ’ to user defined key 1 (the numeric key 1). If the user hits the ‘1’ key when the keyboard is idle (no other menu entry in progress), this will pull up the defined command string, and then the user hits Enter to execute it. The ‘RQS 4’ command is necessary to enable the SRQ command to actually generate the SRQ. This mechanism could be used to generate a second SRQ when the user is done with his front panel work, so the controller will have to keep track of how many events it has fielded. Let me know if that works |
|
|
|
好的,我会看看。
我怀疑我们最终会告诉他们他们不能这样做。 谢谢,布赖恩 以上来自于谷歌翻译 以下为原文 Ok, I'll look at that. I suspect we will end up telling them that they can't do that. Thanks, Brian |
|
|
|
只有小组成员才能发言,加入小组>>
1300 浏览 0 评论
2379 浏览 1 评论
2199 浏览 1 评论
2068 浏览 5 评论
2955 浏览 3 评论
1152浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
762浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
960浏览 0评论
1301浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-31 03:55 , Processed in 1.284078 second(s), Total 51, Slave 44 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号