E-Sharp Helpcenter
Breadcrumbs

Numeric command

Numeric Analysis

Description

The num command performs statistical analysis on numeric channels, capturing multiple samples and computing metrics like mean, min, max, and standard deviation. It can also generate histograms for data visualization.

Syntax

Bash
num [options]

Optional Options

Option

Short

Description

Default

--channel

-c

The numeric result channel to use

(first available)

--target

-t

The target analog channel to analyze

(required)

--samples

-s

Number of samples to capture

10

--bins

-b

Number of histogram bins

10

--histogram

-h

Display histogram

false

--full

-f

Display full statistical results

false

Examples

Basic Analysis

Bash
num --target "VOLTAGE_SENSOR"

High Sample Count

Bash
num -t "ADC_CH0" -s 10000

With Histogram

Bash
num -t "TEMPERATURE" -s 1000 -h -b 20

Full Statistics

Bash
num -t "CURRENT_SENSE" -s 5000 -f

Specify Channel

Bash
num -c "NUM_RESULT_1" -t "VOUT" -s 1000

Output Format

Basic Output

Available NumericResult channels:
NUM_RESULT_1                   (MODULE.NUM_RESULT_1)

Samples                        10
Min                            3.2891
Max                            3.3112
Mean                           3.3001
Acquisition Time               45 ms
Acquisition Speed              222 sps

Full Statistics Output

Samples                        10000
Min                            3.2891
Max                            3.3112
Mean                           3.3001
Median                         3.3002
Mode                           3.3000
StdDev                         0.0045
Variance                       0.0000
RMS                            3.3001
PeakToPeak                     0.0221
Acquisition Time               450 ms
Acquisition Speed              22222 sps

Histogram Output

Histogram:
05.2% (3.2891-3.2950) [##                                                ]
15.7% (3.2950-3.3000) [########                                          ]
45.8% (3.3000-3.3050) [#######################                           ]
28.3% (3.3050-3.3100) [##############                                    ]
05.0% (3.3100-3.3112) [##                                                ]

Output Colors

  • Blue: Section headers

  • Green: Channel names

  • Dark Green: Statistical values

  • Cyan: Histogram bars

Statistical Metrics

Basic Metrics (Default)

Metric

Description

Samples

Total number of samples captured

Min

Minimum value observed

Max

Maximum value observed

Mean

Arithmetic average

Acquisition Time

Time to capture all samples (ms)

Acquisition Speed

Samples per second

Full Metrics (--full flag)

Metric

Description

All Basic Metrics

(see above)

Median

Middle value when sorted

Mode

Most frequently occurring value

StdDev

Standard deviation

Variance

Statistical variance

RMS

Root mean square

PeakToPeak

Difference between min and max

Histogram

The histogram divides the data range into bins and shows the distribution:

  • Width of 50 characters represents 100%

  • Each # represents a percentage of samples

  • Bin ranges shown in parentheses

  • Percentage shown to left of bar

Use Cases

Quick Voltage Check

Bash
# Verify voltage stability
num -t "VDD_CORE" -s 100

Noise Analysis

Bash
# Analyze signal noise with histogram
num -t "ANALOG_IN" -s 10000 -h -b 50

Performance Testing

Bash
# High-speed acquisition
num -t "FAST_ADC" -s 100000 -f

Compare Statistics

Bash
# Before optimization
num -t "VOUT" -s 5000 -f

# After optimization
num -t "VOUT" -s 5000 -f

Channel Types

Compatible target channels:

  • Analog input channels

  • ADC channels

  • Sensor channels

  • Calculated/derived channels

  • Any channel with numeric values

Performance

Samples

Typical Time

Speed

10

< 1ms

10k+ sps

100

5-10ms

10k-20k sps

1,000

45-50ms

20k sps

10,000

450ms

22k sps

100,000

4.5s

22k sps

Speeds vary by hardware and network latency

Configuration

The command automatically configures the numeric result channel:

  1. Sets target channel

  2. Sets number of samples

  3. Configures data reduction mode

  4. Triggers acquisition

  5. Retrieves and decodes results

Error Handling

Common errors:

  • No numeric result channel: Hardware doesn't support this feature

  • Target channel not found: Verify target channel name

  • Invalid target: Target not supported by numeric result channel

  • Timeout: Large sample counts may timeout

  • Not connected: Run init command first

Best Practices

  1. Start small: Begin with 10-100 samples

  2. Increase gradually: Scale up sample count as needed

  3. Use histogram: Visualize distribution for noisy signals

  4. Monitor speed: Check if acquisition speed meets requirements

  5. Full stats for analysis: Use -f for detailed characterization

Advanced Examples

Comprehensive Analysis

Bash
# Full statistical analysis with visualization
num -t "VOUT" -s 50000 -f -h -b 30

Compare Multiple Channels

Bash
# Analyze multiple voltages
num -t "VDD_1V8" -s 5000 -f
num -t "VDD_3V3" -s 5000 -f
num -t "VDD_5V0" -s 5000 -f

Quality Control

Bash
# Verify within specification
num -t "CALIBRATED_SENSOR" -s 10000 -f
# Check that StdDev < 0.01, Mean within ±0.1%

Notes

  • Requires an active connection (use init first)

  • Requires numeric result channel support in hardware

  • Sample rate limited by hardware and network

  • Results are based on discrete samples

  • Histogram bins are equally sized across the data range