0% found this document useful (0 votes)
34 views294 pages

Sfsdaf

The NI-SCOPE User Manual provides comprehensive information on the features, requirements, and functionalities of NI-SCOPE instruments. It includes sections on getting started, creating applications in various programming environments, device synchronization, and detailed tutorials. Additionally, it covers fundamental concepts such as bandwidth, resolution, and triggering methods relevant to the use of NI-SCOPE instruments.

Uploaded by

Andrei Vasile
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views294 pages

Sfsdaf

The NI-SCOPE User Manual provides comprehensive information on the features, requirements, and functionalities of NI-SCOPE instruments. It includes sections on getting started, creating applications in various programming environments, device synchronization, and detailed tutorials. Additionally, it covers fundamental concepts such as bandwidth, resolution, and triggering methods relevant to the use of NI-SCOPE instruments.

Uploaded by

Andrei Vasile
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 294

NI-SCOPE

2025-04-20
NI-SCOPE

Contents
Welcome to the NI-SCOPE User Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Features Supported by NI-SCOPE Instruments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
NI-SCOPE Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
NI-SCOPE New Features and Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
NI-SCOPE 2023 Q3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
NI-SCOPE 2023 Q1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
NI-SCOPE 2023 Q1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
NI-SCOPE 2022 Q3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Operating System Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Creating an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Creating an Application with LabVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
LabVIEW Real-Time Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Creating an Application with LabWindows™/CVI™ . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Creating an Application with Microsoft Visual C and C++ . . . . . . . . . . . . . . . . . . . . . 47
Creating an Application with Visual Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Creating an Application Using Visual C# or Visual Basic .NET . . . . . . . . . . . . . . . . . 51
Forms of Device Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Supported Synchronization Methods by Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
NI-SCOPE Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Instrument Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Initialize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Configure the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Configuring an Acquisition Using Auto_Setup. . . . . . . . . . . . . . . . . . . . . . . . . . 62
Configuring an Acquisition Using Configuration Functions . . . . . . . . . . . . . . 62
Acquiring the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Retrieving Error Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Closing the Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
NI-SCOPE and InstrumentStudio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
NI-SCOPE Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

2 ni.com
NI-SCOPE

Flatness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Sample Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Nyquist Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Oversampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Undersampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Record Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Vertical Range and Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Input Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Impedance and Impedance Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Probes and Their Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Probe Compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
PCI and PXI Ground Loop Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Thermal Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Trigger Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Immediate Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Software Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Edge Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Glitch Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Hysteresis Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Runt Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Video Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Width Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Window Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Digital Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Burst Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Trigger Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Trigger Holdoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Trigger Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Trigger Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Sample Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Reference Clock/Phase-Lock Loop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

© National Instruments 3
NI-SCOPE

Time Stamping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104


TDC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Sampling Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Real-Time Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Equivalent-Time Sampling and Random Interleaved Sampling . . . . . . . . . . . . . . 107
Averaging to Minimize Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Time Interleaved Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Frequency Domain Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Spurious Free Dynamic Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
THD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
SINAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
ENOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Video Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Composite and Component Video Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Video Format Naming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Scanning Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Color Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Interlaced Scanning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Complete NTSC Frame Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Gray Scale Image and Extracted Line Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Active Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Video Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Waveform Measurements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Reference Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Hysteresis Percent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Measuring Reference-Level Crossings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Last-Acquisition Histogram Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Smoothing Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Spectral Leakage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
FFT with Spectral Leakage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
FFT without Spectral Leakage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Digital Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
IIR Filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Types of IIR Filters in NI-SCOPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Butterworth Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Chebyshev Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

4 ni.com
NI-SCOPE

Bessel Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143


FIR Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Types of FIR Filters in NI-SCOPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
FIR No Window Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
FIR Hamming Window Responses . . . . . . . . . . . . . . . . . . . . . . . . . 147
FIR Triangle Window Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
FIR Flat Top Window Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
FIR Blackman Window Responses . . . . . . . . . . . . . . . . . . . . . . . . . 149
Integration and System Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
PXI/PXIe Chassis Cooling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
PXI Express Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
PXI Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
PXI Express Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
PXI Star Trigger Line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
PXI Trigger Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
System Reference Clock (PXI_CLK10) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
PFI Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
MXI Optimization Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
RTSI Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
PFI Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
NI-SCOPE Soft Front Panel and InstrumentStudio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
NI-SCOPE 32-Bit Soft Front Panel Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Accessing the NI-SCOPE Soft Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Selecting or Simulating a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Important SFP Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Debug Driver Session in the Soft Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Debug Driver Session Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Debugging a Device in the SFP While in Use by Another Application . . . . . 167
Sharing Control of a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Monitoring a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Troubleshooting a Debug Session in the SFP . . . . . . . . . . . . . . . . . . . . . . . . . 170
Saving Waveform Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Hierarchical Waveform Storage Data File (.hws) . . . . . . . . . . . . . . . . . . . . . . . 171
LabVIEW Measurement Data File (.lvm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Binary Waveform Data Format (.bin) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Saving Configuration Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

© National Instruments 5
NI-SCOPE

Backing Store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174


Keyboard Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Getting Started with NI-SCOPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
NI-SCOPE Programming Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Acquiring Data with NI High-Speed Digitizers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Acquisition Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Configuration Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Configuring the Acquisition Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Configuring the Vertical Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Using Configure Vertical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Using Configure Chan Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Configuring the Horizontal Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Configuring Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Attributes and Attribute Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Setting Attributes Before Reading Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Utility Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Fetching Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Declaring a Waveform Array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Initiating an Acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Waiting for the Data Acquisition to Complete . . . . . . . . . . . . . . . . . . . . . . . . . 196
Retrieving Data from the Digitizer to the Host Computer . . . . . . . . . . . . . . . 197
Using Fetch VIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Using Fetch Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Acquiring Data Continuously . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Acquiring Records Larger than Available Memory . . . . . . . . . . . . . . . . . . . . . 205
Fetching Triggered Records while Other Records Are Being Acquired . . . . 206
Acquiring More Records Than Fit in Digitizer Memory . . . . . . . . . . . . . . . . . . 206
Fetching the Most Recent Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Acquiring Waveforms at Hardware-Timed Intervals . . . . . . . . . . . . . . . . . . . 208
Making Multiple-Record Acquisitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Fetching Multiple-Record Acquisitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Making Waveform Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Fetching Scalar and Array Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Using Attributes in Waveform Measurements . . . . . . . . . . . . . . . . . . . . 214
Configuring Reference Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

6 ni.com
NI-SCOPE

Fetching Statistics from Waveform Measurements. . . . . . . . . . . . . . . . 215


Making Scalar Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Making Array Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Histogram Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Time Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Creating Time Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Voltage Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Creating Voltage Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Coercions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Coercions of Horizontal Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Coercions of Vertical Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Coercions of Trigger Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Using the Standard Functionality for error in Parameters . . . . . . . . . . . . . . . . . . . 230
Using the Standard Functionality for error out Parameters . . . . . . . . . . . . . . . . . . 231
Array Measurements in NI-SCOPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Last Acq Histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Multi Acq Time Histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Multi Acq Voltage Histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Blackman Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Hanning Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Flat Top Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Triangle Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Hamming Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Bessel IIR Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
FIR Windowed Filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Butterworth IIR Filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Chebyshev IIR Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Add Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Multiply Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Divide Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Subtract Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Multi Acq Average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Array Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Array Gain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

© National Instruments 7
NI-SCOPE

Array Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252


FFT Amp Spectrum (dB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
FFT Phase Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
FFT Amp Spectrum (Volts RMS). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Polynomial Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Scalar Measurements in NI-SCOPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
AC Estimate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Voltage Cycle RMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Voltage Cycle Average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
FFT Amplitude. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Voltage RMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Voltage Average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
DC Estimate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Cycle Area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Voltage Min . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Voltage Low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Voltage Max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Voltage High . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Voltage Amplitude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Voltage Peak to Peak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Voltage Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Voltage Top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Voltage Base to Top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Overshoot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Preshoot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Low Ref Volts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Mid Ref Volts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
High Ref Volts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Fall Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Positive Duty Cycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Falling Slew Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Rise Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Negative Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Rising Slew Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

8 ni.com
NI-SCOPE

Positive Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275


Negative Duty Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Phase Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Time Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Average Frequency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
FFT Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Average Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Time Hist Hits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Time Hist Max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Time Hist Mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Time Hist Mean + Stdev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Time Hist Mean + 2 Stdev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Time Hist Mean + 3 Stdev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Time Hist Median . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Time Hist Min . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Time Hist Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Time Hist New Hits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Time Hist Peak to Peak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Time Hist Stdev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Volt Hist Hits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Volt Hist Max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Volt Hist Mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Volt Hist Mean + Stdev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Volt Hist Mean + 2 Stdev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Volt Hist Mean + 3 Stdev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Volt Hist Median . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Volt Hist Min. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Volt Hist Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Volt Hist New Hits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Volt Hist Peak to Peak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Volt Hist Stdev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
NI-SCOPE Instrument Driver FPGA Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Using NI-SCOPE Instrument Driver FPGA Extensions . . . . . . . . . . . . . . . . . . . . . . . . 287
Manual Adjustment of NI-TClk Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

© National Instruments 9
NI-SCOPE

Improving NI-TClk Synchronization of Oscilloscopes with Manual Adjustment . . . .


289

10 ni.com
NI-SCOPE

Welcome to the NI-SCOPE User Manual


The NI-SCOPE User Manual provides detailed descriptions of product functionality and
step-by-step processes for use.

Looking for something else?


For information not found in the User Manual for your product, like specifications or
API reference, browse Related Information.

Related information:

• NI-SCOPE API References


• License Setup and Activation
• NI-SCOPE Download
• NI-SCOPE Release Notes

© National Instruments 11
NI-SCOPE

Features Supported by NI-SCOPE Instruments


Refer to this page for a comparison by feature category of the features supported by NI
oscilloscopes.

Note

• Instruments with multiple bus type variants (for example, PXIe and PXI)
are shown separately only when the bus type affects the available
features.
• These instruments are configurable in Measurement & Automation
Explorer (MAX). Refer to the getting started guide for each instrument
for configuration information.
• Refer to the specifications for each instrument for detailed information
on the supported features.

Refer to the following categories to compare oscilloscope functionality:

Table 1. Input Configuration


Maximum
Input 3 dB Bandwidth1
Input Input Range DC Input
Instrument
Channels Impedance Offset? Coupling Digital
Analog
50 Ω 1 MΩ Unfiltered FIR
Filter
Filter

PXIe/PXI/
8
• 50 Ω
±3 V
±15
✕ • AC2 60 MHz 24 MHz -
PCI-5105 • 1 MΩ V • DC

PXIe-5110 100 MHz


20 MHz
PXIe-5111 350 MHz
• 50 Ω ±20 • AC
2 ±5 V ✔ -
• 1 MΩ V • DC • 350
PXIe-5113 500 MHz
MHz

12 ni.com
NI-SCOPE

Maximum
Input 3 dB Bandwidth1
Input Input Range DC Input
Instrument
Channels Impedance Offset? Coupling Digital
Analog
50 Ω 1 MΩ Unfiltered FIR
Filter
Filter

• 20
MHz

PXIe/PXI/ • 50 Ω ±20 • AC2


2 ±5 V ✔ • DC 125 MHz 20 MHz -
PCI-5114 • 1 MΩ V
• GND

• 35
PXIe/PXI/ • 50 Ω ±10 • AC2 MHz
2 ±5 V ✔ • DC 100 MHz -
PCI-5122 • 1 MΩ V • 20
• GND MHz

• 60
PXI/ • 50 Ω ±10 • AC2 MHz
2 ±5 V ✔ • DC 150 MHz -
PCI-5124 • 1 MΩ V • 20
• GND MHz

USB-5132
• AC
±20
2 1 MΩ - ✔ • DC 50 MHz 20 MHz -
USB-5133 V
• GND

• 35
PXI/ • 50 Ω ±10 • AC2 MHz
2 ±5 V ✔ • DC 100 MHz -
PCI-5142 • 1 MΩ V • 20
• GND MHz

PXI/ • 50 Ω
±5 V ±5 V ✔ • AC 300 MHz 20 MHz -
PCI-5152 • 1 MΩ
2 • DC
• GND
PXI/ ±2.5
50 Ω - ✕ 500 MHz 20 MHz -
PCI-5153 V

© National Instruments 13
NI-SCOPE

Maximum
Input 3 dB Bandwidth1
Input Input Range DC Input
Instrument
Channels Impedance Offset? Coupling Digital
Analog
50 Ω 1 MΩ Unfiltered FIR
Filter
Filter
PXI/
1 GHz 20 MHz -
PCI-5154

• 175
• 50 Ω: 500 MHz MHz
PXIe-5160 -
• 1 MΩ: 300 MHz • 20
MHz
• 50 Ω ±2.5 ±25 • AC
2 or 4 ✔
• 1 MΩ V V • DC
• 175
• 50 Ω: 1.5 GHz MHz
PXIe-5162 -
• 1 MΩ: 300 MHz • 20
MHz

PXIe-5163 200 MHz -


Low-
pass:

• 150
MHz
• 30
MHz
• 20
• 50 Ω ±2.5 ±50 • AC
2 ✕ • 50 Ω: 400 MHz MHz
PXIe-5164 • 1 MΩ V V • DC -
• 1 MΩ: 300 MHz
High-
pass:

• 450
Hz
• 90
Hz

PXIe-5170 4 or 8 ±2.5 100 MHz - -


50 Ω - ✕
PXIe-5171 8 V
• AC 250 MHz 100 MHz -
±40 • DC
PXIe-5172 4 or 8 • 50 Ω ±5 V ✕ 100 MHz - • 80
V

14 ni.com
NI-SCOPE

Maximum
Input 3 dB Bandwidth1
Input Input Range DC Input
Instrument
Channels Impedance Offset? Coupling Digital
Analog
50 Ω 1 MΩ Unfiltered FIR
Filter
Filter

MHz
• 40
• 1 MΩ MHz
• 20
MHz

• 50 Ω: 3 GHz
PXIe-51853 • 1 MΩ: 500 MHz
2
• 50 Ω ±0.5
±5 V ✔ • AC2 - -
• 1 MΩ V • DC
• 50 Ω: 5 GHz
PXIe-51863 • 1 MΩ: 500 MHz

• Direct path: 3
MHz to 250 MHz
±1.4 • AC
PXIe-5622 1 50 Ω - ✕ • Bandpass path: - -
V • GND
162.5 MHz to
212.5 MHz

• AC
PXI/ • 50 Ω 0.4 × Sample Rate (6
2 ±5 V ±5 V ✕ • DC - -
PCI-5922 • 1 MΩ MHz maximum)
• GND

Table 2. Timing
Maximum Sample Rate Time Stamps
Instrument Real-Time Time-Interleaved Random Interleaved
Absolute Relative
Sampling Sampling (TIS) Sampling (RIS)
PXIe/PXI/
60 MS/s - - ✔ ✔
PCI-5105
PXIe-5110 500 MS/s 1 GS/s - ✔ ✔

© National Instruments 15
NI-SCOPE

Maximum Sample Rate Time Stamps


Instrument Real-Time Time-Interleaved Random Interleaved
Absolute Relative
Sampling Sampling (TIS) Sampling (RIS)
PXIe-5111 3 GS/s
1.5 GS/s
PXIe-5113 3 GS/s
PXIe/PXI/
250 MS/s - 5 GS/s ✔ ✔
PCI-5114
PXIe/PXI/
100 MS/s - 2 GS/s ✔ ✔
PCI-5122
PXI/
200 MS/s - 4 GS/s ✔ ✔
PCI-5124
USB-5132 50 MS/s
- - ✕ ✔
USB-5133 100 MS/s
PXI/
100 MS/s - 2 GS/s ✔ ✔
PCI-5142
PXI/
PCI-5152
PXI/
1 GS/s 2 GS/s 20 GS/s ✔ ✔
PCI-5153
PXI/
PCI-5154
PXIe-5160 2.5 GS/s 50 GS/s
1.25 GS/s ✔ ✔
PXIe-5162 5 GS/s 100 GS/s
PXIe-5163
1 GS/s - - ✔ ✔
PXIe-5164
PXIe-5170
PXIe-5171 250 MS/s - - ✔ ✔
PXIe-5172
PXIe-5185
6.25 GS/s 12.5 GS/s 250 GS/s ✔ ✔
PXIe-5186
PXIe-5622 150 MS/s - - ✔ ✔

16 ni.com
NI-SCOPE

Maximum Sample Rate Time Stamps


Instrument Real-Time Time-Interleaved Random Interleaved
Absolute Relative
Sampling Sampling (TIS) Sampling (RIS)
PXI/
15 MS/s - - ✔ ✔
PCI-5922

Table 3. Clocking
Reference Clock External Sample Clock Sample
Instrument Clock
Frequency Input Sources Outputs Frequency Sources Outputs

• PFI 1
PXIe-5105 PFI 1
• PXI_CLK10

5 MHz to • PFI 1
PXI-5105 PFI 1
20 MHz, 1 • PXI_CLK10 4 MHz to • PFI 1
MHz 65 MHz • PXI Star PFI 14
increments
• PFI 1
• PFI 1
• RTSI
PCI-5105 • RTSI clock
clock
(RTSI 7)
(RTSI 7)

PXIe-5110
PXIe-5111 100 MHz PXI_CLK100 - - - -
PXIe-5113

• PFI
• CLK IN <0..1>
PXIe-5114
5 MHz to • PXI_CLK10 • PXI_Trig
20 MHz, 1 <0..6> 50 MHz to
CLK IN -
MHz 250 MHz
increments
• CLK IN • PFI
PXI-5114
• PXI_CLK10 <0..1>

© National Instruments 17
NI-SCOPE

Reference Clock External Sample Clock Sample


Instrument Clock
Frequency Input Sources Outputs Frequency Sources Outputs

• PXI_Trig
<0..6>

• PFI
• CLK IN <0..1>
PCI-5114 • RTSI clock • RTSI
(RTSI 7) clock
(RTSI 7)

• CLK
OUT
• CLK IN • PFI
PXIe-5122
• PXI_CLK10 <0..1>
• PXI_Trig
<0..6>

• CLK
• CLK
OUT
5 MHz to OUT
• CLK IN • PFI
PXI-5122 20 MHz, 1 30 MHz to • CLK IN • PFI
• PXI_CLK10 <0..1>
MHz 105 MHz • PXI Star <0..1>
• PXI_Trig
increments • RTSI
<0..6>
<0..6>

• CLK
OUT
• CLK IN • PFI
PCI-5122 • RTSI clock <0..1>
(RTSI 7) • RTSI
clock
(RTSI 7)

18 ni.com
NI-SCOPE

Reference Clock External Sample Clock Sample


Instrument Clock
Frequency Input Sources Outputs Frequency Sources Outputs

• CLK
OUT
• CLK IN • PFI
PXI-5124
• PXI_CLK10 <0..1>
• PXI_Trig
<0..6> • CLK
5 MHz to OUT
20 MHz, 1 50 MHz to • CLK IN • PFI
MHz 210 MHz • PXI Star <0..1>
increments • CLK • RTSI
OUT <0..6>
• CLK IN • PFI
PCI-5124 • RTSI clock <0..1>
(RTSI 7) • RTSI
clock
(RTSI 7)

1 MHz to
USB-5132
50 MHz
- - - PFI 1 -
1 MHz to
USB-5133
100 MHz

• CLK
OUT
• CLK IN • PFI
PXI-5142
• PXI_CLK10 <0..1>
• PXI_Trig
<0..6>
5 MHz to • CLK
20 MHz, 1 30 MHz to • CLK IN OUT
MHz 105 MHz • PXI Star • PFI
increments • CLK <0..1>
OUT
• CLK IN • PFI
PCI-5142 • RTSI clock <0..1>
(RTSI 7) • RTSI
clock
(RTSI 7)

© National Instruments 19
NI-SCOPE

Reference Clock External Sample Clock Sample


Instrument Clock
Frequency Input Sources Outputs Frequency Sources Outputs

• PFI 1
• PFI 0
PXI-5152 • PXI_Trig
• PXI_CLK10
<0..6>

• PFI 1
• PFI 0
• RTSI
PCI-5152 • RTSI clock
clock
(RTSI 7)
(RTSI 7)

• PFI 1
• PFI 0
PXI-5153 • PXI_Trig
• PXI_CLK10
<0..6>
1 MHz to
20 MHz, 1 350 MHz
PFI 0 -
MHz to 1 GHz
increments • PFI 1
• PFI 0
• RTSI
PCI-5153 • RTSI clock
clock
(RTSI 7)
(RTSI 7)

• PFI 1
• PFI 0
PXI-5154 • PXI_Trig
• PXI_CLK10
<0..6>

• PFI 1
• PFI 0
• RTSI
PCI-5154 • RTSI clock
clock
(RTSI 7)
(RTSI 7)

PXIe-5160
• CLK IN 1.25 GHz
10 MHz CLK OUT CLK IN -
PXIe-5162 • PXI_CLK10 to 2.5 GHz

20 ni.com
NI-SCOPE

Reference Clock External Sample Clock Sample


Instrument Clock
Frequency Input Sources Outputs Frequency Sources Outputs
PXIe-5163
• CLK IN
• SMB CLK IN
• AUX 0 CLK AUX 0 CLK
10 MHz 1.0 GHz • PXIe_DSTAR -
PXIe-5164 IN OUT
A
• PXI_CLK10

PXIe-5170
• AUX 0CLK
PXIe-5171 • AUX 0CLK 150 MHz
AUX 0 CLK IN
10 MHz IN to 250 -
OUT • PXIe_DSTAR
• PXI_CLK10 MHz
PXIe-5172 A

PXIe-5185
• 10
MHz • REF CLK 1.6 GHz to
- CLK IN -
PXIe-5186 • 100 • PXI_CLK100 3.125 GHz
MHz

1 MHz to
100 MHz, 1 • CLK IN 20 MHz to
PXIe-5622 CLK OUT CLK IN CLK OUT
MHz • PXI_CLK100 150 MHz
increments

• CLK
OUT
• CLK IN • PFI
PXI-5922
• PXI_CLK10 <0..1>
• PXI_Trig
1 MHz to <0..6>
20 MHz, 1
- - -
MHz
increments • CLK
OUT
• CLK IN
• PFI
PCI-5922 • RTSI clock
<0..1>
(RTSI 7)
• RTSI
clock

© National Instruments 21
NI-SCOPE

Reference Clock External Sample Clock Sample


Instrument Clock
Frequency Input Sources Outputs Frequency Sources Outputs

(RTSI 7)

Table 4. Supported Trigger Types and Triggering Features


Reference Trigger Types Trigger Trigger
Instrument
Digital Edge Glitch Hysteresis Immediate Runt Software Video Width Window Holdoff? Delay?
PXIe/PXI/
✔ ✔ ✕ ✔ ✔ ✕ ✔ ✕ ✕ ✔ ✔ ✔
PCI-5105
PXIe-5110
PXIe-5111 ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✕ ✔ ✔ ✔ ✔
PXIe-5113
PXIe/PXI/
✔ ✔ ✕ ✔ ✔ ✕ ✔ ✔ ✕ ✔ ✔ ✔
PCI-5114
PXIe/PXI/
✔ ✔ ✕ ✔ ✔ ✕ ✔ ✔ ✕ ✔ ✔ ✔
PCI-5122
PXI/
✔ ✔ ✕ ✔ ✔ ✕ ✔ ✔ ✕ ✔ ✔ ✔
PCI-5124
USB-5132
✔ ✔ ✕ ✔ ✔ ✕ ✔ ✕ ✕ ✔ ✕ ✔
USB-5133
PXI/
✔ ✔ ✕ ✔ ✔ ✕ ✔ ✔ ✕ ✔ ✔ ✔
PCI-5142
PXI/
PCI-5152
PXI/
✔ ✔ ✕ ✔ ✔ ✕ ✔ ✔ ✕ ✔ ✔ ✔
PCI-5153
PXI/
PCI-5154
PXIe-5160
✔ ✔ ✕ ✔ ✔ ✕ ✔ ✕ ✕ ✕ ✔ ✔
PXIe-5162
PXIe-5163
✔ ✔ ✕ ✔ ✔ ✕ ✔ ✕ ✕ ✔ ✔ ✔
PXIe-5164
PXIe-5170
PXIe-5171 ✔ ✔ ✕ ✔ ✔ ✕ ✔ ✕ ✕ ✔ ✔ ✔
PXIe-5172
PXIe-5185
✔ ✔ ✕ ✕ ✔ ✕ ✔ ✕ ✕ ✕ ✔ ✔
PXIe-5186
PXIe-5622 ✔ ✕ ✕ ✕ ✕ ✕ ✕ ✕ ✕ ✕ ✔ ✔

22 ni.com
NI-SCOPE

Reference Trigger Types Trigger Trigger


Instrument
Digital Edge Glitch Hysteresis Immediate Runt Software Video Width Window Holdoff? Delay?
PXI/
✔ ✔ ✕ ✔ ✔ ✕ ✔ ✕ ✕ ✔ ✔ ✔
PCI-5922

Table 5. Reference Trigger Sources and Trigger Coupling


Trigger Coupling
Reference Trigger Sources External TRIG Input
Instrument Analog Input External
(Bus-Independent) Impedance
Channel TRIG Input

PXIe/PXI/ • CH <0..7> Same as input


- -
PCI-5105 • PFI 1 channel

PXIe-5110
• Same as
PXIe-5111 input
• CH <0..1>
channel - -
• PFI <0..3>
• HF reject
PXIe-5113
• LF reject

• AC
• DC
• Same as
• LF
• CH <0..1> input
PXIe/PXI/ reject
• PFI <0..1> channel 1 MΩ
PCI-5114 • HF
• TRIG • HF reject
reject
• LF reject
• AC + HF
reject

• AC
• DC
• Same as
• LF
• CH <0..1> input
PXIe/PXI/ reject
• PFI <0..1> channel 1 MΩ
PCI-5122 • HF
• TRIG • HF reject
reject
• LF reject
• AC + HF
reject

© National Instruments 23
NI-SCOPE

Trigger Coupling
Reference Trigger Sources External TRIG Input
Instrument Analog Input External
(Bus-Independent) Impedance
Channel TRIG Input

• AC
• DC
• Same as
• LF
• CH <0..1> input
PXI/ reject
• PFI <0..1> channel 1 MΩ
PCI-5124 • HF
• TRIG • HF reject
reject
• LF reject
• AC + HF
reject

USB-5132
• CH <0..1> Same as input
- -
USB-5133 • PFI 1 channel

• AC
• DC
• Same as
• LF
• CH <0..1> input
PXI/ reject
• PFI <0..1> channel 1 MΩ
PCI-5142 • HF
• TRIG • HF reject
reject
• LF reject
• AC + HF
reject

• AC
• DC
• LF
• CH <0..1>
PXI/ reject
• PFI <0..1> • Same as 1 MΩ
PCI-5152 • HF
• TRIG input reject
channel • AC + HF
• HF reject reject
• LF reject

PXI/ • CH <0..1> • DC
2.25 kΩ
PCI-5153 • PFI <0..1> • LF

24 ni.com
NI-SCOPE

Trigger Coupling
Reference Trigger Sources External TRIG Input
Instrument Analog Input External
(Bus-Independent) Impedance
Channel TRIG Input

• TRIG

reject
• HF
• CH <0..1> reject
PXI/
• PFI <0..1>
PCI-5154
• TRIG

PXIe-5160
• AC
• DC
• Same as
• LF
• CH <0..n> input
reject Software selectable:
• PFI <0..1> channel
PXIe-5162 • HF 50 Ω or 1 MΩ
• TRIG • HF reject
reject
• LF reject
• AC + HF
reject

PXIe-5163
• Same as
• CH <0..1> input
• SMB PFI 0 channel - -
PXIe-5164 • AUX 0 PFI <0..7> • HF reject
• LF reject

PXIe-5170
• CH <0..n> Same as input
PXIe-5171 - -
• PFI <0..7> channel
PXIe-5172
PXIe-5185
• CH <0..1> Same as input
DC 50 Ω
PXIe-5186 • TRIG channel

PXIe-5622 IF IN - - -

© National Instruments 25
NI-SCOPE

Trigger Coupling
Reference Trigger Sources External TRIG Input
Instrument Analog Input External
(Bus-Independent) Impedance
Channel TRIG Input

• CH <0..1>
PXI/ Same as input
• PFI <0..1> DC 1 MΩ
PCI-5922 channel
• TRIG

Note Some reference trigger sources are available across all instruments of
a given bus type.

The reference trigger sources available on NI oscilloscopes specific to bus


type are as follows:

• PXIe oscilloscopes: PXI_Trig <0..7>


• PXI oscilloscopes: PXI_Trig <0..7>, PXI Star
• PCI oscilloscopes: RTSI <0..7>

The previous table excludes these bus-dependent reference trigger sources


and lists only those sources that are unique to each instrument.

Table 6. Synchronization Trigger Sources and Outputs


Synchronization Signal Sources Synchronization Signal Outputs

Instrument Arm Record


Start Reference
End of End of
Start
Reference Advance Record Acquisition
Trigger Trigger Trigger
Trigger Trigger Event Event

• PFI 1 • PFI 1
PXIe-5105 • PXI_Trig • RTSI
<0..7> • PFI 1 <0..7>
• PXI Star • PFI 1
• RTSI • RTSI <0..6>
<0..7>
• PFI 1 • PFI 1
PXI-5105
• PXI_Trig • PXI Star

26 ni.com
NI-SCOPE

Synchronization Signal Sources Synchronization Signal Outputs

Instrument Arm Record


Start Reference
End of End of
Start
Reference Advance Record Acquisition
Trigger Trigger Trigger
Trigger Trigger Event Event

<0..7> • RTSI
• PXI Star <0..7>

• PFI 1 • PFI 1
PCI-5105 • RTSI • RTSI
<0..7> <0..7>

PXIe-5110
• PFI • PFI • PFI
PXIe-5111 <0..3> <0..3> <0..3> • PFI <0..3>
• PXI_Trig • PXI_Trig • PXI_Trig • PXI_Trig <0..6>
PXIe-5113 <0..7> <0..7> <0..7>

• PFI • PFI
<0..1> <0..1>
PXIe-5114
• PXI_Trig • RTSI
<0..7> <0..7>

• PFI • PFI
<0..1> • PFI <0..1>
PXI-5114 • PXI_Trig <0..1> • PXI Star
• PFI <0..1>
<0..7> • PXI Star • RTSI
• RTSI <0..6>
• PXI Star • RTSI <0..7>
<0..7>

• PFI
<0..1> • PFI
• PXI_Trig <0..1>
PCI-5114
<0..7> • RTSI
• RTSI <0..7>
<0..7>

© National Instruments 27
NI-SCOPE

Synchronization Signal Sources Synchronization Signal Outputs

Instrument Arm Record


Start Reference
End of End of
Start
Reference Advance Record Acquisition
Trigger Trigger Trigger
Trigger Trigger Event Event

• PFI • PFI
<0..1> <0..1>
PXIe-5122
• PXI_Trig • RTSI
<0..7> <0..7>

• PFI • PFI
<0..1> • PFI <0..1>
PXI-5122 • PXI_Trig <0..1> • PXI Star
• PFI <0..1>
<0..7> • PXI Star • RTSI
• RTSI <0..6>
• PXI Star • RTSI <0..7>
<0..7>

• PFI
<0..1> • PFI
• PXI_Trig <0..1>
PCI-5122
<0..7> • RTSI
• RTSI <0..7>
<0..7>

• PFI • PFI
<0..1> <0..1>
PXI-5124 • PXI_Trig • PXI Star
<0..7> • RTSI
• PXI Star • PFI <0..7>
<0..1>
• PFI <0..1>
• PXI Star
• RTSI <0..6>
• PFI • RTSI
<0..1> <0..7> • PFI
• PXI_Trig <0..1>
PCI-5124
<0..7> • RTSI
• RTSI <0..7>
<0..7>

28 ni.com
NI-SCOPE

Synchronization Signal Sources Synchronization Signal Outputs

Instrument Arm Record


Start Reference
End of End of
Start
Reference Advance Record Acquisition
Trigger Trigger Trigger
Trigger Trigger Event Event
USB-5132
- - PFI 1 PFI 1 - PFI 1 PFI 1
USB-5133

• PFI • PFI
<0..1> <0..1>
PXI-5142 • PXI_Trig • PXI Star
<0..7> • RTSI
• PXI Star • PFI <0..7>
<0..1>
• PFI <0..1>
• PXI Star
• RTSI <0..6>
• PFI • RTSI
<0..1> <0..7> • PFI
• PXI_Trig <0..1>
PCI-5142
<0..7> • RTSI
• RTSI <0..7>
<0..7>

• PFI • PFI
<0..1> <0..1>
PXI-5152 • PXI_Trig • PXI Star
<0..7> • RTSI
• PXI Star <0..7>

• PFI
• PFI <0..1>
• PFI <0..1>
<0..1> • PXI Star • PFI
• RTSI <0..6>
• PXI_Trig • RTSI <0..1>
PCI-5152
<0..7> <0..7> • RTSI
• RTSI <0..7>
<0..7>

• PFI • PFI
PXI-5153
<0..1> <0..1>

© National Instruments 29
NI-SCOPE

Synchronization Signal Sources Synchronization Signal Outputs

Instrument Arm Record


Start Reference
End of End of
Start
Reference Advance Record Acquisition
Trigger Trigger Trigger
Trigger Trigger Event Event

• PXI_Trig • PXI Star


<0..7> • RTSI
• PXI Star <0..7>

• PFI
<0..1> • PFI
• PXI_Trig <0..1>
PCI-5153
<0..7> • RTSI
• RTSI <0..7>
<0..7>

• PFI • PFI
<0..1> <0..1>
PXI-5154 • PXI_Trig • PXI Star
<0..7> • RTSI
• PXI Star <0..7>

• PFI
<0..1> • PFI
• PXI_Trig <0..1>
PCI-5154
<0..7> • RTSI
• RTSI <0..7>
<0..7>

PXIe-5160
• PFI • PFI • PFI
<0..1> <0..1> <0..1> • PFI <0..1>
PXIe-5162 • PXI_Trig • PXI_Trig • PXI_Trig • PXI_Trig <0..6>
<0..7> <0..7> <0..7>

PXIe-5163
• PFI • PFI • PFI • PFI <0..7>
PXIe-5164

30 ni.com
NI-SCOPE

Synchronization Signal Sources Synchronization Signal Outputs

Instrument Arm Record


Start Reference
End of End of
Start
Reference Advance Record Acquisition
Trigger Trigger Trigger
Trigger Trigger Event Event

<0..7> <0..7> <0..7>


• PXI_Trig • PXI_Trig • PXI_Trig • PXI_Trig <0..6>
<0..7> <0..7> <0..7>

PXIe-5170
• PFI • PFI • PFI
PXIe-5171 <0..7> <0..7> <0..7> • PFI <0..7>
• PXI_Trig • PXI_Trig • PXI_Trig • PXI_Trig <0..6>
PXIe-5172 <0..7> <0..7> <0..7>

PXIe-51855 PXI_Trig PXI_Trig


- PXI_Trig <0..6>
5 <0..6> <0..6>
PXIe-5186

• PFI 1 • PFI 1 • PFI 1


• PFI <0..1>
PXIe-5622 • PXI_Trig • PXI_Trig • PXI_Trig
• PXI_Trig <0..6>
<0..7> <0..7> <0..7>

• PFI • PFI
<0..1> <0..1>
PXI-5922 • PXI_Trig • PXI Star
<0..7> • PFI • RTSI
• PXI Star <0..1> <0..7>
• PFI <0..1>
• PXI Star
• PXI_Trig <0..6>
• RTSI
• PFI <0..7> • PFI
<0..1> <0..1>
PCI-5922
• RTSI • RTSI
<0..7> <0..7>

© National Instruments 31
NI-SCOPE

Table 7. Acquisition
Multiple Record Continuous DDC Acquisition
Instrument Resolution
Acquisitions? Acquisition? Mode?
PXIe/PXI/
12 bits ✔ ✔ ✕
PCI-5105
PXIe-5110
PXIe-5111 8 bits ✔ ✔ ✕
PXIe-5113
PXIe/PXI/
8 bits ✔ ✔ ✕
PCI-5114
PXIe/PXI/
14 bits ✔ ✔ ✕
PCI-5122
PXI/
12 bits ✔ ✔ ✕
PCI-5124
USB-5132
8 bits ✕ ✔ ✕
USB-5133
PXI/
14 bits ✔ ✔ ✔
PCI-5142
PXI/
PCI-5152
PXI/
8 bits ✔ ✔ ✕
PCI-5153
PXI/
PCI-5154
PXIe-5160
10 bits ✔ ✔ ✕
PXIe-5162
PXIe-5163
14 bits ✔ ✔ ✕
PXIe-5164
PXIe-5170
PXIe-5171 14 bits ✔ ✔ ✕
PXIe-5172

32 ni.com
NI-SCOPE

Multiple Record Continuous DDC Acquisition


Instrument Resolution
Acquisitions? Acquisition? Mode?
PXIe-5185
8 bits ✔ ✔ ✕
PXIe-5186
PXIe-5622 16 bits ✔ ✔ ✔
PXI/ Flexible resolution, up
✔ ✔ ✕
PCI-5922 to 24 bits

Table 8. Miscellaneous
Probe Onboard
LabVIEW Onboard
Self- Compensation Signal Reconfigurable CableSenseT Memory
Instrument Real-Time
Calibration? Signal Processing FPGA? Capable?8
Support?7 Options9
Output6 Support?

• 16
MB
PXIe/PXI/ • 128
✔ PFI 1 ✔ ✕ ✕ ✕
PCI-5105 MB
• 512
MB

PXIe-5110
• 64
PXIe-5111 Probe
MB
✔ compensation ✕ ✕ ✕ ✔
• 512
terminals
PXIe-5113 MB

• 8
MB
PXIe/PXI/ • 64
✔ PFI 1 ✔ ✕ ✕ ✕
PCI-5114 MB
• 256
MB

PXIe-5122 ✔ PFI 1 ✔ ✕ ✕ ✕ • 8

© National Instruments 33
NI-SCOPE

Probe Onboard
LabVIEW Onboard
Self- Compensation Signal Reconfigurable CableSenseT Memory
Instrument Real-Time
Calibration? Signal Processing FPGA? Capable?8
Support?7 Options9
Output6 Support?

MB
• 64
MB
• 256
MB

• 8
MB
• 32
MB
PXI-5122
• 256
MB
• 512
MB

• 8
MB
• 32
PCI-5122
MB
• 256
MB

• 8
MB
• 32
PXI/ MB
✔ PFI 1 ✔ ✕ ✕ ✕
PCI-5124 • 256
MB
• 512
MB

34 ni.com
NI-SCOPE

Probe Onboard
LabVIEW Onboard
Self- Compensation Signal Reconfigurable CableSenseT Memory
Instrument Real-Time
Calibration? Signal Processing FPGA? Capable?8
Support?7 Options9
Output6 Support?

USB-5132
• 8
MB
✔10 PFI 1 ✕ ✕ ✕ ✕
• 64
USB-5133
MB

• 64
PXI/ MB
✔ PFI 1 ✔ ✔ ✕ ✕
PCI-5142 • 256
MB

PXI/
PCI-5152 • 16
MB
PXI/ • 128
PCI-5153 ✔ PFI 1 ✔ ✕ ✕ ✕
MB
• 512
PXI/
MB
PCI-5154

PXIe-5160
• 64
✔ PFI 1 ✔ ✕ ✕ ✔ MB
PXIe-5162 • 2 GB

PXIe-5163 ✕ 512 MB
✔ SMB PFI 0 ✕ ✕ ✕
PXIe-5164 ✔ 1.5 GB

• 0.75
GB
PXIe-5170
✔ - ✕ ✕ ✔ ✕ • 1.5
GB

PXIe-5171 1.5 GB

© National Instruments 35
NI-SCOPE

Probe Onboard
LabVIEW Onboard
Self- Compensation Signal Reconfigurable CableSenseT Memory
Instrument Real-Time
Calibration? Signal Processing FPGA? Capable?8
Support?7 Options9
Output6 Support?

• 0.75
GB
PXIe-5172
• 1.5
GB

PXIe-5185
• 32
11 - ✔ ✕ ✕ ✕ MB

PXIe-5186 • 1 GB

• 64
MB
PXIe-5622 ✔ - ✔ ✔ ✕ ✕
• 256
MB

• 16
MB
PXI/ • 64
PCI-5922 ✔11 - ✔ ✕ ✕ ✕
MB
• 512
MB

1
All filters are low-pass unless otherwise noted.

2
Available on 1 MΩ input impedance only.

3
1 MΩ available on modules with part numbers as follows:

• PXIe-5185: 152962x-0zL
• PXIe-5186: 152961x-0zL

36 ni.com
NI-SCOPE

where x is any letter and z is any number.

4
Sample clock may be exported only at full rate.

5
Can simultaneously export or import a maximum of four triggers or events.

6
1 kHz square wave.

7
Applies to instruments with PXIe and PXI bus types only.

8
CableSense-capable instruments may not include the CableSense option. To use
CableSense, you must purchase a CableSense-capable instrument that includes the
CableSense option.

9
Total module memory. The maximum memory available to each channel in a session
is the module total divided by the number of channels enabled in the session.

10
Self-calibration of DC offset only.

11
Self-calibration not supported on Linux systems.

Related concepts:

• Features Supported by NI-SCOPE Instruments

© National Instruments 37
NI-SCOPE

NI-SCOPE Requirements
NI-SCOPE has the following requirements:

• 1 GHz or faster 64-bit (x64) processor


• If you are running your application on a RT target, at least 128 MB of disk space
• At least 2 GB RAM (x64)
• A screen resolution of 1,024 x 768

Supported Operating Systems


NI-SCOPE 2023 Q3 supports the following operating systems:

• Windows 11
• Windows 10
• Windows Server 2022
• Windows Server 2019
• Windows Server 2016
• NI Linux® Real-Time1

Note NI-SCOPE no longer supports any 32-bit Windows operating system.

1. This operating system is not supported for the following features:


◦ Autopopulation of resource names in LabVIEW 2020 and earlier
◦ Test panels as accessible from NI Measurement & Automation Explorer (NI MAX)

38 ni.com
NI-SCOPE

NI-SCOPE New Features and Changes


Learn about updates—including new features and behavior changes—introduced in
each version of NI-SCOPE.

NI-SCOPE 2023 Q3

Behavior Changes

The NI-SCOPE Soft Front Panel has been replaced by InstrumentStudio, which is
automatically installed when you install the NI-SCOPE driver. You can access
InstrumentStudio in one of the following ways:

• From Windows, select Start » National Instruments » InstrumentStudio. This


launches InstrumentStudio and runs a soft front panel populated with devices
detected on your system.
• From NI MAX, select a device and click Test Panels.... This launches
InstrumentStudio and runs a soft front panel for the device you selected.

Note The deprecated NI-SCOPE Soft Front Panel remains available for
download. Visit Legacy Soft Front Panels for NI-SCOPE for more information.

Related information:

• Legacy Soft Front Panels for NI-SCOPE

NI-SCOPE 2023 Q1.1

Behavior Changes

The NI-SCOPE Soft Front Panel has been replaced by InstrumentStudio, which is
automatically installed when you install the NI-SCOPE driver. You can access

© National Instruments 39
NI-SCOPE

InstrumentStudio in one of the following ways:

• From Windows, select Start » National Instruments » InstrumentStudio. This


launches InstrumentStudio and runs a soft front panel populated with devices
detected on your system.
• From NI MAX, select a device and click Test Panels.... This launches
InstrumentStudio and runs a soft front panel for the device you selected.

Note The deprecated NI-SCOPE Soft Front Panel remains available for
download. Visit Legacy Soft Front Panels for NI-SCOPE for more information.

NI-SCOPE 2023 Q1

Behavior Changes

The NI-SCOPE Soft Front Panel has been replaced by InstrumentStudio, which is
automatically installed when you install the NI-SCOPE driver. You can access
InstrumentStudio in one of the following ways:

• From Windows, select Start » National Instruments » InstrumentStudio. This


launches InstrumentStudio and runs a soft front panel populated with devices
detected on your system.
• From NI MAX, select a device and click Test Panels.... This launches
InstrumentStudio and runs a soft front panel for the device you selected.

Note The deprecated NI-SCOPE Soft Front Panel remains available for
download. Visit Legacy Soft Front Panels for NI-SCOPE for more information.

NI-SCOPE 2022 Q3

New Features

NI-SCOPE 2022 Q3 adds support for LabVIEW 2022

40 ni.com
NI-SCOPE

Behavior Changes

• NI-SCOPE 2022 Q3 removes support for NI-HWS.


• The NI-SCOPE Soft Front Panel has been replaced by InstrumentStudio, which is
automatically installed when you install the NI-SCOPE driver. You can access
InstrumentStudio in one of the following ways:
◦ From Windows, select Start » National Instruments » InstrumentStudio. This
launches InstrumentStudio and runs a soft front panel populated with devices
detected on your system.
◦ From NI MAX, select a device and click Test Panels.... This launches
InstrumentStudio and runs a soft front panel for the device you selected.

Note The deprecated NI-SCOPE Soft Front Panel remains available for
download.

© National Instruments 41
NI-SCOPE

Getting Started
To get started using your NI-SCOPE device and driver software, refer to the getting
started guide for your device. The getting started guide explains how to complete the
following tasks:

• Install the software and hardware


• Configure the hardware in MAX
• Program the hardware
• Self-calibrate the hardware
• Make a first measurement
• Troubleshoot

The getting started guide for your device is printed in your hardware kit, installed with
the driver software, and available at ni.com/manuals.

Tip Complete the getting started guide for your device before using the
information in this help file.

Related concepts:

• Integration and System Considerations


• NI-SCOPE Examples

Operating System Support

For information about the supported operating system (OS) for your device, refer to
the NI-SCOPE Readme at Start»All Programs»National Instruments»NI-
SCOPE»Documentation.

Creating an Application

42 ni.com
NI-SCOPE

You can begin programming with the following application development


environments (ADEs):

• LabVIEW 7.1 or later


• LabWindows/CVI 7.0 or later
• Microsoft Visual C++ (MSVC) 6.0 or later
• Microsoft Visual Basic 6.0 or later
• Microsoft Visual C# or Visual Basic .NET

Each section includes basic information on how to create an application and how to
find and use examples for each ADE.

Related concepts:

• Creating an Application with LabVIEW


• Creating an Application with LabWindows™/CVI™
• Creating an Application with Microsoft Visual C and C++
• Creating an Application with Visual Basic
• Creating an Application Using Visual C# or Visual Basic .NET

Creating an Application with LabVIEW

To begin programming in LabVIEW, complete the following steps:

1. Launch LabVIEW.
2. Open an existing LabVIEW VI or create a new VI.
3. Make sure you are on the block diagram screen.
4. Open the NI-SCOPE palette. In LabVIEW 7.1 and later, the path to the palette
depends on the current palette view in Tools»Options. In the Express palette view
(default) the path is Input»Instrument Drivers»NI SCOPE.
5. Build your application using the appropriate programming flow steps.

LabVIEW Examples

You can find shortcuts to the LabVIEW examples at Start»All Programs»National


Instruments»NI-SCOPE»Examples. These examples are also available in the NI-SCOPE
portion of the LabVIEW functions palette.

© National Instruments 43
NI-SCOPE

Several forms of help are available for these examples. You can find an overall
description of the purpose of the example by going to File»VI Properties and selecting
Documentation from the Category listbox. For help on individual front-panel controls,
activate the LabVIEW help window by selecting Help»Show Context Help, and placing
the cursor over the control you want more information about. The block diagrams of
the examples are documented with step-by-step descriptions of what the example
does.

NI Example Finder

LabVIEW 7.0 or later users can use the NI Example Finder to search or browse
examples. NI-SCOPE examples are classified by keyword, so you can search for a
particular device or measurement function. To browse for NI-SCOPE examples, launch
LabVIEW, select Help»Find Examples, then navigate to Hardware Input and
Output»Modular Instruments» NI-SCOPE (High-Speed Digitizers).

Related concepts:

• NI-SCOPE Programming Flow

LabVIEW Real-Time Module

You can use the NI‑SCOPE VIs on a LabVIEW Real-Time execution target. To develop an
NI‑SCOPE application in the LabVIEW Real-Time Module, follow the same steps used
for developing any application in the LabVIEW Real-Time Module, with the addition of
using NI‑SCOPE VIs, as follows:

1. From the Function Palette, locate the NI-SCOPE VIs at Instrument I/O Instrument
Drivers»NI-SCOPE.
2. Select the VIs that you want to use and drop them on the block diagram to build
your application.

Supported LabVIEW Versions

LabVIEW Real-Time Module 7.1.1 or later

44 ni.com
NI-SCOPE

Supported Hardware Modules

Most NI high-speed digitizers are supported under the LabVIEW Real-Time Module.

The following devices are not supported under the LabVIEW Real-Time Module:

• PXIe‑5110/5111/5113
• PXIe‑5163
• PXIe‑5164
• PXIe‑5170/5171
• PXIe‑5172

Unsupported Features

When using NI high-speed digitizers with the LabVIEW Real-Time Module, the
NI‑SCOPE Soft Front Panel is not supported.

Example Programs

You can use the LabVIEW Example Finder to search or browse through examples.
NI‑SCOPE examples are classified by keyword, so you can search for a particular device
or measurement function. You can reach the NI‑SCOPE examples from LabVIEW
Example Finder (Help»Find Examples). Click the Browse tab, browse according to
Task, and navigate to Hardware Input and Output/Modular
Instruments/NI-SCOPE (High-Speed Digitizers). You can use all of the
NI‑SCOPE examples on a LabVIEW Real-Time execution target provided that the
example is not specific to an unsupported hardware module.

Related Documentation

• For configuration instructions for remote systems, refer to the Remote Systems
Help in Measurement & Automation Explorer (MAX) by selecting Help»Help
Topics»Remote Systems in MAX.
• For more information on the LabVIEW Real-Time Module, refer to the LabVIEW
Real-Time Module User Manual at ni.com/manuals.

© National Instruments 45
NI-SCOPE

Creating an Application with LabWindows™/CVI™

To begin programming an NI-SCOPE application with LabWindows/CVI, complete the


following steps:

1. Launch LabWindows/CVI.
2. Open an existing or new source file (.c).
3. Include the NI-SCOPE header file, niscope.h, in your source code files
(#include "niscope.h").
4. Go to Instrument»Load, and select niscope.fp. You can find the installed
location of this file in the NI-SCOPE Readme.
5. Add the source file to the project.
6. Build your application using the appropriate programming flow steps.

LabWindows/CVI Examples

Open the project file for the example you want to run. You can find shortcuts to the
project files at Start»All Programs»National Instruments»NI-SCOPE»Examples. The
source code for these examples is heavily documented, and all input and output
values are documented to facilitate changing the code to perform different
acquisitions. Each example also has a Readme file that provides an overall description
of the example.

To find documentation for functions used in the examples, complete the following
steps:

1. Double-click niScope.fp.
2. Select the function or function class you need more information about.
3. Click Help.

NI Example Finder

LabWindows/CVI 7.0 or later users can use the NI Example Finder to search or browse
examples. NI-SCOPE examples are classified by keyword, so you can search for a
particular device or measurement function. To browse for NI-SCOPE examples, launch
LabWindows/CVI, select Help»Find Examples, then navigate to Hardware Input and
Output»Modular Instruments» NI-SCOPE (High-Speed Digitizers).

46 ni.com
NI-SCOPE

Related concepts:

• NI-SCOPE Programming Flow

Creating an Application with Microsoft Visual C and C++

This topic assumes that you are using the Microsoft Visual C or C++ ADE to manage
your code development and that you are familiar with the following ADEs:

• Microsoft Visual C++ 6.0


• Microsoft Visual Studio 2010

Creating an Application with Microsoft Visual C++ 6.0

To develop an NI-SCOPE application with Microsoft Visual C++ 6.0, follow these general
steps:

1. Open an existing or new Visual C/C++ project to manage your application code.
2. Create source code files of type .c (C) or .cpp (C++).
3. Add the source code files to the project.
4. Add the following code in the source code files:

#include "niscope.h"

5. Add the NI-SCOPE include and library files to the project. <IVIROOTDIR32> is an
alias to a specific National Instruments file folder location. Refer to the NI-SCOPE
Readme for more information about installed file locations.

Tip You can modify an NI-SCOPE C example to create an application,


and all required include and library files are added to the project for you.
[Action: Verify that your driver includes C examples that include Visual
C++ project files. If it does not, delete this tip.]

a. Select Project»Settings»C/C++»Preprocessor»Additional include directories,


and add the paths, separated by a semicolon, to the niscope.h and visa.h
files. The niscope.h and visa.h files are located in the
<IVIROOTDIR32>\Include and <VXIPNPPATH>\WinNT\Visa\

© National Instruments 47
NI-SCOPE

include directories, respectively.


b. Select Project»Link»General»Object/Library Modules, and add
niscope.lib.
c. Select Project»Link»Input»Additional library path, and add the path to the
niscope.lib file. The niscope.lib file is located in the
<IVIROOTDIR32>\Lib\msc or the <IVIROOTDIR32>\Lib x64\msc
directory.
6. Build your application using the appropriate programming flow steps.

Creating an Application with Microsoft Visual Studio 2010

To develop an NI-SCOPE application with Microsoft Visual Studio 2010, follow these
general steps:

1. Open an existing or new Visual C/C++ project to manage your application code.
2. Create source code files of type .c (C) or .cpp (C++).
3. Add the source code files to the project.
4. Add the following code in the source code files:

#include "niscope.h"

5. Add the NI-SCOPE include and library files to the project. <IVIROOTDIR32> is an
alias to a specific National Instruments file folder location. Refer to the NI-SCOPE
Readme for more information about installed file locations.

Tip You can modify an NI-SCOPE C example to create an application,


and all required include and library files are added to the project for you.
[Action: Verify that your driver includes C examples that include Visual
C++ project files. If it does not, delete this tip.]

a. Select Project»Properties»Configuration Properties»C/


C++»General»Additional Include Directories, add the paths, separated by a
semicolon, to the niscope.h and visa.h files. The niscope.h and
visa.h files are located in the <IVIROOTDIR32>\Include and
<VXIPNPPATH>\WinNT\Visa\include directories, respectively.
b. Select Linker»Input»Additional Dependencies, and add niscope.lib.
c. Select Linker»General»Additional Dependencies, and add the path to the
niscope.lib file. The niscope.lib file is located in the

48 ni.com
NI-SCOPE

<IVIROOTDIR32>\Lib\msc or the <IVIROOTDIR32>\Lib x64\msc


directory.
6. Build your application using the appropriate programming flow steps.

Microsoft Visual C and C++ Examples

Two sets of examples for Visual C/C++ exist. You can find the installed location of these
examples in the NI-SCOPE Readme.

• The examples in the first set are C-based console applications that illustrate the NI-
SCOPE function calls but have no provision for data display.
• The examples in the second set are C++ examples. They use Microsoft Foundation
Classes (MFC) along with Measurement Studio tools for Visual C++. To compile
these examples, you need these tools. The source code for these examples is
documented, so you can change the code to fit your needs.

Microsoft Visual C Examples

The C examples were built and tested using Microsoft Visual C++ 6.0 with Service Pack
5.0. These examples are console-based with no graphical interface.

To build the examples in Microsoft Visual C++ 6.0 using the Microsoft NMAKE utility,
complete the following steps:

1. Go to the directory for the particular example you want to use.


2. Run the VCVARS32.BAT batch file (located in the \bin directory of the MSVC
compiler) to set up the environment variables for command line usage if they are
not already set. You might need to increase the initial environment size of the DOS
box to accommodate the added environment variables.
3. To build an example, run nmake examplename.mak. The executable is built to
the debug subdirectory by default.

To build the examples in Microsoft Visual C++ 6.0 using the Microsoft Developer Studio
workspace, complete the following steps:

1. Go to the directory for the example you want to use.


2. Open the project workspace file (.dsw) that launches Developer Studio. You can
find the installed location of this file in the NI-SCOPE Readme.

© National Instruments 49
NI-SCOPE

3. Add the include directory and lib\msc directories to the project. You can find
the installed location of these examples in the NI-SCOPE Readme. To build the
examples, the INCLUDE and LIB search paths might need to be modified to find
niscope.h and niscope.lib (Tools»Options»Directories or
Project»Settings).
4. Build the example.

Related concepts:

• NI-SCOPE Programming Flow

Creating an Application with Visual Basic

To develop an NI-SCOPE application with Visual Basic, complete the following steps:

1. Open an existing or new project (.vbp).


2. Find shortcuts to the examples at Start»All Programs»National Instruments»NI-
SCOPE»Examples.
3. Go to Projects»References and select NI-SCOPE Library.
4. Build your application using the appropriate programming flow steps.

Microsoft Visual Basic Examples

The Visual Basic examples use an evaluation version of the NI Measurement Studio
ActiveX UI controls. The examples were built and tested using Microsoft Visual Basic
6.0. For each example, there is a project file (.vbp) that launches Developer Studio.

Note The evaluation version of the Measurement Studio UI controls is


limited to 5 minutes of continuous use.

If you have problems getting the examples to load or run, complete the following
steps:

1. Make sure the NI-SCOPE reference is loaded (go to Project»References, and load
\bin\niscope_32.dll. You can find the installed location of this file in the NI-
SCOPE Readme.

50 ni.com
NI-SCOPE

2. Make sure the National Instruments Measurement Studio UI controls are loaded
(go to Project»Components, and load cwui.ocx from the Windows system
directory).
3. Install Service Pack 5 for Microsoft Visual Studio.

The source code for these examples is heavily documented, and all input and output
values are documented to facilitate changing the code to perform different
acquisitions.

Related concepts:

• NI-SCOPE Programming Flow

Creating an Application Using Visual C# or Visual Basic .NET

To develop an NI-SCOPE application with Visual C# or Visual Basic .NET, complete the
following steps:

1. Make sure you have installed the following on your computer:


◦ Microsoft .NET Framework 2.0
◦ NI-SCOPE 3.2 or later
2. Download the NI-SCOPE .NET Libraries.
a. Go to ni.com/downloads.
b. Click Drivers and Updates.
c. Use the Search field to locate the latest version of the NI-SCOPE .NET Libraries.
d. Click the Readme link for installation instructions and system requirements.

Forms of Device Synchronization

The following forms of synchronization are available, listed in order by synchronization


accuracy.

Note

© National Instruments 51
NI-SCOPE

• Synchronization accuracy specifications depend on the system and


device(s) being used. Refer to your device Specifications for more
information.
• Multi-instrument NI-SCOPE sessions automatically synchronize all
channels of the included instruments, simplifying your test program
development and maintenance. You can only create an NI-SCOPE
session with multiple instruments of the same model and in the same
chassis.
• Sharing a clock (reference clock or sample clock) among devices can
achieve time locking. In some cases, time locking among clocks can
achieve greater determinism; however, it does not affect any overall
delays in signals sent.

Software-Based Synchronization

You can send a synchronization software command from a host computer to a device.
Synchronizing events by software is not deterministic on operating systems such as
Windows or Mac.

• Accuracy: tens of milliseconds

Time-Based Synchronization

Note You can use a time-based protocol, such as GPS, 1588, or IRIG-B, to
coordinate events at large distances, typically greater than 10 m.

• Accuracy: under 100 nanoseconds

Signal-Based Synchronization
PXI Trigger or RTSI Trigger Routing (SCOPE, FGEN, HSDIO, RF)

You can send an electrical signal from one device (master) to another (slave) to signal
an event using the trigger routing available from a PXI chassis or RTSI cable. The
devices dictate the level of determinism. The signal path length mainly determines the

52 ni.com
NI-SCOPE

synchronization accuracy.

• Accuracy: tens of nanoseconds

External Triggering

Note In this case, external refers to triggering external to your PXI chassis or
external to the device for other device form factors, for example USB and
PCIe.

You can send triggers to each device through PFI, channel, or other I/O lines on the
device front panel. When trigger lines have matched signal path lengths, measured
synchronization results may improve.

• Use time locking for greater determinism.


• Accuracy: ± 1 sample clock

NI-TClk (SCOPE, FGEN, HSDIO, RF)

You can use NI-TClk to programmatically phase align clocks and coordinate triggers
between devices and multiple chassis. NI-TClk is an advanced synchronization
method, and is not supported by all devices.

• Use time locking for greater determinism.


• Accuracy: 10-500 ps

Note NI-SCOPE does not support using NI-TClk to synchronize multi-


instrument NI-SCOPE sessions with other NI-SCOPE sessions or other driver
sessions.

Related concepts:

• Supported Synchronization Methods by Device

Related information:


© National Instruments 53
NI-SCOPE








• Introduction to NI Clock Disciplining for PXI Express
• PXI_Clk10 Disciplining and Synchronization across Multiple PXIe Chassis
• Timing and Synchronization Systems
• Synchronization Products
• Synchronization Explained (trigger routing and sharing clocks and triggers)
• Triggers Offered by PXI Standard
• PXI Star Trigger Line
• Improving System Clock Error
• When to Use External Sample Clock
• National Instruments T-Clock Technology for Timing and Synchronization of
Modular Instruments

Supported Synchronization Methods by Device

Software-based PXI Trigger or RTSI External NI-TClk


Device Name
Synchronization Trigger Routing Triggering (Advanced)
PXIe/PXI/
Yes Yes Yes Yes
PCI‑5105

PXIe‑5110/
Yes Yes Yes Yes
5111/5113
PXIe/PXI/
Yes Yes Yes Yes
PCI‑5114
PXIe/PXI/
Yes Yes Yes Yes
PCI‑5122

PXI/PCI‑5124 Yes Yes Yes Yes

USB‑5132/
Yes No Yes No
5133

54 ni.com
NI-SCOPE

Software-based PXI Trigger or RTSI External NI-TClk


Device Name
Synchronization Trigger Routing Triggering (Advanced)

PXI/PCI‑5142 Yes Yes Yes Yes

PXI/PCI‑5152 Yes Yes Yes Yes

PXI/PCI‑5153 Yes Yes Yes Yes

PXI/PCI‑5154 Yes Yes Yes Yes

PXIe‑5160/
Yes Yes Yes Yes
5162
PXIe-5163 Yes Yes Yes Yes
PXIe-5164 Yes Yes Yes Yes

PXIe‑5170/
Yes Yes Yes Yes
5171

PXIe‑5185/
Yes Yes Yes Yes
5186

PXIe‑5622 Yes Yes Yes Yes

PXI/PCI‑5922 Yes Yes Yes Yes

NI-SCOPE Tutorial

Example Programs

NI-SCOPE ships with several examples that demonstrate some basic digitizer
applications. You can find these examples at Start»All Programs»National
Instruments»NI-SCOPE»Examples.

Note The NI-SCOPE examples assume that you are already familiar with
your ADE. If you are unfamiliar with your ADE, consult an introductory text on
the ADE before you begin the Getting Started example.

NI-SCOPE provides the same functionality in two different formats—as virtual


instruments (VIs) in LabVIEW and as functions in traditional programming languages.

© National Instruments 55
NI-SCOPE

Basic Steps

The tutorial explains how to do the following:

1. Initialize the session.


2. Configure an application.
3. Acquire data.
4. Retrieve error information.
5. Close the session.

After you finish the NI-SCOPE Tutorial, you can find more advanced information in the
following sections:

• Acquisition Functions
• Configuration Functions
• Attributes and Attribute Functions

Related concepts:

• Initialize
• Configure the Application
• Acquiring the Data
• Retrieving Error Information
• Closing the Session
• Acquisition Functions
• Configuration Functions
• Attributes and Attribute Functions

Instrument Drivers

An instrument driver is a set of software routines that control programmable


instruments. Each routine corresponds to a programmatic operation such as
configuring, reading from, writing to, and triggering the instrument. Instrument drivers
simplify instrument control and reduce test program development time by eliminating
the need to learn the programming protocol for each instrument. NI-SCOPE, NI-FGEN,
NI-DMM, and NI-HSDIO are examples of instrument drivers provided by National
Instruments.

56 ni.com
NI-SCOPE

Instrument Driver Structure

All instrument drivers have the same basic hierarchy. Instrument drivers are written
from low-level components that are used to program instruments. These component
functions fit into six categories—Initialize, Configuration, Action/Status, Data, Utility,
and Close.

Initialize

All instrument drivers have an Initialize function. It is the first instrument driver
function called and establishes communication with instruments. Optionally, it can
also perform instrument identification query and reset operations. Initialization also
places instruments in a specific state, usually the default power on state.

Configuration

Configuration functions are collections of software routines that configure instruments


to perform a desired operation. The number of Configuration functions depends on
the complexity of the instruments. After the Configuration functions are called, the
instruments are ready to take measurements.

Action/Status

The Action/Status category contains two types of functions. Action functions cause
instruments to initiate or terminate test and measurement operations such as arming
the triggering system or generating a stimulus. Action functions differ from
Configuration functions in that they do not change instrument settings; instead, they
order the instrument to carry out an action based on its current configuration settings.
Status functions return the current status of instruments or of pending operations.
Specific routines in this category and the actual operations they perform are at the
discretion of the instrument driver developer, and are usually created as required by
other functions.

Data

Data functions include calls to transfer data to or from instruments. Examples of Data
function operations include reading a measured value or waveform from a
measurement instrument, and downloading waveforms or digital patterns to a source

© National Instruments 57
NI-SCOPE

instrument. Specific routines in this category depend on the instrument.

Utility

Utility functions perform a variety of operations auxiliary to the most-used instrument


driver calls. These functions include the majority of the template instrument driver
calls such as reset, self-test, revision, and error query, and may include other custom
routines such as calibration or storing/recalling instrument configurations.

Close

All instrument drivers include a Close function. The Close function terminates the
software connection to instruments and deallocates system resources used during that
instrument session.

Initialize

Because you can have multiple digitizers connected to your computer, you must tell
NI-SCOPE which digitizer(s) to communicate with by opening a session to the digitizer
or digitizers with an Initialize function.

What Is a Session?

A session establishes a connection between digitizers and your application. After this
connection is established, the digitizer(s) can transmit data to your application.
Sessions allow the driver to cache previous settings, which greatly improves
performance.

How Do You Create a Session?

To create a session, use the Initialize with Options or Initialize


functions. These functions return a handle that allows you to communicate with the
digitizer(s) using other function calls in your application.

You can create sessions that include multiple instruments of the same model and in
the same chassis. This automatically synchronizes all channels of the included
instruments, simplifying your test program development and maintenance. To create a
session to multiple digitizers, enter the instrument names as a comma-delimited list of

58 ni.com
NI-SCOPE

strings in the form PXI1Slot3,PXI1Slot4 for the Resource Name input parameter of an
Initialize function.

Note You can only specify multiple instruments of identical model


numbers, bus types, channel counts, and onboard memory sizes.

LabVIEW Example—Initializing a Session

C Example—Initializing a Session

niScope_init ("PXI1Slot2", VI_TRUE, VI_TRUE, &vi);

Note

• When you run your application, you must use the resource name
assigned by Measurement & Automation Explorer (MAX). Find or set the
resource name for your digitizers by launching MAX and selecting
Devices and Interfaces.
• Setting the ID Query parameter to TRUE has no effect with NI-SCOPE.
NI-SCOPE automatically verifies that the digitizer(s) you initialize are
supported—therefore, setting this parameter to TRUE is not necessary.
• Setting the Reset Device parameter to TRUE resets digitizers during
initialization.

Caution Resetting digitizers may cause wear on the relays, so you should
reset only when necessary.

© National Instruments 59
NI-SCOPE

Configure the Application

After you have opened a session to the digitizer(s) with an Initialize function, you need
to configure your application. For example, you might want to set input parameters
(also known as controls and constants in LabVIEW) such as the vertical range,
minimum sample rate, and triggering options.

You can use one of the following two methods to configure an application:

• Using Auto_Setup—This method automatically configures input parameters.


• Using Configuration Functions—This method allows you to set the input
parameters yourself.

Programming Flow

The following diagram shows the basic programming flow for using either Auto Setup
or configuration functions.

60 ni.com
NI-SCOPE

Initialize
Opens a session

Have NI-SCOPE
No automatically configure Yes
the settings?

Configure Acquisition
Configures how digitizer
acquires data

Configure Vertical
Configures the vertical
subsystem like range

Configure Chan Characteristics


Auto Setup
Configures impedance
Automatically configures
and hardware filtering
the digitizer by measuring
the signals applied to both
channels
Configure Horizontal Timing
Configures horizontal subsystem

One of the Configure Trigger


functions. Configures edge,
digital, video, or other trigger types

Acquire data with Read or Fetch


functions

Error Handler
(not required for LabVIEW)

Close

Related concepts:

• Configuring an Acquisition Using Auto_Setup


• Configuring an Acquisition Using Configuration Functions

© National Instruments 61
NI-SCOPE

Configuring an Acquisition Using Auto_Setup

After you have opened a session to the digitizer(s), you need to configure your
application. For the Getting Started example, we use the Auto Setup function
to configure the digitizer. The Auto Setup function senses the input signal and
automatically configures many of the instrument settings, such as the vertical range,
sample rate, minimum record length, and trigger levels.

LabVIEW Example—Configuring An Acquisition

C Example—Configuring An Acquisition

niScope_AutoSetup (vi);

Alternative Configuration Method—Using the Configuration Functions to


Set Up an Acquisition

If you want to customize sample rates, change triggers, or alter the offset, you must
use the Configuration functions such as Configure Vertical and Configure
Horizontal Timing instead of the Auto Setup function.

Refer to Configuring an Acquisition Using Configuration Functions for more


information on using the Configuration functions.

Related concepts:

• Configuring an Acquisition Using Configuration Functions

Configuring an Acquisition Using Configuration Functions

62 ni.com
NI-SCOPE

As an alternative to using the Auto_Setup function, you can use the Configuration
functions to set up an acquisition in which you want to set triggers, input impedance,
DC offset, vertical range, sampling rate, and so on.

Configuration Example

The Configured Acquisition example demonstrates using the Configuration


functions. This example supports most of the configuration functions of NI-SCOPE, so
you can experiment with the digitizer.

Related Topics

Configuring the Acquisition Type

Configuring the Vertical and Channel Settings

Configuring the Horizontal Settings

Related concepts:

• Configuring an Acquisition Using Auto_Setup


• Configuring the Acquisition Type
• Configuring the Vertical Settings
• Configuring the Horizontal Settings

Acquiring the Data

NI-SCOPE has two kinds of functions that acquire data—Read and Fetch functions. For
simplicity, this example uses a Read function.

© National Instruments 63
NI-SCOPE

LabVIEW Example—Acquiring the Data

The channels input parameter specifies the channel or channels that NI-SCOPE
acquires data from.

C Example—Acquiring the Data

This example includes additional functions and parameters not needed in LabVIEW.
You need to call niScope_ActualRecordLength to get the actual record length
that NI-SCOPE uses so you can create enough space for the waveform array. You can
then initiate the acquisition and fetch the data with niScope_Read. After fetching
the data, you need to pass a pointer to extract and plot the acquired data. The method
you use to do this varies depending on your ADE.

// Get the actual number of samples to be acquired


niScope_ActualRecordLength (vi, &actualRecordLength);

// Get the number of waveforms available for the // given


channelList niScope_ActualNumWfms (vi,channelList,
&numWfm);

// Allocate space for the waveform information wfmInfoPtr =


malloc (sizeof (struct niScope_wfmInfo) * numWfm);

// Allocate space for the waveform array wfmPtr = malloc


(sizeof (ViReal64) * actualRecordLength * numWfm);

// Check if allocations succeeded if (!wfmPtr||

64 ni.com
NI-SCOPE

!wfmInfoPtr)

return NISCOPE_ERROR_INSUFFICIENT_MEMORY;

// Read the data (Initiates an acquisition and fetches //


the data) niScope_Read (vi, channelList, timeout,
actualRecordLength, wfmPtr, wfmInfoPtr);

About the Parameters

The channelList parameter specifies the channel or channels that NI-SCOPE acquires
data from. The wfmInfoPtr parameter returns the values needed to display a
waveform: relative initial x is the time of the first point in the waveform with respect
to the trigger and is expressed in seconds; absolute initial x is the absolute timestamp
of the first point in the waveform; and x increment is the length of time between
points in the waveform in seconds. The wfmPtr parameter is a buffer into which NI-
SCOPE stores the waveform it reads. The units for the individual array elements are
volts.

Retrieving Error Information

LabVIEW

Make sure that you have wired the Error In and Error Out parameters for each VI in
your application, so the VI (unless it is a Close, Abort, or Reset VI) does not execute if
there is an error. The Error Description parameter displays messages for any errors
encountered when running the application.

LabVIEW Example—Retrieving Error Information

© National Instruments 65
NI-SCOPE

Other ADEs

The Error Handler function translates error codes into explanations to help you
debug your application.

C Example—Retrieving Error Information

// The handleErr macro checks the return value of a //


function and jumps to the Error: label Error: // Free all
the allocated memory if (wfmInfoPtr) free (wfmInfoPtr);
if (waveformPtr) free (waveformPtr); // Display messages
if (error != VI_SUCCESS) niScope_errorHandler (vi,
error, errorSource, errorMessage); // Interpret the error
else strcpy(errorMessage, "Acquisition successful!"); //
The handleErr macro checks the return value

Closing the Session

The closing step closes the session and deallocates any resources the session used.
Closing the session is important because it releases any temporary buffers that were
created to transfer data between the digitizer and the host memory.

LabVIEW Example-Closing the Session

C Example—Closing the Session

// Close the session if(vi) niScope_close(vi);

66 ni.com
NI-SCOPE

NI-SCOPE and InstrumentStudio

When you install NI‑SCOPE on a 64‑bit system, you can monitor, control, and record
measurements from supported devices using InstrumentStudio. InstrumentStudio is a
software-based front panel application that allows you to perform interactive
measurements on several different device types, including oscilloscopes, in a single
program.

Note InstrumentStudio support was first available in NI‑SCOPE 18.1.


InstrumentStudio is supported only on 64‑bit systems. If you are using a
32‑bit system, use the NI‑SCOPE Soft Front Panel.

InstrumentStudio is automatically installed when you install the NI‑SCOPE driver. You
can access InstrumentStudio in one of the following ways:


• From the Windows start menu, select National Instruments»NI‑SCOPE Soft Front
Panel. This launches InstrumentStudio and runs a soft front panel populated with
NI‑SCOPE devices.
• From the Windows start menu, select National Instruments»InstrumentStudio
[year]. This launches InstrumentStudio and runs a soft front panel populated with
devices detected on your system.
• From Measurement & Automation Explorer (MAX), select a device and then click
Test Panels.... This launches InstrumentStudio and runs a soft front panel for the
device you selected.

For more information, refer to NI-SCOPE Soft Front Panel and InstrumentStudio.

Related concepts:

• NI-SCOPE 32-Bit Soft Front Panel Help

NI-SCOPE Examples

NI-SCOPE includes several example applications that demonstrate the functionality of

© National Instruments 67
NI-SCOPE

your device and can serve as interactive tools, programming models, and building
blocks for your own applications.

NI Example Finder

The NI Example Finder is a utility that organizes examples into categories and allows
you to browse and search installed examples. For example, search for "SCOPE" to
locate all NI Digitizers signal generator examples. You can see descriptions and
compatible hardware models for each example or see all the examples compatible
with one particular hardware model.

To locate examples using the NI Example Finder within LabVIEW or LabWindows/CVI,


select Help»Find Examples and navigate to Hardware Input and Output»Modular
Instruments»NI-SCOPE.

Installed Example Locations

Software
Installed Example Locations
Application
<LabVIEW>\examples\instr\niScope, where <LabVIEW> is the
LabVIEW
LabVIEW directory for the specific LabVIEW version you installed on your system.
LabWindows/ Program Files\IVI Foundation\IVI\Drivers\niScope\
CVI Examples\CVI
<NIDocDir>\NI-SCOPE\examples, where <NIDocDir> is one of the
following directories:
ANSI C or
• Windows 8/7/Vista—Users\Public\Documents\National
Microsoft Visual
Instruments
C/C++
• Windows XP—Documents and Settings\All Users\Shared
Documents\National Instruments

68 ni.com
NI-SCOPE

Common NI-SCOPE Examples

NI-
SCOPE Description
Example
niScope EX This example opens a session to the NI-SCOPE driver and uses the Auto
Getting Setup VI to optimally configure the session properties and displays the
Started.vi acquired channel data.
This example opens and configures an NI-SCOPE session and allows you
to experiment with numerous configurations, including acquisition types
niScope EX
and triggering modes, since it supports nearly the entire functionality of
Quick Start.vi
NI-SCOPE. It is designed so that if the recommended input signal is used,
most configurations will return valid results.
This example configures all the digitizer's vertical, horizontal, and
niScope EX triggering properties before every acquisition. It allows you to
Configured experiment with numerous configurations, including acquisition types
Acquisition.vi and triggering modes, since it supports nearly the entire functionality of
NI-SCOPE.
niScope EX
This example demonstrates using continuous acquisition to fetch an
Fetch
infinite record of data (until you press "Stop").
Forever.vi
niScope EX
Stream to This example demonstrates streaming a continuous acquisition to disk.
Disk.vi
niScope EX
Advanced This example illustrates using some of the advanced measurement library
Measurement functions such as waveform processing and filtering.
Library.vi
niScope EX
Multi-Device
This example demonstrates how to easily synchronize an arbitrary
Configured
number of digitizers with NI-TClk.
Acquisition
(TClk).vi

© National Instruments 69
NI-SCOPE

Fundamentals
Expand this book for more information on digitizer fundamentals.

Bandwidth

Bandwidth describes the difference between limiting frequencies within which the
input signal can pass through the system with minimal amplitude loss — from the
input at the tip of the probe or test fixture to the output data. The limiting frequencies
that determine the bandwidth include both a high and a low frequency that are
specified as the frequency (in Hz) at which a sinusoidal input signal is attenuated to
70.7% of its original amplitude. This point is known as the -3 dB point.
5

0
–3dB
Gain (dB)

–5

–10

–15

–20
10 100 1000

Frequency (MHz)

The following figure shows the four main areas that can affect the bandwidth of a
digitizer.

ADC Software

Signal From
Outside World

1 2 3 4

1. Outside world to probe

70 ni.com
NI-SCOPE

2. Probe to input connector


3. Input connector to ADC
4. ADC to software

Flatness

Flatness is an effect on the acquired waveform that is frequency dependent. As the


frequency rises, the amplitude slowly falls toward the 3 dB cutoff point of the
bandwidth. When signals are composed entirely of frequencies below this cutoff point,
the measured signal can appear slightly different than the input signal. The higher
frequency components of the signal are attenuated more than the lower frequency
components, changing the overall signal. Flatness describes how well the analog front
end passes signals of different frequencies. A maximally flat front end passes all
frequencies with the same amount of attenuation, so the measured signal looks like
the input signal. However, in the real world, as the frequency rises, the measured input
signal slowly falls toward the –3 dB point.
50 ohm, 2 V, Repeatability
2.0
1.5
1.0 Flatness
0.5 Freq1 Freq2
0.0 3dB 20M 50M
–0.5 Min 113.6M 42.7m 95.8m
Max 113.7M 47.0m 149.2m
dB

–1.0
Median 113.6M 44.3m 119.5m
–1.5 Std dev 22.4k 1.1m 12.4m
–2.0
–2.5
–3.0
–3.5
–4.0
1.0M 10.0M 150.0M
Frequency

Resolution

Resolution is the smallest input voltage change a digitizer can capture. Resolution can
be expressed in bits (LSB), in proportions, or in percent of full scale. For example, a
system has 12-bit resolution, one part in 4,096 resolution, and 0.0244% of full scale.

Resolution limits the precision of a measurement. The higher the resolution (number

© National Instruments 71
NI-SCOPE

of bits), the more precise the measurement. An 8-bit ADC divides the vertical range of
the input amplifier into 256 discrete levels. With a vertical range of 10 V, the 8-bit ADC
cannot ideally resolve voltage differences smaller than 39 mV. In comparison, a 14-bit
ADC with 16,384 discrete levels can ideally resolve voltage differences as small as
610 µV.

Bits Resolution % FS
8 1/256 .390
10 1/1024 .0976
12 1/4096 .0244
14 1/16384 .0061
16 1/65536 .0015

The following figure shows the transfer function of a 3-bit ADC with a vertical range of
5 V having an ideal resolution of 5/8 V/LSB.

111 Range 0-5 V


110
101
100
011
010
001
000
0 5V

Voltage Fluctuations in This


Region Will Be Unnoticed

Sample Rate

Sample rate, specified in samples per second (S/s), is the rate at which a signal is
sampled and digitized by an analog-to-digital converter (ADC). According to the

72 ni.com
NI-SCOPE

Nyquist theorem, a sample rate at least twice the highest frequency of the signal
produces accurate measurements if the analog bandwidth is wide enough to let the
signal pass through without attenuation. A higher sample rate captures more
waveform details for the time domain measurements. The following figure illustrates a
1 MHz sine wave sampled by a 2 MS/s ADC and a 20 MS/s ADC. The faster ADC digitizes
20 points per cycle of the input signal compared with 2 points per cycle with the
slower ADC. In this example, the higher sample rate more accurately captures the
waveform shape.

Legend

Trigger Accepted Trigger Rejected

Related Topics

Undersampling

Oversampling

Related concepts:

• Nyquist Theorem
• Bandwidth
• Undersampling
• Oversampling

Nyquist Theorem

The Nyquist theorem states that a signal must be sampled at least twice as fast as the
highest frequency component of the signal to accurately reconstruct the waveform.
Frequency components higher than half the sample rate are mistakenly interpreted as

© National Instruments 73
NI-SCOPE

low-frequency components, a phenomenon known as aliasing. The following figure


shows a 5 MHz sine wave digitized by a 6 MS/s ADC. The dotted line indicates the
aliased signal recorded by the ADC at that sample rate. The 5 MHz frequency aliases
back into the passband, falsely appearing as a 1 MHz sine wave. Inserting a lowpass
filter with a cutoff at the Nyquist rate prevents aliasing in the passband.

The following figure shows the frequency view of the same example.

f
fa fN 5 fs

where

fs = 6 MS/s fN = 3 MHz (the Nyquist frequency) fa = 1 MHz (1fs - 5 MHz)

Related Topics

Undersampling

Oversampling

Related concepts:

• Aliasing
• Undersampling
• Oversampling

74 ni.com
NI-SCOPE

Aliasing

Aliasing is the misrepresentation of high frequencies as lower frequencies. An alias


appears in sampled data acquired at too low a sampling rate compared to the Nyquist
frequency of the signal being sampled.

In systems where you want to perform accurate measurements using sampled data,
the sampling rate must be set high enough to prevent aliasing, or an optional anti-
aliasing filter must be introduced before the A/D converter to restrict the bandwidth of
the input signal to meet the sampling criteria. An anti-aliasing filter attenuates
unwanted high-frequency signals (which otherwise would appear as undesired,
aliased frequency components) of an analog signal prior to its conversion into a digital
value. The actual bandwidth in which you can make correct measurements without
aliasing is called the alias-free bandwidth. After aliasing has been introduced into a
sampled signal, there is no general way to remove it.

In video applications, several forms of visual aliasing are possible. Temporal aliasing,
where the wheel of a car seems to turn backwards, raster scan aliasing that results in
twinkling on sharp horizontal lines, and stair-step aliasing, where jagged edges appear
on lines running at an angle to the scan.

Related concepts:

• Nyquist Theorem

Oversampling

Oversampling is sampling at a rate beyond twice the highest frequency component of


interest in the signal. Because real-world signals are not perfectly filtered and often
contain frequency components greater than the Nyquist frequency, oversampling can
be used to increase the foldover frequency so that these unwanted components of the
signal do not alias into the passband. Oversampling is also necessary when trying to
capture fast edges, transients, and one-time events.

Related concepts:

• Nyquist Theorem

© National Instruments 75
NI-SCOPE

Undersampling

Undersampling is essentially sampling too slowly, or sampling at a rate below the


Nyquist frequency for a particular signal of interest. Undersampling leads to aliasing
and the original signal cannot be properly reconstructed. However, undersampling
also requires less memory, so it may be useful in certain applications.

Related concepts:

• Nyquist Theorem
• Aliasing

Record Length

Record length refers to the number of samples, or data points, the digitizer acquires
for each channel in a single acquisition.

To determine record length, call the niScope Actual Record Length VI or the
niScope_ActualRecordLength function. You can also obtain the record length
using the Actual Record Length property or the
NISCOPE_ATTR_HORZ_RECORD_LENGTH attribute.

Maximum Duration

Record length limits the maximum duration of a single-shot acquisition. For example,
with a 1,000-sample record and a sample rate of 20 MS/s, the duration of acquisition is
50 µs (the number of points multiplied by the acquisition time per sample, or 1,000 x
50 ns. With a 100,000-sample record and a sample rate of 20 MS/s, the duration of the
acquisition is 5 ms (100,000 x 50 ns).

Vertical Range and Offset

Vertical range is the peak-to-peak voltage span that a digitizer can measure at the
input connector. Most digitizers have several choices for vertical range.

76 ni.com
NI-SCOPE

Vertical offset is the voltage the vertical range is centered on. Vertical offset positions
the vertical range around an arbitrary DC value. Using this offset allows you to examine
small changes in the input signal, which can improve the accuracy of your
measurement.

For example, imagine that you are acquiring the waveform shown in the following
figure that outputs 0.75 V to 1.25 V. Without using vertical offset, you would need to
specify a range of 2.5 V (±1.25 V) to capture the waveform.

1.25 V 1.25 V
1V

1V

–1 V
–1.25 V 0.75 V

Offset = 0 V Offset = 1 V
Range = 2.5 V Range = 0.5 V
Resolution = 2.5 V = 10 mV Resolution = 0.5 V = 2 mV
256 256

Input Coupling

On many digitizers, you can configure the input channels to be DC-coupled, AC-
coupled, or GND coupled. DC coupling allows DC and low-frequency components of a
signal to pass through without attenuation. In contrast, AC coupling removes DC
offsets and attenuates low frequency components of a signal. This feature can be
exploited to zoom in on AC signals with large DC offsets, such as switching noise on a
12 V power supply. GND coupling disconnects the input and internally connects the
channel to ground to provide a ground, zero-voltage reference.

Refer to the specifications for your specific digitizer for input limits that must be
observed regardless of coupling.

Impedance and Impedance Matching

When broadband signals are carried on transmission lines of any significant length,

© National Instruments 77
NI-SCOPE

care must be taken that the transmission medium is matched to its terminations. The
source and load impedances should equal the characteristic impedance of the
transmission line, as this minimizes signal reflections. The presence of impedance
discontinuities or mismatches degrades the amplitude and phase accuracy, as well as
the temporal fidelity, of measurements made with a digitizer. The example below
shows one of the most common mismatch errors encountered in such measurements.

Example

Selectable termination impedances are provided at the digitizer inputs to


accommodate the most popular coaxial cable characteristic impedances: 50 Ω and
75 Ω. The diagram below illustrates what happens when a coaxial cable of the wrong
characteristic impedance (50 Ω) is used with 75 Ω source and load impedances.

Characteristic Impedance = 50 W

Delay = t

75 W
To Digitizer ADC

2V 75 W

Source Coaxial Digitizer


Cable Input

Digitizer
Voltage With Matched Cable

0
0 t 3t 5t 7t 9t Time

The pulse encounters impedance mismatches at each end of the cable, whereupon it
is partially reflected. The reflected pulse traverses the cable back and forth numerous
times, diminishing at each end by the reflection coefficient, .

78 ni.com
NI-SCOPE

where

vr = reflected voltage vi = incident voltage zt = termination impedance z0 =


characteristic impedance

The resulting voltage waveform recorded by the digitizer is distorted by the asymptotic
decay of the reflected pulse as shown, exaggerated for visual effect. Impedance
discontinuities of smaller magnitude and/or duration have correspondingly smaller
effects. Also displayed is the waveform that results when a cable of matched
impedance (75 Ω) is used.

Mismatch Uncertainty

Impedance matching is also important for preserving the absolute power


measurement accuracy of a digitizer. The accuracy with which power can be measured
is limited by mismatch error. The mismatch error in a system can be shown to be
bounded by:

where

L = load reflection coefficient G = generator reflection coefficient

The denominator term represents mismatch uncertainty, which is a fundamental limit


to the power transfer accuracy that can be achieved across a mismatched junction.

Resistive Matching

Signal sources with low (high) source impedance can be matched with a resistor
placed in series (shunt) such that the total source impedance (admittance) is matched
to the cable characteristic impedance (admittance). Sources that are not capable of
driving the cable impedance directly can be coupled through a matching L-pad, an
example of which is shown in the following figure. In this case, the source sees a 500 Ω
load, while the source impedance presented to the cable is 50 Ω. High-frequency
components and layout techniques should be used throughout to minimize parasitic

© National Instruments 79
NI-SCOPE

effects.
Characteristic Impedance = 50 Ω
500 Ω 50 Ω
475 W To Digitizer ADC

56.2 Ω 50 Ω

Source L-Pad Coaxial Digitizer


Cable Input

Probes and Their Effects

Probes work with digitizers as part of your measurement system. Signals travel from
the tip of the probe to the input amplifier and are then digitized by the ADC. This signal
path makes the probe an important electrical system component that can affect the
accuracy of the measurement. A probe can potentially influence measured amplitude
and phase, and the signal can pick up additional noise on its way to the input stage.
Although NI high-speed digitizers do not ship with probes, several types of probes are
available, including passive, active, and current probes.

Passive Probes

The passive probe is the most widely used general-purpose probe. Passive probes are
specified by bandwidth (or rise time), attenuation ratio, compensation range, and
mechanical design aspects. Probes with attenuation, X10, X100, or X1000, have a
tunable capacitor that can reduce capacitive effects at the input. The ability to cancel
or minimize effective capacitance improves the probe's bandwidth and rise time. The
following figure shows a typical X10 probe model.

80 ni.com
NI-SCOPE

X10 Probe Digitizer Input

Rp One-tenth of Signal
(1 Vpk-to-pk) at Input
9M

10 Vpk-to-pk x pF Cp
20 pF 1M
Signal Probe Cin Rin
Compensation
Adjustment

Cc = Lumped Cable
Capacitance

Adjust the tunable capacitor, Cp, to obtain a flat frequency response. Cp is the probe
capacitance, Rp is the probe resistance, Cin is the input capacitance, Rin is the input
resistance of the digitizer.

Analytically, obtaining a flat frequency response means that

Rin/(Rin + Rp) = Cp/(Cp + Cin + Cc)

When tuned for flat response, it can be shown that

Rin(Cin + Cc) = CpRp

or the time constant of the probe equals the time constant of the digitizer input.

Active Probes

Active probes, such as differential and field-effect transistor (FET) probes, contain
active circuitry in the probe itself to reject noise and amplify the signal. FET probes are
useful for low-voltage measurements at high frequencies and differential probes are
noted for their high common-mode rejection ratio (CMRR) and nongrounded
reference.

Current Probes

Current probes magnetically measure AC and/or DC current flowing in a conductor


instead of using a series resistance in the loop to measure current. This lack of series
resistance causes very little interference in the circuit being tested.

© National Instruments 81
NI-SCOPE

Related Topics

Probe Compensation

Related concepts:

• Probe Compensation

Probe Compensation

Adjusting the tunable probe capacitor to get a flat frequency response is called probe
compensation. Compensating passive probes increases the accuracy of your
measurements by matching the capacitance of your probe to the capacitance of a
particular oscilloscope input channel.

The following figure illustrates that an undercompensated probe attenuates higher


frequency signals, whereas an overcompensated probe amplifies higher frequencies.

Probe Adjustment Signal Probe Adjustment Signal Probe Adjustment Signal

Proper Amplitude of a Reduced Amplitude of a Increased Amplitude of a


1 MHz Test Signal 1 MHz Test Signal 1 MHz Test Signal

a. Compensated Correctly b. Undercompensated c. Overcompensated

Refer to the module or probe user documentation for information on how to


compensate the probe.

82 ni.com
NI-SCOPE

Tip For the most accurate measurements:

• Compensate probes for each channel of the oscilloscope;


• Use a compensated probe only with the channel you used to
compensate it; and
• Compensate your probes frequently.

Accuracy

Accuracy is a measure of the ability of a device to indicate the true value of a measured
signal. Accuracy is usually expressed as a percentage of the specified value, for
example, 5 V ±1%.

Signal Characteristics

Knowing the characteristics of the signal under consideration helps you to choose the
correct settings to maximize measurement accuracy. Such characteristics include:

• Peak-to-peak value—This parameter, in units of volts, reflects the maximum


change in signal voltage. If V is the signal voltage at any given time, then Vpk-pk =
Vmax – Vmin. The peak-to-peak value affects the vertical sensitivity or gain of the
input amplifier. If you do not know the peak-to-peak value, start with the largest
input range, and decrease it until the waveform is digitized using the maximum
dynamic range without clipping the signal. Refer to the specifications for your
digitizer for the maximum input range. The following figure shows how different
ranges affect the resolution of a 600 mVpk-pk signal.

© National Instruments 83
NI-SCOPE

+127 LSB

+7.7 LSB
0 LSB
–7.7 LSB

–128 LSB

Input Range 10 V
Number of LSBs = 15.4 (600 mV/10 V´256 LSBs = 15.4 LSB)

+127 LSB
+77 LSB

0 LSB
–77 LSB

–128 LSB

Input Range 1 V
Number of LSBs = 154 (600 mV/1 V´256 LSBs = 154 LSB)

+153 LSB

+127 LSB

0 LSB Acquired Signal

–128 LSB

–154 LSB

Input Range 500 mV


Number of LSBs = 307.6 (600 mV/500 mV ´ 256 LSBs = 307.6 LSB)

• Source impedance—Most digitizers have a 1 MΩ input resistance in the passband.


If the source impedance is large, the signal is attenuated at the amplifier input and
the measurement is inaccurate. If the source impedance is unknown but suspected
to be high, change the attenuation ratio on your probe and acquire data. In
addition to the input resistance, all digitizers and probes present some input
capacitance in parallel with the resistance. This capacitance can interfere with your

84 ni.com
NI-SCOPE

measurement in much the same way as the resistance does.


• Input frequency—If your sample rate is less than twice the highest frequency
component at the input, the frequency components above half your sample rate
will alias in the passband at lower frequencies, indistinguishable from other
frequencies in the passband. If the highest frequency of the signal is unknown, you
should start with the digitizer maximum sample rate to prevent aliasing and
reduce the digitizer sample rate until the display shows either enough cycles of the
waveform or the information you need. Refer to the Nyquist Theorem for more
information.
• General signal shape—Some signals are easy to capture by ordinary triggering
methods. A few iterations on the trigger level may finally render a steady display.
This method works for sinusoidal, triangular, square, and saw tooth waves. Some
of the more elusive waveforms, such as irregular pulse trains, runt pulses, and
transients, may be more difficult to capture. The following figure shows an
example of a difficult pulse-train trigger.

+V

5V

1 2 3 4
Trigger Level rigger Level

t
Hold-off Hold-off

1 and 3 = Trigger Accepted


2 and 4 = Trigger Ignored

Ideally, the trigger event should occur at condition one, but sometimes the
instrument may trigger on condition two because the signal crosses the trigger
level. You can solve this problem without using complicated signal processing
techniques by using trigger holdoff, which lets you specify a time from the trigger
event to ignore additional triggers that fall within that time. With an appropriate
holdoff value, the waveform shown in the previous figure can be properly captured
by discarding conditions two and four.
• Input coupling—On many digitizers, you can configure the input channels to be
DC-coupled or AC-coupled. DC coupling allows DC and low-frequency components

© National Instruments 85
NI-SCOPE

of a signal to pass through without attenuation. In contrast, AC coupling removes


DC offsets and attenuates low-frequency components of a signal. This feature can
be exploited to zoom in on AC signals with large DC offsets, such as switching noise
on a 12 V power supply. Refer to the specifications for your digitizer for input limits
that you must observe regardless of coupling.

Related concepts:

• Resolution
• Impedance and Impedance Matching
• Aliasing
• Nyquist Theorem
• Trigger Holdoff

Noise

Noise is any unwanted signal that appears in your sampled data. Noise comes from
both external sources, such as the AC power line, motors, generators, transformers,
fluorescent lights, soldering irons, CRT displays, computers, electrical storms, welders,
and radio transmitters, and internal sources, such as digital clocks, microprocessors,
and switched mode power supplies.

Noise can be transient in nature, have fixed frequencies such as harmonic or mixer
products, or be broadband random noise.

PCI and PXI Ground Loop Noise

Some computer chassis can induce ground loop noise in measurements taken with
instruments having grounded input connectors. Spurious DC and low-frequency
content can result. The cause is usually power supply return currents from the
motherboard that partially flow through the computer chassis to the power supply
housing rather than entirely through the power supply cabling.

Follow these guidelines to mitigate the ground loop noise for PCI devices:

1. Ensure that the motherboard is tightly screwed down to the chassis so that chassis

86 ni.com
NI-SCOPE

return currents will flow though the chassis under the motherboard and not in the
vicinity of the PCI boards.
2. Ensure that the power supply cable is well seated on the motherboard.
3. Locate analog input cards in slots furthest away from the power supply.
4. Locate video cards and other high power PCI boards in slots furthest removed from
the analog input cards.

Follow these guidelines to mitigate the ground loop noise for PXI devices:

1. Ensure that the screws on the front panel of the device are tightened down.
2. Ensure that any external equipment that is providing a signal, and is not floating
with respect to ground (for example, it is not a passive sensor or a battery-
operated device), is connected to the same ground as the chassis.
3. On rack mounted systems, ground the chassis to the metal rack mount to reduce
ground loop currents.

Thermal Shutdown

NI-SCOPE driver software supports thermal shutdown capability for SMC-based


digitizers. This capability allows the digitizer to detect when it has reached an over
temperature range condition, and to then power down, preventing damage to the
digitizer.

Air circulation paths, fan settings, and space allowances are several factors that can
influence device temperature. To prevent thermal shutdown, follow the guidelines
described in the Maintain Forced-Air Cooling Note to Users document that shipped
with your device. Refer to the specifications document for your device to find the
correct operating temperature range.

In the event that the digitizer powers down, you are notified with an error message in
one of the following ways:

• NI-SCOPE returns an error when you use any of the functions that program the
hardware or check hardware status, for example, the commit function and the self-
calibration function.
• Measurement & Automation Explorer (MAX) returns an error message if you run a
self-test on your device after it exceeds the thermal shutdown temperature.

© National Instruments 87
NI-SCOPE

Re-enabling the Device After Thermal Shutdown

To re-enable your device after thermal shutdown, use one of the following methods:

• Power down the computer and the chassis that contains the digitizer (required for
the NI PXIe-5185/5186).
• For the NI PXIe-5160/5162, you can disable and enable the device from the Device
Manager.
• For PXI and PCI devices, you can call niScope_ResetDevice or perform a
device reset in MAX. For more information on resetting a device in MAX, select
Help»Help Topics»NI-DAQmx»MAX Help for NI-DAQmx within MAX.

The thermal shutdown error continues to be reported until the device is successfully
reset.

Note

• When overheating occurs on the NI PXI-5122, the Active LED turns red
and the Access LED may turn red, depending on the hardware revision
you have.
• When overheating occurs on the NI PXI-5124/5142/5152/5153/5154/
5922 or the NI PXIe-5122/5185/5186/5622, the Active LED turns red.
• For the NI 5185/5186, you must follow the guidelines described in the
Maintain Forced-Air Cooling Note to Users to prolong the life of the
device. If the NI 5185/5186 goes into thermal shutdown, a power cycle
is required to re-enable the device. You can read the current
temperature of the device using LabVIEW by selecting the Device
Temperature property in the NI-SCOPE property node. It is
recommended that this value stay below 100 °C to maximize the life of
the NI 5185/5186. The NI 5185/5186 will go into thermal shutdown
when its temperature exceeds 107 °C.

Related Topics

Features Supported by SMC-Based Devices and USB Devices

88 ni.com
NI-SCOPE

Related concepts:

• Features Supported by NI-SCOPE Instruments

Triggering

A trigger is an external stimulus that initiates one or more instrument functions.


Trigger stimuli include digital edges, software functions, and analog levels. The trigger
can be derived from attributes of the signal to be acquired, such as the level and slope
of the signal.

You can use several kinds of triggering with NI high-speed digitizers, including digital,
edge, glitch, hysteresis, immediate, runt, software, video, width, and window
triggering. Each type of triggering uses a different NI-SCOPE Configure Trigger
function.

The following table describes the triggers supported by NI high-speed digitizers. The
Supported Types column denotes which trigger types are valid for a given trigger.

Trigger Supported
Description
Name Types
The Start trigger transitions a device into a state where the device can
Digital respond to Sample clocks. This trigger transitions the device from a
Start
Edge nonsampling state into a sampling state—the device starts acquiring and
storing data.
The Reference trigger transitions a device from the Wait for Reference
Trigger sampling state into the Post Reference trigger sampling state. In the
Analog, Post Reference Trigger sampling state, a counter begins counting Sample
Reference Digital, clock cycles. When the configured number of samples is acquired, the
Video device transitions into a Done state. In other words, the arrival of this
trigger establishes the reference point that separates pretrigger and
posttrigger samples.
Digital The Advance trigger initiates the acquisition of the additional records in a
Advance
Edge multirecord acquisition.
The digitizer acquires pre-reference triggers until the Arm Reference trigger
Arm Digital
is received. For more information, refer to SMC-Based Digitizers Acquisition
Reference Edge
Engine State Diagram.

© National Instruments 89
NI-SCOPE

Related concepts:

• Digital Triggers
• Edge Triggers
• Glitch Triggers
• Hysteresis Triggers
• Immediate Triggers
• Runt Triggers
• Software Triggers
• Video Triggers
• Width Triggers
• Window Triggers

Related information:

• SMC-Based Digitizers Acquisition Engine State Diagram

Trigger Types

You can use several kinds of triggering with NI high-speed digitizers, including digital,
edge, glitch, hysteresis, immediate, runt, software, video, width, and window
triggering. Each type of triggering uses a different NI-SCOPE Configure Trigger
function.

Related concepts:

• Digital Triggers
• Edge Triggers
• Glitch Triggers
• Hysteresis Triggers
• Immediate Triggers
• Runt Triggers
• Software Triggers
• Video Triggers
• Width Triggers
• Window Triggers

90 ni.com
NI-SCOPE

Immediate Triggers

Immediate triggers occur when the digitizer triggers itself. There is no external signal
that triggers the acquisition—the acquisition simply begins immediately after being
configured by the driver software. Immediate triggering is the default option on NI
high-speed digitizers. Therefore, you can omit using this function if you never change
triggering modes.

Software Triggers

Software triggers occur when a software command starts the acquisition of posttrigger
data. When you call Initiate Acquisition the digitizer starts acquiring
pretrigger data and continues to do so until you call Send SW Trigger. The
digitizer continues to store posttrigger samples after the software trigger, so you still
need to wait for the acquisition to complete after the trigger. You can do this by setting
the timeout parameter in a Fetch function to a positive value. You cannot use a Read
function in conjunction with software triggering; you must use Initiate
Acquisition followed by one of the Fetch functions. The following figure shows the
programming flow using software trigger functions.

Initialize
Opens a session

Configure Trigger Software


Configures your application

Initiate Acquisition
Begins acquiring pretrigger data

Send Software Trigger Edge


Sends a command to trigger the digitizer

Fetch
Polls the digitizer until the acquisition is
complete and retrieves the data

Close
Closes the session

© National Instruments 91
NI-SCOPE

Note Not all digitizers support software triggering. Refer to Features


Supported by Device to find out which digitizers support software triggering.

Edge Triggers

An edge trigger occurs when a signal crosses a trigger threshold that you specify. You
can specify the slope as either positive (on the rising edge) or negative (on the falling
edge) to the trigger. Edge triggering is possible on all analog trigger channels, such as
0, 1, or the external trigger channel. The following figure shows edge triggering.

Trigger Level

Legend
Negative Edge Trigger Positive Edge Trigger

Glitch Triggers

A glitch trigger occurs when a pulse that crosses a vertical threshold you specify and
with a polarity you specify also has a width that is either greater than or less than a
duration you specify. The oscilloscope can trigger on pulses of positive, negative, or
either polarity.

Use the glitch trigger to detect transient pulses within pulse trains.

You can configure the glitch parameters in NI‑SCOPE using the Analog Glitch Ref
Trigger instance of the Configure Trigger (poly) VI.

The following figure illustrates glitch triggering.

92 ni.com
NI-SCOPE

2 2
3 4

2 2
5 6

Legend

1. Trigger level
2. Width
3. Positive glitch trigger (less than)
4. Positive glitch trigger (greater than)
5. Negative glitch trigger (less than)
6. Negative glitch trigger (greater than)

Hysteresis Triggers

Hysteresis triggers eliminate incorrect triggers caused by noisy signals. For example, if
your signal contains two rising edges of different amplitudes, you can use hysteresis
triggering to trigger on one of the edges. Although NI-SCOPE uses a default amount of
hysteresis for edge triggering, which is typically 2.5% of the vertical range, you can
override that value by setting your own hysteresis values. The Configure Trigger
Hysteresis function or VI allows you to choose the trigger coupling, trigger level,
hysteresis value, and trigger slope.

Hysteresis triggering is possible on all analog trigger channels, such as 0, 1, or the

© National Instruments 93
NI-SCOPE

external trigger input.

A positive slope hysteresis trigger is generated when the signal crosses below the
voltage specified by the trigger level parameter minus the hysteresis value, and then
crosses the trigger level.

Trigger Level

Trigger Level – Hysteresis


Value

Trigger

A negative slope hysteresis trigger is generated when a signal crosses above the
voltage specified by the trigger level parameter plus the hysteresis value, and then
crosses the trigger level.

Trigger Level +
Hysteresis Value

Trigger Level

Trigger

Runt Triggers

A runt trigger occurs when both the leading edge and trailing edge of a pulse cross only
one of two trigger thresholds you specify and with a polarity you specify, where the
polarity is relative to the threshold crossed. The oscilloscope can trigger on pulses of
positive, negative, or either polarity.

You can also add time qualification to the runt trigger. A time-qualified runt trigger
captures only those runt pulses that, in addition to meeting your vertical threshold
criteria, have a width either within or outside a duration range you specify. By default,
the runt trigger is not time qualified.

Use the runt trigger to debug digital systems by capturing pulses that could represent

94 ni.com
NI-SCOPE

metastable logic states.

You can configure the runt trigger parameters in NI‑SCOPE using the Analog Runt Ref
Trigger instance of the Configure Trigger (poly) VI. Use NI‑SCOPE properties to time-
qualify the runt trigger.

The following figure illustrates runt triggering.

Legend

1. Runt low threshold


2. Runt high threshold
3. Positive runt trigger
4. Negative runt trigger

Video Triggers

A video trigger occurs when the digitizer finds a valid video signal synchronization.
Refer to NI 5114/5122/5124/5142 Video Triggering for more information.

Related information:

© National Instruments 95
NI-SCOPE

• Video Triggering

Width Triggers

A width trigger occurs when a pulse that crosses a vertical threshold you specify and
with a polarity you specify also has a duration that is either within or outside a
duration range you specify. The oscilloscope can trigger on pulses of positive,
negative, or either polarity.

Use the width trigger to detect transient pulses with a duration that falls within or
outside of a known range.

You can configure the width trigger parameters in NI‑SCOPE using the Analog Width
Ref Trigger instance of the Configure Trigger (poly) VI.

The following figure illustrates width triggering.


4 5 4

2 2 2

3 3 3

6 7 6

2 2 2

3 3 3

Legend

1. Trigger level
2. Width low threshold
3. Width high threshold

96 ni.com
NI-SCOPE

4. Positive width trigger (outside)


5. Positive width trigger (within)
6. Negative width trigger (outside)
7. Negative width trigger (within)

Window Triggers

A window trigger occurs when a signal either enters or leaves a window you specify
with the window mode parameters in the Configure Trigger Window function.
Window triggering is possible on all analog trigger channels, such as 0, 1, or the
external trigger input.

The following figure shows an entering window trigger.

High Level

Low Level

Trigger Trigger

The following figure shows a leaving window trigger.

High Level

Low Level

Trigger Trigger

Digital Triggers

A digital trigger occurs on either a rising edge or falling edge of a digital signal. Digital
triggering is possible on the RTSI lines, PFI lines, and the PXI Star Trigger line.

© National Instruments 97
NI-SCOPE

Related concepts:

• RTSI Bus
• PFI Lines
• PXI Star Trigger Line

Burst Triggers

Note Burst triggering is available only on high-speed digitizers that support


onboard signal processing (OSP).

To trigger on data bursts, you can configure the digitizer to wait until it detects a quiet
period before arming the trigger. Use the Min Quiet Time property or the
NISCOPE_ATTR_REF_TRIGGER_MINIMUM_QUIET_TIME attribute to set the
length of this quiet period.

The following figure shows how burst triggers occur after a configured minimum quiet
time of 1.5 seconds. The trigger occurs at point A because the minimum quiet time of
1.5 seconds has been exceeded—in this case, 2 seconds have elapsed since a signal
above the trigger level was detected. A trigger does not occur at point B because only 1
second of quiet time has elapsed.

98 ni.com
NI-SCOPE

Trigger Parameters

Common NI-SCOPE trigger parameters include trigger holdoff, trigger delay, and
trigger coupling.

Related concepts:

• Trigger Holdoff
• Trigger Delay
• Trigger Coupling

Trigger Holdoff

Trigger holdoff is an adjustable period of time during which the digitizer cannot trigger.
NI high-speed digitizers use trigger holdoff to guarantee a minimum time between two
Reference Triggers. This feature is useful if incoming triggers are a known time apart
and only a relatively small window of samples adjacent to the trigger are necessary. In
this case, setting the holdoff allows you to efficiently allocate the onboard memory,
and prevents the device from triggering on sections of the input waveform that are not

© National Instruments 99
NI-SCOPE

of interest. Each device uses an onboard counter that is programmed by software to


implement this functionality. While the holdoff counter is decrementing, incoming
Reference Triggers are ignored. The device arms itself for the next Reference Trigger
when the holdoff counter reaches zero. Each device that supports trigger holdoff has a
minimum holdoff value, which is listed in the specifications document for each device.

Trigger Holdoff Trigger Holdoff

Trigger
Level

Digitized Waveform Digitized Waveform

Legend

Trigger Accepted Trigger Rejected

Note Trigger holdoff is not supported by all digitizers. Some digitizers allow
only trigger holdoff or trigger delay at any given time. Refer to Features
Supported by Device to find out which digitizers support trigger holdoff.

The details of how holdoff is implemented on each device varies. Refer to the device-
specific help sections for more information on your particular digitizer.

Trigger Delay

Trigger delay is the amount of time that elapses between when a trigger occurs and
when the digitizer actually triggers.

In NI-SCOPE, the trigger delay parameter specifies this time period, (in seconds). For
example, setting a 1 second trigger delay means the digitizer continues to acquire
pretrigger samples for 1 second after it is triggered. The posttrigger samples occur
after the delayed trigger.

100 ni.com
NI-SCOPE

Acquired Waveform

Trigger Delay
Trigger 50% Reference Position

Note Trigger delay is not supported by all digitizers. Some digitizers allow
only trigger holdoff or trigger delay at any given time. Refer to Features
Supported by Device to find out if your digitizer supports trigger delay.

Related topics:

• Trigger Parameters

Trigger Coupling

The trigger coupling parameter can be either AC, DC, HF Reject, LF Reject, or AC Plus
HF Reject. This parameter works much like the vertical coupling parameter. When AC
is selected, NI-SCOPE rejects the DC component of the trigger signal. When triggering
on channel 0 or channel 1 of the digitizer, the input signal is immediately coupled
based on the vertical coupling parameter. Therefore, if the vertical coupling
parameter is set to AC coupling, triggering occurs on the AC components of the signal
because the DC component has already been removed.

Note For the PXIe/PXI/PCI‑5122, trigger coupling applies only to the


external trigger channel. When using the analog input channels (channels 0
and 1) as the trigger source, the trigger coupling is the same as the input

© National Instruments 101


NI-SCOPE

coupling and is specified by calling Configure Vertical.

Related concepts:

• Input Coupling

Sample Clock

The sample clock is sent to the ADC of each channel and to the acquisition engine to
control the sampling rate of a digitizer. The sample clock sources are as follows.

Internal Sample Clock

High-speed digitizers and oscilloscopes have an onboard (internal) clock that controls
the sampling rate as well as other timing functionality of the device. In most cases, the
onboard oscillator is a Voltage Controlled Crystal Oscillator (VCXO). Typically, an
onboard DAC (digital to analog converter) is used to calibrate the VCXO to exactly the
desired clock rate. This DAC can also be used to adjust the frequency of the VCXO to
phase lock it to a reference clock. The maximum sampling rate of a device is usually
determined by the speed of the onboard clock. However, other sampling rates can be
achieved by two methods; decimation of the data or dividing down the onboard clock.

Decimation Method

In the decimation method, the ADC samples at the rate of the onboard clock and then
sends its digital data to a decimator that essentially discards samples at a specific
interval to achieve slower effective sampling rates. The valid sampling rates are always
an integer divisor of the onboard clock. For example, if the onboard clock is 100 MHz
but you want to sample at 25 MS/s, you must use decimation. The decimation method
would discard all data except for every fourth datapoint to achieve exactly 1/4 of the
maximum sample rate (or onboard clock rate).

Divide Down Clock Method

Some oscilloscopes use the divide down clock method. In this method the onboard
clock is sent through a series of clock dividers, and then that clock is sent to the ADC.

102 ni.com
NI-SCOPE

Typically, the decimation method is preferred over the divide down clock method.

Note NI high-speed digitizers support the decimation method but do not


support the divide down clock method.

External Sample Clock

Some digitizers and oscilloscopes can accept an external sample clock. This external
sample clock is used to replace the onboard clock (the VCXO) for synchronization or to
achieve a sampling rate that cannot be specified by using the onboard clock. Some
devices can also decimate the external sample clock to achieve a sampling rate that is
an integer divisor of the external sample clock. For example, if the external sample
clock is 70 MHz, you could decimate the clock by a factor of 2 and achieve a 35 MS/s
sampling rate.

Note Not all devices support the option for an external sample clock and/or
decimation of that clock. Refer to Features Supported by Device for more
information. If your device does not support external sample clocks, refer to
reference clock for another method of synchronization.

Related concepts:

• Reference Clock/Phase-Lock Loop

Reference Clock/Phase-Lock Loop

The reference clock is used in the phase-locked loop (PLL) circuit of a digitizer to
synchronize the internal oscillator to the reference clock. The frequency stability of the
internal oscillator matches that of the PLL reference clock when the two are phase
locked. In turn, phase locking synchronizes clocks of multiple devices that are phase
locked to the same reference clock. The most common frequency for a reference clock
is 10 MHz because a clock of that frequency can generally be shared over a cable
without much attenuation or loss. However, the frequency range of reference clocks
can vary anywhere from 1 MHz to 20 MHz. Refer to the Devices section of this help file
to determine what your device supports. The following figure shows a block diagram
of a basic PLL.

© National Instruments 103


NI-SCOPE

Frequency Voltage
Frequency
Reference Phase Detector Low Pass Filter Controlled
Output
Oscillator

The operation of this circuit is typical of all PLLs. A PLL is a feedback control system
that controls the frequency and phase of a voltage controlled oscillator (VCO). The
input signal is applied to a phase detector. The output of the VCO connects to the other
input. As shown in the previous diagram, the frequencies of both signals are the same.
The output of the phase detector develops a voltage proportional to the phase
difference between the two input signals. The lowpass filter receives this signal from
the phase detector. The lowpass filter determines the dynamic characteristics of the
PLL. The filtered signal controls the VCO.

Time Stamping

NI digitizers use a free-running timing clock and/or a time-to-digital converter (TDC) to


accurately record the time of an event. For example, the NI 5114/5122/5124/5142/5922
each have a 64-bit counter. NI-SCOPE creates accurate time records by aligning the NI-
TIO clock to the sample clock on your device. This time record is a time stamp. With
time stamps, you can correlate multiple records or even multiple acquisitions. For
example, you can use time stamps to determine the amount of time between
acquisitions.

How Time Stamps Work

NI-SCOPE returns time stamps with every Fetch function, if the digitizer supports
them, in the waveform info structure. This structure contains both absolute initial x
and relative initial x parameters. The absolute initial x parameter is the time of the
first point in the waveform in units of seconds, and it has a resolution of the maximum
real-time sampling period of the digitizer (such as 10 ns for a 100 MS/s digitizer). This
time is valid between records and entire acquisitions, provided the clock is not reset.
The relative initial x parameter, which is supported by all digitizers, is the time
between the first point in your waveform and the trigger. Therefore, the trigger always
occurs at time equals zero. It includes the interpolated TDC. This conversion measures
when the trigger occurs between two samples. Keep in mind that the relative initial x

104 ni.com
NI-SCOPE

value is not valid until a trigger occurs when using continuous acquisition. To compute
an absolute trigger time that includes the TDC value, use the following formula:

absolute trigger time = absolute initial x – relative initial x

The time it takes for the time stamp counter to roll over depends on the number of bits
in the time stamp counter and the clock frequency. For instance, the rollover would
occur for an NI 5114/5122/5124/5142/5922 if it runs for 5849 years. If the rollover
occurs, NI-SCOPE returns a warning.

To reset the counter on the NI 5114/5122/5124/5142/5922, call niScope Reset.

Time Stamps Example

The Timestamps example uses time stamps to compute a histogram of the time
between triggers. You can use this example to calculate the minimum time required
between records. You can find the Timestamps example by using the shortcut
Start»All Programs»National Instruments»NI-SCOPE»Examples.

Related concepts:

• TDC

TDC

A time-to-digital converter (TDC) is a circuit that is used to measure the time between
two events. For digitizers, the TDC measures the time elapsed from when a trigger is
received by the digitizer to the time the first sample is taken.

© National Instruments 105


NI-SCOPE

Sampled Data

Trigger
Level
Trigger

The TDC measures the


time between the trigger
and the sample clock

Sampling Methods

The sampling method you use determines how the digitizer collects sample points.
Depending on whether the signal is changing slowly or quickly, you can choose one of
the following methods to collect samples:

• Real-Time Sampling
• Random Interleaved Sampling (RIS)
• Time Interleaved Sampling (TIS)

Related concepts:

• Real-Time Sampling
• Equivalent-Time Sampling and Random Interleaved Sampling
• Time Interleaved Sampling

Real-Time Sampling

Real-time sampling is the default sampling method used by NI high-speed digitizers. In


real-time sampling, the digitizer gathers all the samples for a waveform in one
acquisition with one trigger event.

106 ni.com
NI-SCOPE

Related Topics

Random-Interleaved Sampling

Related concepts:

• Equivalent-Time Sampling and Random Interleaved Sampling

Equivalent-Time Sampling and Random Interleaved Sampling

Equivalent-time sampling is a sampling method in which a picture of a waveform is


created over time by using a series of samples taken from repetitive waveforms.

Random Interleaved Sampling (RIS) is a form of equivalent-time sampling that


increases apparent sample rates of repetitive signals by combining several triggered
waveforms. Because the trigger time occurs randomly between two samples, the
digitizer samples different points in the waveform on consecutive acquisitions. By
combining these waveforms, you can achieve RIS sample rates that are up to 25 times
higher than the ADC sample rate on the digitizer.

Note NI-SCOPE does not support using RIS with multi-instrument NI-
SCOPE sessions.

How RIS Works

Each waveform trigger occurs at some time randomly distributed between two
samples. The digitizer can measure the time from the trigger to the next sample,
commonly called the time-to-digital conversion (TDC), extremely accurately—with
hundreds of times more resolution than the sample period of the digitizer. With these
TDC measurements, NI-SCOPE can combine multiple waveforms, aligned at the trigger
time, to simulate a faster sampling rate for repetitive signals.

How Oversampling Factors Increase Effective Sample Rates

When a digitizer is in RIS mode, the legal sample rates become multiples of the
maximum real-time sampling rate. These multiples are the oversampling factor. For
example, for a digitizer that has a 100 MS/s maximum real-time sampling rate, the RIS

© National Instruments 107


NI-SCOPE

sampling rates are the oversampling factor times 100 MS/s, where the oversampling
factor is two, three, four, and so on. If you specify 300 MS/s for your sampling rate, the
oversampling factor is three.

Each TDC value is between zero and the sampling period, so a 100 MS/s digitizer has
TDC values between 0 and 10 ns. This time span is divided into a number of bins equal
to the oversampling factor. For example, an oversampling factor of three means there
is one TDC bin from 0 to 3.33 ns, another from 3.33 to 6.67 ns, and another from 6.67 to
10 ns. To reconstruct a waveform, each bin must contain at least one TDC value.

The following four figures show an example RIS acquisition with an oversampling
factor of three. Each of the figures shows the aligned trigger time of the waveforms
followed by the three TDC bins, where the combined width of the three bins is the real-
time sample period of the digitizer.

1. The first waveform has a TDC value that falls in bin number 1.

A. Bin 1 Bin 2 Bin 3

Trigger Time of Each Waveform

Legend
Acquisition 1

2. The succeeding waveform falls in bin number 3.

108 ni.com
NI-SCOPE

B. Bin 1 Bin 2 Bin 3

Trigger Time of Each Waveform

Legend
Acquisition 1 Acquisition 2

3. Because of the randomness of the TDC value, another sampled waveform falls in
bin 1. NI-SCOPE does not fetch this waveform from the digitizer because the bin is
already filled.

C. Bin 1 Bin 2 Bin 3

Trigger Time of Each Waveform

Legend
Acquisition 1 Acquisition 2 Acquisition 3

4. The next waveform falls in bin 2.

© National Instruments 109


NI-SCOPE

D. Bin 1 Bin 2 Bin 3

Trigger Time of Each Waveform

Legend
Acquisition 1 Acquisition 2 Acquisition 4

Now all bins are full, so NI-SCOPE returns the three waveforms sampled at the
maximum real-time rate as one evenly-sampled waveform with a sampling rate three
times greater.

Averaging to Minimize Noise

At a minimum to complete an RIS acquisition, the number of TDC values must be equal
to the oversampling factor. However, this does not guarantee a cleanly reconstructed
signal. The following figures show three acquisitions of a perfectly linear edge.

The following figure shows that the sample in bin number 1 is extremely close to its
right-hand bin edge. When NI-SCOPE returns the RIS waveform, this sample is coerced
to the middle of the bin. In similar fashion, each sample is coerced to the center of its
bin.

110 ni.com
NI-SCOPE

A. Bin 1 Bin 2 Bin 3

Trigger Time of Each Waveform

Legend
Acquisition 1

The following figure shows how NI-SCOPE returns the RIS waveform, with evenly-
spaced samples.

B. Bin 1 Bin 2 Bin 3

Trigger Time of RIS Waveform

Legend
Acquisition 1 Acquisition 2 Acquisition 3

Note You can avoid noise in RIS waveforms by averaging multiple

© National Instruments 111


NI-SCOPE

waveforms in each bin during the RIS algorithm. The number of averages in
each bin can be specified with the RIS Num Averages attribute of NI-SCOPE.

The following figure shows the acquisition using two averages. Notice that twice as
many waveforms are required now.

C. Bin 1 Bin 2 Bin 3

Trigger Time of Each Waveform

Legend
Acquisition 1 Acquisition 2 Acquisition 3

Acquisition 4 Acquisition 5 Acquisition 6

The following figure shows the returned waveform from the averaged RIS acquisition.

112 ni.com
NI-SCOPE

D. Bin 1 Bin 2 Bin 3

Trigger Time of RIS Waveform

Legend
Acquisition 1 Acquisition 2 Acquisition 3

The higher the number of averages, the smaller the effect of coercing the time of
samples. Therefore, it is generally important to use some amount of averaging with
RIS. Increasing the amount of averaging increases the minimum number of waveforms
necessary to reconstruct the RIS waveform and therefore, the time it takes to complete
an acquisition.

Randomness in RIS Acquisitions

When using RIS, remember that the TDC value is completely random—the hardware
does not adjust anything to ensure an even distribution of TDC values. If the TDC is the
same from two acquisitions, the digitizer has effectively sampled the same places on
the repetitive waveform, so no information has been gained. Therefore, for RIS to
work, you must have a suitable random distribution of TDC values, which requires a
nondeterministic number of waveforms. While it can take a long time to receive a
suitable set of waveforms with different TDC values, in practice you rarely need to wait
long. Furthermore, NI-SCOPE employs multirecord acquisitions and continuous
acquisition when possible to optimize reconstructing the waveform while the
acquisition is in progress.

Note Sometimes an RIS acquisition times out and does not complete. If

© National Instruments 113


NI-SCOPE

increasing the timeout value does not solve the problem, you may need to
self-calibrate the digitizer. This timeout can also occur if the digitizer is
frequency locked to the same reference as the frequency source.

Related concepts:

• Equivalent-Time Sampling and Random Interleaved Sampling

Time Interleaved Sampling

Time Interleaved Sampling (TIS) is a technique to increase the real-time sample rate of
a digitizer. TIS uses multiple analog-to-digital converters (ADCs) to sample the same
input waveform, but at different relative phases. The hardware then interleaves these
samples to create the waveform as if only one ADC were sampling the waveform at a
higher sample rate.

Note To use time interleaved sampling for the NI 5152, 5153, and 5154, set
the Enable TIS property or the
NISCOPE_ATTR_ENABLE_TIME_INTERLEAVED_SAMPLING attribute to
TRUE. For all other devices, TIS is enabled automatically by setting the
sample rate. The Enable TIS property is ignored.

How TIS Works

When you enable TIS on a channel, the digitizer samples the input signal of that
channel using more than one ADC. The clocks of these ADCs are shifted to a phase that
reflects the time when an ADC of a higher sample rate would acquire a point. An
example is shown in the following figure.

114 ni.com
NI-SCOPE

ADC 1

ADC 2

ADC 1

ADC 2

ADC 1 + ADC 2

To obtain a 2 G/s TIS rate using two ADCs, each operated at 1 G/s, the 1 GHz clock of
one ADC is shifted 180 degrees with respect to the 1 GHz clock of the other ADC.

The data returned is in order and is acquired in real time. Therefore, the input signal is
not required to be repetitive.

How TIS Affects Measurements

Because multiple ADCs are used in TIS, it is possible for mismatch between ADCs and
phase offset between clocks to cause small changes in the spectral performance of the
digitizer. NI digitizers calibrate most of these changes out, but some small residual
changes may persist. It may be important, particularly in frequency domain
applications, to understand the following effects.

• Offset Mismatch—If the ADCs are not perfectly matched in DC offset, a small spur
can appear at DC and at the Nyquist frequency (Sample Rate/2).
• Gain Mismatch—If the ADCs are not perfectly matched in DC gain, spurs occur at
image frequencies of input signal frequencies. The size of the image spurs are
proportional to the amount of gain mismatch.
• Phase Offset—If the ADCs are not sampling at exactly the correct phase for the
interleaving factor, images of the frequency content similar to those found with
gain mismatch will occur.

© National Instruments 115


NI-SCOPE

Frequency Domain Fundamentals

Expand this book to view the frequency domain topics, or click one of the following
links:

• SFDR
• THD
• SINAD
• ENOB

Related concepts:

• Spurious Free Dynamic Range


• THD
• SINAD
• ENOB

Spurious Free Dynamic Range

Spurious free dynamic range (SFDR) is the usable dynamic range before spurious noise
interferes with or distorts the fundamental signal. The amplitude of the fundamental
signal is usually -1 dBFS. SFDR is the measure of the ratio in amplitude between the
fundamental signal and the largest harmonically or non-harmonically related spur
from DC to the full Nyquist bandwidth (half the sampling rate). A spur is any frequency
bin on a spectrum analyzer, or from a Fourier transform, of the analog signal. SFDR is
expressed in dBc.

The following figure illustrates how SFDR is measured.

116 ni.com
NI-SCOPE

RMS Fundamental Signal


Amplitude

Spurious Free Dynamic Range

Largest Spur

fN fS/2 fS
Frequency

THD

The total harmonic distortion (THD) of a signal is the ratio of the sum of the powers of
the first five harmonics above the measured fundamental frequency to the power of
the fundamental frequency. THD is usually expressed in dB or dBc. Measurements for
calculating the THD are made at the output of a device under specified conditions.

SINAD

Signal-to-noise-and-distortion (SINAD) is the ratio of the rms signal amplitude (set to


1 dB below Full Scale) to the rms sum of all other spectral components, including the
harmonics but excluding DC. SINAD is usually expressed in dB.

ENOB

Effective number of bits (ENOB) is another way of specifying signal-to-noise and


distortion ratio (SINAD). ENOB is calculated using the following formula.

© National Instruments 117


NI-SCOPE

where A is the input amplitude and V is the full scale range of the ADC.

The ENOB indicates that the ADC is equivalent to an ideal ADC of this number of bits.

Related concepts:

• SINAD

Video Fundamentals

Expand this topic for information about the fundamentals of video signals.

Composite and Component Video Signals

Composite Video Signals

A composite video signal is a signal in which all the components needed to generate a
video signal are embedded in a single signal. The three main components that
together form a composite signal are as follows:

• The luma signal (or luminance)—Contains the intensity (brightness or darkness)


information of the video image
• The chroma signal—Contains the color information of the video image
• The synchronization signal—Controls the scanning of the signal on a display such
as the TV screen

The monochrome composite signal is built of two components: luma (or luminance)
and synchronization. This signal, which is usually called the Y signal, is shown in the
following figure.

150
IRE Y = Luminance signal
100

50

0
Hsync
-50
0 5 10 15 20 25 30 35 40 45 50 55 60 us 65

118 ni.com
NI-SCOPE

Monochrome Composite Video Signal (Luma Steps from White to Black)

The chroma signal by itself, which is usually called the C signal, is shown in the
following figure.
100
C = Color Signal
50
IRE

0
Burst
–50

–100
0 5 10 15 20 25 30 35 40 45 50 55 60 65
µs

Color Information Signal for a Color Bar Line (Including the Color Burst)

The composite color video signal, often called the Color Video, Blank, and Sync (CVBS)
signal, is the sum of Y and C.

CVBS = Y + C
150
Composite Signal
100
IRE

50

-50
0 5 10 15 20 25 30 35 40 45 50 55 60 65
µs

Color Composite Video Signal for a Color Bar Line

The two components Y and C can also be distributed separately as two independent
signals. These two signals together are called either Y/C or S-video.

Y/C = S-video

Component Video Signals

A component video signal is a signal in which all the color components needed to

© National Instruments 119


NI-SCOPE

generate a video signal are transmitted separately. Most HDTV formats are component
(Y-Pb-Pr).

Video Format Naming

The most common standard video formats (NTSC, PAL, and SECAM) are known by
acronyms. Sometimes extra letters are appended to the front of the names to indicate
the refresh rate. For example, M-PAL and M-NTSC have a refresh rate of 59.94 fields per
second.

Standard Definition (SDTV) Formats

The definition of standard composite video signal formats differs from country to
country.

• M-NTSC—Mainly used in the USA and Japan.


• B/G-PAL—Used in most of Europe, parts of Africa, and some other countries such as
Australia.
• SECAM—Used in France, the former Soviet Union, and parts of the Middle East.
• M-PAL—Used in Brazil.

EDTV and HDTV Video Formats

Other video signal formats such as HDTV (high-definition television) and EDTV
(enhanced-definition television) are named using characteristics of the video format.
For example, an HDTV video format with 1,080 active horizontal lines using an
interlaced scheme with a refresh rate of 30 fields per second is designated as 1080i/30
fps. If the video signal format is changed to use a progressive scheme, the name would
change to 1080p/30 Fps.

Note Fps = Frames per second, used in progressive formats; fps = fields per
second, used in interlaced formats.

EDTV Formats

• 480i/59.94 fps
• 480i/60 fps

120 ni.com
NI-SCOPE

• 480p/59.94 Fps
• 480p/60 Fps
• 576i/50 fps
• 576p/50 Fps

HDTV Signal Formats

• 720p/30 Fps (not supported by NI-SCOPE)


• 720p/50 Fps
• 720p/59.94 Fps
• 720p/60 Fps
• 1080i/50 fps
• 1080i/59.94 fps
• 1080i/60 fps
• 1080p/24 Fps

Scanning Speed

The scanning speed is the number of video frames generated per second. The
scanning speed and the number of lines per frame depend on the video format. NTSC
specifies a scanning speed of approximately 30 frames per second and 525 lines per
frame while PAL and SECAM specify a rate of 25 frames per second and 625 lines per
frame.

Color Coding

The color information signal C, together with Y, forms the composite video signal is a
modulated signal. The modulation type depends on the video format.

For all PAL and NTSC formats, the coding is based on the Quadrature Amplitude
Modulation (QAM) concept, where 2-color components are amplitude modulated in
quadrature and then combined. The modulation must be decoded, so to keep track of
the absolute phase needed to decode the color information, a reference signal, called
the color burst, is inserted at the beginning of each line, right after the horizontal
synchronization pulse. The insertion signal is shown in the Complete NTSC Frame Scan
image.

© National Instruments 121


NI-SCOPE

For the SECAM format, the 2-color components are frequency modulated using two
different subcarrier frequencies and are sequentially distributed on alternated video
lines. SECAM does not need a color burst signal.

Related concepts:

• Complete NTSC Frame Scan

Interlaced Scanning

All composite video systems display the video image on a TV screen using an
interlaced scanning technique. The following figure shows the interlaced scanning
concept.

Odd Field Even Field

Even

Odd

Interlaced Scanning Concept

The analog video signal includes synchronization pulses that control the scanning line-
by-line from left to right and field-by-field from top to bottom. The pulses that control
the line-by-line scanning are called the horizontal synchronization pulses (Hsync). The
pulses that control the vertical scanning are called the vertical synchronization pulses
(Vsync).

122 ni.com
NI-SCOPE

Two interlaced fields compose a complete frame. The first field, called the odd field,
scans the odd lines of the video image. The second field, called the even field, scans
the even lines of the video image. The process repeats for every frame.

Related concepts:

• Complete NTSC Frame Scan

Complete NTSC Frame Scan

The following figure shows the result of scanning all 525 lines that compose a
complete NTSC frame.

Gray Scale Image and Extracted Line Profile

The Complete NSTC Frame Scan image simulates the video display that would appear
on a television screen if the following conditions were true:

© National Instruments 123


NI-SCOPE

• The television could show the entire line instead of just the active image part.
• The television was not interlacing the two fields to form a complete image frame,
but instead was displaying a progressive scanning, line by line, of the entire frame.

The scanning starts (line-by-line from top to bottom) with a number of lines that
represent the vertical synchronization pattern for the odd field. Immediately after the
vertical synchronization pattern for the odd field, optional insertion test signals (ITS)
are inserted. Finally, the actual odd field active image displays.

The process repeats for the even field, forming the complete frame.

Note Most lines start with a horizontal synchronization pulse followed by


the color burst pattern. Then the active image (or the ITS) displays as an
intensity change, where a higher signal level corresponds to brighter
intensity.

The extracted line profile example at the bottom of the figure shows an actual video
signal line extracted from the even field. Refer to Video Levels for more information.

Horizontal synchronization pulses are basically simple negative pulses, which are
pulses going below the level of the luminance signal. However, the vertical
synchronization signals are composed of pulse trains distributed on several lines, and
the pulse trains are different for odd and even fields. The following figures show the
vertical synchronization patterns for both fields and for several main video formats.

Vertical Blanking and Synchronization Signal for M-NTSC, M-PAL, and 480i
Start of VSync

Field I

1 2 3 4 5 6 7 8 9 10 # 18 19

Field II

262 263 264 265 266 267 268 269 270 271 272 272 # 281 282

Vertical Blanking and Synchronization Signal for 480p

124 ni.com
NI-SCOPE

Start of VSync

Field I

524 525 1 2 7 8 13 14 15 16 45

Vertical Blanking and Synchronization Signal for B/G-PAL, SECAM, and 576i

Start of VSync

Field I
621 622 623 624 625 1 2 3 4 5 6 7

Field II

308 309 310 311 312 313 314 315 316 317 318 319 320

Vertical Blanking and Synchronization Signal for 576p

Start of VSync

619 620 621 625 1 2 6 7 8 9 45

Vertical Blanking and Synchronization Signal for 720p

Start of VSync

744 745 746 750 1 2 6 7 8 9 26

Vertical Blanking and Synchronization Signal for 1080i

© National Instruments 125


NI-SCOPE

Start of VSync

1123 1125 1 2 3 4 5 6 7 21

Field I

560 562 563 564 565 566 567 568 569 584

Field II

Vertical Blanking and Synchronization Signal for 1080p


Start of VSync

Field I

1120 1121 1122 1125 1 2 6 7 8 9 42

Related concepts:

• Complete NTSC Frame Scan


• Active Image
• Video Levels

Active Image

The active video image resulting from the scanning always has an aspect ratio
(horizontal/vertical) of 4/3, independent of the video format. The color composite
video signal shows that the scanning process requires some additional room on the
left and right sides of each line, as well as on the top and bottom of the active video
image region. This additional room includes the synchronization signals, color bursts,
and other format-specific information, like the ITS, which are not part of the active
video image. Approximately 90% of all the lines and 80% of each line can transmit the
active image information. The exact values depend on the video format, as shown in
the following table.

126 ni.com
NI-SCOPE

Video Format Lines/Frame Active Lines Frame Rate Line Duration Active Line Duration
NTSC 525 480/486 29.97 frames/sec 63.55 µs 52.2 µs
PAL/SECAM 625 576 25.00 frames/sec 64.00 µs 52.0 µs

Active Lines represents the number of lines that are actually used to transmit the
image information. For example, only 480 lines out of 525 lines/frame transmit the
image information in NTSC. Likewise, on each line, the image information is
transmitted only during the active lines sequence, which is shorter than the entire line
duration. For example, of 63.55 µs only 52.2 µs are the active line duration in NTSC.
Frame rate is the scanning speed described in Scanning Speed.

Related concepts:

• Composite and Component Video Signals


• Scanning Speed

Video Levels

The video levels define the levels and ranges for the different parts of the video signal.
The unit used to define video levels is the IRE (Institute of Radio Engineers). The
blanking level refers to 0 IRE and the white level refers to +100 IRE. The blanking level,
which is the reference level for the video signal (usually 0 V), is different from the black
level if a setup is applied to the signal as shown in the following figure.

© National Instruments 127


NI-SCOPE

140
Peak Level
120

100 White Level

80

60
IRE

40

20 Burst Amplitude
Black Level
0 Blanking Level

–20

–40 Sync Level

0 2 4 6 8 10 12 14 16
µs

For NTSC, a setup of 7.5 IRE is usually applied, moving the black level to +7.5 IRE. For
PAL and SECAM, the black level is aligned with the blanking level at 0 IRE.

The following table shows the different video levels depending on the video format.

Video Sync Blanking Black White Peak Burst


Format Level Level Level Level Level Amplitude
NTSC –40 IRE 0 IRE +7.5 IRE +100 IRE +120 IRE 20.0 IRE
PAL –43 IRE 0 IRE 0 IRE +100 IRE +133 IRE 21.5 IRE
SECAM –43 IRE 0 IRE 0 IRE +100 IRE +130 IRE N/A

The analog composite video signal is defined as a voltage source with an output
impedance of 75 Ω. The sync-to-white level is normally 1 Vpk-pk when loaded with a
75 Ω resistance. Therefore, the unloaded signal is nominally 2 Vpk-pk.

Waveform Measurements

NI-SCOPE waveform measurements offer you another method for fetching data from
NI high-speed digitizers. The measurements are processed in software instead of on
the digitizer hardware. The results are scalar or array measurements. Scalar
measurements refer to calculations such as rise time and frequency, which take the

128 ni.com
NI-SCOPE

time-domain data and produce a single value, whereas array measurements transform
the time-domain data into a new waveform, such as an FFT amplitude spectrum.

Related Topics

Making Waveform Measurements

Related concepts:

• Scalar Measurements in NI-SCOPE


• Array Measurements in NI-SCOPE
• Making Waveform Measurements

Reference Levels

Reference levels are high, low, and mid range values that you set to take rise time, fall
time, width negative, width positive, duty cycle positive, and duty cycle negative
measurements. Reference levels are generally configured in terms of the percentage of
the waveform you acquire. By default, the low value is 10% of the waveform, the mid
level is 50%, and the high value is 90%.

Use the channel-based attributes to set the reference levels. Refer to Attributes and
Attribute Functions for an overview of attributes.

You can customize how NI-SCOPE configures the percentages used for the reference
levels with the Percentage Method attribute. This attribute uses any of the following
constants:

• Min Max—This method uses the measurement's voltage minimum and voltage
maximum as 0% and 100%. These algorithms find the absolute minimum and
maximum in the waveform, which is useful for sine waves and triangle waves
where the histogram method does not work.
• Low High—This method uses the measurement's voltage low and voltage high as
0% and 100%. The voltage low is the voltage of the histogram bin with the most
hits below 40% of the waveform's voltage peak-to-peak value. The voltage high is
the voltage of the histogram bin with the most hits above 60% of the waveform's
voltage peak-to-peak value. These measurements use the last-acquisition

© National Instruments 129


NI-SCOPE

histogram method to find the most common high and low voltages, which is useful
for ignoring the preshoot and overshoot on a square wave.
• Base Top—The voltage base and voltage top measurements correspond to 0% and
100% with this method. These measurements use the last-acquisition histogram
method if the most common histogram bin contains a substantial number of the
total points. Otherwise, it returns the absolute minimum and maximum values in
the waveform. This is a useful default value for most waveform types.

You can also configure the reference levels in terms of voltage with the Ref Level Units
property or the NISCOPE_ATTR_MEAS_REF_LEVEL_UNITS attribute.

Related concepts:

• Attributes and Attribute Functions

Hysteresis Percent

This attribute is used by NI-SCOPE measurements that determine crossing to calculate


a measurement. For example, to calculate frequency the algorithm first determines
the mid-reference level average for the signal. Next, the algorithm sets up a digital
hysteresis around the mid-reference level using the attribute Hysteresis Percent. The
algorithm then finds all crossings by counting the number of times the waveform
crosses the upper hysteresis level, mid reference level, and lower hysteresis level. Note
that the hysteresis levels are calculated based on the vertical range. The algorithm
multiplies the hysteresis percent attribute by the vertical range attribute to determine
the upper and lower hysteresis levels. The default value for the hysteresis percent is
configured to 2, which means in a 2 V vertical range the algorithm does not see signals/
noise that are less than 40 mV.

Measuring Reference-Level Crossings

All scalar measurements involving time use the concept of reference-level crossings,
which occur when the waveform voltage crosses the reference level. Linear
interpolation accurately estimates the crosspoint times, but noise can create a higher
number of level crossings. To minimize the impact of noise, you can create a hysteresis
window around crosspoints. To count a crossing, the signal must start outside this
window and then pass through the window to the crosspoint. A crossing is not

130 ni.com
NI-SCOPE

counted again until the signal passes outside the window and then passes through the
window to the crosspoint. The following figure shows an exaggerated example of
digital hysteresis, where the dots are the real crosspoints after eliminating the spurious
crosspoints caused by noise.

Vertical Hysteresis
Hysteresis Range ´ Percent
=
Window Size 100

Legend
Crosspoints counted for Measurement Reference Level

Last-Acquisition Histogram Method

Last-acquisition histogram method is used by the voltage low and voltage high
measurements for computing the extrema of a waveform. This method is useful for
ignoring overshoot or preshoot in a square waveform. In this method, a voltage
histogram is created from the most recent acquisition. The limits of this histogram are
set by the minimum and maximum voltages of the acquisition. NI-SCOPE then counts
how many samples fall into each bin of the histogram. The resolution is defined by the
Last Acquisition Histogram Size attribute, which is 256 bins by default. You can fetch
the histogram array using the Fetch Array Measurement function, with Last Acquisition
Histogram constant specified as the array measurement function. The following
illustrations show an example of a square wave and its resulting histogram. In the
histogram the voltage low and voltage high measurements correspond to the middle
value of a bin with the maximum number of hits in the lower 40% or upper 40%
respectively.

© National Instruments 131


NI-SCOPE

Voltage Max
Voltage High

Voltage Low
Voltage Min
Hits

Min Lo Hi Max

Lower 40% Upper 40%


Searched for Searched for
Max Hits to Max Hits to
Determine Determine
Voltage Low Voltage High

Smoothing Windows

Smoothing windows are a simple means of minimizing spectral leakage associated


with truncated waveforms. Leakage exists because the finite time record of the input
signal creates discontinuities when the waveform is extended. The greater the

132 ni.com
NI-SCOPE

amplitude of these discontinuities, the greater the spectral leakage. A simple way to
avoid this is to use smoothing windows when applying an FFT on finite-length data.

You can use smoothing windows to reduce the amplitude of the discontinuities at the
boundaries of each period. This technique multiplies the time record by a finite length
window whose amplitude varies smoothly and gradually towards zero at the edges. In
the following figure, the original time signal shown in FFT with Spectral Leakage is
windowed using a Hanning window.

The following figure shows that the FFT of this data is significantly less noisy than the
non-windowed FFT shown in FFT with Spectral Leakage.

Types of Window Measurements

Choosing the correct window to use requires some prior knowledge of the signal that

© National Instruments 133


NI-SCOPE

you are analyzing. The following table shows the different types of windows and the
signal types they are appropriate for.

Window
Type and Description Applications
Signal
Order tracking, system analysis (frequency
Transient signals that are shorter
Rectangular response measurements) with pseudorandom
than the length of the window;
(no excitation, separation of two tones with
truncates a window to within a
window) frequencies very close to each other, but with
finite time interval.
almost equal amplitudes.
General-purpose applications, system analysis
Transient signals that are longer
Hanning (frequency response measurements) with
than the length of the window.
random excitation.
Transient signals that are longer
than the length of the window; a
Hamming modified version of the Hanning Often used in speech signal processing.
window that is discontinuous at
the edges.
Transient signals; similar to
Hanning and Hamming windows
Blackman General-purpose applications.
but adds one additional cosine
term to reduce ripple.
Window that is the shape of a
Triangle No special applications.
triangle.
Has the best amplitude accuracy
Accurate single tone amplitude measurements
of all the windows but comes at
Flat top when there are no nearby frequency
the expense of frequency
components.
selectivity.

Note In cases in which you do not have sufficient prior knowledge of the
signal, you may need to experiment with different windows to find the best
one.

Related concepts:

• Spectral Leakage
• FFT with Spectral Leakage

134 ni.com
NI-SCOPE

• FFT without Spectral Leakage

Spectral Leakage

When you use the discrete Fourier transform (DFT) or Fast Fourier Transform (FFT) to
find the frequency content of a signal, it is assumed that the data that you have is a
periodically repeating waveform. In the following figure, the first period shown is the
one sampled. Notice that the waveform has not completed an entire cycle, which
creates a discontinuity when the waveform is repeated to produce the periodic
waveform.

One Period Discontinuity

Time

Discontinuities happen when you sample a noninteger number of cycles. These


artificial discontinuities turn up as very high frequencies in the spectrum of the signal
that were not present in the original signal. These frequencies could be much higher
than the Nyquist frequency and are aliased somewhere between 0 and fs/2, where fs is
your sampling rate. The spectrum you get by using a FFT, therefore, is not the actual
spectrum of the original signal, but a smeared version. It appears as if the energy at
one frequency has leaked out into all the other frequencies. This phenomenon is
known as spectral leakage.

Related concepts:

• FFT with Spectral Leakage


• FFT without Spectral Leakage

FFT with Spectral Leakage

In the following figure, you see the spectral representation when you sample a
noninteger number of cycles of the time waveform (namely 10.25). The periodic
extension of this signal creates a discontinuity similar to the figure shown in Spectral
Leakage.

© National Instruments 135


NI-SCOPE

Notice how the energy is now spread over a wide range of frequencies, so the relative
height difference between the FFT peak amplitude and the neighboring bins is
reduced. This smearing of the energy is called spectral leakage.

Related concepts:

• Spectral Leakage

FFT without Spectral Leakage

The following figure shows a sine wave sampled from an NI digitizer and its
corresponding FFT amplitude spectrum in decibels. The time-domain waveform has
an integer number of cycles (10), so the assumption of periodicity does not create any
discontinuities.

136 ni.com
NI-SCOPE

Digital Filtering

Analog filter design is one of the most important areas of electronic design, but it is
often reserved for specialists because it requires advanced mathematical knowledge
and understanding of the processes involved in the system affecting the filter. With the
digital filters in NI-SCOPE, however, you do not have to be a design expert. NI-SCOPE
handles all the design issues, computations, memory management, and actual
filtering internally.

Although digital filters have advantages over analog filters, they have disadvantages
such as floating-point precision limitations, numerical instability, quantization noise,
and frequency warping.

© National Instruments 137


NI-SCOPE

Types of Filters

Filters alter or remove unwanted frequencies. Depending on the frequency range that
they either pass or attenuate, they can be classified into the following types:

• A lowpass filter passes low frequencies, but rejects (or attenuates) high
frequencies. To specify the cut-off frequency, use the Measurement Filter Cutoff
Frequency attribute.
• A highpass filter passes high frequencies, but attenuates low frequencies. To
specify the cut-off frequency, use the Measurement Filter Cutoff Frequency
attribute.
• A bandpass filter passes a certain band of frequencies and attenuates others. To
specify the bandpass filter, use the Measurement Filter Center Frequency attribute
and the Filter Width attribute, where the cut-off frequencies are the center
frequency plus or minus one-half width.
• A bandstop filter attenuates a certain band of frequencies and passes others. To
specify the bandstop filter, use the Measurement Filter Center Frequency attribute
and the Measurement Filter Width attribute, where the cut-off frequencies are the
center frequency plus or minus one-half width.
• An ideal filter has a gain of one (0 dB) in the passband so that the amplitude of the
signal neither increases nor decreases. The stopband (SB) corresponds to that
range of frequencies that do not pass through the filter at all and are rejected
(attenuated).
Amplitude

Amplitude

Frequency Frequency
fc fc
Lowpass Highpass
Amplitude

Amplitude

Frequency Frequency
fc1 fc2 fc1 fc2
Bandpass Bandstop

138 ni.com
NI-SCOPE

Infinite Impulse Response (IIR) Versus Finite Impulse Response (FIR) Filters

Another way to classify filters is by impulse response. An impulse response is the


response of a filter to an input that is an impulse (x[0] = 1 and x[i] = 0 for all i ≠ 0). The
FFT of the filtered impulse response is known as the frequency response of the filter.
The frequency response of a filter tells you what the output of the filter is going to be
at different frequencies. In other words, it tells you the gain of the filter at different
frequencies. For an ideal filter, the gain should be 1 in the passband and 0 in the
stopband. So, all frequencies in the passband are passed as is to the output, but there
is no output for frequencies in the stopband.

If the impulse response of the filter falls to zero after a finite amount of time, it is
known as a FIR filter. However, if the impulse response exists indefinitely, it is known as
an IIR filter. Whether the impulse response is finite (that is, whether the filter is FIR or
IIR) depends on how the output is calculated. The basic difference between FIR and IIR
filters is that for FIR filters, the output depends only on the current and past input
values, whereas for IIR filters, the output depends not only on the current and past
input values, but also on the past output values. The advantage of digital IIR filters
over FIR filters is that IIR filters usually require fewer coefficients to perform similar
filtering operations. Thus, IIR filters execute much faster and do not require extra
memory, because they execute in place. The disadvantage of IIR filters is that the
phase response is nonlinear. If the application does not require phase information,
such as amplitude spectrum analysis, IIR filters may be appropriate. You should use
FIR filters for those applications requiring linear phase responses.

IIR Filters

Filters are classified as infinite impulse response (IIR) filters if the impulse response
exists indefinitely. For IIR filters, the output depends not only on the current and past
input values, but also on the past output values.

Truncating Data with IIR Filters

Because IIR filters depend on the output and the input, there is a transient response at
the beginning of the filtered data that is invalid, due to the assumptions made at the
beginning boundary condition. This is due to the assumption that negative indices in
the general IIR difference equation are zero. NI-SCOPE IIR filters remove the user-

© National Instruments 139


NI-SCOPE

defined transient portion by deleting the first input size times the Measurement Filter
Transient Waveform Percent attribute divided by 100 from the beginning of the filtered
data array. This feature is useful when using a combination of processing steps, so the
result of an IIR filter excluding the transient portion may be the input of another
measurement. The length of the transient response depends on both the filter order
and the input waveform, and it may require some trial and error to determine the
proper setting for the Measurement Filter Transient Waveform Percent attribute.
Transient Steady State

Legend

Original Signal Filtered Signal

Related Topics

FIR Filters

Digital Filtering

Related concepts:

• FIR Filters
• Digital Filtering

Types of IIR Filters in NI-SCOPE

NI-SCOPE supports Butterworth, Chebyshev , and Bessel IIR filters. You can fetch
filtered data by calling the Fetch Array Measurement function or VI.

Related concepts:

140 ni.com
NI-SCOPE

• Butterworth Filters
• Chebyshev Filters
• Bessel Filters

Butterworth Filters

NI-SCOPE supports the following attributes for configuring Butterworth filters:

• Measurement Filter Type—lowpass, highpass, bandpass, bandstop


• Measurement Filter Order
• Measurement Transient Waveform Percent

A smooth response at all frequencies and a monotonic decrease from the specified
cutoff frequencies characterize Butterworth filters. These filters are maximally
flat—the ideal response of unity in the passband and zero in the stopband. The half
power frequency or the –3 dB down frequency corresponds to the specified cutoff
frequencies.

Butterworth filters do not always provide a good approximation of the ideal filter
response because of the slow rolloff between the passband (the portion of interest in
the spectrum) and the stopband (the unwanted portion of the spectrum). The
advantage of Butterworth filters is a smooth, monotonically decreasing frequency
response. The steepness of the transition is proportional to the filter order, so higher
order Butterworth filters approach the ideal lowpass filter response.

The following figure shows the response of a lowpass Butterworth filter. In the figure,
the sampling frequency is normalized to 1.0, and the cutoff frequency is 0.25.

© National Instruments 141


NI-SCOPE

Impulse Magnitude and Phase Response Versus Frequency for a Lowpass


Butterworth Filter

Chebyshev Filters

NI-SCOPE supports the following attributes for configuring Chebyshev filters:

• Measurement Filter Type—lowpass, highpass, bandpass, bandstop


• Measurement Filter Order
• Measurement Passband Filter Ripple in dB
• Measurement Transient Waveform Percent

These attributes minimize peak error in the passband by setting the maximum
allowable absolute value of the difference between the ideal filter and the filter
response you want (the maximum tolerable error in the passband). Chebyshev filters
have an equiripple magnitude response in the passband, monotonically decreasing
magnitude response in the stopband, and a sharper rolloff than Butterworth filters.
The cutoff frequency for Chebyshev filters is defined as the end of the passband. For
example, if you specify a lowpass filter with 1 dB ripple, the passband response from
0 Hz to the cutoff frequency will have 1 dB ripple. At the cutoff frequency, the response
will be 1 dB down, and it is monotonically decreasing above the cutoff frequency.

The following figure shows the response of a lowpass Chebyshev filter. Notice that the
equiripple response in the passband is constrained by the maximum tolerable ripple

142 ni.com
NI-SCOPE

error and that the sharp rolloff appears in the stopband. The advantage of Chebyshev
filters over Butterworth filters is that Chebyshev filters have a sharper transition
between the passband and the stopband with a lower order filter, which produces
smaller absolute errors and higher execution speeds.

Impulse Magnitude and Phase Response Versus Frequency for a Lowpass Chebyshev
Filter

Bessel Filters

NI-SCOPE supports the following attributes for configuring Bessel filters:

• Measurement Filter Type—lowpass, highpass, bandpass, bandstop


• Measurement Filter Order
• Measurement Transient Waveform Percent

You can use Bessel filters to reduce nonlinear phase distortion inherent in all IIR filters.
In higher order filters and those with a steeper rolloff, this condition is more
pronounced, especially in the transition regions of the filters. Bessel filters have
maximally flat response in both magnitude and phase. Furthermore, the phase
response in the passband of Bessel filters, which is the region of interest, is nearly
linear. Like Butterworth filters, Bessel filters require high-order filters to minimize the
error and, for this reason, are not widely used. You can also obtain linear phase
response using FIR filter designs. The following figure shows a plot of the response of a

© National Instruments 143


NI-SCOPE

lowpass Bessel filter with a sampling frequency normalized to 1.0 and a cutoff
frequency of 0.25. Notice that the response is smooth at all frequencies, as well as
monotonically decreasing in both magnitude and phase. In addition, notice that the
phase in the passband is nearly linear. For Bessel filters, the cutoff frequency specifies
the passband, or the region of linear phase response.

Bessel filters have a distinct advantage in the time domain because they exhibit small
transient aberrations.

FIR Filters

Finite impulse response (FIR) filters are digital filters that have a finite impulse
response. FIR filters are also known as nonrecursive filters, convolution filters, or
moving-average (MA) filters because you can express the output of a FIR filter as a
finite convolution:

where x represents the input sequence to be filtered, y represents the output filtered
sequence, and h represents the FIR filter coefficients.

144 ni.com
NI-SCOPE

The most important characteristics of FIR filters are the following:

• They can achieve linear phase because of filter coefficient symmetry in the
realization.
• They are always stable.
• The filtering function is performed using the convolution and, as such, generally
allows associating a delay with the output sequence of (n-1)/2, where n is the
number of filter coefficients or filter taps.

The simplest method for designing linear-phase FIR filters is the window design
method. To design a FIR filter by windowing, you start with an ideal frequency
response, calculate its impulse response, and then truncate the impulse response to
produce a finite number of coefficients. The truncation of the ideal impulse response
results in the effect known as the Gibbs phenomenon—oscillatory behavior near
abrupt transitions (cutoff frequencies) in the FIR filter frequency response.

You can reduce the effects of the Gibbs phenomenon by smoothing the truncation of
the ideal impulse response using a smoothing window. By tapering the FIR coefficients
at each end, you can diminish the height of the side lobes in the frequency response.
This method widens the main lobe, however, resulting in a wider transition region at
the cutoff frequencies. The selection of a window function, then, is similar to the
choice between Chebyshev and Butterworth IIR filters in that it is a trade-off between
side lobe levels near the cutoff frequencies and width of the transition region.

Related concepts:

• Types of FIR Filters in NI-SCOPE


• IIR Filters
• Digital Filtering

Types of FIR Filters in NI-SCOPE

NI-SCOPE supports the following attributes for configuring FIR filters:

• Measurement Filter Type—lowpass, highpass, bandpass, bandstop


• Measurement Filter Taps
• Measurement Filter Window—none, Hanning, Hamming, Triangle, Flat Top, or
Blackman

© National Instruments 145


NI-SCOPE

The window type you choose affects the data you acquire. In the following figure, a FIR
Filter with a Hanning response window is applied to a signal.

In the following figure, a FIR filter with no window is applied to the same signal, which
has been normalized to 1.0 with a cutoff frequency of 0.25.

Related concepts:

• FIR Filters
• Digital Filtering

146 ni.com
NI-SCOPE

FIR No Window Responses

The figure shows the impulse response magnitude and phase response versus
frequency for a lowpass windowed FIR filter, where the sampling frequency is
normalized to 1.0 and the cutoff frequency is 0.25.

No Window

FIR Hamming Window Responses

The figure shows the impulse response magnitude and phase response versus
frequency for a lowpass Hamming windowed FIR filter, where the sampling frequency
is normalized to 1.0 and the cutoff frequency is 0.25.

© National Instruments 147


NI-SCOPE

Hamming Window

FIR Triangle Window Responses

The figure shows the impulse response magnitude and phase response versus
frequency for a lowpass Triangle windowed FIR filter, where the sampling frequency is
normalized to 1.0 and the cutoff frequency is 0.25.

Triangle Window

148 ni.com
NI-SCOPE

FIR Flat Top Window Responses

The figure shows the impulse response magnitude and phase response versus
frequency for a lowpass Flat Top windowed FIR filter, where the sampling frequency is
normalized to 1.0 and the cutoff frequency is 0.25.

Flat Top Window

FIR Blackman Window Responses

The figure shows the impulse response magnitude and phase response versus
frequency for a lowpass Blackman windowed FIR filter, where the sampling frequency
is normalized to 1.0 and the cutoff frequency is 0.25.

© National Instruments 149


NI-SCOPE

Blackman Window

150 ni.com
NI-SCOPE

Integration and System Considerations


This section contains information about integrating digitizers into a PXI/PXIe or PCI
based measurement system.

PXI/PXIe Chassis Cooling

Not all PXI or PXI Express chassis provide the same cooling. When selecting a PXI or PXI
Express chassis, consideration should be given to providing adequate airflow.

NI PXI and PXI Express devices are high-precision instruments and may be sensitive to
interference from other electronic devices. To optimize the accuracy and performance
of the device, you may need to locate the device in a slot away from devices with
power supplies and other noisy circuitry. The device may also be sensitive to heat
generated by high-power products in neighboring slots. When possible, consider
locating the device away from high-power devices to optimize cooling.

For more information on cooling, refer to the Maintain Forced-Air Cooling note that
shipped with the device.

PXI Express Topology

PXI Express uses PCI Express signaling and protocols for communication. A PCI Express
system topology includes several different types of components:

• Root Complex—The root complex is the base of the PCI Express hierarchy that
connects the CPU and system memory to PCI Express I/O.
• Switch—A switch routes transactions among multiple PCI Express devices, other
switches and the root complex. PCI Express communication is always point-to-
point. A device communicates to a single switch. The switch then passes on the
data to another switch, another PCI Express device, or the root complex.
• Endpoint—An endpoint is a device that performs an I/O function, such as a PXI
Express module.

© National Instruments 151


NI-SCOPE

The following diagram shows an example PCI Express system.

Root Complex CPU/Memory

Switch Endpoint

Switch Endpoint

Endpoint Endpoint

Links, Lanes and Training

• Link—A link is a communication connection between two PCI Express elements.


For example, a switch and an endpoint can form a link. A link consists of one or
more lanes.
• Lane—A lane is a single transmit/receive pair connection between two PCI Express
elements. Two devices can communicate data in both directions on a lane at the
same time.

The following figure illustrates a link between two devices consisting of 4 lanes.

“Lane” “Link”

Device A Device B

The number of lanes in a link is denoted as xn, where n is a number. All PCI Express
devices must support x1 links. PCI Express devices may also support links of x2, x4, x8,
x12, x16, and x32.

152 ni.com
NI-SCOPE

The data transfers on a lane can occur at 2.5 Gb/s or 5.0 Gb/s.

During initialization, the two devices of a link must negotiate the lane width and
signaling speed that will be used for the link. This process is called link training. All
devices must support x1 lane widths and 2.5 Gb/s signaling.

Performance

The actual throughput for a given system will be less due to protocol overhead, system
topology, data transfers between other devices in the system, and other components
in the system.

Transfers between an I/O device and host memory usually travel through several PCIe
links. Data transfer performance depends on the performance of each link. For
example, if a PXI chassis is controlled with a x1 MXI Express link, the throughput to
system memory may be limited by the x1 link.

As another example, consider an NI PXIe-1065 chassis. In this chassis, slots 7 and 8


support x4 PXI Express devices. Slots 7 and 8 each have a direct x4 PCIe path to the PXI
controller. Slots 9–14 also support x4 PXI Express devices. However, data transfers for
all of these slots (as well as PXI transfers for slots 15–18) all travel through a PCI
Express switch on the backplane before transferring to the PXI controller. So all devices
in slots 9–18 share the bandwidth available on the link between the backplane switch
and the PXI controller.

PXI Modules

PCI eXtensions for Instrumentation (PXI) modular instrumentation delivers a PC-based,


standardized, high-performance measurement and automation system. PXI combines
the high-speed PCI bus with integrated timing and triggering designed specifically for
measurement and automation applications to deliver significant performance
improvements over older architectures. For an overview of the PXI Specification, refer
to PXI Specification Tutorial.

The following figure shows a typical PXI chassis installation.

© National Instruments 153


NI-SCOPE

NI
PX
I-1
04
2

Chassis Guidelines

NI PXI digitizers can be installed in the following chassis and slots:

• PXI chassis—PXI modules can be installed in any peripheral slot of a PXI chassis.
• PXI Express chassis—PXI devices can be installed in the following PXI Express
chassis slots:
◦ PXI-1 slots—Accepts all PXI modules
◦ PXI hybrid slots—Accepts all PXI modules that are hybrid slot-compatible or
PXI Express modules
◦ PXI Express slots—Accepts PXI Express modules

Using PXI-Compatible Products with Standard CompactPCI Products

The ability to use PXI-compatible products with standard CompactPCI products is an


important feature provided by the PXI Specification, revision 2.1. If you use a PXI-
compatible plug-in device in a standard CompactPCI chassis, you cannot use PXI-
specific functions, but you can still use the basic plug-in device functions. For example,
the PXI trigger bus on NI signal generators is available in a PXI chassis but not in a
CompactPCI chassis. The CompactPCI specification permits vendors to develop sub-

154 ni.com
NI-SCOPE

buses that co-exist with the basic PCI interface on the CompactPCI bus. Compatible
operation is not guaranteed between CompactPCI devices with different sub-buses nor
between CompactPCI devices with sub-buses and PXI. The standard implementation
for CompactPCI does not include these sub-buses. NI signal generators work in any
standard CompactPCI chassis. PXI-specific features, such as PXI_Trig bus and
PXI_CLK10 reference are implemented on the J2 connector of the CompactPCI bus.

Related concepts:

• PXI Star Trigger Line

PXI Express Modules

The PXI Express Specification integrates PCI Express signaling into the PXI standard,
which increases backplane bandwidth and enhances PXI timing and synchronization
features by incorporating a 100 MHz differential reference clock and differential
triggers. The PXI Express Specification adds these features to PXI while maintaining
backward compatibility. For an overview of the PXI Express specification, refer to PXI
Express Specification Tutorial.

The following figure shows a typical PXI Express chassis installation.

© National Instruments 155


NI-SCOPE

NI
PX
Ie-
10
62
Q

Chassis Guidelines

NI PXI Express modules can be installed in the following PXI Express chassis slots:

• PXI hybrid slots—Accepts all PXI modules that are hybrid slot-compatible or PXI
Express modules
• PXI Express slots—Accepts PXI Express modules

Note Refer to the documentation for your PXI Express chassis for more
information about installing and configuring PXI Express modules.

Related information:

• PXI Express Specification Tutorial

PXI Star Trigger Line

156 ni.com
NI-SCOPE

The PXI star trigger is a feature implemented on National Instruments PXI chassis. PXI
chassis have a PXI trigger bus that is linked to all slots in the chassis. In addition, PXI
chassis have a star trigger that is linked to Slot 2. The star trigger is a high-performance
trigger signal that you can use to synchronize all the modules in a chassis. You can also
do this using the normal PXI trigger bus, but the star trigger offers increased
performance, specifically a propagation delay of no more than 5 ns and an
intermodule delay of no more than 1 ns.
Star Triggers
Star Trigger/Peripheral Slot [3]

Local Local Local


System Controller Slot [1]

Bus Bus Bus External

Peripheral Slot [N-1]

Peripheral Slot [N]


Peripheral Slot [3]

Peripheral Slot [4]

Backplane
Interface

Slot 2 of the PXI chassis is optimized for a star trigger controller. If the star trigger is not
required, you can use Slot 2 as a standard peripheral slot. The trigger signal generated
by a controller can then be accessed by the other modules through the backplane. The
star trigger controller in Slot 2 of the PXI chassis can route triggers among peripheral
slots with very low skew (within 1 nanosecond).

To use a star trigger, the digitizer must be in a PXI form factor.

All NI digitizers can receive triggers from the PXI star trigger line, which means that if
another instrument is driving the PXI star trigger from Slot 2 of the PXI chassis, the NI
digitizer can receive this trigger signal from another slot. NI digitizers cannot drive the
PXI star trigger line from Slot 2. Therefore, if you want to generate a trigger on the star
trigger line with a master in Slot 2, this master cannot be an NI digitizer.

PXI Trigger Lines

Eight PXI bused trigger lines are highly flexible and can be used in a variety of ways. For
example, triggers can be used to synchronize the operation of several different PXI

© National Instruments 157


NI-SCOPE

peripheral modules. In other applications, one module can control carefully timed
sequences of operations performed on other modules in the system. Triggers may be
passed from one module to another, allowing precisely timed responses to
asynchronous external events that are being monitored or controlled. The number of
triggers that a particular application requires varies with the complexity and number
of events involved.
PXI_Trigger Bus
PXI Backplane
Star Trigger/Peripheral Slot [2]
System Controller [1]

Peripheral Slot [N-1]

Peripheral Slot [N]


Peripheral Slot [3]

Peripheral Slot [4]

The PXI Specification is implemented with the RTSI bus through the PXI trigger lines.
PXI Specification requires 8 lines, PXI_TRIGGER[0:7], on the P2/J2 connector of the PXI
chassis for the trigger lines. The RTSI features of the NI Source hardware is
implemented on this sub-bus. The RTSI trigger [0..6] is implemented on
PXI_TRIGGER[0:6], and the RTSI clock is routed on PXI_TRIGGER(7).

System Reference Clock (PXI_CLK10)

The PXI chassis supplies the PXI 10 MHz system clock signal (PXI_CLK10)
independently to each peripheral slot. An independent buffer drives the clock signal to
each peripheral slot. The buffer has a source impedance matched to the backplane
and a skew ranging from less than 1 ns to more than 250 ps between slots. You can use
this common reference clock signal to synchronize multiple modules in a
measurement or control system. You can drive PXI_CLK10 from an external source
through the PXI_CLK10_IN pin on the P2 connector of the star trigger slot. Sourcing an
external clock on this pin automatically disables the backplane's 10 MHz source. You
can synchronize multiple chassis that have connectors on the back panel for 10 MHz

158 ni.com
NI-SCOPE

Reference In and 10 MHz Reference Out. Refer to your PXI chassis documentation for
more information.

Related concepts:

• Impedance and Impedance Matching

PFI Lines

PFI lines are multipurpose programmable function input/outputs. These lines serve as
connections to virtually all internal timing signals. Many NI high-speed digitizers have
two or more digital lines that can import a trigger, import or export a reference clock,
or output various signals.

The function of each PFI line is independent. However, only one trigger source can be
imported during acquisition.

Notice If you enable a PFI line for output, do not connect any external
signal source to it; doing so can damage the device, the computer, and the
connected equipment.

MXI Optimization Application

MXI-3

If you are using the MXI-3 interface to control the PXI chassis, the MXI-3 Optimization
Application must be run prior to using the NI high-speed digitizer. By default, this
application runs automatically when Windows starts. If you have an initialization,
timeout, or performance issue with your module, or if you are not certain that the
application ran, select Start»Programs»National Instruments MXI-3»MXI-3
Optimization to run the application. If you continue to have initialization or
performance issues, refer to the MXI-3 documentation at Start»Programs»National
Instruments MXI-3, or visit NI Technical Support at ni.com/support.

© National Instruments 159


NI-SCOPE

MXI-4 and MXI-Express Optimization

Optimization for MXI-4 and MXI Express are performed automatically by the hardware.

RTSI Bus

RTSI stands for Real-Time System Integration. It is a bus found on many National
Instruments devices that, when cabled together with a RTSI cable, is used to share and
exchange timing and control signals between multiple boards. It is usually used for
synchronization purposes.

The RTSI bus cables are short, 34-conductor ribbon cables equipped with two to five
connectors to link together a group of boards. The cable options include connections
for two, three, four, and five boards, plus an extended cable length to connect up to
five long and short boards. The following figure shows an example of an extended five-
board cable setup.

PFI Lines

PFI lines are multipurpose programmable function input/outputs. These lines serve as
connections to virtually all internal timing signals. Many NI high-speed digitizers have
two or more digital lines that can import a trigger, import or export a reference clock,

160 ni.com
NI-SCOPE

or output various signals.

The function of each PFI line is independent. However, only one trigger source can be
imported during acquisition.

Notice If you enable a PFI line for output, do not connect any external
signal source to it; doing so can damage the device, the computer, and the
connected equipment.

© National Instruments 161


NI-SCOPE

NI-SCOPE Soft Front Panel and


InstrumentStudio
October 2018

When you install NI‑SCOPE on a 64‑bit system, you can monitor, control, and record
measurements from supported devices using InstrumentStudio. InstrumentStudio is a
software-based front panel application that allows you to perform interactive
measurements on several different device types, including oscilloscopes, in a single
program.

Note InstrumentStudio support was first available in NI‑SCOPE 18.1.


InstrumentStudio is supported only on 64‑bit systems. If you are using a
32‑bit system, use the NI‑SCOPE Soft Front Panel.

InstrumentStudio is automatically installed when you install the NI‑SCOPE driver. You
can access InstrumentStudio in one of the following ways:


• From the Windows start menu, select National Instruments»NI‑SCOPE Soft Front
Panel. This launches InstrumentStudio and runs a soft front panel populated with
NI‑SCOPE devices.
• From the Windows start menu, select National Instruments»InstrumentStudio
[year]. This launches InstrumentStudio and runs a soft front panel populated with
devices detected on your system.
• From Measurement & Automation Explorer (MAX), select a device and then click
Test Panels.... This launches InstrumentStudio and runs a soft front panel for the
device you selected.

For more information on using InstrumentStudio, refer to the InstrumentStudio


Manual.

© 2001–2018 National Instruments Corporation. All rights reserved.

162 ni.com
NI-SCOPE

Related concepts:

• NI-SCOPE 32-Bit Soft Front Panel Help

Related information:

• InstrumentStudio

NI-SCOPE 32-Bit Soft Front Panel Help

This help file contains information about using the 32‑bit NI-SCOPE Soft Front Panel
(SFP) to interactively control your NI high-speed digitizer. For information about
developing applications, refer to NI High-Speed Digitizers Help»Programming.

Note The information in this help file is relevant only to the NI-SCOPE SFP
that launches in NI-SCOPE 18.0 and earlier or that, beginning with NI-SCOPE
18.1, launches on 32‑bit systems. For information on InstrumentStudio, a
software-based front panel application for 64‑bit systems that was first
available in NI-SCOPE 18.1, refer to NI-SCOPE Soft Front Panel and
InstrumentStudio.

Similar to stand-alone oscilloscopes, the SFP acquires, controls, analyzes, and


presents data. Unlike bench-top instruments, however, you can use the SFP to view
and control waveforms directly from your computer. You can also run multiple
sessions of the SFP simultaneously.

The SFP provides the following functionality:

• Easily observe and control signal


• Debug a device
• Load/store waveforms
• Load/store device-specific configurations
• Make scalar measurements
• Use NI-SCOPE utilities such as Auto-Setup and Self-Calibration

© National Instruments 163


NI-SCOPE

Note Most features of the SFP are documented in the SFP context help. You
can view the context help for a SFP element by hovering the cursor over the
element you want more information about. If the context help window does
not appear, press <Ctrl-H> to activate the context help, or select Help»Show
Context Help.

Related concepts:

• NI-SCOPE Soft Front Panel and InstrumentStudio

Accessing the NI-SCOPE Soft Front Panel

You can access the SFP two ways:

• Launch the SFP by selecting Start»All Programs»National Instruments»NI-


SCOPE»SCOPE Soft Front Panel or from NI Launcher in Windows 8.
• Navigate to <IVIROOTDIR32>\Drivers\niScope\NI-SCOPE Soft
Front Panel.exe. <IVIROOTDIR32> is an alias to a specific National
Instruments file folder location. Refer to the NI-SCOPE Readme for more
information about installed file locations.

Selecting or Simulating a Device

You must either connect to or simulate a device to use the SFP. If you have already
registered an active device or simulated a device in Measurement & Automation
Explorer (MAX), you can choose from a list of available devices.

If you do not have any active digitizers registered in MAX, the SFP will prompt you to
simulate a device. Choose the Model Number and Bus Type of the device you want to
simulate, then select the amount of Noise (%) to simulate. The SFP will simulate data
acquired from the type of digitizer you have chosen.

Note Monitoring or controlling a simulated device may result in unexpected


data.

164 ni.com
NI-SCOPE

Important SFP Elements

The SFP is designed to look similar to the front panel of a desktop instrument.
However, some functionality of the SFP is fundamentally different from that of a box
oscilloscope.

• The SFP does not generate data.


• The SFP configures a connected or simulated device and acquires, analyzes, and
presents data from that device.
• The SFP can control a device in use by another application during a Debug Driver
session.

The following buttons control the connection and data acquisition of your device.

The Pause button pauses the acquisition. The device is still connected to the SFP, but
other programs are not able to acquire data from the device. The Pause button
becomes the Run button while the acquisition is paused.

The Run button resumes a paused acquisition. It also prompts you to select a new
device if you have released a previous session with a device.

The Single button runs one acquisition.

The Off button stops the acquisition. When stopped, all drivers are unloaded. Select
the Run button to resume an acquisition.

© National Instruments 165


NI-SCOPE

The Auto button automatically configures the device. The device recognizes the input
signal and automatically configures many instrument settings.

The Prop button opens a dialog box and displays all properties available in a session.

Control Tabs

The control tabs on the SFP are similar to the soft buttons on a box oscilloscope. The
control tabs are, from left to right: Channel Settings (CHAN), Trigger Settings (TRIG),
Horizontal Settings (HORIZ), Measurement Settings (MEAS), Cursor Settings (CURS),
and Display Settings (DISP). The Trigger Settings tab is active by default.

Related concepts:

• Monitoring a Device
• Sharing Control of a Device

Debug Driver Session in the Soft Front Panel

In a Debug Driver session, you can monitor or control your device in the Soft Front
Panel (SFP) while the device is being used by another application, such as LabVIEW or
TestStand. Changing device settings in the SFP can help you troubleshoot problems
with your device under test or application.

Note The SFP automatically opens in a Debug Driver session for a device
that is In Use.

Example

You want to change the device settings based on unexpected results from your
application. You immediately pause the application where you suspect an error, start

166 ni.com
NI-SCOPE

the SFP and choose the device for which you want to change settings. You can change
device settings, then resume your application with the new settings.

Related Topics

Sharing Control of a Device

Monitoring a Device

Related concepts:

• Monitoring a Device

Debug Driver Session Model

The following figure shows a diagram of a typical Debug Driver session.

Your
SFP
Application

Debug Driver

Device

Debugging a Device in the SFP While in Use by Another Application

You can monitor or control your device in the SFP when the device is in use by other
applications, such as LabVIEW or TestStand. Select Debug Driver Session (Monitor)
from the pull-down menu to view data and device settings. Most SFP controls are
disabled because the SFP is read-only when Debug Driver Session (Monitor) is
selected. You cannot make changes in the SFP that will affect your device or
application in this mode.

Select Debug Driver Session (Control) from the pull-down menu if you want to change
device settings. The SFP is read-write when Debug Driver Session (Control) is
selected. Controls are enabled and you have full access to your device. To relinquish

© National Instruments 167


NI-SCOPE

control, select Debug Driver Session (Monitor) or resume execution of your


application.

Related Topics

Sharing Control of a Device

Monitoring a Device

Related concepts:

• Monitoring a Device

Sharing Control of a Device

You can debug your device by sharing a device between the SFP and another
application.

Controlling a Device in Use by LabVIEW

Complete the following steps to share control between the SFP and LabVIEW:

1. Transfer control of the device from LabVIEW to the SFP.


a. Create a probe on a niScope session wire at a point where you suspect device
setting errors. For more information about probes, refer to LabVIEW
documentation.
b. Select Debug in Soft Front Panel from the Probe Watch Window.
c. Leave the Probe Watch Window open, and run your code. Code execution
pauses at the probe, and the SFP opens with Debug Driver Session (Control)
selected.
2. Change the device settings in the SFP manually.
3. Select Debug Driver Session (Monitor) from the pull-down menu, or close the SFP.
Control of the device is given back to LabVIEW.
4. Apply your changed device settings to your LabVIEW application, or revert your
changes in the Scope Session Changes dialog box before closing the SFP.

Tip Select Show Changes in the Debug Session Changes dialog box to
display a log of device setting changes made during the Debug Driver

168 ni.com
NI-SCOPE

session. Select Generate VI in the dialog box to create a VI of the device


setting changes you made during the session.

5. (Optional) Continue using your device in your LabVIEW application, with your new
device settings.

Controlling a Device in Use by CVI, TestStand, or Another Application

Complete the following steps to share control between the SFP and CVI, TestStand, or
another application:

1. Pause the external application that is using your device.


2. Launch the SFP.
3. Select Debug Driver Session (Control) from the pull-down menu in the SFP.
4. Change the device settings in the SFP manually.
5. Select Debug Driver Session (Monitor) from the pull-down menu, or close the SFP.
Control of the device is given back to your application.
6. Apply your changed device settings to your application, or revert your changes in
the Scope Session Changes dialog box before closing the SFP.

Tip Select Show Changes in the Debug Session Changes dialog box to
display a log of device setting changes made during the Debug Driver
session. Select Export as Text to document the changes.

7. (Optional) Continue using your device in the other application, with your new
device settings.

Monitoring a Device

You can monitor a device with LabVIEW, CVI, TestStand, or your application in the SFP
to troubleshoot problems with your device under test or application. View data and
device settings by sharing your device between the SFP and your application.

Complete the following steps to monitor a device with the SFP:

1. Launch the SFP.

© National Instruments 169


NI-SCOPE

Tip You can launch the SFP from the Windows Start menu, the Tools
menu in LabVIEW, or from your device listed under Devices and
Interfaces in the MAX configuration tree.

2. Select an In Use device that you want to monitor with the SFP. Debug Driver
Session (Monitor) is selected from the pull-down menu.
3. When you finish monitoring the device, close the SFP.

Troubleshooting a Debug Session in the SFP

Complete the following to correct common issues you might encounter while
debugging your device.

Why did I lose control of the device in the SFP?

Your application made a call to the NI-SCOPE driver. Pause your external application
and select Debug Driver Session (Control) from the pull-down menu, or ensure that
the application does not fetch data or access the device.

How do I debug my C application? I get an error when I debug my C


application.

From the SFP, select Utility»Configure Debug Session»Using Breakpoints in C/


C++/.NET? to debug your C application.

Why is my performance slow?

Supporting communication with your device in C/C++/.NET environments at


breakpoints requires additional overhead that affects performance.

Selecting Using Breakpoints in C/C++/.NET? may cause a slight performance impact.


When you complete debugging your C application, deselect Using Breakpoints in C/
C++/.NET? in the SFP. Restart your application to implement the changes.

Why can't I select a device that is "In Use"?

The SFP is currently monitoring or controlling a shared device session, or the device

170 ni.com
NI-SCOPE

does not support debugging. Verify that no external applications are currently
accessing the device.

How do I enable/disable my device for a Debug Session?

Complete the following steps in the SFP to ensure the device is enabled for Debug
Session mode (the default value is enabled).

1. Select Utility»Configure Debug Session and click the device in use.


2. Select Enabled in the Debug Session Configure dialog box.
3. (Optional) Select Using Breakpoints in C/C++/.NET? if you are setting breakpoints
in a C/C++/.NET application.

Saving Waveform Data

Select File»Save Data to open the File Save dialog.

Waveform data can be saved in three file formats: hierarchical waveform storage
(*.hws) data file, LabVIEW Measurement (*.lvm) data file, and flat binary (*.bin).
Waveforms saved with the NI-SCOPE Soft Front Panel can be generated using an NI
arbitrary waveform generator and the NI-FGEN Soft Front Panel.

Shortcut:

<Ctrl–S>

Related concepts:

• Hierarchical Waveform Storage Data File (.hws)


• LabVIEW Measurement Data File (.lvm)
• Binary Waveform Data Format (.bin)

Hierarchical Waveform Storage Data File (.hws)

Hierarchical Waveform Storage Data File (.hws) format is based on the HDF5 file
format, which is a widely used and efficient file format for storing scientific and
engineering data such as images, vector arrays, and structured and unstructured grids.

© National Instruments 171


NI-SCOPE

For more information about HDF5, refer to the HDF Group web site at
http://www.hdfgroup.org/HDF5/.

HWS is the file type of choice due to its flexibility. It is capable of saving device
configuration settings as well as multiple channels of waveform data, measurements,
and associated header information. HWS also offers compression options, making this
format the best choice for very large or multiple data records.

LabVIEW Measurement Data File (.lvm)

The LabVIEW Measurement (.lvm) format is a text-based file format for one-
dimensional data that you can use with the Read LabVIEW Measurement File and Write
LabVIEW Measurement File Express VIs.

The .lvm format is easy to parse and easy to read when imported into a spreadsheet
program such as Microsoft Excel, or a text editor such as Notepad. The .lvm format
supports multiple data sets, grouping of data sets, and the addition of data sets to
existing files.

This file format is not designed for high-performance or for very large data sets, as is
the case with all text-based formats.

Note For very large data sets, use the HWS or binary file formats.

For more information on the .lvm file format, refer to the Specification for the
LabVIEW Measurement File.

Related concepts:

• Hierarchical Waveform Storage Data File (.hws)


• Binary Waveform Data Format (.bin)

Binary Waveform Data Format (.bin)

The NI-SCOPE Soft Front Panel can save data in a binary file that conforms to the
following specifications:

172 ni.com
NI-SCOPE

• File extension—.bin
• File header—none
• Data—Data are stored as a continuous single stream. The creator of the file must
remember the data type the data were stored in. Data can be imported in 8-, 16-, or
32-bit binary, and can be little or big endian format.

Binary files save only one channel of data and offer advanced options for byte format.
Associated header information is saved in a separate text file with the same name.

Saving Configuration Settings

Configuration settings are saved in three ways: automatically upon stopping or closing
the SFP, using the File»Save Configuration option, and when saving data in HWS file
format.

The SFP always saves your device configuration settings upon release of a session or
closing of the SFP. If the SFP detects the same device using the same resource
descriptor (set in MAX) upon reopening, it loads the previous configuration settings. If
you are using a different type of device, the SFP configures your acquisition
automatically using the Autosetup function.

To save your configuration settings, select File»Save Configuration. Enter the name of
your configuration file or select an existing configuration file and click Save.

Note Several configurations can be saved in one configuration file. Internal


to the saved file, each configuration is distinguished by an indexed unique
group name. As such, you can have two configurations with the same label in
the same file. The same label will not overwrite a previous configuration.

Enter any additional information you would like to add in the fields provided. Click OK
to add your current configuration to the selected file.

Configuration settings can also be saved along with waveform data.

Related concepts:

• Hierarchical Waveform Storage Data File (.hws)

© National Instruments 173


NI-SCOPE

• Saving Waveform Data

Backing Store

Backing store is a feature that stores the current waveform on the NI-SCOPE Soft Front
Panel in RAM. During normal operation, the NI-SCOPE SFP gets the data from the
digitizer, decimates and scales it for display, displays it, then discards it. This process
saves time and memory, especially when working with large data sets. With large data
sets, the data is never all in memory at one time, because it is read from the digitizer in
chunks and decimated in chunks. The NI-SCOPE SFP scales this decimated data. The
disadvantage of this process is that you must wait for an acquisition to finish before
you get data that you can save. If you have a signal on the NI-SCOPE SFP that you want
to save, you may not be able to do so unless the acquisition is currently paused,
depending on the length of the waveform.

To save a waveform, the NI-SCOPE SFP copies chunks of data from the digitizer directly
to disk, which prevents a memory hit. If your acquisition is in progress, the data that is
currently displayed is lost, and you must wait until the acquisition is complete before
saving data. Using single-shot mode is usually recommended if you want to save the
displayed data. When the digitizer pauses, the data is preserved because another
acquisition is not initiated. If backing store is enabled, the current waveform is stored
in memory and you can save at any time.

Backing store is enabled by default. If you are using an older computer, however, you
may experience reduced performance and higher memory requirements. Disabling
backing store may solve these problems.

Keyboard Shortcuts

Note Shortcuts for controls grouped under a Control Tab are only usable
while their Control Tab is active.

Shortcut Description
<G>, <R>, <Shift–G>, <Shift–R> Run
<P>, <Shift–P> Pause

174 ni.com
NI-SCOPE

Shortcut Description
<G>, <R> Resume
<ESC>, <Q>, <Shift–Q> Stop
<Shift–X>, <X>, <Ctrl–Q>, <Alt–F4> Exit
<A>, <Shift–A> Auto setup
<1> Trigger a single-shot acquisition
<)> (usually Shift–0) Set left channel selector to channel 0
<!> (usually Shift–1) Set left channel selector to channel 1
<#> (usually Shift–3) Set left channel selector to channel 2 (if available)
<$> (usually Shift–4) Set left channel selector to channel 3 (if available)
<Ctrl–)> (usually Ctrl–Shift–0) Set right channel selector to channel 0
<Ctrl–!> (usually Ctrl–Shift–1) Set right channel selector to channel 1
<Ctrl–#> (usually Ctrl–Shift–3) Set right channel selector to channel 2 (if available)
<Ctrl–$> (usually Ctrl–Shift–4) Set right channel selector to channel 3 (if available)
<Ctrl–D> Enable/Disable the left channel
<Ctrl–Shift–D> Enable/Disable the right channel
<Ctrl–up arrow> Decrease volts per division on the left channel
<Ctrl–down arrow> Increase volts per division on the left channel
<Ctrl–Shift–up arrow> Decrease volts per division on the right channel
<Ctrl–Shift–down arrow> Increase volts per division on the right channel
<Ctrl–A> Increment coupling on left channel
<Shift–Ctrl–A> Increment coupling on right channel
<Up arrow> Increase left channel software offset
<Down arrow> Decrease left channel software offset
<Shift–up arrow> Increase right channel software offset
<Shift–down arrow> Decrease right channel software offset
<Shift–up arrow> Increase vertical position slider
<Shift–down arrow> Decrease vertical position slider

© National Instruments 175


NI-SCOPE

Shortcut Description
<Ctrl–M> Launch measurement window
<Ctrl–D> Launch device configuration window
<Ctrl–left arrow> Decrease horizontal range
<Ctrl–right arrow> Increase horizontal range
<F2> Change reference position to 10%
<F3> Change reference position to 50%
<F4> Change reference position to 90%
<Shift–right arrow> Increase reference (trigger) position slider
<Shift–left arrow> Decrease reference (trigger) position slider
<Y> Increment acquisition type
<Shift–Y> Decrement acquisition type
<Ctrl–E> Display error info
<Ctrl–O> Turn on/off probe compensation
<Ctrl–T> Turn on/off trigger cursor
<Ctrl–Shift–S> Run self–calibration
<Ctrl–P> Print window
<Ctrl–X> Cut
<Ctrl–V> Paste
<Ctrl–H> Show context help
<Ctrl–S> Save waveform data
<E> Increment EXT coupling
<Shift-E> Decrement EXT coupling
<C> Toggle Cursors
<F1>, <Ctrl–?> Contents and index
Trigger Settings (TRIG) Control Tab
<S> Increment trigger source
<Shift–S> Decrement trigger source

176 ni.com
NI-SCOPE

Shortcut Description
<T> Increment trigger type
<Shift–T> Decrement trigger type
<U> Increment trigger coupling
<Shift–U> Decrement trigger coupling
<L> Increment trigger slope
<Shift–L> Decrement trigger slope
<M> Increment trigger mode
<Shift–M> Decrement trigger mode
<W> Increment trigger window mode
<Shift–W> Decrement trigger window mode
<Ctrl–W> Increment trigger delay
<Ctrl–Shift–W> Decrement trigger delay
<PgUp> Increment trigger level/low level
<PgDwn> Decrement trigger level/low level
<Shift–PgUp> Increment trigger hysteresis/high level
<Shift–PgDwn> Decrement trigger hysteresis/high level
<V> Increment TV event
<Shift-V> Decrement TV event
<O> Increment TV polarity
<Shift-O> Decrement TV polarity
<N> Increment TV line number
<Shift-N> Decrement TV line number
<F> Increment TV signal format
<Shift–F> Decrement TV signal format
<Ctrl–R> Toggle TV DC Restore
Horizontal Settings (HORIZ) Control Tab
<Z> Enable zoom

© National Instruments 177


NI-SCOPE

Shortcut Description
Display Settings (DISP) Control Tab
<Ctrl–M> Toggle show/hide measurement/cursor data
<Ctrl–C> Toggle show/hide configuration data
<H> Hide all data

178 ni.com
NI-SCOPE

Programming
This section contains information on programming NI high-speed digitizers. You can
acquire data with an NI high-speed digitizer either programmatically or interactively.

Programmatically Acquiring Data using NI-SCOPE.


If you want to integrate a digitizer into your test and measurement application, you
can program the device using National Instruments LabVIEW or LabWindows/CVI, C/
C++, or Microsoft Visual Basic.

The following figure illustrates the relationship between your programming


environment, NI‑DAQmx, and the digitizer.

NI-SCOPE Visual Basic/


Soft Front Panel LabVIEW C/C++/C# LabWindows/CVI VB.NET

NI-SCOPE Driver API IVI Engine


IVI Verification

NI-DAQ Driver NI-VISA

NI High-Speed Digitizer

Interactively Acquiring Data with the NI-SCOPE Soft Front Panel


If you are using the digitizer as a general-purpose digitizer, you can use the NI-SCOPE
Soft Front Panel (SFP) to make measurements interactively without writing code. The
NI-SCOPE SFP is a software application for NI high-speed digitizers. The NI-SCOPE SFP
is a full-featured, easy-to-use interface with 40 waveform measurements that you can

© National Instruments 179


NI-SCOPE

use immediately without learning a programming language.

To launch the NI-SCOPE SFP, go to Start»All Programs»National Instruments» NI-


SCOPE»NI-SCOPE Soft Front Panel.

For more information, refer to the NI-SCOPE Soft Front Panel and InstrumentStudio.

Getting Started with NI-SCOPE

NI-SCOPE is both the application programming interface (API) and the instrument
driver that controls your NI high-speed digitizer. NI-SCOPE is included with all NI high-
speed digitizers.

Features

NI-SCOPE has the following features:

• Complies with the IVI-Scope driver class specification


• Handles continuous acquisition and multiple device synchronization
• Seamlessly integrates with National Instruments LabVIEW and LabWindows/CVI, as
well as conventional programming languages such as C/C++ and Visual Basic
• Includes more than 50 built-in measurement and analysis functions
• Processes waveform measurements in software rather than in hardware

The NI-SCOPE driver provides flexibility and programmability in a standard full-


featured instrument driver format.

Examples

To help you get started, NI-SCOPE comes with examples you can use or modify. You
can find shortcuts to the examples for each ADE at Start»All Programs»National
Instruments»NI-SCOPE»Examples.

Related concepts:

• Instrument Drivers

180 ni.com
NI-SCOPE

NI-SCOPE Programming Flow

NI-SCOPE provides the same functionality in two formats:

• In LabVIEW as VIs
• In traditional programming languages as functions

Note If you are new to NI-SCOPE, read Getting Started with NI-SCOPE
(Tutorial) before you read this section.

The following diagram illustrates the basic programming flow for using NI-SCOPE
functions in your own digitizer applications. Click the VIs in the diagram for more
detailed programming information.

For any application you write, you must open a session to establish communication
with the digitizer(s) by using niScope Initialize or niScope Initialize With Options. When
your program finishes, you must close the session with niScope Close.

Initialize functions set the driver and digitizers to a known state. This function may
take a significant amount of time compared to all other NI-SCOPE functions, so you
should not include it in a loop when repeatedly acquiring data. Ideally, your program

© National Instruments 181


NI-SCOPE

should call an Initialize function one time. If the reset device parameter is set to TRUE,
the digitizer resets to the default state, which may include resetting relays and
resetting time stamp counters.

Caution Resetting digitizers may cause wear on the relays, so you should
reset only when necessary.

niScope Close is essential for freeing resources, including deallocating memory,


destroying threads, and freeing operating system resources. You should close every
session that you initialize, even if an error occurs during the program. While debugging
your application, it is common to abort execution before you reach Close. Though
aborting the execution should not cause problems, NI does not recommend doing so.

Examples

All NI-SCOPE examples include niScope Initialize or niScope Initialize With Options,
niScope Close, and Error Message (except for LabVIEW). The Getting Started
example is a good choice to start with if you are inexperienced with NI-SCOPE because
it is the simplest example.

Related concepts:

• NI-SCOPE Tutorial

Acquiring Data with NI High-Speed Digitizers

You can acquire data with an NI high-speed digitizer either programmatically or


interactively.

Programmatically Acquiring Data

If you want to integrate a digitizer into your test and measurement application, you
can program the device using National Instruments LabVIEW or LabWindows/CVI,
Microsoft Visual C++/C#, Microsoft Visual Basic, and Microsoft Visual Basic .NET.

The following figure illustrates the relationship between your programming

182 ni.com
NI-SCOPE

environment, NI‑DAQmx, and the digitizer.

NI-SCOPE Visual Basic/


Soft Front Panel LabVIEW C/C++/C# LabWindows/CVI VB.NET

NI-SCOPE Driver API IVI Engine


IVI Verification

NI-DAQ Driver NI-VISA

NI High-Speed Digitizer

Interactively Acquiring Data

If you are using the digitizer as a general-purpose digitizer, you can use the NI-SCOPE
Soft Front Panel (SFP) to make measurements interactively without writing code. To
launch the NI-SCOPE SFP, select Start»All Programs»National Instruments»NI-
SCOPE»NI-SCOPE Soft Front Panel. For more information, refer to the NI-SCOPE Soft
Front Panel Help.

Related concepts:

• NI-SCOPE Soft Front Panel and InstrumentStudio

Acquisition Functions

Reading versus Fetching

You can acquire data by calling either a Read function or a Fetch function. The Read
functions are the easiest way to acquire data from your digitizer. They initiate an
acquisition, wait for it to complete, and retrieve the data.

Fetch functions assume that the acquisition has already been initiated. Both Read and

© National Instruments 183


NI-SCOPE

Fetch functions accept a timeout parameter and a number of points to retrieve. They
will efficiently sleep while waiting for the number of requested points to be acquired.

Using a Fetch function in conjunction with the acquisition status function allows you to
perform other operations while waiting for the acquisition to finish. When acquisition
status reports the operation is complete, you can call the Fetch function with any
timeout value to retrieve the data.

You must use Fetch functions to acquire binary data because Read functions allow
retrieval of scaled data only. Fetching binary data is faster and requires less user
memory than fetching scaled data.

If you want to use a software trigger to start the acquisition, you must use a Fetch
function because Read functions block until the operation is complete.

Refer to Fetching Data for more information on using Fetch functions.

Reading and Fetching Examples

The Getting Started example uses a Read function. Most examples use Fetch
functions, but the Binary Acq example provides the least complicated source
code. You can find shortcuts to these examples at Start»All Programs»National
Instruments»NI-SCOPE»Examples.

Related concepts:

• Fetching Data

Configuration Functions

Use the Configuration functions to set up your acquisition.

Using these functions, you can set triggers, input impedance, DC offset, vertical range,
sampling rate, and much more. Additionally, NI‑SCOPE can automatically configure
your device settings with the Auto Setup function. Once configured, you can also
export and import device settings between matching models.

184 ni.com
NI-SCOPE

Configuring Different Parameters

You can use the Configuration functions to configure the following settings and
parameters:

• Acquisition type
• Vertical settings
• Horizontal settings
• Configuring triggers

Configuration Example

The Configured Acquisition example demonstrates the Configuration


functions. This example supports most of the functionality of NI-SCOPE, so you can
experiment with the digitizer.

Configuring the Acquisition Type

NI digitizers support different acquisition types. You set the acquisition type with the
niScope Configure Acquisition VI or the niScope_ConfigureAcquisition
function. The different acquisition types change the processing of the data that is
returned. In conventional (or normal) mode, the digitizer acts like a traditional
instrument, measuring voltage waveforms. In PXI/PCI‑5922 flexible resolution mode,
the digitizer uses an advanced averaging algorithm to increase the resolution of data
at lower sample rates.

Note Not all digitizers support flexible resolution mode. Refer to Features
Supported by Device for more information. By default, the acquisition type
parameter is set to normal, and you can omit Configure Acquisition
if you do not want to change the acquisition type.

Related concepts:

• Features Supported by NI-SCOPE Instruments

Configuring the Vertical Settings

© National Instruments 185


NI-SCOPE

Both Configure Vertical and Configure Chan Characteristics affect


settings that may be different for each channel. Therefore, if you have a two-channel
digitizer, you can call each of these functions twice, changing the channel name
parameter between 0 and 1. If you want to set these parameters to the same value for
multiple channels, use a channel list such as 0,1.

With the Configure Vertical function, you can adjust the vertical range,
vertical offset, vertical coupling, and the probe attenuation parameters.

With the Configure Chan Characteristics function, you can adjust the input
impedance and the and the max input frequency parameters.

Related Topics

Configuring the Horizontal Settings

Related concepts:

• Configuring the Horizontal Settings

Using Configure Vertical

The Configure Vertical function is necessary in almost every program because


it allows you to enable a channel. By default, all channels are disabled. To acquire
data, you must enable a channel either with Configure Vertical or a Read
function. As a convenience, Read functions automatically enable the channels passed
into them.

Vertical Range

Configure Vertical adjusts the vertical range for the digitizer. The vertical range
is the full-scale (peak-to-peak) voltage range at the probe or the input to the digitizer.
For example, a 10 V vertical range means the digitizer can measure a signal between
–5 V and 5 V. The signal may be clipped if it exceeds this range, which means the
analog-to-digital converter (ADC) is saturated, so all values above 5 V or below –5 V are
mapped to approximately 5 V or –5 V, respectively. For optimum resolution, choose the
smallest vertical range that completely covers your input signal and avoids clipping.
For example, if your signal is 2 Vpk-pk and your vertical range is 10 Vpk-pk, you are only

186 ni.com
NI-SCOPE

using one-fifth of the range of the ADC. With an 8-bit digitizer, you have 256 unique
voltage levels, but if you only use one-fifth of the range, you only have 51 unique
voltage levels. This results in a noisy signal from the quantization of the ADC.

Vertical Offset

The vertical offset parameter in the Configure Vertical function adjusts the
middle of your vertical range. For example, if you set the vertical offset to 2 V with a
vertical range of 10 V, your signal must be between –3 V and 7 V. Vertical offset allows
you to adjust the range when analyzing signals with a DC offset. By centering the
vertical offset on the DC level of your signal, you can use a smaller vertical range and
optimize the resolution of your measurement.

1.25 V 1.25 V
1V

1V

–1 V
–1.25 V 0.75 V

Offset = 0 V Offset = 1 V
Range = 2.5 V Range = 0.5 V
Resolution = 2.5 V = 10 mV Resolution = 0.5 V = 2 mV
256 256

Note Not all digitizers support using vertical offset. Refer to Features
Supported by Device to determine if your digitizer supports vertical offset.

Vertical Coupling

When you need to measure a small AC signal on top of a large DC component, you can
use AC-coupling by setting the vertical coupling parameter in the Configure
Vertical function. AC-coupling rejects any DC component in your signal before it is
digitized. Activating AC-coupling inserts a capacitor in series with the input.

When you change the vertical range or coupling on the digitizer, the input stage takes
time to settle. When you switch from AC- to DC-coupling, the settling time is about
0.5 ms. When you switch from DC- to AC-coupling, returned data is accurate about 20

© National Instruments 187


NI-SCOPE

time constants after switching to AC. A 1X probe takes about 15 ms, while a 10X probe
takes 150 ms, depending on the digitizer. NI-SCOPE does not provide the delay to
account for settling time; therefore, acquisitions immediately following a coupling
change may yield incorrect data. However, the vertical range and coupling are set
immediately when you call Configure Vertical, so inserting a delay in your
program before calling Initiate Acquisition or a Read function allows time for
the input stage to completely settle.

Note For the NI 5122, the vertical range and coupling are not set when
Configure Vertical is called. Settling delays for a 1X probe are
automatically compensated for in the driver. For other probes that require
longer delays, you can call Commit to switch the coupling immediately.
Then, you can insert the appropriate delay before calling a Read function or
Initiate Acquisition.

Probe Attenuation

Probe attenuation scales your data to compensate for the attenuation of the probe.
The voltage measured by the digitizer is multiplied by the probe attenuation
parameter in the Configure Vertical function. The vertical range parameter is
the voltage range you want after the probe compensation scaling. For example, if your
probe attenuation is 10 and your vertical range is 10 V, the digitizer is set to measure a
1 Vpk-pk signal. The data returned with the Fetch function is 10 Vpk-pk.

Related concepts:

• Features Supported by NI-SCOPE Instruments

Using Configure Chan Characteristics

Using the Configure Chan Characteristics function, you can configure the
less common vertical parameters.

Input Impedance

The input impedance parameter allows you to switch between 50 Ω and 1 MΩ input
impedance, depending on your digitizer. Refer to Features Supported by Device to find

188 ni.com
NI-SCOPE

out the input impedance your digitizer supports. The allowed vertical ranges may vary
depending on the input impedance. If you measure a signal from a 50 Ω output
function generator, set the digitizer for 50 Ω input to match your source. Impedance
matching becomes much more important with higher frequency signals to avoid
reflections of the signal that may distort your measurements. Alternatively, if you
probe a circuit, it is best to use the high impedance setting on the digitizer to avoid
changing the characteristics of the circuit.

To protect the 50 Ω resistor, a thermal sensing circuit opens the input if the power
dissipation is too high. If this occurs, a warning is returned from all Read, Fetch, and
Status functions. The circuit tries to reset itself when Read, Fetch, or Status functions
are called, except on SMC-based devices, which require you to reset the circuit by
initiating a new acquisition. Some digitizers also support the detection of an ADC
overload. ADC overload detection works the same as the 50 Ω overload detection
circuit described previously.

Max Input Frequency

The max input frequency parameter sets the –3 dB cutoff frequency for a hardware
analog filter. Setting this parameter to zero uses the default bandwidth of the digitizer.
The filter attenuates signals greater than the cutoff frequency, which is useful for
minimizing high-frequency noise when sampling at lower rates. For example, if you
sample at 100 MS/s, you can resolve frequencies up to 50 MHz according to the Nyquist
theorem. Any noise in the signal above 50 MHz, such as harmonics of the input signal,
are aliased onto a frequency below 50 MHz. The solution is to filter this noise before
the signal is digitized. Refer to Features Supported by Device to find out the valid –3 dB
bandwidth your digitizer supports. This hardware filter is not available in all digitizers.

Related concepts:

• Features Supported by NI-SCOPE Instruments


• Nyquist Theorem

Configuring the Horizontal Settings

The horizontal timing parameters apply to all enabled channels of the digitizer, which
means that both channels of a two-channel digitizer sample the same amount of data
at the same rate. Some digitizers support acquiring multirecords. multirecord

© National Instruments 189


NI-SCOPE

acquisitions allow you to acquire multiple, triggered waveforms very quickly. Because
the triggering and timing are done in hardware, multirecord acquisitions eliminate the
possibility of the operating system interrupting your program and causing the digitizer
to miss triggers. To find out if your digitizer supports multirecord acquisitions, refer to
Features Supported by Device. The horizontal settings include the num records,
sample rate, min record length, and reference position parameters.

Num Records

The num records parameter in the Configure Horizontal Timing function


allows you to configure a multirecord acquisition. For a single record acquisition, set
this parameter to 1.

Sample Rate

The sample rate parameter is the frequency at which digitized samples are stored,
expressed in samples per second. This parameter is rounded up to the next legal
sampling rate that your device supports. If the enforce realtime parameter is set to
TRUE, the sampling rate must be set lower than the maximum real-time sampling rate
of the digitizer, so data can be digitized at the requested rate. If you set the enforce
realtime parameter to FALSE, NI-SCOPE allows you to specify sampling rates higher
than the maximum real-time sampling rate of the digitizer. When you do this, NI-
SCOPE enters random interleaved sampling (RIS) mode, where it acquires multiple
waveforms at the maximum real-time sampling rate and reconstructs a periodic
waveform.

Min Record Length

The min record length parameter is the minimum number of samples to store for each
record in the acquisition. This parameter can also be rounded up. NI-SCOPE maintains
a constant time per record, which is the min record length divided by the requested
sampling rate. Because the sampling rate is rounded up to a legal value, the min
record length can also be rounded up. You can fetch this resulting actual record length
by calling Actual Record Length. Similarly, you can call Sample Rate to find
the true sample rate used or Actual Sample Mode to determine if NI-SCOPE is
using RIS or real-time sampling.

190 ni.com
NI-SCOPE

Reference Position

The reference position parameter determines the number of pretrigger versus


posttrigger points that are stored. Reference position is expressed as a percent of the
record, from 0 to 100. For example, a 0% reference position means that you have the
actual record length points stored after the trigger occurs, while 100% reference
position means that all the samples are stored before the trigger.

Related Topics

Configuring the Vertical Settings

Related concepts:

• Making Multiple-Record Acquisitions


• Equivalent-Time Sampling and Random Interleaved Sampling
• Configuring the Vertical Settings
• Features Supported by NI-SCOPE Instruments

Configuring Triggers

NI-SCOPE provides several types of triggering options, including immediate, software,


hysteresis, edge, window, video, and digital triggering. Each kind of triggering uses a
different NI-SCOPE Configure Trigger function.

You can also use the Configure Trigger functions to set certain trigger parameters.
Refer to Trigger Parameters for more information on some of the common parameters.

Related concepts:

• Immediate Triggers
• Software Triggers
• Hysteresis Triggers
• Edge Triggers
• Window Triggers
• Video Triggers
• Digital Triggers
• Trigger Parameters

© National Instruments 191


NI-SCOPE

Attributes and Attribute Functions

Attributes—which are also called properties in LabVIEW—serve as a base for


parameters. For example, the Minimum Number Points parameter in the Configure
Horizontal Timing function is actually built on the Horizontal Minimum Number of
Points, Horizontal Minimum Sample Rate, Horizontal Number of Records, and
Horizontal Record Reference Position attributes. Because attributes and attribute
functions require additional code and include limited error checking, avoid using
attributes except in the following cases:

• Use attributes if NI-SCOPE does not have a high-level function that sets an
attribute that you need.
• Use attributes if you need to change one variable at a time. Attributes allow you to
change one variable at a time, whereas functions and parameters do not. Because
NI-SCOPE efficiently caches previous settings, there is no performance penalty if
you use a function when only one variable is changed at a time.

Attributes are used frequently when making waveform measurements.

Accessing Attributes

In LabVIEW, you can find attributes in the NI-SCOPE property node by dropping the
property node from the NI-SCOPE palette onto your block diagram.

In C and Visual Basic, you can access attributes with the Set Attribute and Get Attribute
functions.

Setting Attributes Before Reading Attributes

Attributes—which are also called properties in LabVIEW—are modified when you set
them or when you call a configuration VI or function that sets them. It is important to
set the attributes or call any configuration VIs or functions before reading back any
attribute values for the following reasons:

• Values read are coerced depending on the current configuration of the session. If
you read an attribute value and then set other attributes, the value read may no
longer be valid.

192 ni.com
NI-SCOPE

• The driver verifies that the configuration of the device is valid at the time the
attribute is read. It is possible to get an error when reading an attribute if the
configuration is not valid at that point, even when a setting later could make it
valid.
• Reading attributes causes the driver to verify the current configuration. If you
change some of the settings later, those settings need to be validated again.

Note Perform all module configuration before writing data on output


devices.

Utility Functions

The Utility functions perform various tasks such as resetting the digitizer and returning
the revision numbers of NI-SCOPE and the instrument firmware. These functions can
also help you start or stop the output of a square wave for probe compensation.

Related concepts:

• Probe Compensation

Fetching Data

Fetching data involves the following main steps:

1. Declaring a waveform array (except in LabVIEW)


2. Initiating an acquisition
3. Waiting for the data acquisition to complete
4. Retrieving data from the digitizer to your host computer

Advanced Fetching Options

NI-SCOPE supports several attributes for advanced fetching operations. The two
following attributes are general purpose, allowing you to fetch only a portion of the
acquired waveforms.

• The Fetch Offset attribute is the offset in samples from which to start fetching

© National Instruments 193


NI-SCOPE

samples. It may be negative.


• The Fetch Relative To attribute specifies what the retrieval offset is relative
to. All digitizers support fetching relative to pretrigger and trigger. The pretrigger
sample is the first pretrigger point requested with the Configure Horizontal
Timing function. This is the typical (and default) method because it allows
fetching the exact data requested with the Configure Horizontal Timing
function. Fetching relative to the trigger means the first posttrigger sample is the
first one fetched. Digitizers supporting continuous acquisition have several other
options for the Fetch Relative To attribute.

Related concepts:

• Declaring a Waveform Array


• Initiating an Acquisition
• Waiting for the Data Acquisition to Complete
• Retrieving Data from the Digitizer to the Host Computer

Declaring a Waveform Array

If you are programming in C, C++, or Visual Basic, you need to declare a waveform
array in your program. This array allocates space for the data that is acquired with a
Fetch function. LabVIEW users do not need to declare a waveform because the Fetch
call allocates it for you.

NI-SCOPE coerces up the min record length specified with the Configure
Horizontal Timing function. You can retrieve the actual number of samples
acquired by the digitizer by calling niScope Actual Record Length.

NI-SCOPE provides the Actual Num Wfms function when declaring your waveform
array. This function returns the number of waveforms that are available for fetching,
according to the formula:

numWaveforms = NR x NC x AT

where NR is the number of records, NC is the number of channels, and AT is the


number of waveforms for the current acquisition type. AT is equal to 1. Using the
Actual Num Wfms function allows your program to handle switching between
different acquisition types (such as normal or flexible resolution), channel lists, and

194 ni.com
NI-SCOPE

minimum record lengths without altering the fetching code.

The waveform array is a single dimension array with a size equal to the number of
waveforms to fetch times the number of points to fetch in each waveform. For
example, if you are fetching scaled voltage data in a C program, your code may look
like the following:

ViReal64 *wfmPtr; ViInt32 actualRecordLength, numWfms;


niScope_ActualRecordLength (vi, &actualRecordLength);
niScope_ActualNumWfms (vi, channelList, &numWfms); wfmPtr =
malloc (sizeof(ViReal64) * actualRecordLength * numWfms);

You also need to declare an niScope_WfmInfo structure to hold the relevant constants
that describe each waveform. You need one structure for each fetched waveform. The
syntax is as follows:

struct niScope_wfmInfo *wfmInfoPtr; wfmInfoPtr = malloc


(sizeof(struct niScope_wfmInfo) * numWfms);

Related Topics

Fetching Data

Related concepts:

• Fetching Data

Initiating an Acquisition

Initiate Acquisition tells the digitizer to start acquiring data. During this
function, the hardware is programmed with the configuration that you have chosen,
and the digitizer begins sampling data and storing it to onboard memory. First, the
digitizer samples the requested number of pretrigger points, ignoring any triggers that
may occur. After the requested number of pretrigger points are stored, the digitizer
waits for a trigger. While waiting, it continues to sample and store data into the
circular, onboard memory. The trigger signals the digitizer to sample the exact number
of posttrigger samples that you requested. After the posttrigger points are stored, the
digitizer either stops sampling data or restarts this process for the next record. The

© National Instruments 195


NI-SCOPE

digitizer stores the memory location of the first posttrigger sample, which allows it to
calculate where the first pretrigger sample is located in memory when you fetch the
waveform.

Related Topics

Fetching Data

Related concepts:

• Fetching Data

Waiting for the Data Acquisition to Complete

After the acquisition is initiated, you typically use a Fetch function with a positive
timeout parameter to sleep while the digitizer acquires the data. The Fetch function
polls the digitizer while waiting for the data to be acquired, and it returns the
requested data when the data is available. If the data is not acquired within the time
specified with the timeout parameter, NI-SCOPE returns an error.

Alternatively, you can use the Acquisition Status function, or the Records
Done or Points Done attributes to determine when the data is available. Using
these low-level functions allows you to perform other operations while the digitizer is
busy. However, using a Fetch function to wait for the data is easier.

Digitizers that support continuous acquisition allow fetching while the acquisition is
still in progress. When you specify a positive timeout, the Fetch function only waits for
the requested data, not the entire acquisition. Furthermore, digitizers supporting
continuous acquisition allow you to call a Fetch function with a timeout value of zero,
which fetches all the currently available data without waiting. In this case, the actual
number of samples fetched from the digitizer is returned in the wfmInfo structure.
Fore more information, refer to Acquiring Data Continuously.

NI-SCOPE supports one high-level Read function that combines the Initiate
Acquisition and a Fetch function into one call. This function is suitable for most
applications, but it does not support fetching binary (non-scaled) waveforms, software
triggering, or continuous acquisition. You can use Read to acquire and fetch some
data, followed by a call to a Fetch function to retrieve more data.

196 ni.com
NI-SCOPE

If you want to stop the digitizer before it finishes, use Abort. If the digitizer supports
continuous acquisition, you can fetch all the data that was acquired before you called
Abort. However, if the trigger has not occurred in the record that the digitizer is
currently acquiring, the trigger point is invalid.

Related Topics

Fetching Data

Related concepts:

• Initiating an Acquisition
• Acquiring Data Continuously
• Fetching Data

Retrieving Data from the Digitizer to the Host Computer

Fetching data refers to the process of transferring the acquired waveform from the
digitizer memory to the host computer memory. This is generally done with direct
memory access (DMA), which copies the binary data from the digitizer extremely
quickly. Usually, the binary data is scaled to voltage during the fetch and stored in as a
64-bit floating point number. One or more waveform arrays are returned from each
Fetch function, which allow you to display, analyze, or store the acquired data.

NI-SCOPE offers one method to fetch many types of data. This means that one function
can fetch normal acquisitions, multirecord acquisitions, and continuous fetching
acquisitions. For C and Visual Basic, there are four Fetch functions, one for each data
type that may be returned. For LabVIEW, there are several Fetch functions that allow
fetching either one or several waveforms with either a waveform cluster output or a
two-dimensional array output for each data type. In LabVIEW 7.0 and later, data can
also be returned as a waveform data type.

The Fetch functions all take a comma-delimited list of channels to fetch, and the
number of samples (numSamples) to fetch for each waveform that is returned. If the
acquisition finishes and the specified numSamples have not been acquired, the Fetch
functions return all the available data. The waveformInfo output lists the actual
number of samples fetched. In LabVIEW, setting the numSamples parameter to –1
fetches the actual record length, specified when you configure the acquisition.

© National Instruments 197


NI-SCOPE

Otherwise, you can determine the actual record length by calling Actual Record
Length.

Fetch functions may return multiple waveforms, depending on the number of


channels in the channel list, the number of records, and the acquisition type. In C and
Visual Basic, there is a pointer to a one-dimensional array that contains all the
waveforms sequentially, where the first waveform starts at the zeroth index, the
second waveform starts at the numSamples index, the third waveform starts at two
times the numSamples index, and so on.

In LabVIEW, NI-SCOPE supports single waveform versions and multiple waveform


versions. The cluster versions output either one cluster containing timing information
and the waveform or an array of clusters. The array versions output either a single
array with one waveform or a two-dimensional array with multiple waveforms.

The order of the returned data follows these rules:

• If the acquisition type returns two waveforms, they are directly next to each other.
• If multiple channels are specified, the channel's data is returned in the order of the
list.
• If multiple records are specified, all Record 0 waveforms are returned before any
Record 1 waveforms.

Refer to the NI-SCOPE Function Reference Help or the NI-SCOPE LabVIEW Reference for
more information on Read and Fetch functions.

The most common situation is fetching two channels of data during a normal, single-
record acquisition. In this case, the two waveforms are ordered the same as the
channel list. Refer to Making Multiple-Record Acquisitions for more information about
fetching data in multiple-record situations. Remember, you can always call a Fetch
function repeatedly to fetch each waveform separately. In addition to returning
waveforms, Fetch functions return an array of wfmInfo structures—one for each
waveform returned. The structure contains information about the waveform, including
timing and scaling information.

The waveformInfo structure contains the necessary timing information for plotting
and analyzing an acquired waveform. The x increment is the time, in seconds,
between two samples. The relative initial x is the time, in seconds, of the first point in

198 ni.com
NI-SCOPE

the waveform with respect to the trigger. If you acquire pretrigger samples, this value
is negative. The trigger time is very accurate and has much higher resolution than the
sample period because it uses a time-to-digital conversion (TDC) circuit. Using the
relative initial x scale, the trigger always occurs at time equals zero. In LabVIEW, the
Fetch functions that return a cluster contain the relative initial x value and the
x increment. Wiring that cluster directly to the graph plots the waveform versus time.
The absolute initial x parameter is only supported on devices with continuous
acquisition. Refer to Acquiring Data Continuously for more information on continuous
acquisition.

The waveformInfo structure also contains the gain and offset scaling factors that allow
you to convert binary data to voltage. Often, you need to maximize the speed of the
application while acquiring data. Fetching binary data saves time because it avoids the
scaling operation and uses significantly less memory (on an 8-bit device, 1 byte instead
of 8 bytes per sample). However, you may want to scale the binary values to a voltage
at a later time. To do this, use the gain factor and offset values from the waveformInfo
structure in the following formula:

Voltage Value = Gain x Binary Value + Offset

Related Topics

Fetching Data

Related concepts:

• Making Multiple-Record Acquisitions


• Acquiring Data Continuously
• Fetching Data

Using Fetch VIs

What Are Fetch Acquisition VIs?

Unlike Read VIs, Fetch VIs such as niScope Fetch Poly and niScope Fetch Measurement
Poly—acquire data asynchronously. That means these VIs store data on your digitizer
until you need it, which frees up your computer to perform other tasks. However,
fetching requires additional VIs that initiate waveform acquisitions and query your

© National Instruments 199


NI-SCOPE

device to verify if the acquisition is complete.

Using Fetch Acquisition VIs

To fetch data, write a program that follows these general steps:

1. Create a new instrument session using niScope Initialize.


2. Configure your digitizer with NI-SCOPE Configuration VIs.
3. Call niScope Actual Record Length to find the actual number of points your
digitizer acquires for each channel.
4. Call niScope Initiate Acquisition to initiate a waveform acquisition. Data will be
acquired simultaneously on all enabled channels.
5. Call niScope Acquisition Status in a loop to check if the acquisition is complete or
in progress. This step is optional and useful if you want to perform other tasks
during the acquisition. The Fetch VIs also accept a timeout that can make NI-
SCOPE wait until the acquisition is complete.
6. Call the Fetch VI you need. You can call multiple fetches if you are acquiring data
from more than one channel or measurement.

You use the same Fetch VIs for simple data acquisition and advanced continuous
acquisition, such as fetching multiple records. Although the VIs only have the
numSamples input parameter to determine how what data is retrieved, NI-SCOPE
offers several properties that allow you to specify advanced fetching options. The
Fetch Relative To and Fetch Offset properties allow you to explicitly choose the
portion of a record to retrieve. The Fetch Record Number and Fetch Number of
Records properties allow specifying the records to retrieve during a multirecord
acquisition.

7. Call niScope Close to close the current session.

Using Fetch Functions

What Are Fetch Acquisition Functions?

Unlike Read functions, Fetch functions—such as niScope_Fetch and


niScope_FetchMeasurement—acquire data asynchronously. That means these
functions store data on your digitizer until you need it, which frees up your computer

200 ni.com
NI-SCOPE

to perform other tasks and allows for better system performance. However, fetching
requires additional functions that initiate waveform acquisitions and query your board
to see if the acquisition is complete.

You use the same Fetch functions for both simple data acquisition and advanced data
acquisition such as multiple-record fetching. Although the functions have only the
numSamples parameter to determine how data is retrieved, NI-SCOPE offers several
attributes that allow you to specify advanced fetching options. The
NISCOPE_ATTR_FETCH_RELATIVE_TO and NISCOPE_ATTR_FETCH_OFFSET
attributes allow you to explicitly choose the portion of a record to retrieve. The
NISCOPE_ATTR_FETCH_RECORD_NUMBER and
NISCOPE_ATTR_FETCH_NUM_RECORDS attributes allow specifying the records to
retrieve during a multirecord acquisition.

Using Fetch Acquisition Functions

To fetch data, write a program that follows these general steps:

1. Create a new instrument session using niScope_init.


2. Configure your digitizer with NI-SCOPE Configuration functions.
3. Call niScope_ActualRecordLength to find the actual number of points your
digitizer acquires for each channel.
4. Call niScope_InitiateAcquisition to initiate a waveform acquisition.
Data will be acquired simultaneously on all enabled channels.
5. Call niScope_AcquisitionStatus in a loop to check if the acquisition is
complete or in progress. This step is useful if you want to perform other tasks
during the acquisition. The Fetch functions can also accept a timeout to force NI-
SCOPE to wait until the acquisition is complete.
6. Call the Fetch function you need. You can call multiple fetches if you are acquiring
data from more than one channel or measurement.
7. Call niScope_close to close the current session.

Acquiring Data Continuously

Continuous acquisition is the ability to transfer data from the digitizer to the host
computer memory while the digitizer is still acquiring data, which can be useful for the
following applications:

© National Instruments 201


NI-SCOPE

• Acquiring records larger than available memory


• Fetching triggered records while other records are being acquired
• Acquiring more records than fit in digitizer memory
• Fetching the most recent data
• Acquiring waveforms at hardware-timed intervals

How Continuous Acquisition Works

NI digitizers contain a large amount of onboard memory, generally 8, 16, 32, or 256 MB
per channel. This memory is divided into individual records when acquiring data. For
example, if you are acquiring two records, 8 MB of memory is divided into two 4 MB
records. Each record is treated as a circular buffer. When the digitizer starts acquiring
data, the samples are placed in the beginning of the buffer. The digitizer acquires the
requested number of pretrigger samples—that is, the actual record length times the
reference position divided by 100. After the pretrigger samples are complete, the
digitizer waits for a trigger. While waiting, the digitizer continues to acquire and store
data. This data is placed in the circular buffer, so after the buffer is filled, the digitizer
starts overwriting data at the beginning. If a trigger never occurs, the digitizer waits for
a trigger forever. After the trigger occurs, the digitizer samples the requested number
of posttrigger samples, and the record is complete. If another record is requested, the
digitizer restarts the acquisition, moving to the next record in memory.

Continuous acquisition refers to the digitizer's ability to fetch data from its own
circular buffer to the host computer's memory while it is acquiring data. When you call
Initiate Acquisition, the digitizer starts acquiring data into its circular buffer,
as shown in the following figure.

202 ni.com
NI-SCOPE

Circular Buffer

Host Computer Memory

Legend

Empty Buffer Untransferred Data Transferred Data

Reading Data into Buffer Transferring Data into Host Memory

You can then use a Fetch function to send the first chunk of data to the host computer
while the digitizer continues to acquire more samples, as shown in the following
figure.

Host Computer Memory

Legend

Empty Buffer Untransferred Data Transferred Data

Reading Data into Buffer Transferring Data into Host Memory

When the circular buffer is filled on the digitizer, it starts to overwrite the data at the
beginning of the buffer, as shown in the following figure.

© National Instruments 203


NI-SCOPE

Host Computer Memory

Legend

Empty Buffer Untransferred Data Transferred Data

Reading Data into Buffer Transferring Data into Host Memory

Ideally, you have already copied and saved the data that is being overwritten in the
host computer.

Host Computer Memory

Legend

Empty Buffer Untransferred Data Transferred Data

Reading Data into Buffer Transferring Data into Host Memory

If you do not send a trigger, the digitizer continues to acquire data forever or until you
call Abort, Reset, or Close.

Fetching Continuous Acquisition Data

No special configuration is necessary for continuous acquisition programs. The only


difference is how the data is fetched. The Fetch functions all work for continuous

204 ni.com
NI-SCOPE

acquisition, but additional attributes are available to specify what data to fetch. In
particular, the Fetch Relative To attribute supports values of Read Pointer, Now,
and Start in addition to the standard Trigger and Pretrigger values. These values allow
specifying different locations within the record from which to start fetching. When
fetching data continuously, the possibility always exists that the data has been
overwritten in the onboard memory before you attempt to fetch it. NI-SCOPE returns
an error in this situation.

When fetching data continuously, the relative initial x value returned in the waveform
info structure is not valid until the trigger occurs. Often, the trigger never occurs during
continuous acquisitions. However, the waveform info structure also contains an
absolute initial x value, which is a free-running timestamp counter on the digitizer.
Additional status information about your acquisition is available by using the Fetch
Points Done and Fetch Records Done attributes. The points done is the
number of samples available in the record specified by the Fetch Record Number
attribute, starting at the Fetch Offset attribute that is relative to the Fetch
Relative To attribute. NI-SCOPE also supports a Fetch Backlog attribute,
which is the number of samples that have not been fetched when performing a
continuous acquisition.

Related concepts:

• Acquiring Records Larger than Available Memory


• Fetching Triggered Records while Other Records Are Being Acquired
• Acquiring More Records Than Fit in Digitizer Memory
• Fetching the Most Recent Data
• Acquiring Waveforms at Hardware-Timed Intervals
• Time Stamping

Acquiring Records Larger than Available Memory

The standard use of continuous acquisition is to fetch a record that is larger than the
available memory on the digitizer. Because the data is fetched as it is acquired, the
digitizer memory can be overwritten. At slow sampling rates, you can fetch data
forever by setting up an acquisition that is never triggered and is repeatedly fetching.
At faster sampling rates, the host computer may not be able to fetch as fast as the
digitizer samples data. If the data that is being fetched is overwritten, NI-SCOPE

© National Instruments 205


NI-SCOPE

returns an error message from the Fetch function. Look at the Fetch in Chunks
example to see how a waveform can be reconstructed with the data from multiple
fetch calls. Look at the Fetch Forever example to benchmark how much data you
can acquire at a given sampling rate before the data is overwritten.

To fetch a record that is larger than memory, set the Fetch Relative To attribute
to Read Pointer. This positions the beginning of the fetch operation at the start of the
record when you initiate a new acquisition. After every fetch, the read pointer is
incremented to be the sample after the last sample retrieved. Therefore, you can
repeatedly fetch relative to the read pointer, with a retrieval offset of zero, to acquire a
single, infinite record.

If you specify a positive timeout with a Fetch function, it waits for the requested
number of samples. Alternatively, specifying a timeout of zero acquires the number of
samples currently available (up to a maximum of the numSamples parameter). The
waveform info structure returns the actual number of samples fetched. Using a
timeout of zero achieves slightly better performance because the status of the digitizer
is queried less often.

A separate read pointer is stored for each channel, so you can alternate fetching
different channels. The read pointer is also reset to zero when you fetch from a
different record.

Fetching Triggered Records while Other Records Are Being Acquired

Fetching records continuously can greatly speed up applications that have a very slow
trigger rate. If you are acquiring at 100 MS/s, but you only receive a trigger once every
second, you can completely fetch each record as soon as it is acquired by fetching each
record individually. You can set the Fetch Num Records attribute to 1 and
increment the Fetch Record Number attribute for each record you want to fetch.
Then, using a positive timeout with any of the Fetch functions causes the digitizer to
wait only for the next record to be acquired before it returns the waveform.

For lower-level control, NI-SCOPE supports the Records Done attribute that you can
poll to determine the current status of your acquisition.

Acquiring More Records Than Fit in Digitizer Memory

206 ni.com
NI-SCOPE

During typical multirecord operation, each buffer in memory must be large enough to
contain all the pretrigger and posttrigger samples. If you request 1,000 points with
Configure Horizontal Timing, each record in memory must be at least 1,000
points; otherwise NI-SCOPE returns an error. Typically, all the records are required to
fit in memory, so you can wait until the entire acquisition is finished before fetching
anything.

However, in certain cases, you may want to acquire more records than would fit in the
onboard memory. In this situation, the records in memory are also circular. That
means if you configure four records and only three fit in memory, the fourth record
overwrites the first record. Ideally, you have time to fetch the first record to the host
computer memory before it is overwritten.

To fetch more records than fit in memory, set the Boolean attribute Enable More
Records Than Memory to TRUE and configure the desired number of records with
the Configure Horizontal Timing function. You must fetch the records
individually as described in Fetching Triggered Records while other Records are Being
Acquired. If the record you are attempting to fetch has been overwritten, NI-SCOPE
returns an error.

Caution The total number of records that you can acquire is limited. Each
record requires up to 64 bytes of page-locked memory. The actual amount of
page-locked memory depends on the amount of physical memory and the
number of other devices being used in your host computer. You can configure
as many records as you need, but save your work first.

Related concepts:

• Fetching Triggered Records while Other Records Are Being Acquired

Fetching the Most Recent Data

Another application of continuous acquisition is fetching a few of the most recent data
points. This technique is useful if you want chunks of nontriggered data with the same
configuration parameters. It avoids the software overhead necessary to reconfigure
the acquisition, and your program never needs to wait for the data to be acquired.

© National Instruments 207


NI-SCOPE

To fetch the most recent data, initiate an infinite acquisition—one that never
triggers—by configuring software triggering. When you want the most recent data
points, call a Fetch function with the Fetch Relative To attribute set to now,
which specifies that the offset is from the last sample acquired by the digitizer. You
must set the Fetch Offset attribute to the negated number of samples you want.

Acquiring Waveforms at Hardware-Timed Intervals

Setting the Fetch Relative To attribute to Start sets the starting fetch position to be the
first sample acquired by the digitizer. If the trigger happens immediately, the first point
sampled by the digitizer would equal the first pretrigger point. However, this is
generally not true because the digitizer usually has to wait for a trigger. While the
digitizer waits, it continues to sample data, possibly forever. As it samples data into the
circular, onboard memory, the original data is eventually overwritten. As in other
cases, if you attempt to fetch data that is overwritten, NI-SCOPE returns an error. A
typical use of fetching relative to start is to acquire nontriggered waveforms at precise
intervals. You can use the digitizer sample clock to precisely time the duration
between waveforms. Suppose you want 500 points every millisecond, while sampling
at 100 MS/s. You can set the Fetch Relative To attribute to start at the beginning of your
program. Then, for every iteration of a loop, call a Fetch function to retrieve 500
samples, and increment the Fetch Offset attribute by 100,000 samples. Because
100,000 samples are acquired every millisecond when sampling at 100 MS/s, this
program is effectively using the sample clock to precisely time the interval between
acquired waveforms.

Making Multiple-Record Acquisitions

Some NI digitizers support multiple-record acquisitions, also known as retriggerable


acquisitions, which allow you to capture multiple, triggered waveforms without
software intervention. NI-SCOPE stores each record in separate memory locations on
the digitizer. Refer to Features Supported by Device for a listing of digitizers that
support multiple-record acquisitions.

The main benefit of multiple-record acquisitions is that you can acquire numerous
triggered waveforms quickly. Multiple-record acquisitions allow hardware rearming of
the digitizer. The digitizer hardware must transition between several states (given by
the digitizer's Acquisition Engine State Diagram) before it is ready to accept a

208 ni.com
NI-SCOPE

subsequent trigger. If two triggers arrive, one shortly after the other, the digitizer may
or may not detect the second trigger.

• If the second trigger arrives before the first record completes, it will not be
accepted. Only one trigger can be accepted in any one record in the NI-SCOPE
driver.
• If the second trigger arrives after the first record completes, but before the dead
time has elapsed, it will not be accepted.
• If the second trigger arrives after the first record completes and after the dead time
has elapsed, but before the minimum pre-reference trigger sampling for the
subsequent record is complete, it will not be accepted.
• If the second trigger arrives after the first record completes, the dead time has
elapsed, and the minimum pre-reference trigger sampling is finished, the trigger
will be accepted.
Minimum Minimum Minimum
Post-Reference Pre-Reference Post-Reference Pre-Reference Post-Reference Pre-Reference
Trigger Trigger Trigger Trigger Trigger Trigger
Sampling Sampling Sampling Sampling Sampling Sampling

Dead Time Dead Time Dead Time

Trigger
Level

= Trigger Accepted
= Trigger Rejected

Note The information above assumes that there are no holdoff values set
(for example, trigger holdoff).

Minimum Time Between Reference Triggers

The minimum time between triggers can be calculated with the dead time and the
time per record as follows: Minimum Time Between Triggers = Time Per Record + Dead
Time

The maximum trigger rate can be calculated as follows: Maximum Trigger Rate (Hz) =
1/(Minimum Time Between Triggers)

When the reference trigger type is set to immediate and all holdoff values = 0 seconds,

© National Instruments 209


NI-SCOPE

the digitizer will trigger at the maximum trigger rate regardless of any external signal.

Some digitizers specify a minimum rearm time. Minimum rearm time is the minimum
time between reference triggers as the record length approaches a minimum (for
example, record length = 1 sample). Therefore, when the record length is 1 sample,
Maximum Trigger Rate (Hz) = 1/(minimum rearm time).

Multiple-Record Example

For an introduction to multiple-record acquisitions, refer to the Multi Record


example. Modify the niScope_ConfigureHorizontalTiming function in your application,
setting the numRecords parameter to the number of records you want to acquire.
The digitizer acquires an additional record each time a trigger is accepted until all the
requested records have been acquired.

Related topics
Trigger Holdoff Fundamentals
Related concepts:

• Features Supported by NI-SCOPE Instruments


• Trigger Holdoff

Fetching Multiple-Record Acquisitions

You use the same Fetch functions discussed in Acquisition Functions—Reading versus
Fetching for retrieving multirecord acquisitions. However, two additional attributes are
available for specifying which records to retrieve. The Fetch Record Number
attribute is the zero-based index of the first record to fetch, and the Fetch Number
of Records attribute specifies how many records to fetch. By default, the Fetch
Number of Records is –1, which means fetch all the records starting at the Fetch
Record Number.

The Fetch functions wait for specified number of samples to be acquired when the
timeout parameter is positive. During a multirecord acquisition, they wait for the
requested number of samples in each record. Because the number of records attribute
defaults to –1 (or all the records), Fetch functions wait for all the specified number of
samples in all the records.

210 ni.com
NI-SCOPE

Fetching multiple records with a single Fetch function requires understanding the
order of the returned waveforms. All record 0 waveforms come before all record 1
waveforms. For example, fetching data with a channel list of "0,1" for three records
results in the following order:

• Channel 0 Record 0
• Channel 1 Record 0
• Channel 0 Record 1
• Channel 1 Record 1
• Channel 0 Record 2
• Channel 1 Record 2

For C and Visual Basic users, the waveforms are all packed into a one-dimensional
array that is declared using code such as the following:

// Set numWfms to 6, because the acquisition is for 2


channels times 3 records. niScope_ActualNumWfms (vi, "0,1",
&numWfms); // Fetch the coerced record length
niScope_ActualRecordLength (vi, &actualRecordLength); //
Declare memory for the waveforms and waveform info structs
wfm = malloc (sizeof (ViReal64) * actualRecordLength *
numWfms); wfmInfo = malloc (sizeof (struct niScope_wfmInfo)
* numWfms);

The first waveform starts at wfm[0], the second waveform at


wfm[actualRecordLength], and so on.

For LabVIEW users, the waveforms are returned in either a two-dimensional array or an
array of clusters that include timing information. In both cases, you can use the index
array function to extract the waveform of interest.

You can also fetch each record individually by setting the Fetch Number of
Records parameter to 1. Then, in a loop set the Fetch Record Number attribute
to the zero-based index of the record you want to fetch and call one of the Fetch
functions.

Related concepts:

© National Instruments 211


NI-SCOPE

• Acquisition Functions

Making Waveform Measurements

This section describes the different ways to make waveform measurements, which are
processed in software by NI-SCOPE. For more information, refer to the following:

Fetching Scalar and Array Measurements

Making Scalar Measurements

Making Array Measurements

Processing Time Domain Data

Often the time-domain data returned from a digitizer requires processing before
measurements are done. To do this, register an array measurement as a processing
step by using the AddWaveformProcessing function. At the time of registering the
processing step, the entire set of NISCOPE_ATTR_MEAS parameters are cached.
Then when a measurement function is called, the processing measurements are
completed with this cached set of parameters, and the result is used in the
measurement. This allows streaming together of measurements. For example, if you
register Add Channels and Bessel Filter as processing steps, fetching a frequency
measurement actually gives you the frequency of the filtered summation of two
channels.

Related concepts:

• Fetching Scalar and Array Measurements


• Making Scalar Measurements
• Making Array Measurements

Fetching Scalar and Array Measurements

You can fetch scalar and array measurements with the Fetch Measurement,
Fetch Measurement Stats, and Fetch Array Measurement functions.
The channel list and timeout parameters are identical to the waveform functions.

212 ni.com
NI-SCOPE

However, instead of returning waveforms, these functions return either the specified
scalar measurement or the specified array measurement. In LabVIEW, versions exist
that fetch either a single measurement or an array of measurements. The C and Visual
Basic versions return an array of measurement results, just as the Fetch functions can
return an array of waveforms. The order of the returned results is the same as in the
Fetch functions. C and Visual Basic users can dynamically declare memory for the
measurement results using code such as the following.

Note The following sample code uses the Actual Meas Wfm Size
function to query how many samples are available in the resulting array
measurement.

ViConstString channelList = "0,1"; ViReal64 *results;


niScope_ActualNumWfms (vi, channelList, &numWfms); results
= malloc (sizeof (ViReal64) * numWfms);
niScope_FetchMeasurement (vi, channelList, timeout,
NISCOPE_VAL_RISE_TIME, results); ViReal64 *measWfm; struct
niScope_wfmInfo *measWfmInfo; niScope_ActualMeasWfmSize
(vi, NISCOPE_VAL_FFT_AMP_SPECTRUM_DB, &measWfmSize);
measWfm = malloc (sizeof (ViReal64) * measWfmSize *
numWfms); measWfmInfo = malloc (sizeof (struct
niScope_wfmInfo) * numWfms); niScope_FetchArrayMeasurement
(vi, channelList, timeout, NISCOPE_VAL_FFT_AMP_SPECTRUM_DB,
measWfmSize, measWfm, measWfmInfo);

Steps for Fetching Scalar and Array Data with Fetch Functions

1. Create a new instrument session using the niScope Initialize VI or the


niScope_init function.
2. Configure the digitizer with NI-SCOPE Configuration functions.
3. Call the niScope Initiate Acquisition VI or the
niScope_InitiateAcquisition function to initiate a waveform acquisition.
Data is acquired simultaneously on all enabled channels.
4. Call the niScope Acquisition Status VI or the niScope_AcquisitionStatus
function in a loop to verify whether the acquisition is complete or in progress.
Alternatively, you can pass a nonzero timeout value to the Fetch Measurement

© National Instruments 213


NI-SCOPE

or the Fetch Array Measurement function.


5. Call a Fetch Measurement VI or function.

Related concepts:

• Waveform Measurements
• Using Attributes in Waveform Measurements
• Fetching Statistics from Waveform Measurements

Using Attributes in Waveform Measurements

By default, the Fetch Measurement functions use the entire acquired waveform for the
analysis. However, all the fetching attributes apply when determining what data is
used for the measurement. In addition to the normal fetch attributes such as Fetch
Relative To and Fetch Offset, the Fetch Meas Num Samples attribute
allows you to specify the number of samples fetched for performing the measurement.
By default, this attribute is –1, which fetches the actual record length. This attribute is
the same as the numSamples parameter in the other Fetch functions.

Configuring Reference Levels

Use the channel-based attributes to set the reference levels. The Measurement
Library example shows how to set the reference levels. You can customize how NI-
SCOPE configures the percentages used for the reference levels with the Percentage
Method attribute. This attribute uses any of the following constants:

• Min Max—This method uses the measurement's voltage minimum and voltage
maximum as 0% and 100%. These algorithms find the absolute minimum and
maximum in the waveform, which is useful for sine waves and triangle waves
where the histogram method does not work.
• Low High—This method uses the measurement's voltage low and voltage high as
0% and 100%. The voltage low is the voltage of the histogram bin with the most
hits below 40% of the waveform's voltage peak-to-peak value. The voltage high is
the voltage of the histogram bin with the most hits above 60% of the waveform's
voltage peak-to-peak value. These measurements use the last-acquisition
histogram method to find the most common high and low voltages, which is useful
for ignoring the preshoot and overshoot on a square wave.
• Base Top—The voltage base and voltage top measurements correspond to 0% and

214 ni.com
NI-SCOPE

100% with this method. These measurements use the last-acquisition histogram
method if the most common histogram bin contains a substantial number of the
total points. Otherwise, it returns the absolute minimum and maximum values in
the waveform, which is a useful default value for most waveform types.

You can also configure the reference levels in terms of voltage with the Ref Level Units
attribute.

Related concepts:

• Reference Levels

Fetching Statistics from Waveform Measurements

The Fetch Measurement Stats function returns the current measurement result
as well as statistics for this measurement over multiple acquisitions. Every time you
fetch a measurement, NI-SCOPE keeps a history of the measurement values, which
allows NI-SCOPE to compute the mean, standard deviation, minimum, and maximum
value of each scalar measurement. To clear the statistics history, use Clear
Waveform Measurement Stats.

Making Scalar Measurements

The following figure shows the programming flow for making scalar measurements.

© National Instruments 215


NI-SCOPE

Initialize

Configure

Initiate
Initiates data acquistion

Fetch Measurement
Polls digitizer until data
is available, fetches the
waveform, and performs the
scalar measurement

Error Handler
(not required in LabVIEW)

Close

Scalar Measurement Example

Refer to the Measurement Library example for sample code you can use to
create your own application. This example demonstrates fetching scalar
measurements and statistics. The Advanced Measurement Library example
demonstrates how to fetch a scalar measurement on a processed waveform.

Making Array Measurements

The following figure shows the programming flow for making array measurements.

216 ni.com
NI-SCOPE

Initialize

Configure

Initiate
Begins acquiring pretrigger data

Fetch Array Measurement

Error Handler

Close

Array Measurement Example

Refer to the Advanced Waveform Measurement example for sample code you
can use to create your own application. The Digital Filtering and Windowing
examples for LabVIEW also use array measurements.

Histogram Measurements

Using histograms and histogram statistics with NI high-speed digitizers provides an


effective visualization of waveform behavior such as the characterization of jitter in
signals. Many applications call for signals with accurate and reliable periodicity and
precise amplitude accuracy. Histograms are very useful in characterizing amplitude
and temporal variations of waveforms. You can make measurements such as cycle-to-
cycle and edge-to-edge jitter with time histogram measurements; you can make

© National Instruments 217


NI-SCOPE

measurements such as pulse height analysis and distortion with voltage histograms.

In some cases the statistical distribution of response values gives richer insights than
numerical representations such as mean, median, standard deviation, and mode.
Histograms are specialized plots that capture statistical data about how many times
specific values occur. Histograms are usually plotted with the dependent variable
along the vertical axis and the independent variable along the horizontal axis.

Histograms from Discrete Data

To create a histogram from discrete response data, a count is taken each time a
discrete value occurs. For example, the following figure is a histogram of 20 students'
letter grades on a test. The discrete values are the letter grades and the counts
represent the number of students who received each grade.
8

6
Number of Students

0
A B C D F
Grade

Histograms from Continuous Data

To create a histogram from continuous response data (as in a frequency-distribution


table), the response range is divided into ranges called bins. The value of the bin is the
mean range the bin covers. Using the previous example, imagine the tests were graded
with a percentage instead of a letter. The histogram in the following figure represents
this distribution using bins that represent 10% increments.

218 ni.com
NI-SCOPE

6
Number of Students

0
5 15 25 35 45 55 65 75 85 95
Percentage

Related concepts:

• Time Histograms
• Voltage Histograms

Time Histograms

Time histograms place samples that fall within a defined voltage range and time
window into bins based on their time relative to a trigger point. The time resolution of
time histograms depends directly on the precision with which samples can be
positioned in time relative to the trigger. More precise positioning of the sample in
time allows the use of more histogram bins of smaller size, increasing histogram
resolution. Often, digitizers can only resolve samples in time with a resolution equal to
the sample period. Many NI digitizers, however, include a high-resolution Time-to-
Digital Conversion (TDC) circuit. Using a process called time-stamping, the TDC circuit
locates samples relative to the trigger point with exceptional precision. For example,
the NI 5122 is equipped with a TDC circuit that allows time-stamping of samples with
100 ps resolution, while using a 10 ns sample period. Thus, TDC circuitry and time-
stamping allow you to sort data into highly resolved time histogram bins and maximize
histogram resolution.

The following figures demonstrate how time histograms are constructed. The first
figure is a time-domain waveform sampled by a high-speed digitizer. The second figure

© National Instruments 219


NI-SCOPE

shows the corresponding time histogram. Multiple pulses are acquired, and an edge
trigger is used to align the rising edge of each pulse. Histogram voltage (vertical)
discriminator levels are configured to define a window around the falling edges of
each pulse—the shaded region in the figure. Make sure you capture only the falling
edges of the waveform when setting these discriminator levels—otherwise, the
histogram appears perfectly uniform.

Time Histogram
High Volts
Trigger
Time Histogram
Low Volts

Acquisition 3
Acquisition 2
Acquisition 1

Time Histogram Time Histogram


Low Time High Time

When you use this setup, every sample on the falling edge is added to the time
histogram shown in the following figure. In this example, both the first and third
acquisitions have a falling edge at the same time, while the second acquisition is later.
The histogram captures this statistical information.
Hits

Low High
Time Time

220 ni.com
NI-SCOPE

Time Histogram Measurements Application

Histograms can be used to characterize delay jitter between the input and output of a
real-time I/O system. By definition, a real-time system is deterministic in time, but it is
useful to know exactly how deterministic a given measurement system is. Time
histogram measurements can be used to characterize the jitter in real-time systems,
which in turn allows measurement of the determinism of a real-time I/O system.

Let's look at a specific example: feeding a square wave into the analog input of a real-
time system while sampling at a rate of 1 kHz. The samples acquired are output to an
analog channel by the real-time system one clock cycle later. This provides a
deterministic delay of 1 msec between the analog input and the analog output of the
real-time system. Measurement of the jitter in this delay between the input and output
yields a measure of the reliability of the real-time I/O system.

In this example, the NI 5122 two-channel high-speed digitizer is used to measure the
jitter. The input square wave and the analog output of the real-time system are
sampled by the NI 5122. A time histogram of the delay from the edge on one channel
to the same edge on the second channel is created. Statistics from the time histogram
such as Time Histogram Min, Time Histogram Max, Time Histogram Hits and Time
Histogram Mean yield measurements of the maximum jitter, the number of measured
samples in the histogram, and the mean delay.

The results shown in the following figure yield a Gaussian distribution of the variations
of the delay, meaning that this jitter is most likely derived from random electrical noise
in the measurement system.

© National Instruments 221


NI-SCOPE

Histogram Measurements of Delay Between Analog Input and Analog


Output on a Real-Time I/O System.

Note Maximum (peak-to-peak) jitter is approximately 16 ns for the Real-


Time I/O system of 1 ms delay.

Related concepts:

• Creating Time Histograms

Creating Time Histograms

To create a time histogram, you must use attributes/properties and follow these
general steps:

1. Set the size of the histogram using the Time Histogram Size property or the
NISCOPE_ATTR_MEAS_TIME_HISTOGRAM_SIZE attribute. The default size is
256 bins. The more bins used, the greater the histogram resolution.
2. Time limits determine the temporal window. Set the time limits for the histogram
using the Time Histogram Low Time property or the
NISCOPE_ATTR_MEAS_TIME_HISTOGRAM_LOW_TIME attribute. for the

222 ni.com
NI-SCOPE

beginning time. Use the Time Histogram High Time property or the
NISCOPE_ATTR_MEAS_TIME_HISTOGRAM_HIGH_TIME attribute for the
ending time. Set these values during the first measurement after the histogram
history is cleared.
3. Histogram voltage limits determine the vertical window. Set the voltage limits for
the acquisition using the Time Histogram Low Volts property or the
NISCOPE_ATTR_MEAS_TIME_HISTOGRAM_LOW_VOLTSattribute and the
Time Histogram High Volts property or the
NISCOPE_ATTR_MEAS_TIME_HISTOGRAM_HIGH_VOLTS attribute. These
values can change every acquisition.

Note Together the time and voltage limits determine the


discriminators for the histogram.

4. Call the niScope Clear Waveform Measurement Stats VI or the


niScope_ClearWaveformMeasurementStats function to erase the
histogram history between acquisitions.

Time Histogram Example (LabVIEW Only)

Refer to the niScope EX Time Histogram.vi example for sample code you can
use to create your own application.

Related concepts:

• Time Histograms

Voltage Histograms

Many scientific and engineering fields require characterization of statistical variations


in signal amplitude. Pulse height analysis, a common application in many scientific
disciplines, can benefit from voltage histograms. In electronic measurements, signal
distortion and quality can also be characterized by voltage histograms. Voltage
histograms eliminate the time information from multiple acquisitions and place each
point in the acquired waveform into a voltage bin. This is useful for analyzing the
statistical amplitude variations of signals. The following figure shows a time-domain
waveform sampled by a high-speed digitizer. The second figure shows the
corresponding voltage histogram.

© National Instruments 223


NI-SCOPE

Voltage Histogram
High Volts

Voltage Histogram
Low Volts

Note The higher amplitude pulse occurs twice. The lower amplitude pulse
occurs only once.
Hits

Low High
Volts Volts

Voltage Histogram Measurements Application

One application calling for voltage histogram measurements is electronic signal


characterization. Signal sources, such as function generators and arbitrary waveform
generators, and output amplifiers are characterized in a number of ways. Voltage
histograms allow you to promptly characterize the sinusoidal output for voltage offset
and distortion, especially zero crossing distortion or crossover distortion.

The voltage histogram of a sine waveform ideally looks like a saddle with the peaks
occurring at the maxima and minima of the sine waveform. The saddle is centered at
zero if the sine waveform has no DC voltage offset. Any anomalous peaks in the
histogram between the maxima and minima reflect nonlinear distortion in the sine
waveform. A peak at the center of the voltage histogram reflects zero-crossing
distortion, which is a key concern for output amplifier performance.

224 ni.com
NI-SCOPE

The two following figures show voltage histograms taken using an NI 5122 high-speed
digitizer. The histograms characterize the sine output of two function generators. The
sine output in the first figure is relatively distortion-free and the histogram centers at
zero. By contrast, the histogram in the second figure is not centered at zero, indicating
distortion and voltage drift in the sine output. Thus, while neither histogram shows
zero-crossing distortion to be a primary problem, the noisy histogram in the second
figure reveals considerable spectral purity degradation in the second function
generator.

Voltage Histogram of 100 kHz 1 V

pk-pk

Sine Output from Function Generator 1

© National Instruments 225


NI-SCOPE

Voltage Histogram of 100 kHz 1 V

pk-pk

Sine Output from Function Generator 2

Related concepts:

• Creating Voltage Histograms

Creating Voltage Histograms

To create a voltage histogram, you must use attributes and follow these general steps:

1. Set the size of the histogram with the Voltage Histogram Size property or the
NISCOPE_ATTR_MEAS_VOLTAGE_HISTOGRAM_SIZE attribute. This property
defines the number of histogram bins. The larger the number of bins, the more
resolution you have in the histogram. The default size is 256 bins.
2. Set the low limit of the voltage histogram with Voltage Histogram Low Volts
property or the NISCOPE_ATTR_MEAS_VOLTAGE_HISTOGRAM_LOW_VOLTS
attribute. Set the high limit of the voltage histogram with Voltage Histogram High
Volts property or the
NISCOPE_ATTR_MEAS_VOLTAGE_HISTOGRAM_HIGH_VOLTS attribute.

226 ni.com
NI-SCOPE

3. Call the niScope Clear Waveform Measurement Stats VI or the


niScope_ClearWaveformMeasurementStats function to erase the
histogram history.

Voltage Histogram Example (LabVIEW Only)

Refer to the niScope EX Voltage Histogram.vi example for sample code you
can use to create your own application.

Related concepts:

• Voltage Histograms

Coercions

NI-SCOPE allows you to configure the digitizer programmatically. However, the


hardware may not support the exact value for some parameters that you specify.
Instead of returning an error and forcing your program to be highly device specific, NI-
SCOPE may coerce (or round) some input parameters to the next higher or lower value
that the digitizer supports. Some of these coercions may result in incorrect behavior.
In most cases, you can query the exact value of the parameter from NI-SCOPE.

Common coercions of NI-SCOPE parameters and attributes include vertical, horizontal,


and trigger parameters.

Related concepts:

• Coercions of Vertical Parameters


• Coercions of Horizontal Parameters
• Coercions of Trigger Parameters

Coercions of Horizontal Parameters

The horizontal timing parameters are all inter-related to comply with the IVI-Scope
specification. These parameters all appear in the Configure Horizontal
Timing function. The fundamental theory is that your time per record is a constant
number during an acquisition. This is accomplished with the following parameter

© National Instruments 227


NI-SCOPE

coercions:

Min Sample Rate

The min sample rate parameter is coerced up to the next available sample rate that
the digitizer supports. The available sample rates change based on the acquisition
type (such as normal and Flex Res). The actual sampling rate may be retrieved with the
Sample Rate function. This information is also returned by the Fetch function, with
the x increment parameter, which is one divided by the actual sampling rate. If the
sample rate parameter is set higher than the maximum, NI-SCOPE returns an error.

Enforce Realtime

If the enforce realtime parameter is set to FALSE, the digitizer enters RIS mode when
the sampling rate exceeds the maximum real-time sampling rate of the device. In RIS
mode, the sampling rate is coerced up to a multiple of the maximum real-time
sampling rate.

Min Record Length

The min record length is coerced so that the time per record is constant. The formula
is the following:

actual rec length = min rec length/min sample rate x actual sample rate

You can find the actual record length by calling the Actual Record Length
function. You can retrieve this value any time after you call Configure
Horizontal Timing. Keep in mind that the amount of memory required on the
digitizer is generally higher than the actual record length.

Reference Position

The reference position is rounded to the nearest sample. You can use the relative
initial x parameter from a Fetch function to determine the actual reference position. If
you fetch relative to the pretrigger, and the offset is zero, the initial x value is the first
pretrigger point to the trigger. Therefore, the actual reference position is the following:

The following C code shows how NI-SCOPE accomplishes timing coercions:

228 ni.com
NI-SCOPE

// Convert minimum sample rate into its corresponding


// time-per-record value
timePerRecord = minRecordLength / minSampleRate;
if (minSampleRate <= maxRealTimeSampleRate)
{
// For real-time, normal acquisitions, sample rate
// is an integer divisor of max sample rate
int divisor = (int) floor (maxRealTimeSampleRate / minSampleRate);
actualSampleRate = maxRealTimeSampleRate / divisor;
}
else
{
//In RIS, sample rate is a multiple of max sample rate
int overSamplingFactor = (int) ceil (minSampleRate / maxRealTimeSampleRate);
actualSampleRate = overSamplingFactor × maxRealTimeSampleRate;
}
actualRecordLength = (int) ((timePerRecord × actualSampleRate) + 0.5);

Coercions of Vertical Parameters

In the Configure Vertical function, vertical range is coerced to the next higher
valid vertical range for the digitizer. You can determine the actual value with a Binary
Fetch function.

Note You can also use the Vertical Range attribute to determine the
coerced value.

The gain scale factor is the volts/binary value. Therefore, if you use the Fetch
Binary 8 function, the actual vertical range is the gain scale factor times 256, with
256 being the number of binary values in an 8-bit number. If this vertical range is set
higher than the maximum vertical range of the digitizer, NI-SCOPE returns an error.

In the Configure Vertical function, the vertical offset parameter is rounded to


the nearest valid value, and it can also be obtained from the vertical offset output of
the Binary Fetch function or from the Vertical Offset attribute.

Probe attenuation is applied exactly as specified. Therefore, if you select a 1.234 probe
attenuation, your data is the voltage measured multiplied by 1.234. NI-SCOPE adjusts

© National Instruments 229


NI-SCOPE

your vertical range based on the probe attenuation parameter, so the resulting voltage
after the probe attenuation scaling is within the range specified. For example, if your
probe attenuation is 10 and your vertical range is 10 V, the digitizer is set to measure a
1 Vpk-pk signal. The data returned with the Fetch function is 10 Vpk-pk.

The max input frequency parameter in the Configure Chan Characteristics


function enables or disables analog filters on the digitizer. Its value is coerced up to the
next valid value. However, if this parameter is set to 0, the value is coerced to the
default bandwidth for the digitizer. If this value is set higher than the maximum input
frequency of the digitizer, NI-SCOPE returns an error.

The input impedance and vertical coupling parameters are not coerced. These
parameters return an error if the value is not valid for the digitizer.

Coercions of Trigger Parameters

The trigger level, low level, high level, and hysteresis parameters found in the
Configure Trigger functions are all coerced to the nearest valid value. Typically the
hardware uses an 8–, 10–, or 12-bit DAC to set the trigger levels. The exact values
cannot be queried for these parameters.

Using the Standard Functionality for error in Parameters

Many LabVIEW VIs contain error in parameters you can use to manage errors. These
parameters typically provide the same, standard functionality. When a node exhibits
different parameter functionality, the exceptions are documented in the reference
material for that node. Standard error in behavior is as follows

Note Some nodes, such as error handling VIs, contain an error in parameter
that does not provide standard error in functionality, but that contains an
error in cluster that is standard.

error in describes error conditions that occur before this node runs. The default is no
error. If an error occurred before this node runs, the node passes the error in value to error
out. This node runs normally only if no error occurred before this node runs. If an error
occurs while this node runs, it runs normally and sets its own error status in error out. Use

230 ni.com
NI-SCOPE

error in and error out to check errors and to specify execution order by wiring error out from
one node to error in of the next node.

The error in cluster contains the following cluster elements:

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a
warning or that no error occurred before this node ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If
status is FALSE, code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the node
that produced the error or warning. The default is an empty string.

Using the Standard Functionality for error out Parameters

Many LabVIEW VIs contain an error out parameter you can use to manage errors. These
parameters typically provide the same, standard functionality. When a node exhibits
different parameter functionality, the exceptions are documented in the reference
material for that node.

Standard error out functionality is as follows:

error out contains error information. If error in indicates that an error occurred before this VI
ran, error out contains the same error information. Otherwise, it describes the error status
that this VI produces. Right-click the error out front panel indicator and select Explain Error
from the shortcut menu for more information about the error.

The error out contains the following cluster elements:

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no
error occurred.
code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE,
code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the node
that produced the error or warning.

© National Instruments 231


NI-SCOPE

Array Measurements in NI-SCOPE

Array measurements are measurements on waveforms that result in an array of values


such as an FFT amplitude spectrum. This section covers some key concepts needed to
make array measurements.

The following is a categorized list of NI-SCOPE Array Measurements. The LabVIEW


name is shown first, followed by the equivalent C/C++ name.

Histogram Measurements

LabVIEW C/C++
Last Acq Histogram NISCOPE_VAL_LAST_ACQ_HISTOGRAM
Multi Acq Time Histogram NISCOPE_VAL_MULTI_ACQ_TIME_HISTOGRAM
Multi Acq Voltage Histogram NISCOPE_VAL_MULTI_ACQ_VOLTAGE_HISTOGRAM

Window Measurements

LabVIEW C/C++
Blackman Window NISCOPE_VAL_BLACKMAN_WINDOW
Hanning Window NISCOPE_VAL_HANNING_WINDOW
Flat Top Window NISCOPE_VAL_FLAT_TOP_WINDOW
Triangle_Window NISCOPE_VAL_TRIANGLE_WINDOW
Hamming Window NISCOPE_VAL_HAMMING_WINDOW

Filter Measurements

LabVIEW C/C++
Bessel IIR Filter NISCOPE_VAL_BESSEL_FILTER
FIR Windowed Filter NISCOPE_VAL_WINDOWED_FIR_FILTER
Butterworth IIR Filter NISCOPE_VAL_BUTTERWORTH_FILTER
Chebyshev IIR Filter NISCOPE_VAL_CHEBYSHEV_FILTER

232 ni.com
NI-SCOPE

Two Channel Measurements

LabVIEW C/C++
Add Channels NISCOPE_VAL_ADD_CHANNELS
Multiply Channels NISCOPE_VAL_MULTIPLY_CHANNELS
Divide Channels NISCOPE_VAL_DIVIDE_CHANNELS
Subtract Channels NISCOPE_VAL_SUBTRACT_CHANNELS

Math Measurements

LabVIEW C/C++
Derivative NISCOPE_VAL_DERIVATIVE
Multi_Acq_Average NISCOPE_VAL_MULTI_ACQ_AVERAGE
Array Integral NISCOPE_VAL_ARRAY_INTEGRAL
Inverse NISCOPE_VAL_INVERSE
Array Gain NISCOPE_VAL_ARRAY_GAIN
Array Offset NISCOPE_VAL_ARRAY_OFFSET

FFT Measurements

LabVIEW C/C++
FFT Amp Spectrum (dB) NISCOPE_VAL_FFT_AMP_SPECTRUM_DB
FFT Phase Spectrum NISCOPE_VAL_FFT_PHASE_SPECTRUM
FFT Amp Spectrum (Volts RMS) NISCOPE_VAL_FFT_AMP_SPECTRUM_VOLTS_RMS

Resampling Measurements

LabVIEW C/C++
Polynomial Interpolation NISCOPE_VAL_POLYNOMIAL_INTERPOLATION

Related concepts:

© National Instruments 233


NI-SCOPE

• Last Acq Histogram


• Multi Acq Time Histogram
• Multi Acq Voltage Histogram
• Blackman Window
• Hanning Window
• Flat Top Window
• Triangle Window
• Hamming Window
• Bessel IIR Filter
• FIR Windowed Filter
• Butterworth IIR Filter
• Chebyshev IIR Filter
• Add Channels
• Multiply Channels
• Divide Channels
• Subtract Channels
• Derivative
• Multi Acq Average
• Array Integral
• Inverse
• Array Gain
• Array Offset
• FFT Amp Spectrum (dB)
• FFT Phase Spectrum
• FFT Amp Spectrum (Volts RMS)
• Polynomial Interpolation

Last Acq Histogram

C/C++ Equivalent: NISCOPE_VAL_LAST_ACQ_HISTOGRAM

The initial x value returned is the bin value for the first bin, corresponding to the
midpoint of the range of values in the first bin. The x increment returned is the bin
size. The last acquisition histogram method is used by the voltage low and voltage high
measurements for computing the extrema of a waveform. This method is useful for
ignoring overshoot or preshoot in a square waveform.

234 ni.com
NI-SCOPE

In the last acquisition histogram method, a voltage histogram is created from the most
recent acquisition. The limits of the histogram are set by the minimum and maximum
voltages of the acquisition. NI-SCOPE then counts how many samples fall into each bin
of the histogram. The resolution is defined by the Last Acquisition Histogram Size
attribute, which is 256 bins by default. You can fetch the histogram array using the
Fetch Array Measurement function, with Last Acquisition Histogram constant specified
as the array measurement function. The following illustrations show an example of a
square wave and its resulting histogram. The voltage low and voltage high
measurements correspond to the middle value of a bin with the maximum number of
hits in the lower 40% or upper 40%, respectively.

Voltage Max
Voltage High

Voltage Low
Voltage Min

© National Instruments 235


NI-SCOPE

Hits

Min Lo Hi Max

Lower 40% Upper 40%


Searched for Searched for
Max Hits to Max Hits to
Determine Determine
Voltage Low Voltage High

Units

Count

X Units

Volts

Resulting Array Size

Measurement Last Acq Histogram Size Property

NI-SCOPE_ATTR_LAST_ACQ_HISTOGRAM_SIZE Attribute

Multi Acq Time Histogram

236 ni.com
NI-SCOPE

C/C++ Equivalent: NISCOPE_VAL_MULTI_ACQ_TIME_HISTOGRAM

The initial x value returned is the bin value for the first bin, corresponding to the
midpoint of the range of values in the first bin. The x increment returned is the bin
size.

Units

Count

X Units

Seconds

Resulting Array Size

The value of the Measurement Time Histogram Size property or the


NISCOPE_ATTR_MEAS_TIME_HISTOGRAM_SIZE attribute during the first time
histogram measurement after the histogram is cleared.

Multi Acq Voltage Histogram

C/C++ Equivalent: NISCOPE_VAL_MULTI_ACQ_VOLTAGE_HISTOGRAM

The initial x value returned is the bin value for the first bin, corresponding to the
midpoint of the range of values in the first bin. The x increment returned is the bin
size.

Units

Count

X Units

Volts

© National Instruments 237


NI-SCOPE

Resulting Array Size

The value of the Measurement Voltage Histogram Size property or the


NISCOPE_ATTR_MEAS_VOLTAGE_HISTOGRAM_SIZE attribute during the first
voltage histogram measurement after the histogram is cleared.

Blackman Window

C/C++ Equivalent: NISCOPE_VAL_BLACKMAN_WINDOW

A Blackman window is applied to the waveform using the following equation:

y[i] = waveform[i] × (0.42 – 0.50cos(w) + 0.08cos(2w))

where w = (2 )i/n and n is the number of elements in the waveform.

Units

Volts

X Units

Seconds

Resulting Array Size

inputSize

Hanning Window

238 ni.com
NI-SCOPE

C/C++ Equivalent: NISCOPE_VAL_HANNING_WINDOW

The Hanning window is useful for analyzing transients longer than the time duration of
the window, and also for general-purpose applications. A Hanning window is applied
to the waveform using the following equation:

y[i] = 0.5 × waveform[i] × [1 – cos(w)]

where w = (2 )i/n and n = waveform size.

Note Hanning and Hamming windows are somewhat similar. However, in


the time domain, the Hamming window does not get as close to zero near
the edges as does the Hanning window.

Units

Volts

X Units

Seconds

Resulting Array Size

inputSize

Flat Top Window

C/C++ Equivalent: NISCOPE_VAL_FLAT_TOP_WINDOW

© National Instruments 239


NI-SCOPE

The Flat Top window has the best amplitude accuracy of all the window functions. The
increased amplitude accuracy (±0.02 dB for signals exactly between integral cycles) is
at the expense of frequency selectivity. The Flat Top window is most useful in
accurately measuring the amplitude of single frequency components with little nearby
spectral energy in the signal. A Flat Top window is applied to the waveform using the
following equation:

y[i] = waveform[i] × (0.2810639 – 0.5208972cos(w) + 0.1980399cos(2w))

where w = (2 )i/n and n is the waveform size.

Units

volts

X Units

Seconds

Resulting Array Size

inputSize

Triangle Window

C/C++ Equivalent: NISCOPE_VAL_TRIANGLE_WINDOW

A triangular window is applied to the waveform using the following equation:

240 ni.com
NI-SCOPE

y[i] = waveform[i] × (1 – |w|)

where w = (2i – n)/n and n is the number of elements in the waveform.

Units

Volts

X Units

Seconds

Resulting Array Size

inputSize

Hamming Window

C/C++ Equivalent: NISCOPE_VAL_HAMMING_WINDOW

A Hamming window is applied to the waveform using the following equation:

y[i] = x[i] [0.54 - 0.46cos(w)]

where w = (2 )i/n and n = the number of elements in x.

Note Hanning and Hamming windows are somewhat similar. However, in


the time domain, the Hamming window does not get as close to zero near
the edges as does the Hanning window.

© National Instruments 241


NI-SCOPE

Units

Volts

X Units

Seconds

Resulting Array Size

inputSize

Bessel IIR Filter

C/C++ Equivalent: NISCOPE_VAL_BESSEL_FILTER

The input waveform is filtered with a Bessel IIR algorithm. The type of the filter is
specified by Measurement Filter Type as any of the following values:

• lowpass
• highpass
• bandpass
• bandstop

The order of the filter is specified by the Filter IIR Order property or the
NISCOPE_ATTR_MEAS_FILTER_ORDER attribute. Also, a number of points equal
to the Percent Waveform Transient property or the
NISCOPE_ATTR_MEAS_FILTER_TRANSIENT_WAVEFORM_PERCENT attribute
divided by 100 times the input size are eliminated from the beginning of the filtered
waveform so that the transient response of the filter does not affect further
measurements.

Units

Volts

242 ni.com
NI-SCOPE

X Units

Seconds (nearly linear time delay)

Resulting Array Size

inputSize × (1 – Percent Waveform Transient property / 100)

or

inputSize × (1 –
NISCOPE_ATTR_MEAS_FILTER_TRANSIENT_WAVEFORM_PERCENT attribute /
100)

Related Topics

Bessel Filters

Related concepts:

• Bessel Filters

FIR Windowed Filter

C/C++ Equivalent: NISCOPE_VAL_WINDOWED_FIR_FILTER

FIR filters are well suited for applications that require phase information, because the
phase response is always linear. This linearity prevents distortion of time-domain
filtered data. The transient response of an FIR filter is a fixed number of points, filter
taps –1, which are eliminated in the filtered waveform returned from this VI.

Windowed FIR filters use the cutoff frequency as part of the design process, but the
cutoff is specified before the windowing operation. For Windowed FIR filters of
sufficient taps (more than 10 for a simple lowpass), the cutoff frequency has a
magnitude near 0.5 (or 6 dB down). This magnitude varies slightly with the order and
the window type.

The number of taps in the filter (that is, the number of coefficients in the filter) is given

© National Instruments 243


NI-SCOPE

by the Filter Taps property or the NISCOPE_ATTR_MEAS_FILTER_TAPS attribute.


This number must be odd for highpass and bandstop filters. The window for the
coefficients is set with the FIR Window property or the
NISCOPE_ATTR_MEAS_FIR_FILTER_WINDOW attribute.

Units

Volts

X Units

Seconds (linear time delay)

Resulting Array Size

inputSize × (Filter Taps property – 1)

or

inputSize × (NISCOPE_ATTR_MEAS_FILTER_TAPS attribute – 1)

Butterworth IIR Filter

C/C++ Equivalent: NISCOPE_VAL_BUTTERWORTH_FILTER

The input waveform is filtered with a Butterworth IIR algorithm. The type of the filter is
specified by Filter Type as any of the following values:

• lowpass
• highpass
• bandpass
• bandstop

The order of the filter is specified by the Filter IIR Order property or the
NISCOPE_ATTR_MEAS_FILTER_ORDER attribute. Also, a number of points equal
to Percent Waveform Transient property or the
NISCOPE_ATTR_MEAS_FILTER_TRANSIENT_WAVEFORM_PERCENT attribute
divided by 100 times the input size are eliminated from the beginning of the filtered

244 ni.com
NI-SCOPE

waveform so the transient response of the filter does not affect further measurements.

Units

Volts

X Units

Seconds (nonlinear time delay)

Resulting Array Size

inputSize × (1 – Percent Waveform Transient property / 100)

or

inputSize × (1 –
NISCOPE_ATTR_MEAS_FILTER_TRANSIENT_WAVEFORM_PERCENT attribute /
100)

Related Topics

Butterworth Filters

Related concepts:

• Butterworth Filters

Chebyshev IIR Filter

C/C++ Equivalent: NISCOPE_VAL_CHEBYSHEV_FILTER

The input waveform is filtered with a Chebyshev IIR algorithm. The type of the filter is
specified by the Filter Type property or the NISCOPE_ATTR_MEAS_FILTER_TYPE
attribute as any of the following values:

• lowpass
• highpass

© National Instruments 245


NI-SCOPE

• bandpass
• bandstop

The Chebyshev filter allows you to specify the passband ripple, the Filter Ripple or the
NISCOPE_ATTR_MEAS_FILTER_RIPPLE, in decibels. The order of the filter is
specified by the Filter Order property or the
NISCOPE_ATTR_MEAS_FILTER_ORDER attribute. Also, a number of points equal
to the Percent Waveform Transient property or the
NISCOPE_ATTR_MEAS_FILTER_TRANSIENT_WAVEFORM_PERCENT attribute
divided by 100 times the input size are eliminated from the beginning of the filtered
waveform, so the transient response of the filter does not affect further
measurements.

Units

Volts

X Units

Seconds (nonlinear time delay)

Resulting Array Size

inputSize × (1 – Percent Waveform Transient property / 100)

or

inputSize × (1 –
NISCOPE_ATTR_MEAS_FILTER_TRANSIENT_WAVEFORM_PERCENT attribute /
100)

Related Topics

Chebyshev Filters

Related concepts:

• Chebyshev Filters

246 ni.com
NI-SCOPE

Add Channels

C/C++ Equivalent: NISCOPE_VAL_ADD_CHANNELS

Adds the waveforms from two channels, where one channel is specified by the
channel parameter to the niScope Fetch Measurement (poly) VI (Measurement Scalar
DBL instance) or the niScope_FetchWaveformMeasurementArray function,
and the other channel is specified by the Other Channel property or the
NISCOPE_ATTR_MEAS_OTHER_CHANNEL attribute. Any processing steps registered
with the niScope Add Waveform Processing VI or the
niScope_AddWaveformProcessing function are completed for the other channel
before this measurement is taken. The two channels used in this measurement must
be different.

Units

Volts

X Units

Seconds

Resulting Array Size

inputSize (on the channel specified by the measurement VI or function)

Multiply Channels

C/C++ Equivalent: NISCOPE_VAL_MULTIPLY_CHANNELS

Multiplies the waveforms from two channels, where one channel is specified by the
channel parameter to the niScope Fetch Measurement (poly) VI (Measurement Scalar
DBL instance) or the niScope_FetchWaveformMeasurementArray function,
and the other channel is the Other Channel property or the
NISCOPE_ATTR_MEAS_OTHER_CHANNEL attribute. Any processing steps registered
with the niScope Add Waveform Processing VI or the
niScope_AddWaveformProcessing function are completed for the "other

© National Instruments 247


NI-SCOPE

channel" before this measurement is taken. The two channels used in this
measurement must be different.

Units

Volts2

X Units

Seconds

Resulting Array Size

inputSize (on the channel specified by the measurement VI)

Divide Channels

C/C++ Equivalent: NISCOPE_VAL_DIVIDE_CHANNELS

The channel specified by the channel parameter to niScope Fetch Measurement (poly)
VI (Measurement Scalar DBL instance) or the or the
niScope_FetchWaveformMeasurementArray function, is divided by the
channel specified by the Other Channel property or the
NISCOPE_ATTR_MEAS_OTHER_CHANNEL attribute. Any processing steps registered
with the niScope Add Waveform Processing VI or the
niScope_AddWaveformProcessing function are completed for the other
channel before this measurement is taken. The two channels used in this
measurement must be different.

Units

None

X Units

Seconds

248 ni.com
NI-SCOPE

Resulting Array Size

inputSize (on the channel specified by the measurement VI or function

Subtract Channels

C/C++ Equivalent: NISCOPE_VAL_SUBTRACT_CHANNELS

The channel specified by the Other Channel property or the


NISCOPE_ATTR_MEAS_OTHER_CHANNEL attribute is subtracted from the channel
specified by the channel parameter to niScope Fetch Measurement (poly) VI
(Measurement Scalar DBL instance) or the
niScope_FetchWaveformMeasurementArray function. Any processing steps
registered with the niScope Add Waveform Processing VI or the
niScope_AddWaveformProcessing function are completed for the other
channel before this measurement is taken. The two channels used in this
measurement must be different.

Units

Volts

X Units

Seconds

Resulting Array Size

inputSize (on the channel specified by the measurement VI or function)

Derivative

C/C++ Equivalent: NISCOPE_VAL_DERIVATIVE

The differences in the waveform are computed using the formula:

y[i] = (waveform[i+2] – waveform[i]) / (2 × dt), where dt is the time between two points.

© National Instruments 249


NI-SCOPE

Units

Volts/second

X Units

seconds

Resulting Array Size

inputSize - 2

Multi Acq Average

C/C++ Equivalent: NISCOPE_VAL_MULTI_ACQ_AVERAGE

The first time this measurement is called after it is cleared, an array the same size as
the input is initialized to the input waveform, and the initial x and x increment values
are set. Every subsequent call updates and returns the running average array without
affecting the size of the array. The average array is cleared by calling niScope Clear
Waveform Measurement Stats VI or the niScope_ClearWaveformMeasurementStats
with the measurement function parameter set to Multi Acq Average.

Units

Volts

X Units

Seconds

Resulting Array Size

inputSize (during the first call to this measurement after clearing it)

Array Integral

250 ni.com
NI-SCOPE

C/C++ Equivalent: NISCOPE_VAL_ARRAY_INTEGRAL

The waveform is integrated using Simpson's rule, fitting a parabola to every 3 points
with the equation:

y[i] = (waveform[i] + 4 × waveform[i + 1] + waveform[i + 2]) × dt/3

Units

Volts × Seconds

X Units

Seconds

Resulting Array Size

inputSize – 2

Inverse

C/C++ Equivalent: NISCOPE_VAL_INVERSE

The inverse is computed using the following formula:

y[i] = 1.0/waveform[i]. If waveform[i] is zero, the inverse is zero.

Units

1.0/volts

X Units

Seconds

Resulting Array Size

inputSize

© National Instruments 251


NI-SCOPE

Array Gain

C/C++ Equivalent: NISCOPE_VAL_ARRAY_GAIN

Every point in the waveform is multiplied by the scalar value Array Gain.

Units

Volts (if gain is unitless)

X Units

Seconds

Array Offset

C/C++ Equivalent: NISCOPE_VAL_ARRAY_OFFSET

The scalar value of measurement array offset is added to every point in the waveform.

Units

Volts (if offset is volts)

X Units

Seconds

FFT Amp Spectrum (dB)

C/C++ Equivalent: NISCOPE_VAL_FFT_AMP_SPECTRUM_DB

The amplitude spectrum is calculated using a split-radix real FFT. If the number of
acquired points is not a power of two, zeros are padded at the end of the waveform so
it is the next higher power of two. The FFT is scaled to decibels:

dB[i] = 20.0 × log10 (Amplitude[i] / Peak Amplitude)

252 ni.com
NI-SCOPE

Units

Decibels relative to peak

X Units

hertz

Resulting Array Size

Next higher power of two than the inputSize divided by two.

FFT Phase Spectrum

C/C++ Equivalent: NISCOPE_VAL_FFT_PHASE_SPECTRUM

The phase spectrum is calculated using a split-radix real FFT. If the number of acquired
points is not a power of two, zeros are padded at the end of the waveform so it is the
next higher power of two. The phase spectrum is unwrapped.

Units

Radians

X Units

hertz

Resulting Array Size

Next higher power of two than inputSize divided by two.

FFT Amp Spectrum (Volts RMS)

C/C++ Equivalent: NISCOPE_VAL_FFT_AMP_SPECTRUM_VOLTS_RMS

The amplitude spectrum is calculated using a split-radix real FFT. If the number of
acquired points is not a power of two, zeros are padded at the end of the waveform so

© National Instruments 253


NI-SCOPE

it is the next higher power of two.

Units

Volts RMS

X Units

hertz

Resulting Array Size

Next higher power of two than inputSize divided by two.

Polynomial Interpolation

C/C++ Equivalent: NISCOPE_VAL_POLYNOMIAL_INTERPOLATION

Polynomial interpolation allows oversampling or undersampling a waveform using


any order polynomial set by the Measurement Polynomial Interpolation Order
property or the NISCOPE_ATTR_MEAS_POLYNOMIAL_INTERPOLATION_ORDER
attribute. For example, an order of 1 corresponds to linear interpolation. The new
number of points is determined by the input size times the Measurement Interpolation
Sampling Factor property or the
NISCOPE_ATTR_MEAS_INTERPOLATION_SAMPLING_FACTOR attribute. The sampling
factor can be any number greater than 0.

For every consecutive (order + 1) number of points, a polynomial is fit to the points,
and new points are interpolated in a region of size dx in the middle of these order + 1
points, where dx is the original x spacing between two points in the waveform. This
results in the interpolation shrinking the total x size of the waveform, since points
cannot be accurately interpolated near the boundaries. In particular, the waveform
loses 0.5 × dx × (order – 1) amount of x range at both the beginning and the end of the
waveform.

Units

Volts

254 ni.com
NI-SCOPE

X Units

Seconds

Resulting Array Size

inputSize × Measurement Interpolation Sampling Factor property

or

inputSize × NISCOPE_ATTR_MEAS_INTERPOLATION_SAMPLING_FACTOR attribute

Scalar Measurements in NI-SCOPE

Scalar measurements are measurements on waveforms that produce a single value


result. For example, you could use a scalar measurement to find the voltage amplitude
or the median voltage of an acquisition.

The following is a categorized list of NI-SCOPE Scalar Measurements. The LabVIEW


name is shown first, followed by the equivalent C/C++ name.

RMS Voltage Measurements

LabVIEW C/C++
AC Estimate NISCOPE_VAL_AC_ESTIMATE
Voltage Cycle RMS NISCOPE_VAL_VOLTAGE_CYCLE_RMS
FFT Amplitude NISCOPE_VAL_FFT_AMPLITUDE
Voltage RMS NISCOPE_VAL_VOLTAGE_RMS

DC Voltage Measurements

LabVIEW C/C++
Voltage Average NISCOPE_VAL_VOLTAGE_AVERAGE
Voltage Cycle Average NISCOPE_VAL_VOLTAGE_CYCLE_AVERAGE

© National Instruments 255


NI-SCOPE

LabVIEW C/C++
DC Estimate NISCOPE_VAL_DC_ESTIMATE

Area Measurements

LabVIEW C/C++
Area NISCOPE_VAL_AREA
Integral NISCOPE_VAL_INTEGRAL
Cycle Area NISCOPE_VAL_CYCLE_AREA

Voltage Extrema Measurements

LabVIEW C/C++
Voltage Min NISCOPE_VAL_VOLTAGE_MIN
Voltage Low NISCOPE_VAL_VOLTAGE_LOW
Voltage Max NISCOPE_VAL_VOLTAGE_MAX
Voltage High NISCOPE_VAL_VOLTAGE_HIGH
Voltage Peak to Peak NISCOPE_VAL_VOLTAGE_PEAK_TO_PEAK
Voltage Amplitude NISCOPE_VAL_AMPLITUDE
Voltage Base NISCOPE_VAL_VOLTAGE_BASE
Voltage_Top NISCOPE_VAL_VOLTAGE_TOP
Voltage Base to Top NISCOPE_VAL_VOLTAGE_BASE_TO_TOP
Overshoot NISCOPE_VAL_OVERSHOOT
Preshoot NISCOPE_VAL_PRESHOOT

Reference Levels

LabVIEW C/C++
Low Ref Volts NISCOPE_VAL_LOW_REF_VOLTS
Mid Ref Volts NISCOPE_VAL_MID_REF_VOLTS

256 ni.com
NI-SCOPE

LabVIEW C/C++
High Ref Volts NISCOPE_VAL_HIGH_REF_VOLTS

Time Measurements

LabVIEW C/C++
Fall Time NISCOPE_VAL_FALL_TIME
Positive Duty Cycle NISCOPE_VAL_DUTY_CYCLE_POS
Falling Slew Rate NISCOPE_VAL_FALL_SLEW_RATE
Rise Time NISCOPE_VAL_RISE_TIME
Negative Width NISCOPE_VAL_WIDTH_NEG
Rising Slew Rate NISCOPE_VAL_RISE_SLEW_RATE
Positive Width NISCOPE_VAL_WIDTH_POS
Negative Duty Cycle NISCOPE_VAL_DUTY_CYCLE_NEG

Two Channel Measurements

LabVIEW C/C++
Phase Delay NISCOPE_VAL_PHASE_DELAY
Time Delay NISCOPE_VAL_TIME_DELAY

Period and Frequency Measurements

LabVIEW C/C++
Average Frequency NISCOPE_VAL_AVERAGE_FREQUENCY
FFT Frequency NISCOPE_VAL_FFT_FREQUENCY
Average Period NISCOPE_VAL_AVERAGE_PERIOD
Frequency NISCOPE_VAL_FREQUENCY
Period NISCOPE_VAL_PERIOD

© National Instruments 257


NI-SCOPE

Time Histogram Measurements

LabVIEW C/C++
Time Hist Hits NISCOPE_VAL_TIME_HISTOGRAM_HITS
Time Hist Mean + 3 Stdev NISCOPE_VAL_TIME_HISTOGRAM_MEAN_PLUS_3_STDEV
Time Hist Max NISCOPE_VAL_TIME_HISTOGRAM_MAX
Time Hist Median NISCOPE_VAL_TIME_HISTOGRAM_MEDIAN
Time Hist Mean NISCOPE_VAL_TIME_HISTOGRAM_MEAN
Time Hist Min NISCOPE_VAL_TIME_HISTOGRAM_MIN
Time Hist Peak to Peak NISCOPE_VAL_TIME_HISTOGRAM_PEAK_TO_PEAK
Time Hist Mode NISCOPE_VAL_TIME_HISTOGRAM_MODE
Time Hist Mean + Stdev NISCOPE_VAL_TIME_HISTOGRAM_MEAN_PLUS_STDEV
Time Hist New Hits NISCOPE_VAL_TIME_HISTOGRAM_NEW_HITS
Time Hist Mean + 2 Stdev NISCOPE_VAL_TIME_HISTOGRAM_MEAN_PLUS_2_STDEV
Time Hist Stdev NISCOPE_VAL_TIME_HISTOGRAM_STDEV

Voltage Histogram Measurements

LabVIEW C/C++
Volt Hist Hits NISCOPE_VAL_VOLTAGE_HISTOGRAM_HITS
Volt Hist Median NISCOPE_VAL_VOLTAGE_HISTOGRAM_MEDIAN
Volt Hist Max NISCOPE_VAL_VOLTAGE_HISTOGRAM_MAX
Volt Hist Min NISCOPE_VAL_VOLTAGE_HISTOGRAM_MIN
Volt Hist Mean NISCOPE_VAL_VOLTAGE_HISTOGRAM_MEAN
Volt Hist Mode NISCOPE_VAL_VOLTAGE_HISTOGRAM_MODE
Volt Hist Mean + Stdev NISCOPE_VAL_VOLTAGE_HISTOGRAM_MEAN_PLUS_STDEV
Volt Hist New Hits NISCOPE_VAL_VOLTAGE_HISTOGRAM_NEW_HITS
Volt Hist Mean + 2 Stdev NISCOPE_VAL_VOLTAGE_HISTOGRAM_MEAN_PLUS_2_STDEV
Volt Hist Peak to Peak NISCOPE_VAL_VOLTAGE_HISTOGRAM_PEAK_TO_PEAK

258 ni.com
NI-SCOPE

LabVIEW C/C++
Volt Hist Mean + 3 Stdev NISCOPE_VAL_VOLTAGE_HISTOGRAM_MEAN_PLUS_3_STDEV
Volt Hist Stdev NISCOPE_VAL_VOLTAGE_HISTOGRAM_STDEV

Related concepts:

• AC Estimate
• Voltage Cycle RMS
• FFT Amplitude
• Voltage RMS
• Voltage Average
• Voltage Cycle Average
• DC Estimate
• Area
• Integral
• Cycle Area
• Voltage Min
• Voltage Low
• Voltage Max
• Voltage High
• Voltage Peak to Peak
• Voltage Amplitude
• Voltage Base
• Voltage Top
• Voltage Base to Top
• Overshoot
• Preshoot
• Low Ref Volts
• Mid Ref Volts
• High Ref Volts
• Fall Time
• Positive Duty Cycle
• Falling Slew Rate
• Rise Time
• Negative Width
• Rising Slew Rate

© National Instruments 259


NI-SCOPE

• Positive Width
• Negative Duty Cycle
• Phase Delay
• Time Delay
• Average Frequency
• FFT Frequency
• Average Period
• Frequency
• Period
• Time Hist Hits
• Time Hist Mean + 3 Stdev
• Time Hist Max
• Time Hist Median
• Time Hist Mean
• Time Hist Min
• Time Hist Peak to Peak
• Time Hist Mode
• Time Hist Mean + Stdev
• Time Hist New Hits
• Time Hist Mean + 2 Stdev
• Time Hist Stdev
• Volt Hist Hits
• Volt Hist Median
• Volt Hist Max
• Volt Hist Min
• Volt Hist Mean
• Volt Hist Mode
• Volt Hist Mean + Stdev
• Volt Hist New Hits
• Volt Hist Mean + 2 Stdev
• Volt Hist Peak to Peak
• Volt Hist Mean + 3 Stdev
• Volt Hist Stdev

AC Estimate

C/C++ Equivalent: NISCOPE_VAL_AC_ESTIMATE

260 ni.com
NI-SCOPE

The DC estimate is subtracted from the waveform, and a Hanning window is applied to
give a processed waveform. The RMS voltage is calculated with the following equation:

sqrt ( [Σ processed waveform[i]2] / [numPoints × enbw × cg2] ),

where the equivalent noise bandwidth (enbw) for the Hanning window is 1.5, and the
coherent gain (cg) is 0.5.

This algorithm minimizes the effect of an uneven number of waveform cycles in the
measurement, which could arbitrarily increase or decrease the RMS value.

Units

Volts RMS

Voltage Cycle RMS

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_CYCLE_RMS

Voltage Cycle RMS = sqrt [(Σ waveform[i]^2) / pointsPerPeriod]

The number of points in a period is calculated using the equation:

pointsPerPeriod = period / dt

where period is the measured period of the signal and dt is the time between two
points. The result will then be converted to an integer from a floating point value.

Units

Volts RMS

Related concepts:

• Period

Voltage Cycle Average

© National Instruments 261


NI-SCOPE

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_CYCLE_AVERAGE

Voltage Cycle Average = (Σ waveform[i]) / pointsPerPeriod

The number of points in a period in volts is calculated using the equation:

pointsPerPeriod = period / dt

where period is the measured period of the signal and dt is the time between two
points. The result will then be converted to an integer from a floating point value.

Related concepts:

• Period

FFT Amplitude

C/C++ Equivalent: NISCOPE_VAL_FFT_AMPLITUDE

The FFT amplitude spectrum is calculated using a split-radix real FFT, and the
maximum amplitude is returned. If the input waveform size is not a power of two, the
waveform is zero-padded to the next higher power of two. For best results, verify that
your actual record length is a power of 2.

Units

Volts RMS

Voltage RMS

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_RMS

Determined by the following equation:

Voltage RMS = sqrt [(Σ waveform[i]2) / numPoints]

262 ni.com
NI-SCOPE

Units

Volts RMS

Voltage Average

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_AVERAGE

Determined by the following equation:

Voltage Average = Σ waveform[i] / numPoints

Units

Volts

DC Estimate

C/C++ Equivalent: NISCOPE_VAL_DC_ESTIMATE

A Hanning window is applied to give a "processed waveform" and the voltage average
is calculated with the following equation:

voltage average = (Σ processed waveform[i] ) / (cg × numPoints),

where the coherent gain (cg) of the Hanning window is 0.5 – the DC gain of the
window.

The algorithm minimizes the effect of an uneven number of waveform cycles. For
example, performing a simple voltage average on 5.5 cycles of a sine waveform gives a
slightly incorrect DC estimate if the extra half cycle is not evenly divided between the
positive and negative portions of the sine wave.

Units

Volts

© National Instruments 263


NI-SCOPE

Area

C/C++ Equivalent: NISCOPE_VAL_AREA

area = voltage average × numPoints × delta time between two points.

Units

Volts × Seconds

Related concepts:

• Voltage Average

Integral

C/C++ Equivalent: NISCOPE_VAL_INTEGRAL

Numerical integration is done using Simpson's rule.

Units

Volts × seconds

Cycle Area

C/C++ Equivalent: NISCOPE_VAL_CYCLE

Cycle area = voltage cycle average × pointsPerPeriod × dt

where pointsPerPeriod is defined in the voltage cycle average description.

Units

Volts × Seconds

Related concepts:

264 ni.com
NI-SCOPE

• Voltage Cycle Average

Voltage Min

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_MIN

The waveform is searched for the minimum point in volts.

Voltage Low

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_LOW

The last acquisition histogram method is used where the voltage low result is the
voltage of the histogram bin with the maximum number of hits below 40% of the
waveform's voltage peak-to-peak value. This calculation is useful for ignoring the
overshoot and preshoot on square waves.

Units

Volts

Voltage Max

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_MAX

The waveform is searched for its maximum point.

Units

Volts

Voltage High

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HIGH

The last-acquisition histogram method is used, where the voltage high result is the

© National Instruments 265


NI-SCOPE

voltage of the histogram bin with the maximum number of hits above 60% of the
waveform's voltage peak-to-peak value. This calculation is useful for ignoring the
overshoot and preshoot on square waves.

Units

Volts

Voltage Amplitude

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_AMPLITUDE

The voltage high minus the voltage low.

Units

Volts

Related concepts:

• Voltage High
• Voltage Low

Voltage Peak to Peak

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_PEAK_TO_PEAK.

The maximum voltage minus the minimum voltage in volts.

Related concepts:

• Voltage Max
• Voltage Min

Voltage Base

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_BASE

266 ni.com
NI-SCOPE

If the histogram bin corresponding to voltage low has over five percent of the total hits,
the voltage low result is returned. Otherwise, the voltage minimum calculation is
returned. This allows using the voltage base to get a reasonable answer for either a
square wave (ignoring the overshoot and preshoot) or a triangle wave (where a
histogram fails).

Units

Volts

Related concepts:

• Voltage Low
• Voltage Min

Voltage Top

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_TOP

If the histogram bin corresponding to voltage high has over five percent of the total
hits, the voltage high result is returned. Otherwise, the voltage maximum calculation is
returned. This allows using the voltage top to get a reasonable answer for either a
square wave (ignoring the overshoot and preshoot) or a triangle wave (where a
histogram fails).

Units

Volts

Related concepts:

• Voltage High
• Voltage Max

Voltage Base to Top

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_BASE_TO_TOP

© National Instruments 267


NI-SCOPE

Voltage top minus voltage base.

Units

Volts

Related concepts:

• Voltage Top
• Voltage Base

Overshoot

C/C++ Equivalent: NISCOPE_VAL_OVERSHOOT

The measurement is taken on the first edge of the waveform. If two edges exist, the
algorithm finds the time interval from the first edge until one half the time to the
second edge. The local maxima and minima are found in this interval. If only one edge
is present in the waveform, the local maximum and minimum is found between the
first edge and the end of the waveform.

If the first edge is positive sloped, overshoot = 100 × (local maximum - voltage high) /
voltage amplitude.

If the first edge is negative sloped, overshoot = 100 × (voltage low - local minimum) /
voltage amplitude.

The following figure shows an example of an overshoot measurement.

268 ni.com
NI-SCOPE

Local Maximum
Voltage High
High Reference Level

Mid Reference Level

Time Interval
Searched for
Max (T E/2)

Low Reference Level


Voltage Low

Time Between Edges ( TE)

Units

Percentage

Related concepts:

• Voltage High
• Voltage Amplitude
• Voltage Low

Preshoot

C/C++ Equivalent: NISCOPE_VAL_PRESHOOT

The measurement is taken on the second edge of the waveform if two edges exist. The
algorithm finds the time interval from the middle time between the two edges until
the second edge. The local maxima and minima are found in this interval. If only one
edge is present in the waveform, the local maximum and minimum are found from the
start of the waveform to the first edge.

If the edge is negative sloped, preshoot = 100 × (local maximum – voltage high) /
voltage amplitude.

© National Instruments 269


NI-SCOPE

If the edge is positive sloped, preshoot = 100 × (voltage low – local minimum) / voltage
amplitude.

Units

Percentage

Details

The following figure shows an example of a preshoot measurement.

Local Maximum
Voltage High
High Reference Level

Time Interval
Searched for
Max (T E/2)

Low Reference Level


Voltage Low

Time Between Edges ( TE)

Related concepts:

• Voltage High
• Voltage Amplitude
• Voltage Low

Low Ref Volts

C/C++ Equivalent: NISCOPE_VAL_LOW_REF_VOLTS

The voltage corresponding to the low reference level. If the Reference Level Units

270 ni.com
NI-SCOPE

property or the NISCOPE_ATTR_MEAS_REF_LEVEL_UNITS attribute is set to Voltage,


the value of the Channel Based Low Ref Level property or the
NISCOPE_ATTR_MEAS_CHAN_LOW_REF_LEVEL attribute is returned.

If the Reference Level Units property or the NISCOPE_ATTR_MEAS_REF_LEVEL_UNITS


attribute is set to Percentage, the voltage is calculated with the method specified by
the Percentage Units Method property or the
NISCOPE_ATTR_MEAS_PERCENTAGE_METHOD attribute.

Units

Volts

Mid Ref Volts

C/C++ Equivalent: NISCOPE_VAL_MID_REF_VOLTS

The voltage corresponding to the mid reference level. If the Reference Level Units
property or the NISCOPE_ATTR_MEAS_REF_LEVEL_UNITS attribute is set to Voltage,
the value of the Channel Based Mid Ref property or the
NISCOPE_ATTR_MEAS_CHAN_MID_REF_LEVEL attribute is returned.

If the Reference Level Units property or the NISCOPE_ATTR_MEAS_REF_LEVEL_UNITS


attribute is set to Percentage, the voltage is calculated with the method specified by
the Percentage Units Method property or the
NISCOPE_ATTR_MEAS_PERCENTAGE_METHOD attribute.

Units

Volts

High Ref Volts

C/C++ Equivalent: NISCOPE_VAL_HIGH_REF_VOLTS

The voltage corresponding to the high reference level. If the Reference Level Units
property or the NISCOPE_ATTR_MEAS_REF_LEVEL_UNITS attribute is set to Voltage,

© National Instruments 271


NI-SCOPE

the value of the Channel Based High Ref property or the


NISCOPE_ATTR_MEAS_CHAN_HIGH_REF_LEVEL attribute is returned.

If the Reference Level Units property or the NISCOPE_ATTR_MEAS_REF_LEVEL_UNITS


attribute is set to Percentage, the voltage is calculated with the method specified by
the Percentage Units Method property or the
NISCOPE_ATTR_MEAS_PERCENTAGE_METHOD attribute.

Units

Volts

Fall Time

C/C++ Equivalent: NISCOPE_VAL_FALL_TIME

The time span in seconds from when the waveform crosses the high reference level
until it crosses the low reference level. The measurement starts at the left edge of the
waveform and finds all high reference level crossings until a low reference level
crossing. The final high reference level crossing is used in the calculation.

The reference levels are specified by Channel Based Low Ref and Channel Based High
Ref, and their default values are 10% and 90%.

The following figure shows an example of fall time.

High Reference Level

Low Reference Level

Rise Fall
Time Time

272 ni.com
NI-SCOPE

Units

Seconds

Positive Duty Cycle

C/C++ Equivalent: NISCOPE_VAL_DUTY_CYCLE_POS

The positive width divided by the period times 100.

Units

Percentage

Related concepts:

• Positive Width
• Period

Falling Slew Rate

C/C++ Equivalent: NISCOPE_VAL_FALL_SLEW_RATE

The low reference voltage minus the high reference voltage is divided by the fall-time
calculation. The result is always negative.

Units

Volts/second

Related concepts:

• Low Ref Volts


• High Ref Volts

Rise Time

© National Instruments 273


NI-SCOPE

C/C++ Equivalent: NISCOPE_VAL_RISE_TIME

The time span in seconds from when the waveform crosses the low reference level
until it crosses the high reference level. The measurement starts at the left edge of the
waveform and finds all low reference level crossings until a high reference level
crossing. The final low reference level crossing is used in the calculation.

The reference levels are specified by Channel Based Low Ref and Channel Based High
Ref, and their default values are 10% and 90%.

The following figure shows an example of rise time.

High Reference Level

Low Reference Level

Rise Fall
Time Time

Units

Seconds

Negative Width

C/C++ Equivalent: NISCOPE_VAL_WIDTH_NEG

The time difference between the first two mid reference level crossings, where the
slopes are negative and positive, respectively. A digital hysteresis is used when finding
the crosspoints.

274 ni.com
NI-SCOPE

Units

Seconds

Rising Slew Rate

C/C++ Equivalent: NISCOPE_VAL_RISE_SLEW_RATE

The high reference voltage minus the low reference voltage is divided by the rise-time
calculation.

Units

Volts/second

Related concepts:

• High Ref Volts


• Low Ref Volts
• Rise Time

Positive Width

C/C++ Equivalent: NISCOPE_VAL_WIDTH_POS

The time difference in seconds between the first two mid reference level crossings,
where the slopes are positive and negative respectively. A digital hysteresis is used
when finding the crosspoints.

Units

Seconds

Negative Duty Cycle

C/C++ Equivalent: NISCOPE_VAL_DUTY_CYCLE_NEG

© National Instruments 275


NI-SCOPE

The negative width divided by the period times 100.

Units

Percentage

Related concepts:

• Negative Width
• Period

Phase Delay

C/C++ Equivalent: NISCOPE_VAL_PHASE_DELAY

The time delay divided by the period (of the waveform on the channel specified by the
measurement VI or function) times 360 degrees.

Units

Degrees

Related concepts:

• Time Delay

Time Delay

C/C++ Equivalent: NISCOPE_VAL_TIME_DELAY

The time between a rising or falling edge on one channel and the subsequent edge, by
default of the same type, on a second channel.

The algorithm operates as follows:

1. Finds the first time that the waveform from the channel specified by the channels
parameter crosses its mid-reference level.

276 ni.com
NI-SCOPE

2. Finds the first two times that the waveform from the channel the Other Channel
property or the NISCOPE_ATTR_MEAS_OTHER_CHANNEL attribute crosses its mid-
reference level.
3. By default, measures the time delay across channels as rising edge to rising edge
or falling edge to falling edge, depending on which edge type the algorithm first
detects on the first channel.

Tip You can invert the data from either or both channels by adding a
processing step and using the array measurement gain with a value of -1.
With this method, you can also measure from rising edge to falling edge or
from falling edge to rising edge by inverting a signal on only one of the two
channels.

The mid-reference level is stored on a per-channel basis, and mid-reference levels do


not need to be the same. All reference levels use a digital hysteresis.

Units

Seconds

Average Frequency

C/C++ Equivalent: NISCOPE_VAL_AVERAGE_FREQUENCY

1.0 divided by the average period.

Units

hertz

Related concepts:

• Average Period

FFT Frequency

© National Instruments 277


NI-SCOPE

C/C++ Equivalent: NISCOPE_VAL_FFT_FREQUENCY

The FFT amplitude spectrum is calculated using a split-radix real FFT, and the
frequency corresponding to the maximum amplitude is returned. If the input
waveform size is not a power of two, the waveform is zero padded to the next higher
power of two. The frequency resolution is sampling rate / number of points.

The DC bin of the FFT is ignored when searching for the maximum amplitude, so the
FFT frequency should ignore any DC offsets. However, the zero padding used in the
FFT measurement can introduce other low frequency components if the waveform has
a large DC offset. To avoid problems, make sure the Horizontal Actual Record Length
property or the NISCOPE_ATTR_HORZ_RECORD_LENGTH attribute is a power of 2, so
no zero padding occurs. This property/attribute can be fetched using the niScope
Actual Record Length VI or the niScope_ActualRecordLength function. Alternatively,
configuring the digitizer for AC coupling solves the problem.

Units

hertz

Average Period

C/C++ Equivalent: NISCOPE_VAL_AVERAGE_PERIOD

Up to 256 mid reference level crossings are found on the waveform, using a digital
hysteresis. The time difference between the last crossing and the first crossing is
divided by the number of periods found in the waveform. The last crossing is defined
as the last crossing in the waveform with the same slope as the first crossing, so an
integer number of periods exist in the waveform.

Units

Seconds

Frequency

C/C++ Equivalent: NISCOPE_VAL_FREQUENCY

278 ni.com
NI-SCOPE

1.0 divided by the period, in hertz.

Related concepts:

• Period

Period

C/C++ Equivalent: NISCOPE_VAL_PERIOD

Finds the time in seconds between the first and third mid reference level crosspoints. A
hysteresis window is applied when finding crosspoints. The mid reference level is 50%
by default and is set with Channel Based Mid Ref Level.

Units

Seconds

Time Hist Hits

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_HITS

Number of points in the histogram.

Time Hist Max

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_MAX

The highest bin value with at least one hit.

Units

Seconds

Time Hist Mean

© National Instruments 279


NI-SCOPE

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_MEAN

Histogram Mean = [ Σ (bin hits × bin value) ] / time hist hits.

The bin value is the center time value of the histogram bin.

Units

Seconds

Related concepts:

• Time Hist Hits

Time Hist Mean + Stdev

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_MEAN_PLUS_STDEV

The percentage of hits in the histogram between mean minus the standard deviation
and mean plus the standard deviation. The percentage is returned in the range 0–100.

Units

Percentage

Time Hist Mean + 2 Stdev

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_MEAN_PLUS_2_STDEV

The percentage of hits in the histogram between the mean minus two times the
standard deviation and the mean plus two times the standard deviation. The
percentage is returned in the range 0—100.

Units

Percentage

280 ni.com
NI-SCOPE

Time Hist Mean + 3 Stdev

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_MEAN_PLUS_3_STDEV

The percentage of hits in the histogram between the mean minus three times the
standard deviation and the mean plus three times the standard deviation. The
percentage is returned in the range 0—100.

Units

Percentage

Time Hist Median

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_MEDIAN

The bin value where half the histogram hits are above it and half the histogram hits are
below.

Units

Seconds

Time Hist Min

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_MIN

The lowest bin value with at least one hit.

Units

Seconds

Time Hist Mode

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_MODE

© National Instruments 281


NI-SCOPE

The bin value with the most hits. If there is a tie, the lower voltage or time value is
returned.

Units

Seconds

Time Hist New Hits

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_NEW_HITS

Number of points added to the histogram by the most recent acquisition.

Time Hist Peak to Peak

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_PEAK_TO_PEAK

Histogram maximum minus the histogram minimum.

Units

Seconds

Time Hist Stdev

C/C++ Equivalent: NISCOPE_VAL_TIME_HISTOGRAM_STDEV

Units

Seconds

Volt Hist Hits

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_HITS

282 ni.com
NI-SCOPE

Number of points in the histogram.

Volt Hist Max

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_MAX

The highest bin value with at least one hit.

Units

Volts

Volt Hist Mean

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_MEAN

Histogram Mean = [ ( (bin hits × bin value) ] / volt hist hits.

The bin value is the center voltage value of the histogram bin.

Units

Volts

Related concepts:

• Volt Hist Hits

Volt Hist Mean + Stdev

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_MEAN_PLUS_STDEV

The percentage of hits in the histogram between mean minus the standard deviation
and mean plus the standard deviation. The percentage is returned in the range 0–100.

© National Instruments 283


NI-SCOPE

Units

Percentage

Volt Hist Mean + 2 Stdev

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_MEAN_PLUS_2_STDEV

The percentage of hits in the histogram between the mean minus two times the
standard deviation and the mean plus two times the standard deviation. The
percentage is returned in the range 0–100.

Units

Percentage

Volt Hist Mean + 3 Stdev

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_MEAN_PLUS_3_STDEV

The percentage of hits in the histogram between the mean minus three times the
standard deviation and the mean plus three times the standard deviation. The
percentage is returned in the range 0–100.

Units

Percentage

Volt Hist Median

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_MEDIAN

The bin value where half the histogram hits are above it and half the histogram hits are
below.

284 ni.com
NI-SCOPE

Units

Volts

Volt Hist Min

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_MIN

The lowest bin value with at least one hit.

Units

Volts

Volt Hist Mode

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_MODE

The bin value with the most hits. If there is a tie, the lower voltage or time value is
returned.

Units

Volts

Volt Hist New Hits

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_NEW_HITS

Number of points added to the histogram by the most recent acquisition.

Volt Hist Peak to Peak

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_PEAK_TO_PEAK

Histogram maximum minus the histogram minimum.

© National Instruments 285


NI-SCOPE

Units

Volts

Volt Hist Stdev

C/C++ Equivalent: NISCOPE_VAL_VOLTAGE_HISTOGRAM_STDEV

Units

Volts

NI-SCOPE Instrument Driver FPGA Extensions

NI-SCOPE instrument driver FPGA extensions for reconfigurable oscilloscopes enable


you to use precompiled FPGA bitfiles to customize the behavior of a reconfigurable
oscilloscope FPGA while maintaining the functionality of the NI-SCOPE instrument
driver.

Before you begin using NI-SCOPE instrument driver FPGA extensions, you must install
NI-SCOPE and LabVIEW. You must also download a precompiled bitfile to use NI-
SCOPE instrument driver FPGA extensions. Visit ni.com/info and enter ex6h8h as
the Info Code, then select your hardware, and browse the download page to download
a NI-SCOPE FPGA extensions precompiled FPGA bitfile.

Note Certain NI-SCOPE instrument driver FPGA extensions might require


you to install the instrument design libraries. Refer to the installation
requirements of individual NI-SCOPE instrument driver FPGA extensions
located on the download page for more information.

The precompiled bitfiles are included in examples that illustrate how to use the
precompiled bitfiles. These examples contain three parts: a precompiled bitfile
featuring application-specific IP, a host-based example that uses NI-SCOPE, and IP

286 ni.com
NI-SCOPE

dependencies, such as source code. These examples are distributed through the VI
Package Manager, which installs with LabVIEW.

When you install NI-SCOPE, model-specific folders for the supported devices are
created in the following location:

• Windows 10/8.1/7: Users\Public\Documents\National


Instruments\FPGA Extensions Bitfiles

Note The instrument driver searches for precompiled bitfiles in these


model-specific folders. For the instrument driver to recognize your
precompiled bitfile, ensure that the precompiled bitfile is located in the
model-specific folder that corresponds to your device.

Related Topics

Using NI-SCOPE Instrument Driver FPGA Extensions

Visit ni.com/info and enter exkt9h as the Info Code to learn more about
instrument driver FPGA extensions.

Related concepts:

• Using NI-SCOPE Instrument Driver FPGA Extensions

Using NI-SCOPE Instrument Driver FPGA Extensions

Before you begin using NI-SCOPE instrument driver FPGA extensions, you must install
NI-SCOPE and LabVIEW. When you install NI-SCOPE, model-specific folders for the
supported devices are created in the following location:

• Windows 10/8.1/7: Users\Public\Documents\National


Instruments\FPGA Extensions Bitfiles

Note The instrument driver searches for precompiled bitfiles in these


model-specific folders. In order for the instrument driver to recognize your

© National Instruments 287


NI-SCOPE

precompiled bitfile, ensure that the precompiled bitfile is located in the


model-specific folder that corresponds to your device.

To use NI-SCOPE instrument driver FPGA extensions, you must specify the precompiled
bitfile you want to use when you initialize the instrument driver session. If you want to
access additional FPGA functionality provided by the precompiled bitfile, you must
also obtain an FPGA reference to use with the LabVIEW FPGA host interface.

Complete the following steps to open an instrument driver session that uses a
precompiled bitfile:

1. Call the niScope Initialize with Options VI.


2. Wire the Driver Setup string to the options string input.
3. Include the Bitfile tag in the Driver Setup string, and set the value of the Bitfile tag
to the name of the bitfile you want to load, as shown in the following example
string:

DriverSetup=Bitfile:filename.lvbitx

where filename.lvbitx is the file name of the bitfile you want to load.

Complete the following steps to obtain an FPGA reference to use with the LabVIEW
FPGA host interface:

1. Call the niScope FPGA Bitfile Path property. The FPGA Bitfile Path property returns
the absolute path to the bitfile as a string.
2. Wire the output of the FPGA Bitfile Path property to the String input of the String to
Path function.
3. Wire the Path output of the String to Path function to the Bitfile Path input of the
Open Dynamic Bitfile Reference function.

Visit ni.com/info and enter ex6h8h as the Info Code to download precompiled NI-
SCOPE instrument driver FPGA extensions bitfiles.

Visit ni.com/info and enter exkt9h as the Info Code to learn more about
instrument driver FPGA extensions.

288 ni.com
NI-SCOPE

Manual Adjustment of NI-TClk Synchronization

Manual adjustment is the process of minimizing synchronization skew and jitter by


adjusting Trigger Clock (TClk) signals using an instrument driver.

You can use the NI-TClk API to synchronize the action of multiple instruments. Manual
adjustment tunes the sample clocks and triggers of instruments that have been
synchronized using NI-TClk, which enables better alignment than you can achieve
using NI-TClk synchronization alone.

The following terms apply to manual adjustment and NI-TClk synchronization:

• Skew—Misalignment between instrument timing across slots of a chassis and


across chassis that is caused by clock and analog path delay differences
• Jitter—Variation in instrument alignment that can be expected with each call to
the NI-TClk Synchronize function
• Repeatability—Consistency in the effect of the NI-TClk Synchronize function
across instruments; reduction in jitter

Perform manual adjustment to obtain the best possible NI-TClk synchronization


between supported instruments.

Refer to the specifications for your instrument for the synchronization specifications
you can expect using NI-TClk with or without manual adjustment.

Note Note Manual adjustment can minimize skew only between multiple
instruments, not between multiple channels of the same physical
instrument. Mulitple channels of the same physical instrument are always
synchronized.

Improving NI-TClk Synchronization of Oscilloscopes with Manual


Adjustment

Manual adjustment significantly reduces skew between instruments and enhances


synchronization repeatability, which results in greater coherence of multi-instrument

© National Instruments 289


NI-SCOPE

measurements.

For background on manual adjustment, refer to Manual Adjustment of NI-TClk


Synchronization.

Before beginning this procedure, complete the following:

• Self-calibrate all instruments in your test system.


• Obtain a reference signal with as low skew and jitter as possible.

Tip Tip The lower the skew and jitter of your reference signal, the better
the synchronization you can achieve between instruments using manual
adjustment.

This procedure applies to:

• Manual adjustment of NI oscilloscopes that support NI-TClk synchronization


• Synchronizing multiple NI oscilloscopes of a single bus type and model number
(for example, all PXI-5922 modules, but not PXI-5922 and PCI-5922 modules)

Complete the following steps to perform manual adjustment for your oscilloscopes.

Set Up

1. Connect the reference signal to all instruments you are synchronizing.

Tip Tip For best results, use cables of the same model and of identical
length for each connection.

2. Configure an acquisition as appropriate for your reference signal.


3. Synchronize the instruments in your session using the NI-TClk API.
a. (LabVIEW, LabVIEW NXG only) Call NI-SCOPE Get Session Reference to generate
a reference from NI-SCOPE that NI-TClk can use.
b. Call NI-TClk Configure for Homogeneous Triggers.
c. Call NI-TClk Synchronize.
d. Call NI-TClk Initiate.

Calculate Adjustment

290 ni.com
NI-SCOPE

1. Fetch data from the instruments and measure the skew and jitter between the
waveforms each instrument is acquiring, for example, by performing a point-by-
point average.
2. Use any of the adjustment techniques applicable to your instrument to reduce the
skew and jitter you measured:

Adjustment
Instrument Description When to Use
Technique
◦ PXIe/PXI/
PCI-5105
◦ Adjustment
◦ PXIe/PXI/
range: ±1 Sample
PCI-5114
Clock Period
◦ PXIe/PXI/
Offsets the ◦ Adjustment unit:
PCI-5122
sample clock seconds
◦ PXI/ NI-SCOPE
from the Primary technique
PCI-5124 Adjust
◦ PXI/ Sample
reference clock by Tip Tip for reducing skew
the specified You can and jitter for
PCI-5142 Clock
amount. call this
◦ PXI/ Relative supported
function
PCI-5152 Delay
Reduces skew instruments.1
multiple
◦ PXI/ function
between times to
PCI-5153
instruments. implement
◦ PXI/
cumulative
PCI-5154
delay.
◦ PXIe-5622
◦ PXI/
PCI-5922

Offsets the
sample clock
◦ PXIe-5110 from the
◦ PXIe-5111 NI-SCOPE reference clock by ◦ Adjustment
Primary technique
◦ PXIe-5113 Absolute the specified range: ±0.5
for reducing skew
◦ PXIe-5163 Sample amount. Sample Clock
and jitter for
◦ PXIe-5164 Clock Period
supported
◦ PXIe-5170 Offset Reduces skew ◦ Adjustment unit:
instruments.
◦ PXIe-5171 property between seconds
◦ PXIe-5172 instruments and
improves
synchronization

© National Instruments 291


NI-SCOPE

Adjustment
Instrument Description When to Use
Technique

repeatability.

To apply offset
All oscilloscopes when adjustment
that support NI- Offsets the sample clock of an NI-TClk beyond the range
TClk session relative to the other synchronized of other
NI-TClk
synchronization Sample NI-TClk sessions. techniques is
except the needed.
Clock Delay
following: Reduces skew between instruments.
property
Sole technique for
◦ Adjustment range: ±∞ reducing skew for
◦ PXIe-51852
◦ Adjustment unit: seconds the PXIe-5160 and
◦ PXIe-51862 PXIe-5162.

3. Repeat steps 4 and 5 until the measured skew and/or jitter are as low as possible.

Apply Adjustment

1. Depending on your adjustment technique(s) from step 5, save the adjustment you
used to minimize skew and/or jitter.

Adjustment
Description
Technique

The NI-SCOPE Oscillator Phase DAC Value property converts the time offset you
applied with NI-SCOPE Adjust Sample Clock Relative Delay into a value that can
apply the manual adjustment across sessions and improve synchronization
NI-SCOPE
repeatability.
Adjust
Sample Clock a. Add the NI-SCOPE Oscillator Phase DAC Value property to your program
Relative and read its value.
Delay b. Save the Oscillator Phase DAC Value you read.

Note Note You do not need to include the NI-SCOPE Adjust

292 ni.com
NI-SCOPE

Adjustment
Description
Technique

Sample Clock Relative Delay function in your program after you


have applied the adjustment with the NI-SCOPE Oscillator
Phase DAC Value property.

All other
adjustment Save the value of each property.
techniques

2. Write the saved value(s) of the property or properties you used prior to calling the
NI-TClk Synchronize function in other sessions when using the test system in an
identical physical configuration. Writing the manual adjustment property or
properties to a session applies the improved synchronization to the session,
regardless of the signals the test system is acquiring.

Reperform manual adjustment for all supported instruments in the following


situations:

• If any chassis, instruments, cables, or other physical components of your test


system are moved, replaced, or removed
• If the onboard temperature of any module in the test system changes by ±1° C
since the last self-calibration
• If the trigger type, filtering characteristics, or any clocking parameters of your
application are changed

Reperform manual adjustment for specific instruments in these additional situations:

• PXIe-5185 and PXIe-5186 only:


◦ If any instrument is reset
◦ If any instrument is self-calibrated
◦ If the host computer or a chassis within the test system is rebooted
• PXI-5922 and PCI-5922 only: If any channel-based properties are changed

1
Must be used in conjunction with the NI-SCOPE Oscillator Phase DAC Value property.

© National Instruments 293


NI-SCOPE

2
PXIe-5185 and PXIe-5186 only: These oscilloscopes have limited support for manual
adjustment. To calculate an adjustment for these oscilloscopes, you must set the NI-
SCOPE Oscillator Phase DAC Value property and determine the effect it has on
measured skew and jitter experimentally.

• Reduces skew between instruments and improves synchronization repeatability


• Valid values: [0, 65535]

This is the sole technique for reducing skew and jitter for the PXIe-5185 and PXIe-5186.

Related concepts:

• Improving NI-TClk Synchronization of Oscilloscopes with Manual Adjustment

294 ni.com © 2025 National Instruments Corporation.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy