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
num [options]
Optional Options
|
Option |
Short |
Description |
Default |
|---|---|---|---|
|
|
|
The numeric result channel to use |
(first available) |
|
|
|
The target analog channel to analyze |
(required) |
|
|
|
Number of samples to capture |
|
|
|
|
Number of histogram bins |
|
|
|
|
Display histogram |
|
|
|
|
Display full statistical results |
|
Examples
Basic Analysis
num --target "VOLTAGE_SENSOR"
High Sample Count
num -t "ADC_CH0" -s 10000
With Histogram
num -t "TEMPERATURE" -s 1000 -h -b 20
Full Statistics
num -t "CURRENT_SENSE" -s 5000 -f
Specify Channel
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
# Verify voltage stability
num -t "VDD_CORE" -s 100
Noise Analysis
# Analyze signal noise with histogram
num -t "ANALOG_IN" -s 10000 -h -b 50
Performance Testing
# High-speed acquisition
num -t "FAST_ADC" -s 100000 -f
Compare Statistics
# 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:
-
Sets target channel
-
Sets number of samples
-
Configures data reduction mode
-
Triggers acquisition
-
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
initcommand first
Best Practices
-
Start small: Begin with 10-100 samples
-
Increase gradually: Scale up sample count as needed
-
Use histogram: Visualize distribution for noisy signals
-
Monitor speed: Check if acquisition speed meets requirements
-
Full stats for analysis: Use
-ffor detailed characterization
Advanced Examples
Comprehensive Analysis
# Full statistical analysis with visualization
num -t "VOUT" -s 50000 -f -h -b 30
Compare Multiple Channels
# 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
# 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
initfirst) -
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