4. visa in programming languages -九游官网下载

there are many programming languages offering the possibility to remotely control test & measurement instruments.

in this guide, we focus on:

  • python in r&s forum
  • python in pycharm
  • matlab®
  • c# in visual studio development environment
  • labview™
  • ansi-c in labwindows/cvi™

in the following sub-chapters, we discuss advantages and disadvantages of each language. included ready-to-use example for each of these languages should help you getting started. the screenshots emphasize simple code change in case you change physical connection to your instrument. they also show used layers between the application and visa.

an installation of visa is the common precondition for all the examples below.

python in r&s forum

advantages: easy to use, specially developed for instrument remote control, multi-platform, also offers interactive console.

disadvantages: difficult to develop guis, the environment is not suitable for bigger projects.

in r&s forum, you change the instrument resource string in menu item settings -> instruments. the session to the instrument is opened with the first communication attempt. see more in the dedicated application note 1ma196

python in pycharm

advantages: intelligent code editor, safe refactoring, allows for tracking code changes, excellent debugger, also available for linux.

compared to pure pyvisa, rsinstrument provides many extended features - proper session attribute settings, synchronization functions, error checking, large data transfer in both directions.

disadvantages: missing compiler means you code is only tested for errors during execution.

in python 3.x, you use rsinstrument module that internally uses pyvisa. you change the resource string in the rsinstrument class constructor.

matlab

advantages: simple scripting language, including easy gui designs.

disadvantages: no multi-threading, bulky executables.

in matlab you change the resource string in the visa open() method. the rest of your script is unchanged. see more in the dedicated application note

c# in visual studio

advantages: state-of-the-art programming environment, optimized for high performance.

disadvantages: requires advanced programming knowledg.

in visual studio c#, you use the rsinstrument assembly, which provides same features as the rsinstrument module for python - proper session attribute settings, synchronization functions, error checking, large data transfer in both directions. you only have to change the resource string in the rsinstrument constructor. the example link below also contains a visual basic .net project.

labview

advantages: ideal for engineers without the need for advanced programming skills, specially developed for instrument remote control applications.

disadvantages: lower performance by graphical tasks, difficult to compare versions due to graphical source code.

in labview, you change the instrument resource string for the labview function visa open. the session stays valid even if your program stops. if you are using instrument drivers, refer to the dedicated application note 1ma228

ansi-c in labwindows/cvi

advantages: ansi-c environment targeted for instrument remote control.

disadvantages: requires advanced programming knowledge.

in c/c , you change the resource string in the viopen() function. first, you need to open a resource manager with the function viopendefaultrm().

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和罗德与施瓦茨实体及分支机构 可出于营销和广告之目的(例如提供特价优惠和折扣促销信息)而通过选定渠道(电子邮件或邮政信件)与我联系并提供相关信息,包括但不限于测试与测量、安全通信、监测与网络测试、广播电视与媒体以及网络安全领域的产品和九游官网下载的解决方案相关信息

您的权利

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

你的申请已提交,我们稍后会联系您。
an error is occurred, please try it again later.
网站地图