我附上了一个可以导入的编程示例。
它提供了我用于成功使用GET的方法。
要使用组执行触发器,除了仪器会话外,还必须打开计算机接口会话,并使用VISA中的viAssertTrigger功能和一些低级编程。
可以使用* viOpen *(defaultRM,+ ioAddress +,VI_NULL,1000,my_controller)打开计算机接口会话,其中ioAddress =“GPIB0 :: INTFC”。
在GPIB接口与指定设备的会话打开后,将各个电源的输出(如果需要)耦合,并将触发源设置为总线。
设置所有仪器的所需触发电平,打开输出,然后启动触发系统。
现在这里有一个棘手的部分:在使用viAssertTrigger之前,你必须确保所有乐器都在听。
这必须使用低级命令完成。
要编写低级命令,请使用命令* viGpibCommand *(my_controller,+ cmdString +,Len(+ cmdString +),actual)。
cmdString是一串ASCII字符,对应于IEEE-488设备的Talk和Listen Addresses。
此字符串将根据您使用的GPIB地址而更改。
我在我的示例程序中使用的字符串是“U!”。这里概述了每个字符的作用。? - >所有设备的“Unlisten”。这可以确保在发送触发器时没有不需要的设备正在侦听。
- >“通话”用于计算机界面。您正在使用的软件将是唯一一个发送命令。! - >“听”GPIB0 :: 1(第一台乐器的地址)“ - >”听“
GPIB0 :: 2(第二个仪器的地址;在VBA中,引号在字符串中输入为“”)?U将用于您拥有的任何仪器地址。
不断变化的组件是!
和。“我附上了一张图片,告诉你要使用哪些字符。一旦完成低级编程,使用* viAssertTrigger *(my_controller,VI_TRIG_PROT_DEFAULT)来使用”GET。“-----编辑:我已经附上了
第二个文件显示了另一种使用VISA在文件VISA_GET_ex2.xlsm中发送GET的方法。编辑:MaxineF于2015年8月6日下午2:56
e3648aVBA.xlsm54.8 KBtalklisten.PNG36.3 KB
以上来自于谷歌翻译
以下为原文
I have attached a programming example that you can import. It provides the methods I used to successfully use GET.
To use the Group Execute Trigger, you must open a computer interface session in addition to the instrument sessions and use the viAssertTrigger function in VISA in conjunction with some lower level programming.
The computer interface session can be opened using *viOpen* (defaultRM, +ioAddress+ , VI_NULL, 1000, my_controller) where ioAddress = "GPIB0::INTFC".
After sessions to the GPIB interface and specified devices have been opened, couple the outputs of individual power supplies (if desired), and set the trigger source to bus. Set the desired trigger level of all instruments, turn the output on, and initiate the trigger system.
Now here is the tricky part: Before using viAssertTrigger, you must make sure that all the instruments are listening. This must be done with low-level commands. In order to write low-level commands, use the command *viGpibCommand* (my_controller, +cmdString+ , Len( +cmdString+ ), actual). cmdString is a string of ASCII characters that corresponds to the Talk and Listen Addresses of an IEEE-488 device. This string will change based on what GPIB addresses that you are using. The string that I used in my example program is ?U!". Here's an overview of what each character does.
? --> "Unlisten" for all devices. This ensures that no unwanted devices are listening when the trigger is sent.
U --> "Talking" for Computer interface. The software that you are using will be the only one sending commands.
! --> "Listening" for GPIB0::1 (address of first instrument)
" --> "Listening" for GPIB0::2 (address of second instrument; in VBA a quotation mark is entered as "" within a string)
?U will be used for whatever instrument addresses you have. The changing components are the ! and the ". I have attached a picture that tells you which characters to use.
Once the low-level programming is finished use *viAssertTrigger* (my_controller, VI_TRIG_PROT_DEFAULT) to use "GET."
-----
Edit: I have attached a second file showing another way to send GET using VISA in the file VISA_GET_ex2.xlsm.
Edited by: MaxineF on Aug 6, 2015 2:56 PM
附件
我附上了一个可以导入的编程示例。
它提供了我用于成功使用GET的方法。
要使用组执行触发器,除了仪器会话外,还必须打开计算机接口会话,并使用VISA中的viAssertTrigger功能和一些低级编程。
可以使用* viOpen *(defaultRM,+ ioAddress +,VI_NULL,1000,my_controller)打开计算机接口会话,其中ioAddress =“GPIB0 :: INTFC”。
在GPIB接口与指定设备的会话打开后,将各个电源的输出(如果需要)耦合,并将触发源设置为总线。
设置所有仪器的所需触发电平,打开输出,然后启动触发系统。
现在这里有一个棘手的部分:在使用viAssertTrigger之前,你必须确保所有乐器都在听。
这必须使用低级命令完成。
要编写低级命令,请使用命令* viGpibCommand *(my_controller,+ cmdString +,Len(+ cmdString +),actual)。
cmdString是一串ASCII字符,对应于IEEE-488设备的Talk和Listen Addresses。
此字符串将根据您使用的GPIB地址而更改。
我在我的示例程序中使用的字符串是“U!”。这里概述了每个字符的作用。? - >所有设备的“Unlisten”。这可以确保在发送触发器时没有不需要的设备正在侦听。
- >“通话”用于计算机界面。您正在使用的软件将是唯一一个发送命令。! - >“听”GPIB0 :: 1(第一台乐器的地址)“ - >”听“
GPIB0 :: 2(第二个仪器的地址;在VBA中,引号在字符串中输入为“”)?U将用于您拥有的任何仪器地址。
不断变化的组件是!
和。“我附上了一张图片,告诉你要使用哪些字符。一旦完成低级编程,使用* viAssertTrigger *(my_controller,VI_TRIG_PROT_DEFAULT)来使用”GET。“-----编辑:我已经附上了
第二个文件显示了另一种使用VISA在文件VISA_GET_ex2.xlsm中发送GET的方法。编辑:MaxineF于2015年8月6日下午2:56
e3648aVBA.xlsm54.8 KBtalklisten.PNG36.3 KB
以上来自于谷歌翻译
以下为原文
I have attached a programming example that you can import. It provides the methods I used to successfully use GET.
To use the Group Execute Trigger, you must open a computer interface session in addition to the instrument sessions and use the viAssertTrigger function in VISA in conjunction with some lower level programming.
The computer interface session can be opened using *viOpen* (defaultRM, +ioAddress+ , VI_NULL, 1000, my_controller) where ioAddress = "GPIB0::INTFC".
After sessions to the GPIB interface and specified devices have been opened, couple the outputs of individual power supplies (if desired), and set the trigger source to bus. Set the desired trigger level of all instruments, turn the output on, and initiate the trigger system.
Now here is the tricky part: Before using viAssertTrigger, you must make sure that all the instruments are listening. This must be done with low-level commands. In order to write low-level commands, use the command *viGpibCommand* (my_controller, +cmdString+ , Len( +cmdString+ ), actual). cmdString is a string of ASCII characters that corresponds to the Talk and Listen Addresses of an IEEE-488 device. This string will change based on what GPIB addresses that you are using. The string that I used in my example program is ?U!". Here's an overview of what each character does.
? --> "Unlisten" for all devices. This ensures that no unwanted devices are listening when the trigger is sent.
U --> "Talking" for Computer interface. The software that you are using will be the only one sending commands.
! --> "Listening" for GPIB0::1 (address of first instrument)
" --> "Listening" for GPIB0::2 (address of second instrument; in VBA a quotation mark is entered as "" within a string)
?U will be used for whatever instrument addresses you have. The changing components are the ! and the ". I have attached a picture that tells you which characters to use.
Once the low-level programming is finished use *viAssertTrigger* (my_controller, VI_TRIG_PROT_DEFAULT) to use "GET."
-----
Edit: I have attached a second file showing another way to send GET using VISA in the file VISA_GET_ex2.xlsm.
Edited by: MaxineF on Aug 6, 2015 2:56 PM
附件
举报