Skip to main content

Standard Commands for Programmable Instruments(SCPI)

FROM WIKIPEDIA:

The Standard Commands for Programmable Instruments (SCPI) (often pronounced "skippy") defines a standard for syntax and commands to use in controlling programmable test and measurement devices.

Overview

In 1990, SCPI became defined with the IEEE 488.2 specification. The standard specifies a common syntaxcommand structure, and data formats, to be used with all instruments. It introduced generic commands (such as CONFigure and MEASure), which could be used with any instrument. These commands are grouped into subsystems. SCPI also defines several classes of instruments. For example, any controllable power supply would implement the same DCPSUPPLY base functionality class. Instrument classes specify which subsystems they implement, as well as any instrument-specific features.
The physical communications link is not defined by SCPI. While originally created for IEEE-488 (GPIB), it can also be used with RS-232EthernetUSBVXIbus, etc
SCPI commands are ASCII textual strings, which are sent to the instrument over the physical layer (e.g., IEEE-488). Commands are a series of one or more keywords, many of which take parameters. In the specification, keywords are written CONFigure: The entire keyword can be used, or it can be abbreviated to just the uppercase portion. Responses to query commands are typically ASCII strings. However, for bulk data, binary formats can be used.


The SCPI Standard specifies the command structure and syntax to be used for controlling programmable instruments via a communications link, such as GPIB, RS232, USB, VXIbus etc. SCPI also includes standard command sets for different “classes” of instruments, e.g. electrical sources, and measurement devices such as DMMs and oscilloscopes.
SCPI commands are in human-readable ASCII format. Because of this, SCPI commands can be sent easily using any programming language including C, C++, Visual Basic, etc. In addition, SCPI is supported by Test Application Software such as Lab View and HP VEE.

SCPI does not define the physical method of communication – whilst originally developed for GPIB (IEEE488.2)-based equipment, SCPI is now also used for communication via RS232, USB, LAN connections and other interfaces.In addition, SCPI does not tell you what your command set should be. Rather, it defines some basic commands that you must support. It also defines some common command sets for similar classes of instruments. You can choose to support one or more of these classes according to the type of your instrument. If your instrument does not match any particular class, you can still claim SCPI-compliancy, as long as you support the base SCPI commands.

Command syntax

SCPI commands to an instrument may either perform a set operation (e.g. switching a power supply on) or a query operation (e.g. reading a voltage). Queries are issued to an instrument by appending a question-mark to the end of a command. Some commands can be used for both setting and querying an instrument. For example, the data-acquisition mode of an instrument could be set by using the ACQuire:MODe command or it could be queried by using the ACQuire:MODe? command. Some commands can both set and query an instrument at once. For example, the *CAL? command runs a self-calibration routine on some equipment, and then returns the results of the calibration.

Similar commands are grouped into a hierarchy or "tree" structure. For example, any instruction to read a measurement from an instrument will begin with "MEASure". Specific sub-commands within the hierarchy are nested with a colon (:) character. For example, the command to "Measure a DC voltage" would take the form MEASure:VOLTage:DC?, and the command to "Measure an AC current" would take the form MEASure:CURRent:AC?.


Arguments

Some commands require an additional argument. Arguments are given after the command, and are separated by a space. For example, the command to set the trigger mode of an instrument to "normal" may be given as "TRIGger:MODe NORMal. Here, the word "NORMal" is used as the argument to the "TRIGger:MODe" command.


Concatenating commands

Multiple commands can be issued to an instrument in a single string. Each command must be separated by a semicolon character (;). Additionally, all commands except the first must be prefixed by a colon (unless they already begin with an asterisk). For example, the command to "Measure a DC voltage then measure an AC current" would be issued asMEASure:VOLTage:DC?;:MEASure:CURRent:AC?.


Example

The command “SYSTEM:COMMUNICATE:SERIAL:BAUD 2400” would set an RS-232 serial communications interface to 2400 bit/s. This could also alternatively be abbreviated “SYST:COMM:SER:BAUD 2400”. The query command “SYSTEM:COMMUNICATE:SERIAL:BAUD?” would instruct the instrument to report its current baud rate.








(PDF) Standard Commands for Programmable Instruments (SCPI)

Comments

Popular posts from this blog

Installing and Activating KEIL uVision

*** NOTE: Click on the images to view them in full resolution Download: Download Keil from the link below: Keil Latest Version Free download with keygen After Installation: 1. File -> License Management 2. Open Keygen from the folder where rar file is unpacked 3. Copy computer ID ( CID ) to clipboard 4. Paste CID in KEYGEN exe, Press generate, copy generated serial and paste in new license textbox of Licence management. *** NOTE: Click on the images to view them in full resolution

Average and Square Root Using 8085

AVERAGE OF N NUMBERS AIM:       To write an assembly language program that finds the average of N numbers and executes the program using 8085 microprocessor kit. APPARATUS REQUIRED: 8085 microprocessor kit, power supply. ALGORITHM: STEP 1: Load HL register pair with a memory pointer. STEP 2: Get the count to B register and clear accumulator. STEP 3: Push the count to stack pointer. STEP 4: Increment memory pointer. STEP 5: Add the content of memory location to accumulator. STEP 6: If carry results increment D register. STEP 7: Decrement count. If it is not zero go to STEP 4. STEP 8: Else move the sum to E register. STEP 9: Get the count from stack pointer. STEP10: Subtract the count from sum(content of DE pair). STEP11:If the subtraction results a carry add the count to the result and get the remainder STEP12: Otherwise increment B register content and go to STEP10. STEP 13: Store the quotient and remainder in successive memory location. PROGRAM:

Block Transfer and Sorting

3. a) SMALLEST OR LARGEST NUMBER IN AN ARRAY Aim:             To write an 8085 assembly language program that finds the smallest (or largest number in an array and execute the program using microprocessor kit. Apparatus required : 8085 Microprocessor kit, Power supply Algorithm: Smallest number in an  array Step 1:             Initialize HL register pair with a memory pointer. Step 2:             Get the count to B register and decrement the count. Step 3:             Increment the memory pointer Step 4:             Move contents of memory pointer to accumulator. Step 5:             Increment memory pointer and compare the contents with accumulator. Step 6:             If carry won't  result  move the contents of memory pointer to                          Accumulator Step7:              Decrement the count Step 8:             If count becomes zero increment the memory pointer and store contents of                         accumulator to that memory location. Memory Location