2974 views|0 replies

12

Posts

6

Resources
The OP
 

How to use Namisoft to make spectrum analyzer capture screen and send it to computer through SCPI command [Copy link]

Namisoft Preface Tips:

SCPI commands are roughly divided into two functions, set operations
that change the operating status of the instrument (turn on/off the power output), or query operations that query the instrument status (such as reading the output voltage value). Query commands usually end with a question mark (?). Some commands can be used to set or query the instrument.
Similar commands can be classified into a layered or tree structure. For example, any command that reads the measurement results of the instrument can start with MEASure. Specific subcommands are separated from the parent command by a colon. For example, measuring DC voltage would be in the form of MEASure:VOLTage:DC?, or measuring AC current would be in the form of MEASure:CURRent:AC?.

SCPI (Standard Commands for Programmable Instruments) - Standard commands for programmable instruments is a pure software standard that is independent of hardware. Strings can be transmitted through any instrument interface.
SCPI is a standardized instrument programming language based on the existing standards IEEE 488.1 and IEEE 488.2, and follows multiple standards such as floating-point arithmetic rules in the IEEE 754 standard and 7-bit encoding symbols for information exchange in ISO646. It specifies the content and structure of the information exchange layer messages between the controller and the instrument and between the instrument and the controller, so as to describe various instrument functions in a standard way, with the purpose of reducing the program development time of automatic test equipment.
1. SCPI commands consist of three parts:
1) Syntax and style - used to describe the application of the actual language and the basic principles of development and maintenance;
2) Command structure - describes the actual language structure that appears in the instrument;
3) Data exchange format - describes a standard representation method of data sets that can be used between instruments and applications, between applications and applications, or between instruments and instruments.
2. SCPI commands can be divided into two types of commands: SCPI general commands and instrument-specific SCPI commands.
1) SCPI general commands include general functions defined in the IEEE 488.2 standard, which are generally applicable to measurement instruments that support the IEEE 488.2 standard. SCPI general commands are not related to the measurement of the instrument and are mainly used to control reset, self-test and status operations. This group of commands starts with an asterisk "*" and has no hierarchical structure. Each instruction independently completes a specific function. The table shows the SCPI general command set.
Table SCPI General Command Set
*IDN?
*ESE
*OPC
*SRE?

*RST
*ESE?
*OPC?
*STB *

CLS *
ESR
*SRE
*TST?

*WAI

2) SCPI instrument specific control commands are used to perform measurement, switch, read data and control instrument settings, etc. These are often involved in Namisoft, and these functions are usually only applied to the corresponding instruments. The specific control commands use a set of tree-like hierarchical command sets, which usually consist of three parts: keywords, parameter forms and comments. As shown in Table 3-3, an example of a SCPI command tree can be seen that the SCPI command tree is divided into multiple subsystems, each of which consists of a root command and one or more hierarchical commands.
SCPI command tree
keyword
parameter form
comment

: SENSe
:FREQuency
:CENTer
:SPAN
:BWIDth
:RESolution
:VIDeo
:STATus
:OPERation :
CALCulate
:MARKer
:MAXimum

<freq>
<freq>

<freq>
<freq>

<Boolean>

[no query]

[:SENSe]:FREQuency:CENTer <freq> command is used to set the center frequency of the spectrum analyzer. SENSe is the first-level keyword of the command, that is, the root command, FREQuency is the second-level keyword, :CENTer is the third-level keyword, and each level is arranged in sequence until the bottom layer of the SENSe command. The ":" separates the keyword from the lower-level keyword; <freq> is the frequency parameter value to be set (command format requirements: the part in the square brackets "[]" can be omitted, lowercase letters can also be omitted, and the part in the angle brackets "<>" must be filled in. For example, the command to set the center frequency to 14 can be written as: :SENS:FREQ:CENT 14GHz or :FREQ:CENT 14GHz).
2. Application of SCPI in Namisoft's automated test system SCPI statements exist in the form of ASCII text, so they can be called by any computer test programming language, making it convenient to make PC-side software. Secondly, SCPI can be used with controllers or instrument interfaces such as IEEE 488.1 (including GPIB), VXI bus, RS-232C, LXI bus, etc. Moreover, it has good functional compatibility, and the same instructions and parameters can be used to control different instruments with the same functions, which can ensure that the designed software is reusable. Based on the above analysis, Namisoft can explain that SCPI is suitable for the control part of the spectrum analyzer in the earth station antenna test system. Of course, for this application, we still need to find a way to embed it into the software program, that is, to find the programming interface between SCPI and the PC software language.

 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>
Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list