getting started -ag真人试玩网址

the purpose of this chapter is to walk you through the steps to successfully run our 'hello world' remote control example. the example sends one command to your instrument and reads its response.

from all different operating systems and physical connections we choose the most common case: lan connection on windows os. as a programming environment we take the one that is free to use – python in pycharm. many of the described steps are universal and can be used in other cases as well.

step 1: set up lan connection between your computer and your instrument

objective: working lan connection

  • connect your computer and your instrument to the same lan network.
  • use instrument’s menu to find out or adjust its ip address. windows-based instrument ip address can be adjusted in the instrument menu or in windows control panel -> network and sharing center menu. for example, r&s rto ip address menu: setup button -> system.
  • make sure your instrument is reachable over lan from your computer. to verify this, use e.g. ping test: use winkey r, type 'cmd' enter to open windows command console. type 'ping ', e.g: ping
  • do not proceed further, unless you have the tcp-ip connection working properly.

step 2: establish a visa connection to your instrument

objective: successfull *idn? query with visa tester tool

for r&s visa:

  • install r&s visa on your computer. if you use gpib connection, you have to use the matching visa. for example, to use ni gpib hardware, you must use ni visa.
  • open r&s visa tester: start->r&s visa-> rsvisatester.
  • to the resource field enter 'tcpip::::instr', e.g. 'tcpip::'
  • press connect button.
  • in the basics tab, from the string combobox select a command *idn?\n and press query button.
  • see chapter 3: visa and visa tools for more details and screenshots.

for ni visa:

  • install ni visa on your computer. if you use gpib connection, you have to install ni-488.2 drivers in addition.
  • open ni max, right-click on devices and interfaces -> network devices and choose create new visa tcpi/ip resource.
  • select manual entry of lan instrument, enter the instrument’s ip address into the field hostname or ip address.leave lan device name field empty.
  • use validate button to verify if the visa connection can be successfully established.
  • open visa test panel, select the tab input/output, select the command *idn?\n and press query button.
  • see chapter 3: visa and visa tools for more details and screenshots.

step 3: install python, pycharm and pyvisa

objective: working python installation, installed pyvisa package, working pycharm environment.

  • download and install
  • download and install
  • download python hello world example, extract it and open the file in pycharm.
  • in menu file->settings->project->project interpreter select the python version you have downloaded.
  • make sure you have pyvisa package installed: it has to be listed in the project interpreter package list. if not, click on the green ' ' button to download it. if you are behind a proxy server, configure it in menu file->settings->appearance->system settings -> http proxy.
  • for offline package installation, see *note1.

step 4: run the hello world script

objective: obtain the instrument's reponse in the 'idn_response' variable and see the communication log.

  • in the file adjust the ip address in resourcestring1 variable to to fit your instrument.
  • start the script: menu run-> run 'python_directscpi_hello_world'. your instrument responds with an identification string that is stored in the 'idn_response' variable. the script outputs the string e.g.: 'hello, i am rohde&schwarz,rto,...' into the python console.
  • open visa trace tool (described in chapter 3) and run the script again to see the log of the communication.

*note 1 - offline installation of pyvisa package

to install pyvisa package offline:

  • close pycharm.
  • download package and a dependency package
  • create a batch file install_setup.bat with the following content:
    • c:\python27\python.exe install
  • extract the enum34 zip package to your local folder.
  • copy created install_setup.bat file to the same folder where the extracted enum34 file is located.
  • execute the batch file. that starts the package installation.
  • repeat the same procedure for the pyvisa zip package.
  • open pycharm and check menu file->settings->project->project interpreter package list again.

request information

do you have questions or need additional information? simply fill out this form and we will get right back to you.




我同意,在网站imprint中提到的rohde & schwarz gmbh & co. kg和罗德与施瓦茨实体及分支机构 可出于营销和广告之目的(例如提供特价优惠和折扣促销信息)而通过选定渠道(电子邮件或邮政信件)与我联系并提供相关信息,包括但不限于测试与测量、安全通信、监测与网络测试、广播电视与媒体以及网络安全领域的产品和ag真人试玩网址的解决方案相关信息


您可以随时发送电子邮件至 撤销此同意声明,邮件主题注明“unsubscribe”即可。此外,我们发送给您的每一封电子邮件中都含有电子邮件取消订阅链接。有关个人数据使用和撤销程序的详情,请参阅“隐私声明”

an error is occurred, please try it again later.