• General
  • API Documentation
  • SCPI
    • General
    • Command Reference
    • Starting Server

    Show / Hide Table of Contents
    • Setup Connection
    • Usage of NI I/O Trace to monitor the SCPI traffic
    • Command Syntax
    • Status Registering System
    • Synchronization
    • Trigger System
    • Data Formats
    • Data Transmission Formats
    • Measurements
    • Error and Event Types
    • Suffixes
    • List of Abbreviations
    • SCPI Python examples

    Data Formats

    The SCPI language defines some data formats that should be used. If a command expects a certain data format, but the given value can not be interpreted as such, an error is generated. The type of error depends on the expected data type. E.g. if a numeric value was expected but the given value could not be interpreted a -120, Numeric Data Error is raised.

    Implemented data formats

    The implemented data formats are

    name usage
    <bool> represents either ON or OFF -
    <string> represents a string without limitations
    <non decimal numeric> a numeric value, no floating point allowed
    <numeric> a numeric value, floating point allowed

    Boolean <bool>

    Boolean values are used for enabling or disabling certain functionalities. There are just two options available, enabled or disabled. The accepted values are

    value meaning
    ON | 1 the feature is enabled
    OFF | 0 the feature is disabled

    Regarding commands ON and 1 as well as OFF and 0 are treated the same way and there is no difference between those values. Queries ALWAYS return the numeric value of the boolean (1 or 0). A query never returns ON or OFF.

    String <string>

    A string value has no restrictions and all ASCII characters are allowed. If a command adds special restrictions to the string data it is documented at the commands info page. Strings needs to be quoted either in single quotes (') or double quoted ("). Quotes cannot be mixed.

    Non decimal numeric <numeric>

    The given data must be an integer. Floating points are not allowed. This data format is used, when decimal values are not applicable for the setting. E.g. setting a value to a register or configuring the number of measurement points.

    Numeric <numeric>

    The given value must be interpretable as a numeric data. Floating point numbers are allowed as well as scientific notation. The numeric value can have suffixes as explained below.

    Suffixes

    When setting physical values it can be useful to append the value with suffixes. The allowed suffixes can either be SI units (seconds, ohm, ...) or Unit prefixes (kilo, mega, ...). For the allowed values and the interpretation of those please refer to Suffixes.

    Back to top Generated by DocFX