
Quick Start Guide 1313.9652.62 - 02
7.3
R&S FSQ
Brief Introduction to Remote Control
Basic Steps in Programming using the VISA Interface
7.1 Basic Steps in Programming using the VISA Interface
The following examples explain how to program the instrument and can be used as a basis
for solving enhanced programming tasks.
Visual Basic was used as the programming language. However, the programs can be
implemented in other languages as well.
7.1.1 Linking the VISA Library for Visual Basic
7.1.1.1 Programming notes:
Outputting texts by using the "Print" function
The following programming examples are based on the assumption that all subroutines are
created as part of a form (file extension .FRM). In this case, the following notation is permitted:
Print "Text"
However, if the subroutines are created as a module (file extension .BAS), the name of the
form that contains the required print method must be placed in front of the print instruction.
Thus, if a form is named "Main", the print instruction will be as follows:
Main.Print "Text".
Accessing the functions of the VISA32.DLL
To enable users to create Visual Basic control applications, the file dynamic link library
VISA32.DLL has to be added to the project using the
References
command in the
Project
menu. In addition, the file VISA32.BAS is being added to the project. This file contains
constants and definitions for error handling, time-out values, etc.
Declaring the DLL functions as procedures
All functions return a status variable that is defined as
Long
. Thus, all functions are declared
in the file VISA32.BAS as follows:
Declare Function xxx Lib "visa32.dll" ( ... ) As Long
In progamming languages as C, C++ or programmes as MATLAB,
NI Interactive Control, a backslash starts an escape sequence (e.g.
“\n” is used to start a new line). In these progamming languages and
programms, two backslashes instead of one must be used in remote
commands, e.g. in
“ Storing Instrument Settings” on page 7.23
instead of
MMEM:STOR:STAT 1,'D:\USER\DATA\TEST1'
use
MMEM:STOR:STAT 1,'D:\\USER\\DATA\\TEST1'
Содержание FSQ series
Страница 1: ...R S FSQ Signal Analyzer Quick Start Guide Quick Start Guide Test Measurement 1313 9652 62 02 ...
Страница 28: ...R S FSQ 0 4 Quick Start Guide 1313 9652 62 02 ...
Страница 50: ...R S FSQ Front and Rear Panel Rear Panel Connections 1 22 Quick Start Guide 1313 9652 62 02 ...
Страница 110: ...R S FSQ Basic Operation Setting Parameters 4 12 Quick Start Guide 1313 9652 62 02 ...
Страница 209: ...Quick Start Guide 1313 9652 62 02 R S FSQ Appendix Appendix ...
Страница 210: ...Quick Start Guide 1313 9652 62 02 R S FSQ Appendix ...
Страница 220: ...R S FSQ Appendix Installing Non Plug Play Printers A 10 Quick Start Guide 1313 9652 62 02 ...