SCPI Parser


A complete SCPI parser for your electronic instruments. Supplied as a library of ANSI C compliant source code, together with comprehensive, step-by-step documentation. Trusted by industry and used worldwide.

JPA-SCPI Parser Specifications

Get Datasheet

Source Code

Language C, fully ANSI/ISO-compliant
External libraries required none
Typical compile-size1 13.3kB ROM, 165 Bytes RAM2

SCPI Support

SCPI version 1999.0 (current version)
Long and short-form keywords Yes, e.g. VOLTage allows VOLT or VOLTAGE
Compound commands (i.e. multiple commands separated by semi-colons) Yes
Numeric suffix Yes, e.g. OUTPut<Channel Number>
Optional keywords Yes, e.g. [:AMPLitude]
Default nodes Yes
Query commands Yes
Optional parameters Yes
Parameter types supported
  • Numeric Values (all variations as defined in SCPI, i.e.: integer, floating-point and scientific notation (up to and beyond +/- 9.9 e +/-37, regardless of processor/compiler limitations)
  • Character Data (i.e. mnemonics such as "MINimum", "DEFault", etc.)
  • Booleans
  • Strings (delimited by quotes)
  • Unquoted Strings
  • Numeric Lists, e.g. (11.4, 15:27, 31)
  • Channel Lists, e.g. (@2!3:4!8, 5!12)
  • Expressions3
Default parameters Yes (Boolean and Character Data parameters)
Multiple-parameter types allowed for the same command Yes, e.g. {MINimum|MAXimum|<range>}
Units Numeric values can be followed by a unit suffix, e.g. kV, GR, uH, etc. Unit Multipliers (p, u, m, k, Ma, G, etc.) automatically scaled to base units. User-definable units allow complete flexibility.
Number bases Numeric values can be entered in decimal, binary, octal, or hexadecimal
Maximum length of command Line 255 characters or more (limited only by processor/ compiler)
Number of commands that can be specified 255 or more (limited only by processor/compiler)

SCPI Instrument Class Templates

A template is supplied for each of these standard SCPI Instrument Classes:

DC Voltmeter
AC Voltmeter
DC Ammeter
AC Ammeter
Ohm Meter
Four-Wire Ohm Meter
Digitizer (e.g. oscilloscope)
DC Power Supply
Signal Switcher (e.g. programmable switch system)
RF Source (e.g. RF and microwave signal generators)
Base Template (supports the base SCPI commands required by all instruments)


1 Compile-size excludes space occupied by command set of instrument, and with no optional support features (numeric suffix, numeric lists, channel lists, expressions) enabled. Requires additional 5kB ROM with all support features turned on.

2 These figures were obtained when compiling JPA-SCPI Parser for a Microchip PIC18 processor using the Microchip XC8 compiler (optimizations on).

3 Expressions are returned as a string pointer. Interpretation of the contents of expressions must be handled by the user's code.

Read on