Rigol MSO5000-E Programming Manual

Add to My manuals
278 Pages

advertisement

Rigol MSO5000-E Programming Manual | Manualzz

Programming Guide

MSO5000-E Series Digital Oscilloscope

May. 2020

RIGOL

TECHNOLOGIES CO., LTD.

RIGOL

Guaranty and Declaration

Copyright

© 2020

RIGOL

TECHNOLOGIES CO., LTD. All Rights Reserved.

Trademark Information

RIGOL

® is the trademark of

RIGOL

TECHNOLOGIES CO., LTD.

Publication Number

PGA28102-1110

Software Version

00.01.02.00.05

Software upgrade might change or add product features. Please acquire the latest version of the manual from

RIGOL

website or contact

RIGOL

to upgrade the software.

Notices

RIGOL

products are covered by P.R.C. and foreign patents, issued and pending.

RIGOL

reserves the right to modify or change parts of or all the specifications and pricing policies at the company ’s sole decision.

Information in this publication replaces all previously released materials.

Information in this publication is subject to change without notice.

RIGOL

shall not be liable for either incidental or consequential losses in connection with the furnishing, use, or performance of this manual, as well as any information contained.

Any part of this document is forbidden to be copied, photocopied, or rearranged without prior written approval of

RIGOL

.

Product Certification

RIGOL

guarantees that this product conforms to the national and industrial standards in China as well as the ISO9001:2015 standard and the ISO14001:2015 standard. Other international standard conformance certifications are in progress.

Contact Us

If you have any problem or requirement when using our products or this manual, please contact

RIGOL

.

E-mail: [email protected]

Website: www.rigol.com

MSO5000-E Programming Guide I

RIGOL

Document Overview

This manual is your guide to programming

RIGOL

MSO5000-E series digital oscilloscope. MSO5000-E series can communicate with the PC via the USB, LAN, or GPIB (requiring to work with

RIGOL

's USB-GPIB interface converter) interface.

Main Topics in this Manual:

Chapter 1 SCPI Command Overview

This chapter introduces the syntax, symbols, parameters, and abbreviation rules of the SCPI commands.

Chapter 2 Command System

This chapter introduces the syntax, function, parameters, and descriptions of each command.

Chapter 3 Programming Examples

This chapter illustrates how to control the MSO5000-E series digital oscilloscope by programming in Excel,

LabVIEW, Visual Basic, and Visual C++.

Tip

For the latest version of this manual, download it from the official website of

RIGOL

(www.rigol.com).

Format Conventions in this Manual:

1.

Key

The key on the front panel is denoted by the format of "Key Name (Bold) + Text Box" in the manual.

For example,

Utility

denotes the "Utility" key.

2.

Menu

The menu items are denoted by the format of "Menu Word (Bold) + Character Shading". For example,

System

denotes the "System" menu item under

Utility

.

3.

Operation Procedures:

"

" denotes the next step of operation. For example,

Utility

System

denotes that first press

Utility

, and then press the

System

softkey.

Content Conventions in this Manual:

MSO5000-E series includes the following models. Unless otherwise specified, this manual takes MSO5152-E as an example to illustrate the functions and operation methods of MSO5000-E series.

Model

Max. Analog

Bandwidth

No. of Analog

Channels

No. of Function/Arbitrary

Waveform Generator

Channels

No. of Digital

Channels

MSO5152-E 150 MHz 2 1, Opt.

16 (Required to purchase the probe)

II MSO5000-E Programming Guide

Contents

RIGOL

Contents

Guaranty and Declaration ......................................................................................................... I

Document Overview ................................................................................................................. II

Chapter 1 SCPI Command Overview .................................................................................. 1-1

Syntax ..................................................................................................................................... 1-2

Symbol Description ................................................................................................................... 1-2

Parameter Type ........................................................................................................................ 1-2

Command Abbreviation ............................................................................................................. 1-3

Chapter 2 Command System ............................................................................................... 2-1

:AUToscale ............................................................................................................................... 2-2

:CLEar...................................................................................................................................... 2-2

:RUN ........................................................................................................................................ 2-2

:STOP ...................................................................................................................................... 2-2

:SINGle .................................................................................................................................... 2-3

:TFORce ................................................................................................................................... 2-3

:ACQuire Commands ................................................................................................................. 2-4

:ACQuire:AVERages ............................................................................................................ 2-4

:ACQuire:MDEPth ............................................................................................................... 2-4

:ACQuire:MDEMdepth? ....................................................................................................... 2-5

:ACQuire:TYPE ................................................................................................................... 2-5

:ACQuire:SRATe? ................................................................................................................ 2-6

:ACQuire:LA:SRATe? ........................................................................................................... 2-6

:ACQuire:LA:MDEPth? ........................................................................................................ 2-6

:ACQuire:AALias ................................................................................................................. 2-6

:BODeplot Commands ............................................................................................................... 2-7

:BODeplot:ENABle .............................................................................................................. 2-7

:BODeplot:DISPtype ........................................................................................................... 2-7

:BODeplot:SOURce ............................................................................................................. 2-8

:BODeplot:SWEeptype ........................................................................................................ 2-8

:BODeplot:REFin ................................................................................................................ 2-9

:BODeplot:REFout .............................................................................................................. 2-9

:BODeplot:IMPedance ........................................................................................................ 2-9

:BODeplot:STARt.............................................................................................................. 2-10

:BODeplot:STOP .............................................................................................................. 2-10

:BODeplot:POINT ............................................................................................................. 2-10

:BODeplot:VOLTage .......................................................................................................... 2-10

:BODeplot:VOLTage:PROFile ............................................................................................. 2-11

:BODeplot:GMARgin? ....................................................................................................... 2-12

:BODeplot:GMARgin:FREQuency?...................................................................................... 2-12

:BODeplot:PMARgin? ........................................................................................................ 2-12

:BODeplot:PMARgin:FREQuency? ...................................................................................... 2-12

:BUS<n> Commands .............................................................................................................. 2-13

:BUS<n>:MODE .............................................................................................................. 2-13

:BUS<n>:DISPlay ............................................................................................................ 2-14

:BUS<n>:FORMat ............................................................................................................ 2-14

:BUS<n>:EVENt .............................................................................................................. 2-14

:BUS<n>:EVENt:FORMat .................................................................................................. 2-15

:BUS<n>:EVENt:VIEW ..................................................................................................... 2-15

:BUS<n>:LABel ............................................................................................................... 2-16

:BUS<n>:DATA? .............................................................................................................. 2-16

:BUS<n>:EEXPort ............................................................................................................ 2-17

:BUS<n>:POSition ........................................................................................................... 2-17

:BUS<n>:THReshold ........................................................................................................ 2-17

:BUS<n>:PARallel ............................................................................................................ 2-19

:BUS<n>:RS232 (Option) ................................................................................................. 2-23

MSO5000-E Programming Guide III

RIGOL

Contents

:BUS<n>:IIC (Option) ...................................................................................................... 2-28

:BUS<n>:SPI (Option) ...................................................................................................... 2-30

:BUS<n>:CAN (Option) .................................................................................................... 2-35

:BUS<n>:FLEXray (Option) ............................................................................................... 2-37

:BUS<n>:LIN (Option) ..................................................................................................... 2-39

:BUS<n>:IIS (Option) ...................................................................................................... 2-41

:BUS<n>:M1553 (Option) ................................................................................................. 2-44

:CHANnel<n> Commands........................................................................................................ 2-45

:CHANnel<n>:BWLimit ..................................................................................................... 2-45

:CHANnel<n>:COUPling ................................................................................................... 2-46

:CHANnel<n>:DISPlay ...................................................................................................... 2-46

:CHANnel<n>:INVert ........................................................................................................ 2-46

:CHANnel<n>:OFFSet....................................................................................................... 2-47

:CHANnel<n>:TCALibrate ................................................................................................. 2-47

:CHANnel<n>:SCALe ........................................................................................................ 2-48

:CHANnel<n>:PROBe ....................................................................................................... 2-48

:CHANnel<n>:UNITs ........................................................................................................ 2-49

:CHANnel<n>:VERNier ..................................................................................................... 2-49

:CHANnel<n>:POSition ..................................................................................................... 2-50

:COUNter Commands .............................................................................................................. 2-51

:COUNter:CURRent? ......................................................................................................... 2-51

:COUNter:CURRent? ......................................................................................................... 2-51

:COUNter:ENABle ............................................................................................................. 2-51

:COUNter:SOURce ............................................................................................................ 2-51

:COUNter:MODE ............................................................................................................... 2-52

:COUNter:NDIGits ............................................................................................................ 2-52

:COUNter:TOTalize:ENABle ................................................................................................ 2-52

:COUNter:TOTalize:CLEar .................................................................................................. 2-53

:CURSor Commands ................................................................................................................ 2-54

:CURSor:MODE ................................................................................................................ 2-54

:CURSor:MANual .............................................................................................................. 2-55

:CURSor:TRACk ................................................................................................................ 2-61

:CURSor:XY ...................................................................................................................... 2-66

:CURSor:MEASure:INDicator ............................................................................................. 2-69

:DISPlay Commands ................................................................................................................ 2-70

:DISPlay:CLEar ................................................................................................................. 2-70

:DISPlay:TYPE .................................................................................................................. 2-70

:DISPlay:GRADing:TIME ................................................................................................... 2-71

:DISPlay:WBRightness ...................................................................................................... 2-71

:DISPlay:GRID ................................................................................................................. 2-71

:DISPlay:GBRightness ....................................................................................................... 2-72

:DISPlay:DATA? ................................................................................................................ 2-72

:DISPlay:RULers ............................................................................................................... 2-72

:DISPlay:COLor ................................................................................................................ 2-73

:DVM Commands .................................................................................................................... 2-74

:DVM:CURRent? ............................................................................................................... 2-74

:DVM:ENABle ................................................................................................................... 2-74

:DVM:SOURce .................................................................................................................. 2-74

:DVM:MODE ..................................................................................................................... 2-75

:HISTogram Commands ........................................................................................................... 2-76

:HISTogram:DISPlay ......................................................................................................... 2-76

:HISTogram:TYPE ............................................................................................................. 2-76

:HISTogram:SOURce ......................................................................................................... 2-77

:HISTogram:SIZE.............................................................................................................. 2-77

:HISTogram:STATic ........................................................................................................... 2-77

:HISTogram:RESet ............................................................................................................ 2-77

:HISTogram:BLIMit ........................................................................................................... 2-78

:HISTogram:LLIMit ........................................................................................................... 2-78

IV MSO5000-E Programming Guide

Contents

RIGOL

:HISTogram:RLIMit .......................................................................................................... 2-78

:HISTogram:TLIMit ........................................................................................................... 2-79

IEEE488.2 Common Commands ............................................................................................... 2-80

*CLS ............................................................................................................................... 2-80

*ESE ............................................................................................................................... 2-80

*ESR? ............................................................................................................................. 2-81

*IDN? ............................................................................................................................. 2-81

*OPC ............................................................................................................................... 2-81

*SAV ............................................................................................................................... 2-81

*RCL ............................................................................................................................... 2-81

*RST ............................................................................................................................... 2-82

*SRE ............................................................................................................................... 2-82

*STB? ............................................................................................................................. 2-82

*TST? ............................................................................................................................. 2-82

*WAI ............................................................................................................................... 2-82

:LA Commands ....................................................................................................................... 2-83

:LA:STATe ........................................................................................................................ 2-83

:LA:ACTive....................................................................................................................... 2-84

:LA:AUTOsort ................................................................................................................... 2-84

:LA:DELete ...................................................................................................................... 2-84

:LA:DIGital:DISPlay .......................................................................................................... 2-85

:LA:DIGital:POSition ......................................................................................................... 2-85

:LA:DIGital:LABel ............................................................................................................. 2-86

:LA:POD<n>:DISPlay ....................................................................................................... 2-86

:LA:DISPlay ..................................................................................................................... 2-86

:LA:POD<n>:THReshold ................................................................................................... 2-87

:LA:SIZE .......................................................................................................................... 2-87

:LA:TCALibrate ................................................................................................................. 2-88

:LA:GROup:APPend .......................................................................................................... 2-88

:LAN Commands ..................................................................................................................... 2-89

:LAN:DHCP ...................................................................................................................... 2-89

:LAN:AUToip .................................................................................................................... 2-90

:LAN:GATeway ................................................................................................................. 2-90

:LAN:DNS ........................................................................................................................ 2-90

:LAN:MAC? ...................................................................................................................... 2-91

:LAN:DSErver? ................................................................................................................. 2-91

:LAN:MANual ................................................................................................................... 2-91

:LAN:IPADdress ............................................................................................................... 2-92

:LAN:SMASk .................................................................................................................... 2-92

:LAN:STATus? .................................................................................................................. 2-92

:LAN:VISA? ...................................................................................................................... 2-93

:LAN:MDNS ..................................................................................................................... 2-93

:LAN:HOST:NAME ............................................................................................................ 2-93

:LAN:DESCription ............................................................................................................. 2-93

:LAN:APPLy ...................................................................................................................... 2-94

:MASK Commands .................................................................................................................. 2-95

:MASK:ENABle ................................................................................................................. 2-95

:MASK:SOURce ................................................................................................................ 2-95

:MASK:OPERate ............................................................................................................... 2-96

:MASK:MDISplay .............................................................................................................. 2-96

:MASK:X .......................................................................................................................... 2-97

:MASK:Y .......................................................................................................................... 2-97

:MASK:CREate ................................................................................................................. 2-97

:MASK:PASSed? ............................................................................................................... 2-97

:MASK:FAILed? ................................................................................................................ 2-98

:MASK:TOTal? .................................................................................................................. 2-98

:MASK:RESet ................................................................................................................... 2-98

:MATH<n> Commands ........................................................................................................... 2-99

MSO5000-E Programming Guide V

RIGOL

Contents

:MATH<n>:DISPlay ........................................................................................................ 2-100

:MATH<n>:OPERator ..................................................................................................... 2-100

:MATH<n>:SOURce1 ...................................................................................................... 2-101

:MATH<n>:SOURce2 ...................................................................................................... 2-101

:MATH<n>:LSOUrce1 ..................................................................................................... 2-102

:MATH<n>:LSOUrce2 ..................................................................................................... 2-102

:MATH<n>:SCALe .......................................................................................................... 2-102

:MATH<n>:OFFSet ......................................................................................................... 2-103

:MATH<n>:INVert .......................................................................................................... 2-103

:MATH<n>:RESet ........................................................................................................... 2-103

:MATH<n>:FFT:SOURce ................................................................................................. 2-104

:MATH<n>:FFT:WINDow ................................................................................................ 2-104

:MATH<n>:FFT:UNIT ..................................................................................................... 2-104

:MATH<n>:FFT:SCALe .................................................................................................... 2-105

:MATH<n>:FFT:OFFSet .................................................................................................. 2-105

:MATH<n>:FFT:HSCale ................................................................................................... 2-105

:MATH<n>:FFT:HCENter ................................................................................................. 2-106

:MATH<n>:FFT:FREQuency:STARt .................................................................................. 2-106

:MATH<n>:FFT:FREQuency:END ..................................................................................... 2-106

:MATH<n>:FFT:SEARch:ENABle ...................................................................................... 2-107

:MATH<n>:FFT:SEARch:NUM .......................................................................................... 2-107

:MATH<n>:FFT:SEARch:THReshold ................................................................................. 2-107

:MATH<n>:FFT:SEARch:EXCursion .................................................................................. 2-108

:MATH<n>:FFT:SEARch:ORDer ....................................................................................... 2-108

:MATH<n>:FILTer:TYPE .................................................................................................. 2-109

:MATH<n>:FILTer:W1 .................................................................................................... 2-109

:MATH<n>:FILTer:W2 .................................................................................................... 2-110

:MATH<n>:SENSitivity .................................................................................................... 2-110

:MATH<n>:DISTance...................................................................................................... 2-111

:MATH<n>:THReshold1 .................................................................................................. 2-111

:MATH<n>:THReshold2 .................................................................................................. 2-112

:MEASure Commands ............................................................................................................ 2-113

:MEASure:SOURce .......................................................................................................... 2-113

:MEASure:CLEar ............................................................................................................. 2-114

:MEASure:THReshold:SOURce ......................................................................................... 2-114

:MEASure:THReshold:DEFault ......................................................................................... 2-114

:MEASure:MODE ............................................................................................................ 2-114

:MEASure:AMSource ....................................................................................................... 2-115

:MEASure:SETup:MAX ..................................................................................................... 2-115

:MEASure:SETup:MID ..................................................................................................... 2-115

:MEASure:SETup:MIN ..................................................................................................... 2-116

:MEASure:SETup:PSA ...................................................................................................... 2-116

:MEASure:SETup:PSB ...................................................................................................... 2-117

:MEASure:SETup:DSA ..................................................................................................... 2-117

:MEASure:SETup:DSB ..................................................................................................... 2-117

:MEASure:STATistic:DISPlay ............................................................................................ 2-118

:MEASure:STATistic:RESet ............................................................................................... 2-118

:MEASure:STATistic:ITEM ................................................................................................ 2-118

:MEASure:ITEM .............................................................................................................. 2-119

:MEASure:AREA .............................................................................................................. 2-120

:MEASure:CREGion:CAX .................................................................................................. 2-120

:MEASure:CREGion:CBX .................................................................................................. 2-121

:MEASure:CATegory ........................................................................................................ 2-121

:POWer Commands ............................................................................................................... 2-122

:POWer:TYPE ................................................................................................................. 2-122

:POWer:CURRentsource .................................................................................................. 2-122

:POWer:VOLTagesource .................................................................................................. 2-123

:POWer:QUALity:FREQreference ...................................................................................... 2-123

VI MSO5000-E Programming Guide

Contents

RIGOL

:POWer:REFLevel:METHod ............................................................................................. 2-123

:POWer:REFLevel:PERCent:HIGH .................................................................................... 2-124

:POWer:REFLevel:PERCent:LOW ..................................................................................... 2-124

:POWer:REFLevel:PERCent:MID ...................................................................................... 2-124

:QUICK Command ................................................................................................................ 2-125

:QUICK:OPERation ......................................................................................................... 2-125

:RECord Commands .............................................................................................................. 2-126

:RECord:ENABle ............................................................................................................. 2-126

:RECord:STARt ............................................................................................................... 2-126

:RECord:PLAY ................................................................................................................ 2-127

:RECord:CURRent .......................................................................................................... 2-127

:RECord:FRAMes ............................................................................................................ 2-127

:REFerence Commands ......................................................................................................... 2-128

:REFerence:DISPlay ....................................................................................................... 2-128

:REFerence:SOURce ....................................................................................................... 2-128

:REFerence:VSCale ......................................................................................................... 2-129

:REFerence:VOFFset ....................................................................................................... 2-129

:REFerence:RESet .......................................................................................................... 2-130

:REFerence:CURRent ...................................................................................................... 2-130

:REFerence:SAVE ........................................................................................................... 2-130

:REFerence:COLor .......................................................................................................... 2-130

:REFerence:LABel:ENABle ............................................................................................... 2-131

:REFerence:LABel:CONTent ............................................................................................. 2-131

:SAVE and :LOAD Commands ................................................................................................ 2-132

:SAVE:CSV ..................................................................................................................... 2-132

:SAVE:CSV:LENGth ......................................................................................................... 2-132

:SAVE:CSV:CHANnel ....................................................................................................... 2-133

:SAVE:IMAGe ................................................................................................................. 2-133

:SAVE:IMAGe:TYPE ........................................................................................................ 2-133

:SAVE:IMAGe:INVert ...................................................................................................... 2-134

:SAVE:IMAGe:COLor ....................................................................................................... 2-134

:SAVE:SETup.................................................................................................................. 2-134

:SAVE:WAVeform ........................................................................................................... 2-135

:SAVE:STATus? ............................................................................................................... 2-135

:LOAD:SETup ................................................................................................................. 2-135

:SEARch Commands ............................................................................................................. 2-136

:SEARch:COUNt? ............................................................................................................ 2-136

:SEARch:VALue? ............................................................................................................ 2-137

:SEARch:STATe .............................................................................................................. 2-137

:SEARch:MODE .............................................................................................................. 2-137

:SEARch:EVENt .............................................................................................................. 2-138

:SEARch:EDGE:SLOPe .................................................................................................... 2-138

:SEARch:EDGE:SOURce .................................................................................................. 2-139

:SEARch:EDGE:THReshold .............................................................................................. 2-139

:SEARch:PULSe:POLarity ................................................................................................ 2-139

:SEARch:PULSe:QUALifier ............................................................................................... 2-140

:SEARch:PULSe:SOURce ................................................................................................. 2-140

:SEARch:PULSe:UWIDth ................................................................................................. 2-140

:SEARch:PULSe:LWIDth .................................................................................................. 2-141

:SEARch:PULSe:THReshold ............................................................................................. 2-141

:SEARch:RUNT:POLarity ................................................................................................. 2-141

:SEARch:RUNT:QUALifier ................................................................................................ 2-142

:SEARch:RUNT:SOURce .................................................................................................. 2-142

:SEARch:RUNT:WUPPer .................................................................................................. 2-142

:SEARch:RUNT:WLOWer ................................................................................................. 2-143

:SEARch:RUNT:THReshold1 ............................................................................................ 2-143

:SEARch:RUNT:THReshold2 ............................................................................................ 2-143

:SEARch:SLOPe:POLarity ................................................................................................ 2-144

MSO5000-E Programming Guide VII

RIGOL

Contents

:SEARch:SLOPe:QUALifier ............................................................................................... 2-144

:SEARch:SLOPe:SOURce ................................................................................................. 2-144

:SEARch:SLOPe:TUPPer .................................................................................................. 2-145

:SEARch:SLOPE:TLOWer ................................................................................................. 2-145

:SEARch:SLOPE:THReshold1 ........................................................................................... 2-145

:SEARch:SLOPE:THReshold2 ........................................................................................... 2-146

[:SOURce[<n>]] Commands ................................................................................................. 2-147

[:SOURce[<n>]]:FREQuency[:FIXed] .............................................................................. 2-148

[:SOURce[<n>]]:PHASe[:ADJust] .................................................................................... 2-148

[:SOURce[<n>]]:PHASe:INITiate .................................................................................... 2-148

[:SOURce[<n>]]:FUNCtion[:SHAPe] ................................................................................ 2-149

[:SOURce[<n>]]:FUNCtion:RAMP:SYMMetry .................................................................... 2-149

[:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate][:AMPLitude] ............................................. 2-150

[:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate]:OFFSet .................................................... 2-150

[:SOURce[<n>]]:PULSe:DCYCle ...................................................................................... 2-151

[:SOURce[<n>]]:TYPE .................................................................................................... 2-151

[:SOURce[<n>]]:MOD:TYPE ........................................................................................... 2-152

[:SOURce[<n>]]:MOD:AM[:DEPTh] ................................................................................. 2-152

[:SOURce[<n>]]:MOD:AM:INTernal:FREQuency ............................................................... 2-153

[:SOURce[<n>]]:MOD:FM:INTernal:FREQuency ............................................................... 2-153

[:SOURce[<n>]]:MOD:AM:INTernal:FUNCtion .................................................................. 2-153

[:SOURce[<n>]]:MOD:FM:INTernal:FUNCtion .................................................................. 2-153

[:SOURce[<n>]]:MOD:FM[:DEVIation] ............................................................................ 2-154

[:SOURce[<n>]]:SWEep:TYPE ........................................................................................ 2-154

:SOURce[<n>]:SWEep:STIMe ......................................................................................... 2-155

:SOURce[<n>]:SWEep:BTIMe ......................................................................................... 2-155

[:SOURce[<n>]]:BURSt:TYPE ......................................................................................... 2-155

:SOURce[<n>]:BURSt:CYCLes ........................................................................................ 2-156

:SOURce[<n>]:BURSt:DELay .......................................................................................... 2-156

[:SOURce[<n>]]:APPLy? ................................................................................................. 2-157

[:SOURce[<n>]]:APPLy:NOISe ........................................................................................ 2-157

[:SOURce[<n>]]:APPLy:PULSe ........................................................................................ 2-157

[:SOURce[<n>]]:APPLy:RAMP ......................................................................................... 2-157

[:SOURce[<n>]]:APPLy:SINusoid .................................................................................... 2-157

[:SOURce[<n>]]:APPLy:SQUare ...................................................................................... 2-157

[:SOURce[<n>]]:APPLy:USER ......................................................................................... 2-157

[:SOURce[<n>]]:OUTPut[<n>][:STATe] .......................................................................... 2-158

[:SOURce[<n>]]:OUTPut[<n>]:IMPedance ..................................................................... 2-159

:SYSTem Commands ............................................................................................................. 2-160

:SYSTem:AOUTput .......................................................................................................... 2-161

:SYSTem:AUToscale ........................................................................................................ 2-161

:SYSTem:BEEPer ............................................................................................................ 2-162

:SYSTem:DATE ............................................................................................................... 2-162

:SYSTem:ERRor[:NEXT]? ................................................................................................. 2-162

:SYSTem:GAMount? ........................................................................................................ 2-162

:SYSTem:GPIB ................................................................................................................ 2-163

:SYSTem:KEY:PRESs ....................................................................................................... 2-163

:SYSTem:KEY:INCRease .................................................................................................. 2-164

:SYSTem:KEY:DECRease ................................................................................................. 2-164

:SYSTem:LANGuage ........................................................................................................ 2-164

:SYSTem:PON ................................................................................................................ 2-165

:SYSTem:OPTion:INSTall ................................................................................................. 2-165

:SYSTem:OPTion:UNINstall ............................................................................................. 2-166

:SYSTem:OPTion:STATus? ............................................................................................... 2-166

:SYSTem:RAMount? ........................................................................................................ 2-166

:SYSTem:SETup .............................................................................................................. 2-167

:SYSTem:SSAVer:TIME .................................................................................................... 2-167

:SYSTem:TIME ............................................................................................................... 2-167

VIII MSO5000-E Programming Guide

Contents

RIGOL

:SYSTem:LOCKed ........................................................................................................... 2-168

:SYSTem:MODules? ........................................................................................................ 2-168

[:TRACe[<n>]] Command..................................................................................................... 2-169

[:TRACe[<n>]]:DATA:DAC16 .......................................................................................... 2-169

:TIMebase Commands .......................................................................................................... 2-170

:TIMebase:DELay:ENABle ............................................................................................... 2-170

:TIMebase:DELay:OFFSet ............................................................................................... 2-170

:TIMebase:DELay:SCALe ................................................................................................ 2-171

:TIMebase[:MAIN]:OFFSet.............................................................................................. 2-171

:TIMebase[:MAIN]:SCALe ............................................................................................... 2-172

:TIMebase:MODE ........................................................................................................... 2-172

:TIMebase:HREFerence:MODE ........................................................................................ 2-172

:TIMebase:HREFerence:POSition ..................................................................................... 2-173

:TIMebase:VERNier ........................................................................................................ 2-173

:TRIGger Commands ............................................................................................................ 2-174

:TRIGger:MODE ............................................................................................................. 2-175

:TRIGger:COUPling ........................................................................................................ 2-175

:TRIGger:STATus? .......................................................................................................... 2-175

:TRIGger:SWEep ............................................................................................................ 2-176

:TRIGger:HOLDoff ......................................................................................................... 2-176

:TRIGger:NREJect .......................................................................................................... 2-177

:TRIGger:EDGE .............................................................................................................. 2-178

:TRIGger:PULSe ............................................................................................................. 2-180

:TRIGger:SLOPe ............................................................................................................. 2-182

:TRIGger:VIDeo ............................................................................................................. 2-185

:TRIGger:PATTern .......................................................................................................... 2-189

:TRIGger:DURation ........................................................................................................ 2-191

:TRIGger:TIMeout .......................................................................................................... 2-194

:TRIGger:RUNT ............................................................................................................. 2-196

:TRIGger:WINDows ....................................................................................................... 2-199

:TRIGger:DELay ............................................................................................................. 2-202

:TRIGger:SHOLd ............................................................................................................ 2-206

:TRIGger:NEDGe ............................................................................................................ 2-210

:TRIGger:RS232 (Option) ............................................................................................... 2-212

:TRIGger:IIC (Option) .................................................................................................... 2-215

:TRIGger:CAN (Option) .................................................................................................. 2-220

:TRIGger:SPI (Option) .................................................................................................... 2-223

:TRIGger:FLEXray (Option) ............................................................................................. 2-228

:TRIGger:IIS (Option) .................................................................................................... 2-230

:TRIGger:LIN (Option) ................................................................................................... 2-234

:TRIGger:M1553 (Option) ............................................................................................... 2-237

:WAVeform Commands ......................................................................................................... 2-239

:WAVeform:SOURce ....................................................................................................... 2-240

:WAVeform:MODE .......................................................................................................... 2-241

:WAVeform:FORMat ....................................................................................................... 2-241

:WAVeform:POINts ......................................................................................................... 2-242

:WAVeform:DATA?.......................................................................................................... 2-242

:WAVeform:XINCrement? ............................................................................................... 2-243

:WAVeform:XORigin? ...................................................................................................... 2-243

:WAVeform:XREFerence? ................................................................................................ 2-243

:WAVeform:YINCrement? ............................................................................................... 2-244

:WAVeform:YORigin? ...................................................................................................... 2-244

:WAVeform:YREFerence? ................................................................................................ 2-244

:WAVeform:STARt .......................................................................................................... 2-245

:WAVeform:STOP ........................................................................................................... 2-245

:WAVeform:PREamble? ................................................................................................... 2-246

Chapter 3 Programming Examples ..................................................................................... 3-1

Programming Preparations ........................................................................................................ 3-2

MSO5000-E Programming Guide IX

RIGOL

Contents

Excel Programming Example ...................................................................................................... 3-3

LabVIEW Programming Example ................................................................................................ 3-7

Visual Basic Programming Example .......................................................................................... 3-11

Visual C++ Programming Example ........................................................................................... 3-13

X MSO5000-E Programming Guide

Chapter 1 SCPI Command Overview

RIGOL

Chapter 1 SCPI Command Overview

SCPI (Standard Commands for Programmable Instruments) is a standardized instrument programming language that is built upon the existing standard IEEE 488.1 and IEEE 488.2 and conforms to various standards, such as the floating point operation rule in IEEE 754 standard, ISO 646 7-bit coded character set for information interchange (equivalent to ASCII programming). The SCPI commands provide a hierarchical tree structure, and consist of multiple subsystems. Each command subsystem consists of one root keyword and one or more sub-keywords.

Contents in this chapter:

Syntax

Symbol Description

Parameter Type

Command Abbreviation

MSO5000-E Programming Guide 1-1

RIGOL

Chapter 1 SCPI Command Overview

Syntax

The command line usually starts with a colon; the keywords are separated by colons, and following the keywords are the parameter settings available. The command ending with a quotation mark indicates querying a certain function. The keywords of the command and the first parameter is separated by a space.

For example,

:ACQuire:TYPE <type>

:ACQuire:TYPE?

ACQuire is the root keyword of the command, and TYPE is the second-level keyword. The command line starts with a colon, and different levels of keywords are also separated by colons. <type> indicates a settable parameter. The command ending with a quotation mark indicates querying a certain function. The command keywords ":ACQuire:TYPE" and the parameter <type> are separated by a space.

In some commands with parameters, "," is often used to separate multiple parameters. For example,

:SYSTem:DATE <year>,<month>,<day>.

Symbol Description

The following symbols are not sent with the commands.

1.

Braces { }

The contents enclosed in the braces are parameter options, Parameters are usually separated by the vertical bar "|". When using the command, you must select one of the parameters.

2.

Vertical Bar |

The vertical bar is used to separate multiple parameters. When using the command, you must select one of the parameters.

3.

Square Brackets [ ]

The contents in the square brackets can be omitted.

4.

Angle Brackets < >

The parameter enclosed in the angle brackets must be replaced by an effective value.

Parameter Type

1.

Bool

The parameter can be set to ON, OFF, 1, or 0. For example,

2.

:SYSTem:BEEPer <bool>

:SYSTem:BEEPer?

Wherein,

<bool> can be set to {{1|ON}|{0|OFF}}.

The query returns 1 or 0.

Discrete

The parameter can be any of the values listed. For example,

:ACQuire:TYPE <type>

:ACQuire:TYPE?

Wherein,

<type> can be set to NORMal, AVERages, or PEAK.

The query returns NORM, AVER, or PEAK.

1-2 MSO5000-E Programming Guide

Chapter 1 SCPI Command Overview

RIGOL

3.

Integer

Unless otherwise specified, the parameter can be any integer (NR1 format) within the effective value range.

Note:

Do not set the parameter to a decimal, otherwise, errors will occur.

For example,

:DISPlay:GBRightness <brightness>

:DISPlay:GBRightness?

Wherein, <brightness> can be set to an integer ranging from 1 to 100.

The query returns an integer ranging from 1 to 100.

4.

Real

The parameter can be any real number within the effective value range, and this command accepts parameter input in decimal (NR2 format) and scientific notation (NR3 format). For example,

:TRIGger:TIMeout:TIME <time>

:TRIGger:TIMeout:TIME?

Wherein, <time> can be set to any real number ranging from 1.6E-8 (i.g. 16 ns) to 1E+1 (i.g. 10 s).

The query returns a real number in scientific notation.

ASCII String 5.

The parameter can be the combinations of ASCII characters.

For example,

:SYSTem:OPTion:INSTall <license>

Wherein, <license> can be set to

MSO5000-PWR@3AEBC07E6C31F82B78A1C401DC2E3AC2CC9431B57F60D1E1CB712F8682C93609A6

05F8577BFDE920373062BE226289A27C134E2C91BF80CB00F8011AC181FD40.

Command Abbreviation

All the commands are case-insensitive. They can all be in upper case or in lower case. If abbreviation is used, you must input all the capital letters in the command. For example,

:DISPlay:GBRightness? can be abbreviated as

:DISP:GBR?

MSO5000-E Programming Guide 1-3

Chapter 2 Command System

MSO5000-E Programming Guide

RIGOL

Chapter 2 Command System

This chapter introduces the syntax, functions, parameters, and usage of each MSO5000-E command.

Contents in this chapter:

:AUToscale

:CLEar

:RUN

:STOP

:SINGle

:TFORce

:ACQuire Commands

:BODeplot Commands

:BUS<n> Commands

:CHANnel<n> Commands

:COUNter Commands

:CURSor Commands

:DISPlay Commands

:DVM Commands

:HISTogram Commands

IEEE488.2 Common Commands

:LA Commands

:LAN Commands

:MASK Commands

:MATH<n> Commands

:MEASure Commands

:POWer Commands

:QUICK Command

:RECord Commands

:REFerence Commands

:SAVE and :LOAD Commands

:SEARch Commands

[:SOURce[<n>]] Commands

:SYSTem Commands

[:TRACe[<n>]] Command

:TIMebase Commands

:TRIGger Commands

:WAVeform Commands

2-1

RIGOL

Chapter 2 Command System

Note:

1.

Unless otherwise specified, the descriptions in this manual all take MSO5152-E as an example.

2.

For the parameter setting command (time, frequency, amplitude, etc.), the digital oscilloscope can only recognize the numbers, unable to recognize the unit sent together with them. The unit of the parameter is a default one. For the default units of various parameters, refer to the descriptions for the specified command.

:AUToscale

Syntax

:AUToscale

Description

Enables the waveform auto setting function. The oscilloscope will automatically adjust the vertical scale, horizontal time base, and trigger mode according to the input signal to realize optimal waveform display. This command functions the same as the

AUTO

key on the front panel.

Remarks

When the AUTO function is disabled, this command is invalid. For details, refer

to :SYSTem:AUToscale .

When the pass/fail test is enabled, the AUTO function runs normally, but the pass/fail test function is forced to be disabled.

When the waveform recording function is enabled or the recorded waveforms are played back, the AUTO function runs normally, but the recording or playing function is forced to be disabled.

:CLEar

Syntax

:CLEar

Description

Clears all the waveforms on the screen. This command functions the same as the

CLEAR

key on the front panel.

:RUN

:STOP

Syntax

:RUN

:STOP

Description

The :RUN command starts the oscilloscope and the :STOP command stops the oscilloscope. This command functions the same as the

RUN/STOP

key on the front panel.

Remarks

When the waveform recording function is enabled, the

RUN/STOP

key on the front panel is disabled.

2-2 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:SINGle

Syntax

:SINGle

Description

Sets the trigger mode of the oscilloscope to "Single". This command functions the same as either of the following two operation: press

SINGLE

on the front panel; or send

the :TRIGger:SWEep SINGle

command.

Remarks

In the single trigger mode, the oscilloscope performs a single trigger when the trigger conditions are met and then it stops.

When the waveform recording function is enabled or the recorded waveforms are played back, this command is invalid.

:TFORce

For the single trigger, you can use the :TFORce command to generate one trigger by

force.

Syntax

:TFORce

Description

Generates a trigger signal forcefully. This command is only applicable to the normal and

single trigger modes (refer to the :TRIGger:SWEep command). This command functions

the same as the

FORCE

key in the trigger control area of the front panel.

MSO5000-E Programming Guide 2-3

RIGOL

Chapter 2 Command System

:ACQuire Commands

The :ACQuire commands are used to set the memory depth of the oscilloscope, the acquisition mode, the average times, as well as query the current sample rate.

Command List [1] :

:ACQuire:AVERages

:ACQuire:MDEPth

:ACQuire:MDEMdepth?

:ACQuire:TYPE

:ACQuire:SRATe?

:ACQuire:LA:SRATe?

:ACQuire:LA:MDEPth?

:ACQuire:AALias

Note [1] :

In the "Command List" in this manual, the query commands and the parameters in the setting commands are omitted. You can refer to the complete introductions of the commands in the body of the text based on the keywords listed here.

:ACQuire:AVERages

Syntax

:ACQuire:AVERages <count>

:ACQuire:AVERages?

Description

Sets or queries the number of averages in the average acquisition mode.

Parameter

Name Type Range Default

<count> Integer 2 n (n is an integer, and its range is from 1 to 16) 2

Remarks

Return

Format

You can send the :ACQuire:TYPE command to set the acquisition mode.

In the average acquisition mode, greater number of averages can lower the noise and increase the vertical resolution; but will also slow the response of the displayed waveform to the waveform changes.

The query returns an integer ranging from 2 to 65536.

Example

:ACQuire:AVERages 128 /*Sets the average times to 128.*/

:ACQuire:AVERages? /*The query returns 128.*/

:ACQuire:MDEPth

Syntax

:ACQuire:MDEPth <mdep>

:ACQuire:MDEPth?

Description

Sets or queries the memory depth of the oscilloscope (i.g. the number of waveform points that can be stored through the sampling in a single trigger). The default unit is pts.

Parameter

Name Type Range Default

<mdep> Discrete {AUTO|1k|10k|100k|1M|10M|25M|50M|100M} AUTO

Remarks

When "AUTO" is selected, the oscilloscope selects the memory depth automatically

2-4 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

according to the current sample rate.

The maximum memory depth for the single channel is 100 M; the maximum memory depth for the all-channel is 50 M.

The query returns the memory depth in scientific notation.

Return

Format

Example

:ACQuire:MDEPth 1M /*Sets the memory depth to 1M.*/

:ACQuire:MDEPth? /*The query returns 1.0000E+06.*/

:ACQuire:MDEMdepth?

Syntax

:ACQuire:MDEMdepth?

Description

Queries the current memory depth.

Return

Format

The query returns the memory depth in scientific notation.

:ACQuire:TYPE

Syntax

:ACQuire:TYPE <type>

:ACQuire:TYPE?

Description

Sets or queries the acquisition mode of the oscilloscope.

Parameter

Name Type Range Default

<type> Discrete {NORMal|AVERages|PEAK|HRESolution} NORMal

Remarks

NORMal: In this mode, the oscilloscope samples the signal at a specified fixed time interval to rebuild the waveform. For most of the waveforms, using this mode can produce the optimal display effects.

AVERages: In this mode, the oscilloscope averages the waveforms from multiple samples to reduce the random noise of the input signal and improve the vertical resolution. Greater number of averages can lower the noise and increase the vertical resolution; while at the same time, it will slow the response of the displayed waveform to the waveform changes.

PEAK: indicates the peak detection. In this mode, the oscilloscope samples the maximum and minimum value of the signal at the fixed sampling interval to acquire the signal envelope or the narrow pulses that might be lost. In this mode, signal aliasing can be prevented, but the noise displayed would be larger.

HRESolution: the oscilloscope averages the neighbouring points of the sampled waveform to reduce the random noise on the input signal and display smoother waveform on the screen. This mode is usually used when the sample rate of the digital converter is greater than the storage rate of the sample storage.

Return

Format

The query returns NORM, AVER, PEAK or HRES.

Example

:ACQuire:TYPE AVERages /*Sets the acquisition mode to AVERages.*/

:ACQuire:TYPE? /*The query returns AVER.*/

MSO5000-E Programming Guide 2-5

RIGOL

Chapter 2 Command System

:ACQuire:SRATe?

Syntax

:ACQuire:SRATe?

Description

Queries the current sample rate. The default unit is Sa/s.

Remarks

Sample rate indicates the frequency of the signal sampling, i.g. the number of waveform points sampled per second.

Return

Format

The formula below describes the relationship among sample rate, memory depth, and waveform length:

memory depth = sample rate x waveform length

Wherein, the memory depth is set by the :ACQuire:MDEPth command. The waveform

length is obtained by multiplying the horizontal time base (set by

the :TIMebase[:MAIN]:SCALe command) by the number of grids in the horizontal

direction. For MSO5000-E, the number of grids in the horizontal direction is 10.

The query returns the sample rate in scientific notation.

Example

:ACQuire:SRATe? /*The query returns 2.500000E+9.*/

:ACQuire:LA:SRATe?

Syntax

:ACQuire:LA:SRATe?

Description

Queries the current LA sample rate. The default unit is Sa/s.

Return

Format

The query returns the sample rate in scientific notation.

Example

:ACQuire:LA:SRATe? /*The query returns 1.250000E+9.*/

:ACQuire:LA:MDEPth?

Syntax

:ACQuire:LA:MDEPth?

Description

Queries the current LA memory depth.

Return

Format

The query returns the memory depth in scientific notation.

Example

:ACQuire:LA:MDEPth? /*The query returns 1.250000E+4.*/

:ACQuire:AALias

Syntax

:ACQuire:AALias <bool>

:ACQuire:AALias?

Description

Enables or disables the anti-aliasing function of the oscilloscope; or queries the on/off status of the anti-aliasing function.

Parameter

Name

<bool>

Type

Bool

Range

{{1|ON}|{0|OFF}}

Default

0|OFF

Return

Format

The query returns 1 or 0.

Example

:ACQuire:AALias ON /*Enables the anti-aliasing function.*/

:ACQuire:AALias? /*The query returns 1.*/

2-6 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BODeplot Commands

The :BODeplot commands are used to execute the bode-related settings and operations.

Command List:

:BODeplot:ENABle

:BODeplot:DISPtype

:BODeplot:SOURce

:BODeplot:SWEeptype

:BODeplot:REFin

:BODeplot:REFout

:BODeplot:IMPedance

:BODeplot:STARt

:BODeplot:STOP

:BODeplot:POINT

:BODeplot:VOLTage

:BODeplot:VOLTage:PROFile

:BODeplot:GMARgin?

:BODeplot:GMARgin:FREQuency?

:BODeplot:PMARgin?

:BODeplot:PMARgin:FREQuency?

:BODeplot:ENABle

Syntax

:BODeplot:ENABle <bool>

:BODeplot:ENABle?

Description

Starts or stops the bode plot drawing; queries the running status of the bode plot.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}}

Return

Format

The query returns 1 or 0.

Example

:BODeplot:ENABle ON /*Starts the bode plot drawing.*/

:BODeplot:ENABle? /*The query returns 1.*/

0|OFF

:BODeplot:DISPtype

Syntax

:BODeplot:DISPtype <disptype>

:BODeplot:DISPtype?

Description

Sets or queries the display type of the bode plot.

MSO5000-E Programming Guide 2-7

RIGOL

Chapter 2 Command System

Parameter

Name Type

<disptype> Discrete

Range

{DISP_WAVE|DISP_CHART}

Default

DISP_WAVE

Description

DISP_WAVE: displays the bode plot in wave format.

Return

Format

DISP_CHART: displays the bode plot in chart format.

The query returns DISP_WAVE or DISP_CHART.

Example

:BODeplot:DISPtype DISP_WAVE /*Sets the display type of bode plot to DISP_WAVE.*/

:BODeplot:DISPtype? /*The query returns DISP_WAVE.*/

:BODeplot:SOURce

Syntax

:BODeplot:SOURce <source>

:BODeplot:SOURce?

Description

Sets or queries the signal source of the sweep signal for the bode function.

Parameter

Name Type Range Default

<source> Discrete {SOURCE1} SOURCE1

Description

Only Source1 is supported.

Return

Format

The query returns SOURCE1.

Example

:BODeplot:SOURce SOURCE1 /*Sets the signal source of bode plot to SOURCE1.*/

:BODeplot:SOURce? /*The query returns SOURCE1.*/

:BODeplot:SWEeptype

Syntax

:BODeplot:SWEeptype <type>

:BODeplot:SWEeptype?

Description

Sets or queries the sweep type of the bode plot.

Parameter

Name Type Range Default

Description

<type> Discrete {LOG_SWEEP|LINE_SWEEP}

LOG_SWEEP: indicates that the sweep type is log.

LINE_SWEEP: indicates that the sweep type is linear.

Return Format

The query returns LOG_SWEEP or LINE_SWEEP.

LOG_SWEEP

Example

:BODeplot:SWEeptype LOG_SWEEP /*Sets the sweep type of the bode plot to

LOG_SWEEP.*/

:BODeplot:SWEeptype? /*The query returns LOG_SWEEP.*/

2-8 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BODeplot:REFin

Syntax

:BODeplot:REFin <source>

:BODeplot:REFin?

Description

Sets or queries the input source of the bode plot.

Parameter

Name Type Range

<source> Discrete {CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns CHANnel1 or CHANnel2.

Example

:BODeplot:REFin CHANnel2 /*Sets the input source of the bode plot to CHANnel2.*/

:BODeplot:REFin? /*The query returns CHANnel2.*/

:BODeplot:REFout

Syntax

:BODeplot:REFout <source>

:BODeplot:REFout?

Description

Sets or queries the output source of the bode plot.

Parameter

Name Type Range

Return

Format

<source> Discrete {CHANnel1|CHANnel2}

The query returns CHANnel1 or CHANnel2.

Default

CHANnel2

Example

:BODeplot:REFout CHANnel1 /*Sets the output source of the bode plot to CHANnel1.*/

:BODeplot:REFout? /*The query returns CHANnel1.*/

:BODeplot:IMPedance

Syntax

:BODeplot:IMPedance <impedance>

:BODeplot:IMPedance?

Description

Sets or queries the output impedance of the bode plot.

Parameter

Name Type Range

<impedance> Discrete {OMEG|FIFTy}

Default

OMEG

Return

Format

The query returns OMEG or FIFTy.

Description

OMEG: indicates that the output impedance is HighZ.

FIFTy: indicates that the output impedance is 50 Ω .

Example

:BODeplot:IMPedance OMEG /*Sets the output impedance of the bode plot to OMEG.*/

:BODeplot:IMPedance? /*The query returns OMEG.*/

MSO5000-E Programming Guide 2-9

RIGOL

Chapter 2 Command System

:BODeplot:STARt

Syntax

:BODeplot:STARt <freq>

:BODeplot:STARt?

Description

Sets or queries the start frequency of the sweep signal.

Parameter

Name Type Range

<freq> Real 10 Hz to 25 MHz

Default

10 Hz

Return

Format

The query returns the start frequency of the sweep signal in scientific notation.

Example

:BODeplot:STARt 200 /*Sets the start frequency of the sweep signal to 200 Hz.*/

:BODeplot:STARt? /*The query returns 2.000000E+2.*/

:BODeplot:STOP

Syntax

:BODeplot:STOP <freq>

:BODeplot:STOP?

Description

Sets or queries the stop frequency of the sweep signal.

Parameter Name Type Range

<freq> Real 100 Hz to 25 MHz

Default

100 Hz

Return

Format

The query returns the stop frequency of the sweep signal in scientific notation.

Example

:BODeplot:STOP 500 /*Sets the stop frequency of the sweep signal to 500 Hz.*/

:BODeplot:STOP? /*The query returns 5.000000E+2.*/

:BODeplot:POINT

Syntax

:BODeplot:POINT <num>

:BODeplot:POINT?

Description

Sets or queries the number of sweep points per decade.

Parameter Name

<num>

Type Range

Integer 10 to 300

Default

10

Return

Format

The query returns an integer ranging from 10 to 300.

Example

:BODeplot:POINT 20 /*Sets the number of the sweep points per decade to 20.*/

:BODeplot:POINT? /*The query returns 20.*/

:BODeplot:VOLTage

Syntax

:BODeplot:VOLTage <amp>,<range>

:BODeplot:VOLTage? <range>

Description

Sets or queries the voltage amplitude of the sweep signal in the bode plot.

Parameter

Name Type Range Default

<amp> Real HighZ: 20 mV to 5 V 200 mV

2-10 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Description

<range> Discrete

50 Ω : 10 mV to 2.5 V

{ALL|F10HZ|F100HZ|F1KHZ|F10KHZ|

F100KHZ|F1MHZ|F10MHZ|F25MHZ}

——

ALL: sets a unified voltage amplitude for the sweep signal of all the frequency ranges, with the voltage amplitude invariable.

F10HZ: sets a voltage amplitude for the sweep signal whose frequency is greater than 10 Hz.

F100HZ: sets a voltage amplitude for the sweep signal whose frequency is greater than 100 Hz.

F1KHZ: sets a voltage amplitude for the sweep signal whose frequency is greater than 1 KHz.

F10KHZ: sets a voltage amplitude for the sweep signal whose frequency is greater than 10 KHz.

F100KHZ: sets a voltage amplitude for the sweep signal whose frequency is greater than 100 KHz.

F1MHZ: sets a voltage amplitude for the sweep signal whose frequency is greater than 1 MHz.

F10MHZ: sets a voltage amplitude for the sweep signal whose frequency is greater than 10 MHz.

F25MHZ: sets a voltage amplitude for the sweep signal whose frequency is greater than 25 MHz.

When the parameter <range> is not set to ALL, you need to perform

the :BODeplot:VOLTage:PROFile ON

command first to configure the voltage amplitude to be variant.

Return

Format

The query returns the voltage amplitude of the sweep signal for the output frequency range in scientific notation.

Example

:BODeplot:VOLTage 1, F1MHZ /*Sets the voltage amplitude of the sweep signal whose frequency is greater than 1 MHz to 1 V.*/

:BODeplot:VOLTage? F1MHZ /*The query returns the voltage amplitude

1.000000E0.*/

:BODeplot:VOLTage:PROFile

Syntax

:BODeplot:VOLTage:PROFile <bool>

:BODeplot:VOLTage:PROFile?

Description

Sets the voltage amplitude of the sweep signal in the bode plot to be variant or invariant; queries whether the voltage amplitude of the sweep signal in the bode plot is set to variant or invariant.

Parameter

Name Type Range Default

<bool> Bool

The query returns 1 or 0.

{{1|ON}|{0|OFF}} 0|OFF

Return

Format

Example

:BODeplot:VOLTage:PROFile ON /*Sets the amplitude of the sweep signal in the bode plot to be variant.*/

:BODeplot:VOLTage:PROFile? /*The query returns 1.*/

MSO5000-E Programming Guide 2-11

RIGOL

Chapter 2 Command System

:BODeplot:GMARgin?

Syntax

:BODeplot:GMARgin?

Description

Queries the gain margin of the bode plot. The default unit is dB.

Return

Format

The query returns the gain margin of the bode plot in scientific notation.

:BODeplot:GMARgin:FREQuency?

Syntax

:BODeplot:GMARgin:FREQuency?

Description

Queries the frequency that corresponds to the gain margin. The default unit is Hz.

Return

Format

The query returns the frequency that corresponds to the gain margin in scientific notation.

:BODeplot:PMARgin?

Syntax

:BODeplot:PMARgin?

Description

Queries the current phase margin. The default unit is degree.

Return

Format

The query returns the phase margin of the bode plot in scientific notation.

:BODeplot:PMARgin:FREQuency?

Syntax

:BODeplot:PMARgin:FREQuency?

Description

Queries the frequency that corresponds to the phase margin. The default unit is Hz.

Return

Format

The query returns the frequency that corresponds to the phase margin in scientific notation.

2-12 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BUS<n> Commands

The :BUS<n> commands are used to execute the decoding-related settings and operations.

Command List:

:BUS<n>:MODE

:BUS<n>:DISPlay

:BUS<n>:FORMat

:BUS<n>:EVENt

:BUS<n>:EVENt:FORMat

:BUS<n>:EVENt:VIEW

:BUS<n>:LABel

:BUS<n>:DATA?

:BUS<n>:EEXPort

:BUS<n>:POSition

:BUS<n>:THReshold

:BUS<n>:PARallel

:BUS<n>:RS232 (Option)

:BUS<n>:IIC (Option)

:BUS<n>:SPI (Option)

:BUS<n>:CAN (Option)

:BUS<n>:FLEXray (Option)

:BUS<n>:LIN (Option)

:BUS<n>:IIS (Option)

:BUS<n>:M1553 (Option)

:BUS<n>:MODE

Syntax

:BUS<n>:MODE <mode>

:BUS<n>:MODE?

Description

Sets or queries the decoding type of the specified decoding bus.

Parameter

Name Type Range

<n> Discrete

<mode> Discrete

{1|2|3|4}

{PARallel|RS232|SPI|IIC|IIS|LIN|CAN|

FLEXray|M1553}

Default

——

PARallel

Remarks

Except PARallel, all the other decodings are options. Only when the specified option is installed, can the command is available.

Return

Format

The query returns PAR, RS232, SPI, IIC, IIS, LIN, CAN, FLEX, or M1553.

Example

:BUS1:MODE SPI /*Sets the type of the decoding bus to SPI.*/

:BUS1:MODE? /*The query returns SPI.*/

MSO5000-E Programming Guide 2-13

RIGOL

Chapter 2 Command System

:BUS<n>:DISPlay

Syntax

:BUS<n>:DISPlay <bool>

:BUS<n>:DISPlay?

Description

Enables or disables the specified decoding bus; or queries the on/off display status of the specified decoding bus.

Parameter Name

<n>

<bool>

Type Range

Discrete {1|2|3|4}

Bool {{1|ON}|{0|OFF}}

Return

Format

The query returns 1 or 0.

Example

:BUS1:DISPlay ON /*Enables the decoding bus.*/

:BUS1:DISPlay? /*The query returns 1.*/

:BUS<n>:FORMat

Default

——

0|OFF

Syntax

:BUS<n>:FORMat <fmt>

:BUS<n>:FORMat?

Description

Sets or queries the display format of decoding data of the specified decoding bus.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4} ——

<fmt> Discrete {HEX|ASCii|DEC|BIN}

Remarks

HEX indicates Hexadecimal; DEC indicates Decimal; BIN indicates Binary.

HEX

Return

Format

The query returns HEX, ASC, DEC, or BIN.

Example

:BUS1:FORMat HEX /*Sets the display format of the bus to HEX.*/

:BUS1:FORMat? /*The query returns HEX.*/

:BUS<n>:EVENt

Syntax

:BUS<n>:EVENt <bool>

:BUS<n>:EVENt?

Description

Enables or disables the event table of the specified decoding bus; or queries the on/off status of the specified decoding bus event table.

Parameter

Name Type Range Default

<n>

<bool>

Discrete {1|2|3|4}

Bool {{1|ON}|{0|OFF}}

——

0|OFF

Remarks

Before using the command, enable the specified decoding bus.

Return

Format

The query returns 1 or 0.

Example

:BUS1:EVENt ON /*Enables the event table of the specified decoding bus.*/

:BUS1:EVENt? /*The query returns 1.*/

2-14 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BUS<n>:EVENt:FORMat

Syntax

:BUS<n>:EVENt:FORMat <format>

:BUS<n>:EVENt:FORMat?

Description

Sets or queries the display format of the specified decoding bus event table.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<format> Discrete {HEX|ASCii|DEC|BIN}

——

HEX

Remarks

HEX indicates Hexadecimal; DEC indicates Decimal; BIN indicates Binary.

Return

Format

The query returns HEX, ASC, DEC, or BIN.

Example

:BUS1:EVENt:FORMat HEX

/*Sets the display format of the specified decoding bus event table to HEX.*/

:BUS1:EVENt:FORMat? /*The query returns HEX.*/

:BUS<n>:EVENt:VIEW

Syntax

:BUS<n>:EVENt:VIEW <packet>

:BUS<n>:EVENt:VIEW?

Description

Sets or queries the data page of the specified decoding bus event table.

Parameter

Name Type Range Default

Remarks

<n> Discrete {1|2|3|4} ——

<packet> Discrete {PACKets|DETails|PAYLoad} PACKets

PACKets: displays time, data, and error information in the specified event table.

DETails: displays the detailed data of the specified row in the event table.

PAYLoad: displays all the data of the specified column in the event table.

When different views are selected, the export format of the data list will be changed accordingly.

Return

Format

The query returns PACK, DET, or PAYL.

Example

:BUS1:EVENt:VIEW DETails /*Sets the data page of the decoding bus event table to DETails.*/

:BUS1:EVENt:VIEW? /*The query returns DET.*/

MSO5000-E Programming Guide 2-15

RIGOL

Chapter 2 Command System

:BUS<n>:LABel

Syntax

:BUS<n>:LABel <bool>

:BUS<n>:LABel?

Description

Enables or disables the label of the specified decoding bus; or queries the on/off status of the label of the specified decoding bus.

Parameter Name

<n>

<bool>

Type Range

Discrete {1|2|3|4}

Bool {{1|ON}|{0|OFF}}

Default

——

0|OFF

Remarks

Before using the command, enable the specified decoding bus.

Return

Format

The query returns 1 or 0.

Example

:BUS1:LABel ON /*Enables the label of the specified decoding bus.*/

:BUS1:LABel? /*The query returns 1.*/

:BUS<n>:DATA?

Syntax

:BUS<n>:DATA?

Description

Reads the data in the decoding event table.

Parameter

Name Type Range Default

Return

Format

<n> Discrete {1|2|3|4} ——

Returns the data in the decoding event table with the following formats.

#9000000072PAL,

Time,Data,,

-1us,0,,

-990.3ns,1,,

-503.2ns,0,,

9.2ns,1,,

497.2ns,0,

Wherein, "#9000000072" is the TMC data block header, which is followed by the data in the event table. The 9-digit data following #9 in the data block header indicates the number of bytes of the effective data. "PAL" indicates the decoding type. The available decoding type can also be RS232, I2C, SPI, CAN, LIN, FlexRay, I2S or

1553B. The data are separated by commas, and will automatically go to the next line according to the line length limit in the decoding list. The data value is related to the numeral system that you have set.

Note:

You can save all the data (except TMC data block header and decoding type, e.g. #9000000072PAL) as the "*.csv" file and view the data in the form of a list.

2-16 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BUS<n>:EEXPort

Syntax

:BUS<n>:EEXPort <path>

Description

Exports the decoding information in the specified decoding bus event table in CSV form.

Parameter

Name Type Range Default

<n> ——

<path>

Discrete {1|2|3|4}

ASCII

String

Refer to

Remarks

——

Remarks

<path> includes the file storage location and the filename with a suffix. If the specified storage location already contains a file with the same filename, the original file will be overwritten.

The stored "*.csv" file can be opened and edited in Excel.

Example

:BUS1

:

EEXPort C:/123.csv /*Exports the decoding information in the bus event table to the local Disk C, with the filename 123.csv.*/

:BUS<n>:POSition

Syntax

:BUS<n>:POSition <pos>

:BUS<n>:POSition?

Description

Sets or queries the vertical position of the bus on the screen.

Parameter

Name Type Range

<n> Discrete {1|2|3|4}

<pos> Integer -250 to +250

Default

——

Related to the channel offset

Return

Format

The query returns an integer ranging from -250 to +250.

Example

:BUS1:POSition 200 /*Sets the vertical position of the bus to 200.*/

:BUS1:POSition? /*The query returns 200.*/

:BUS<n>:THReshold

Syntax

:BUS<n>:THReshold <value>,<type>

:BUS<n>:THReshold? <type>

Description

Sets or queries the threshold of the specified decoding source.

Parameter

Name Type Range

<n>

<value>

Discrete {1|2|3|4}

Real

(-5× VerticalScale – OFFSet) to

(5× VerticalScale – OFFSet)

0

Default

——

<type> ——

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command. For OFFSet, refer to

the :CHANnel<n>:OFFSet command.

For RS232 decoding, only when the RX source is enabled, can you set the threshold.

MSO5000-E Programming Guide 2-17

RIGOL

Chapter 2 Command System

Return

Format

For SPI decoding, only when the MOSI source is enabled, can you set the threshold.

The query returns the threshold of the specified decoding source in scientific notation.

Example

:BUS1:THReshold 2.4,PAL /*Sets the threshold of the PAL decoding source to 2.4 V.*/

:BUS1:THReshold? PAL /*The query returns 2.400000E0.*/

2-18 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BUS<n>:PARallel

The :BUS<n>:PARallel commands are used to set relevant parameters for Parallel decoding.

Command List:

:BUS<n>:PARallel:BUS

:BUS<n>:PARallel:CLK

:BUS<n>:PARallel:SLOPe

:BUS<n>:PARallel:WIDTh

:BUS<n>:PARallel:BITX

:BUS<n>:PARallel:SOURce

:BUS<n>:PARallel:POLarity

:BUS<n>:PARallel:NREJect

:BUS<n>:PARallel:NRTime

:BUS<n>:PARallel:BUS

Syntax

:BUS<n>:PARallel:BUS <source>

:BUS<n>:PARallel:BUS?

Description

Sets or queries the current source of the Parallel decoding bus.

Parameter Name Type Range

<n> Discrete {1|2|3|4}

<source> Discrete

{CH1|CH2|CH3|CH4|D7D0|D15D8|D15D0|

D0D7|D8D15|D0D15|USER}

Default

——

——

Return

Format

The query returns CH1, CH2, CH3, CH4, D7D0, D15D8, D15D0, D0D7, D8D15, D0D15, or USER.

Example

:BUS1:PARallel:BUS D0 /*Sets the current source of the Parallel decoding bus to

D0.*/

:BUS1:PARallel:BUS? /*The query returns D0.*/

:BUS<n>:PARallel:CLK

Syntax

:BUS<n>:PARallel:CLK <source>

:BUS<n>:PARallel:CLK?

Description

Sets or queries the clock source of the Parallel decoding.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

Default

——

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|

D9|D10|D11|D12|D13|D14|D15|

CHANnel1|CHANnel2|OFF}

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, or OFF.

OFF

Return

Format

Example

:BUS1:PARallel:CLK D0 /*Sets the clock source of the Parallel decoding to D0.*/

:BUS1:PARallel:CLK? /*The query returns D0.*/

MSO5000-E Programming Guide 2-19

RIGOL

Chapter 2 Command System

:BUS<n>:PARallel:SLOPe

Syntax

:BUS<n>:PARallel:SLOPe <slope>

:BUS<n>:PARallel:SLOPe?

Description

Sets or queries the edge type of the clock channel when being sampled by Parallel decoding on the data channel.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

Default

——

<slope> Discrete {POSitive|NEGative|BOTH} POSitive

Remarks

If no clock channel is selected, the instrument will sample when the channel data jumps during the decoding.

Return

Format

The query returns POS, NEG, or BOTH.

Example

:BUS1:PARallel:SLOPe BOTH /*Sets the Parallel decoding to sample on any edge of the clock channel.*/

:BUS1:PARallel:SLOPe? /*The query returns BOTH.*/

:BUS<n>:PARallel:WIDTh

Syntax

:BUS<n>:PARallel:WIDTh <wid>

:BUS<n>:PARallel:WIDTh?

Description

Sets or queries the data width of the parallel bus, i.g. the number of bits per frame.

Parameter

Name Type Range Default

<n>

<wid>

Discrete {1|2|3|4}

Integer 0 to 18

——

1

Remarks

After you send this command to set the data width of the bus, send

the :BUS<n>:PARallel:BITX

and :BUS<n>:PARallel:SOURce command to select

the bit respectively and set the channel source for the bit.

Return

Format

Only when the bus source is set to User, can this command be valid.

The query returns an integer ranging from 0 to 18.

Example

:BUS1:PARallel:WIDTh 16 /*Sets the data width of Parallel decoding to 16.*/

:BUS1:PARallel:WIDTh? /*The query returns 16.*/

:BUS<n>:PARallel:BITX

Syntax

:BUS<n>:PARallel:BITX <bit>

:BUS<n>:PARallel:BITX?

Description

Sets or queries the data bit that the parallel bus requires to set for the channel source.

Parameter Name Type Range Default

<n>

<bit>

Discrete {1|2|3|4}

Integer 0 to (data width - 1)

Remarks

The data width is set by the :BUS<n>:PARallel:WIDTh command.

——

0

2-20 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

After selecting the desired bit, send the :BUS<n>:PARallel:SOURce command to

set the channel source for the bit.

The query returns the current data bits in integer.

Return

Format

Example

:BUS1:PARallel:BITX 2 /*Sets the current bit to 2.*/

:BUS1:PARallel:BITX? /*The query returns 2.*/

:BUS<n>:PARallel:SOURce

Syntax

:BUS<n>:PARallel:SOURce <src>

:BUS<n>:PARallel:SOURce?

Description

Sets or queries the channel source of the currently selected data bit.

Parameter Name Type Range

<n>

<src>

Discrete {1|2|3|4}

Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|

D9|D10|D11|D12|D13|D14|D15|

CHANnel1|CHANnel2}

Default

——

Related to the selected bit

Remarks

Before sending this command, send the :BUS<n>:PARallel:BITX command to select

the desired data bit.

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:BUS1:PARallel:SOURce CHANnel2 /*Sets the channel source of the current bit to

CHANnel2.*/

:BUS1:PARallel:SOURce? /*The query returns CHAN2.*/

:BUS<n>:PARallel:POLarity

Syntax

:BUS<n>:PARallel:POLarity <pol>

:BUS<n>:PARallel:POLarity?

Description

Sets or queries the data polarity of Parallel decoding.

Parameter

Name Type Range Default

<n>

<pol>

Discrete {1|2|3|4}

Discrete {NEGative|POSitive}

——

POSitive

Remarks

NEGative: indicates the negative polarity.

POSitive: indicates the positive polarity.

Return

Format

The query returns NEG or POS.

Example

:BUS1:PARallel:POLarity NEGative /*Sets the data polarity of Parallel decoding to

NEGative.*/

:BUS1:PARallel:POLarity? /*The query returns NEG.*/

MSO5000-E Programming Guide 2-21

RIGOL

Chapter 2 Command System

:BUS<n>:PARallel:NREJect

Syntax

:BUS<n>:PARallel:NREJect <bool>

:BUS<n>:PARallel:NREJect?

Description

Enables or disables the noise rejection function of Parallel decoding; or queries the status of the noise rejection function of Parallel decoding.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

Default

——

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Remarks

Noise rejection can remove the data that last not enough time on the bus and eliminate the burst glitch in the actual circuit.

Return

Format

When the noise rejection is enabled, send the :BUS<n>:PARallel:NRTime

command to set the required rejection time.

The query returns 1 or 0.

Example

:BUS1:PARallel:NREJect ON /*Enables the noise rejection function.*/

:BUS1:PARallel:NREJect? /*The query returns 1.*/

:BUS<n>:PARallel:NRTime

Syntax

:BUS<n>:PARallel:NRTime <time>

:BUS<n>:PARallel:NRTime?

Description

Sets or queries the noise rejection time of Parallel decoding. The default unit is s.

Parameter

Name Type Range Default

<n>

<time>

Discrete {1|2|3|4}

Real 0 ns to 1 s

Return

Format

The query returns the noise rejection time in scientific notation.

Example

:BUS1:PARallel:NRTime 0.01 /*Sets the noise rejection time to 10 ms.*/

:BUS1:PARallel:NRTime? /*The query returns 1.000000E-2.*/

——

0 s

2-22 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BUS<n>:RS232 (Option)

The :BUS<n>:RS232 commands are used to set relevant parameters for RS232 decoding.

Command List:

:BUS<n>:RS232:TX

:BUS<n>:RS232:RX

:BUS<n>:RS232:POLarity

:BUS<n>:RS232:ENDian

:BUS<n>:RS232:BAUD

:BUS<n>:RS232:DBITs

:BUS<n>:RS232:SBITs

:BUS<n>:RS232:PARity

:BUS<n>:RS232:PACKet

:BUS<n>:RS232:PEND

:BUS<n>:RS232:TX

Syntax

:BUS<n>:RS232:TX <source>

:BUS<n>:RS232:TX?

Description

Sets or queries the TX channel source of RS232 decoding.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

Default

——

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, or OFF.

Example

:BUS1:RS232:TX D0 /*Sets the TX channel source of RS232 decoding to D0.*/

:BUS1:RS232:TX? /*The query returns D0.*/

:BUS<n>:RS232:RX

Syntax

:BUS<n>:RS232:RX <source>

:BUS<n>:RS232:RX?

Description

Sets or queries the RX channel source of RS232 decoding.

Parameter

Name Type Range

<n> Discrete {1|2|3|4}

Default

——

OFF

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, or OFF.

Example

:BUS1:RS232:RX D0 /*Sets the RX channel source of RS232 decoding to D0.*/

:BUS1:RS232:RX? /*The query returns D0.*/

MSO5000-E Programming Guide 2-23

RIGOL

Chapter 2 Command System

:BUS<n>:RS232:POLarity

Syntax

:BUS<n>:RS232:POLarity <pol>

:BUS<n>:RS232:POLarity?

Description

Sets or queries the polarity of RS232 decoding.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

<pol> Discrete {POSitive|NEGative}

Default

——

NEGative

Remarks

The RS232 standard uses "Negative Logic", i.g. high level is Logic 0 and low level is

Logic 1. Therefore, when the parameter <pol> is set to NEGative, it indicates that the polarity is set to negative logic, i.g. Normal polarity. When the parameter <pol> is set to POSitive, it indicates that the polarity is set to positive logic, i.g. Inverted polarity.

Return

Format

In the RS232 decoding, the start bit of data packet indicates when to start data transmission. It is determined by the polarity. When <pol> is set to "POSitive", the start bit is 0; when "NEGative", the start bit is 1.

The query returns POS or NEG.

Example

:BUS1:RS232:POLarity POSitive /*Sets the polarity of RS232 decoding to POSitive.*/

:BUS1:RS232:POLarity? /*The query returns POS.*/

:BUS<n>:RS232:ENDian

Syntax

:BUS<n>:RS232:ENDian <endian>

:BUS<n>:RS232:ENDian?

Description

Sets or queries the endian of data transmission in RS232 decoding.

Parameter Name Type Range

<n> Discrete {1|2|3|4}

<endian> Discrete {MSB|LSB}

Default

——

LSB

Remarks

LSB: indicates Least Significant Bit transmission sequence, i.g. the lowest bit of the data is transmitted first.

MSB: indicates Most Significant Bit transmission sequence, i.g. the highest bit of the data is transmitted first.

Return

Format

The query returns LSB or MSB.

Example

:BUS1:RS232:ENDian MSB /*Sets the transmission order of RS232 decoding to MSB.*/

:BUS1:RS232:ENDian? /*The query returns MSB.*/

:BUS<n>:RS232:BAUD

Syntax

:BUS<n>:RS232:BAUD <baud>

:BUS<n>:RS232:BAUD?

Description

Sets or queries the baud rate of data transmission in RS232 decoding. The default unit is bps.

2-24 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

Default

——

<baud> Integer 1 bps to 20 Mbps 9600 bps

Remarks

If the baud rate is set to a value with "M", then "A" should be added at the end of the value. For example, if you send 5M, you need to send 5MA.

Return

Format

The query returns an integer ranging from 1 bps to 20 Mbps.

Example

:BUS1:RS232:BAUD 4800 /*Sets the baud rate of data transmission in RS232 decoding to 4800 bps.*/

:BUS1:RS232:BAUD? /*The query returns 4800.*/

:BUS<n>:RS232:DBITs

Syntax

:BUS<n>:RS232:DBITs <bits>

:BUS<n>:RS232:DBITs?

Description

Sets or queries the data width of RS232 decoding.

Parameter

Name Type Range Default

<n>

<bits>

Discrete {1|2|3|4}

Discrete {5|6|7|8|9}

——

8

Return

Format

The query returns 5, 6, 7, 8, or 9.

Example

:BUS1:RS232:DBITs 7 /*Sets the data width of RS232 decoding to 7.*/

:BUS1:RS232:DBITs? /*The query returns 7.*/

:BUS<n>:RS232:SBITs

Syntax

:BUS<n>:RS232:SBITs <stop bits>

:BUS<n>:RS232:SBITs?

Description

Sets or queries the stop bits of each frame of data in RS232 decoding.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<stop bits> Discrete {1|1.5|2}

Return

Format

The query returns 1, 1.5, or 2.

Example

:BUS1:RS232:SBITs 2 /*Sets the stop bits of RS232 decoding to 2.*/

:BUS1:RS232:SBITs? /*The query returns 2.*/

——

1

MSO5000-E Programming Guide 2-25

RIGOL

Chapter 2 Command System

:BUS<n>:RS232:PARity

Syntax

:BUS<n>:RS232:PARity <parity>

:BUS<n>:RS232:PARity?

Description

Sets or queries the odd-even check mode of data transmission in RS232 decoding.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

Default

——

<parity> Discrete {NONE|ODD|EVEN} NONE

Remarks

NONE: indicates that there is no parity bit in data transmission.

ODD: indicates the odd parity bit. The total count of occurrences of 1 in the data bit and check bit is an odd number. For example, when 0x55 (01010101) is sent, "1" should be added to the check bit.

EVEN: indicates the even parity bit. The total count of occurrences of 1 in the data bit and check bit is an even number. For example, when 0x55 (01010101) is sent,

"0" should be added to the check bit.

Return

Format

The query returns NONE, ODD, or EVEN.

Example

:BUS1:RS232:PARity ODD /*Sets the odd-even check mode of data transmission in RS232 decoding to ODD.*/

:BUS1:RS232:PARity? /*The query returns ODD.*/

:BUS<n>:RS232:PACKet

Syntax

:BUS<n>:RS232:PACKet <bool>

:BUS<n>:RS232:PACKet?

Description

Enables or disables the packet end during data transmission; or queries the status of packet end during data transmission.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

Default

——

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Remarks

When enabled, several data blocks will be combined based on the packet end.

Return

Format

The query returns 1 or 0.

Example

:BUS1:RS232:PACKet ON /*Enables the packet end during data transmission.*/

:BUS1:RS232:PACKet? /*The query returns 1.*/

2-26 MSO5000-E Programming Guide

Chapter 2 Command System

:BUS<n>:RS232:PEND

Syntax

:BUS<n>:RS232:PEND <package end>

:BUS<n>:RS232:PEND?

Description

Sets or queries the packet separator type during data transmission.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

<package end> Discrete {NULL|LF|CR|SP}

Remarks

The parameters are represented in hexadecimal as follows:

NULL: 00

LF: 0A

CR: 0D

SP: 20

Return

Format

The query returns NULL, LF, CR, or SP.

Example

:BUS1:RS232:PEND LF /*Sets the packet separator to 0A.*/

:BUS1:RS232:PEND? /*The query returns LF.*/

RIGOL

Default

——

NULL

MSO5000-E Programming Guide 2-27

RIGOL

Chapter 2 Command System

:BUS<n>:IIC (Option)

The :BUS<n>:IIC commands are used to set relevant parameters for I2C decoding.

Command List:

:BUS<n>:IIC:SCLK:SOURce

:BUS<n>:IIC:SDA:SOURce

:BUS<n>:IIC:ADDRess

:BUS<n>:IIC:SCLK:SOURce

Syntax

:BUS<n>:IIC:SCLK:SOURce <source>

:BUS<n>:IIC:SCLK:SOURce?

Description

Sets or queries the clock source of I2C decoding.

Parameter

Name Type Range

<n> Discrete {1|2|3|4}

Default

——

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:BUS1:IIC:SCLK:SOURce D0 /*Sets the clock source of I2C decoding to D0.*/

:BUS1:IIC:SCLK:SOURce? /*The query returns D0.*/

:BUS<n>:IIC:SDA:SOURce

Syntax

:BUS<n>:IIC:SDA:SOURce <source>

:BUS<n>:IIC:SDA:SOURce?

Description

Sets or queries the data channel source of I2C decoding.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4} ——

CHANnel2

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:BUS1:IIC:SDA:SOURce D0 /*Sets the data channel source of I2C decoding to D0.*/

:BUS1:IIC:SDA:SOURce? /*The query returns D0.*/

2-28 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BUS<n>:IIC:ADDRess

Syntax

:BUS<n>:IIC:ADDRess <addr>

:BUS<n>:IIC:ADDRess?

Description

Sets or queries the address mode of I2C decoding.

Parameter

Name

<n>

Type

Discrete

Range

{1|2|3|4}

<addr> Discrete {NORMal|RW}

Default

——

NORMal

Remarks

NORMal: indicates that the address width does not include the R/W bit.

RW: indicates that the address width includes the R/W bit.

Return

Format

The query returns NORM or RW.

Example

:BUS1:IIC:ADDRess RW /*Sets the address of I2C decoding to include the R/W bit.*/

:BUS1:IIC:ADDRess? /*The query returns RW.*/

MSO5000-E Programming Guide 2-29

RIGOL

Chapter 2 Command System

:BUS<n>:SPI (Option)

The :BUS<n>:SPI commands are used to set relevant parameters for SPI decoding.

Command List:

:BUS<n>:SPI:SCLK:SOURce

:BUS<n>:SPI:SCLK:SLOPe

:BUS<n>:SPI:MISO:SOURce

:BUS<n>:SPI:MISO:POLarity

:BUS<n>:SPI:MOSI:SOURce

:BUS<n>:SPI:MOSI:POLarity

:BUS<n>:SPI:DBITs

:BUS<n>:SPI:ENDian

:BUS<n>:SPI:MODE

:BUS<n>:SPI:TIMeout:TIME

:BUS<n>:SPI:SS:SOURce

:BUS<n>:SPI:SS:POLarity

:BUS<n>:SPI:SCLK:SOURce

Syntax

:BUS<n>:SPI:SCLK:SOURce <source>

:BUS<n>:SPI:SCLK:SOURce?

Description

Sets or queries the clock source of SPI decoding.

Parameter

Name Type Range

<n> Discrete {1|2|3|4}

Default

——

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:BUS1:SPI:SCLK:SOURce D0 /*Sets the clock source of SPI decoding to D0.*/

:BUS1:SPI:SCLK:SOURce? /*The query returns D0.*/

:BUS<n>:SPI:SCLK:SLOPe

Syntax

:BUS<n>:SPI:SCLK:SLOPe <slope>

:BUS<n>:SPI:SCLK:SLOPe?

Description

Sets or queries the clock edge type of SPI decoding.

Parameter

Name Type Range Default

Return

Format

<n> Discrete {1|2|3|4}

<slope> Discrete {POSitive|NEGative}

The query returns POS or NEG.

——

POSitive

2-30 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Example

:BUS1:SPI:SCLK:SLOPe NEGative /*Sets the clock edge type of SPI decoding to

NEGative.*/

:BUS1:SPI:SCLK:SLOPe? /*The query returns NEG.*/

:BUS<n>:SPI:MISO:SOURce

Syntax

:BUS<n>:SPI:MISO:SOURce <source>

:BUS<n>:SPI:MISO:SOURce?

Description

Sets or queries the MISO data source of SPI decoding.

Parameter

Name Type Range Default

—— <n> Discrete {1|2|3|4}

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D

12|D13|D14|D15|CHANnel1|CHANnel2|OFF}

CHANnel2

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, or OFF.

Example

:BUS1:SPI:MISO:SOURce D0 /*Sets the MISO data source of SPI decoding to D0.*/

:BUS1:SPI:MISO:SOURce? /*The query returns D0.*/

:BUS<n>:SPI:MISO:POLarity

Syntax

:BUS<n>:SPI:MISO:POLarity <polarity>

:BUS<n>:SPI:MISO:POLarity?

Description

Sets or queries the polarity of MISO data line of SPI decoding.

Parameter Name

<n>

Type Range

Discrete {1|2|3|4}

<polarity> Discrete {HIGH|LOW}

Default

——

HIGH

Remarks

High: indicates that low level is 1, and high level is 0.

Low: indicates that high level is 1, and low level is 0.

Return

Format

The query returns HIGH or LOW.

Example

:BUS1:SPI:MISO:POLarity HIGH /*Sets the polarity of MISO data line to HIGH.*/

:BUS1:SPI:MISO:POLarity? /*The query returns HIGH.*/

:BUS<n>:SPI:MOSI:SOURce

Syntax

:BUS<n>:SPI:MOSI:SOURce <source>

:BUS<n>:SPI:MOSI:SOURce?

Description

Sets or queries the MOSI data source of SPI decoding.

Parameter Name Type Range

<n> Discrete {1|2|3|4}

Default

——

OFF

MSO5000-E Programming Guide 2-31

RIGOL

Chapter 2 Command System

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, or OFF.

Example

:BUS1:SPI:MOSI:SOURce D0 /*Sets the MOSI data source of SPI decoding to D0.*/

:BUS1:SPI:MOSI:SOURce? /*The query returns D0.*/

:BUS<n>:SPI:MOSI:POLarity

Syntax

:BUS<n>:SPI:MOSI:POLarity <polarity>

:BUS<n>:SPI:MOSI:POLarity?

Description

Sets or queries the polarity of MOSI data line of SPI decoding.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<polarity> Discrete {HIGH|LOW}

——

HIGH

Remarks

High: indicates that low level is 1, and high level is 0.

Low: indicates that high level is 1, and low level is 0.

Return

Format

This command has the same function as the :BUS<n>:SPI:MISO:POLarity

command.

The query returns HIGH or LOW.

Example

:BUS1:SPI:MOSI:POLarity HIGH /*Sets the polarity of MOSI data line to HIGH.*/

:BUS1:SPI:MOSI:POLarity? /*The query returns HIGH.*/

:BUS<n>:SPI:DBITs

Syntax

:BUS<n>:SPI:DBITs <width>

:BUS<n>:SPI:DBITs?

Description

Sets or queries the data width of SPI decoding.

Parameter

Name Type Range Default

——

8

<n> Discrete

<width> Integer

{1|2|3|4}

4 to 32

The query returns an integer ranging from 4 to 32.

Return

Format

Example

:BUS1:SPI:DBITs 10 /*Sets the data width of SPI decoding to 10.*/

:BUS1:SPI:DBITs? /*The query returns 10.*/

:BUS<n>:SPI:ENDian

Syntax

:BUS<n>:SPI:ENDian <endian>

:BUS<n>:SPI:ENDian?

Description

Sets or queries the endian of data transmission of SPI decoding.

Parameter

Name Type Range

<n> Discrete {1|2|3|4}

Default

——

2-32 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

<endian> Discrete {MSB|LSB} MSB

Remarks

MSB: indicates Most Significant Bit transmission sequence, i.g. the highest bit of the data is transmitted first.

LSB: indicates Least Significant Bit transmission sequence, i.g. the lowest bit of the data is transmitted first.

The query returns MSB or LSB.

Return

Format

Example

:BUS1:SPI:ENDian LSB /*Sets the endian of data transmission of SPI decoding to LSB.*/

:BUS1:SPI:ENDian? /*The query returns LSB.*/

:BUS<n>:SPI:MODE

Syntax

:BUS<n>:SPI:MODE <mode>

:BUS<n>:SPI:MODE?

Description

Sets or queries the decode mode of SPI decoding.

Parameter Name Type Range

<n> Discrete {1|2|3|4}

<mode> Discrete {CS|TIMeout}

Default

——

TIMeout

Remarks

CS: indicates chip select. You can perform frame synchronization according to CS.

Return

Format

TIMeout: indicates timed out. You can perform frame synchronization according to

the timeout. At this time, you can send the :BUS<n>:SPI:TIMeout:TIME

command to set the timeout value.

The query returns CS or TIM.

Example

:BUS1:SPI:MODE CS /*Sets the decode mode of SPI decoding to CS.*/

:BUS1:SPI:MODE? /*The query returns CS.*/

:BUS<n>:SPI:TIMeout:TIME

Syntax

:BUS<n>:SPI:TIMeout:TIME <time>

:BUS<n>:SPI:TIMeout:TIME?

Description

Sets or queries the timeout value of SPI decoding. The default unit is s.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4} ——

<time>

Remarks

Real 8 ns to 10 s 1 μs

The timeout must be greater than the maximum clock pulse width and less than the idle time between frames.

Return

Format

This setting command is only valid in timeout mode.

The query returns the timeout value in scientific notation.

Example

:BUS1:SPI:TIMeout:TIME 0.000005 /*Sets the timeout value to 5 μ s.*/

:BUS1:SPI:TIMeout:TIME? /*The query returns 5.000000E-6.*/

MSO5000-E Programming Guide 2-33

RIGOL

Chapter 2 Command System

:BUS<n>:SPI:SS:SOURce

Syntax

:BUS<n>:SPI:SS:SOURce <source>

:BUS<n>:SPI:SS:SOURce?

Description

Sets or queries the source channel of the CS line of SPI decoding.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

<source> Real

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|

D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

——

D0

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:BUS1:SPI:SS:SOURce D0 /*Sets the source channel of CS line of SPI decoding to

D0.*/

:BUS1:SPI:SS:SOURce? /*The query returns D0.*/

:BUS<n>:SPI:SS:POLarity

Syntax

:BUS<n>:SPI:SS:POLarity <polarity>

:BUS<n>:SPI:SS:POLarity?

Description

Sets or queries the polarity of CS line of SPI decoding.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<polarity> Discrete {HIGH|LOW}

Remarks

——

LOW

HIGH: indicates that the oscilloscope samples data of the source channel of data line on the specified edge of the clock signal when the CS signal is high level.

LOW: indicates that the oscilloscope samples data of the source channel of data line on the specified edge of the clock signal when the CS signal is low level.

The query returns HIGH or LOW.

Return

Format

Example

:BUS1:SPI:SS:POLarity HIGH /*Sets the polarity of CS line of SPI decoding to HIGH.*/

:BUS1:SPI:SS:POLarity? /*The query returns HIGH.*/

2-34 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BUS<n>:CAN (Option)

The :BUS<n>:CAN commands are used to set relevant parameters for CAN decoding.

Command List:

:BUS<n>:CAN:SOURce

:BUS<n>:CAN:STYPe

:BUS<n>:CAN:BAUD

:BUS<n>:CAN:SPOint

:BUS<n>:CAN:SOURce

Syntax

:BUS<n>:CAN:SOURce <source>

:BUS<n>:CAN:SOURce?

Description

Sets or queries the source channel of CAN decoding.

Parameter

Name Type Range

<n> Discrete {1|2|3|4}

Default

——

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:BUS1:CAN:SOURce D0 /*Sets the source channel of CAN decoding to D0.*/

:BUS1:CAN:SOURce? /*The query returns D0.*/

:BUS<n>:CAN:STYPe

Syntax

:BUS<n>:CAN:STYPe <stype>

:BUS<n>:CAN:STYPe?

Description

Sets or queries the signal type of CAN decoding.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<stype> Discrete {TX|RX|CANH|CANL|DIFFerential}

——

CANL

Remarks

TX: indicates the Transmit signal from the CAN bus transceiver.

RX: indicates the Receive signal from the CAN bus transceiver.

CANH: indicates the actual CAN_H differential bus signal.

CANL: indicates the actual CAN_L differential bus signal.

DIFFerential: indicates the CAN differential bus signal connected to an analog channel by using a differential probe. Connect the differential probe's positive lead to the CAN_H bus signal and connect the negative lead to the CAN_L bus signal.

The query returns TX, RX, CANH, CANL, or DIFF.

Return

Format

Example

:BUS1:CAN:STYPe TX /*Sets the signal type of CAN decoding to TX.*/

:BUS1:CAN:STYPe? /*The query returns TX.*/

MSO5000-E Programming Guide 2-35

RIGOL

Chapter 2 Command System

:BUS<n>:CAN:BAUD

Syntax

:BUS<n>:CAN:BAUD <baud>

:BUS<n>:CAN:BAUD?

Description

Sets or queries the signal rate of CAN decoding. The default unit is bps.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

Default

——

<baud> Integer 10 kbps to 5 Mbps 1 Mbps

Remarks

If the baud rate is set to a value with "M", then "A" should be added at the end of the value. For example, if you send 5M, you need to send 5MA.

Return

Format

The query returns an integer ranging from 10 kbps to 5 Mbps.

Example

:BUS1:CAN:BAUD 120000 /*Sets the signal rate of CAN decoding to 120000 bps.*/

:BUS1:CAN:BAUD? /*The query returns 120000.*/

:BUS<n>:CAN:SPOint

Syntax

:BUS<n>:CAN:SPOint <spoint>

:BUS<n>:CAN:SPOint?

Description

Sets or queries the sample point position of CAN decoding (expressed in %).

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<spoint> Integer 10 to 90

——

50

Remarks

Sample point is a point within a bit’s time. The oscilloscope samples the bit level at this point. The sample point position is expressed as the ratio of "time from the bit start to the sample point" to "bit time", in %.

Return

Format

The query returns an integer ranging from 10 to 90.

Example

:BUS1:CAN:SPOint 70 /*Sets the sample point position of CAN decoding to 70%.*/

:BUS1:CAN:SPOint? /*The query returns 70.*/

2-36 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BUS<n>:FLEXray (Option)

The :BUS<n>:FLEXray commands are used to set the relevant parameters for FLEXray decoding.

Command List:

:BUS<n>:FLEXray:BAUD

:BUS<n>:FLEXray:SOURce

:BUS<n>:FLEXray:SPOint

:BUS<n>:FLEXray:STYPe

:BUS<n>:FLEXray:BAUD

Syntax

:BUS<n>:FLEXray:BAUD <baud>

:BUS<n>:FLEXray:BAUD?

Description

Sets or queries the signal rate of FlexRay decoding. The default unit is bps.

Parameter

Name Type Range Default

<n>

<baud>

Discrete {1|2|3|4}

Discrete {2500000|5000000|10000000}

——

10000000

Return

Format

The query returns 2500000, 5000000, or 10000000.

Example

:BUS1:FLEXray:BAUD 2500000 /*Sets the signal rate of FlexRay decoding to

2500000 bps.*/

:BUS1:FLEXray:BAUD? /*The query returns 2500000.*/

:BUS<n>:FLEXray:SOURce

Syntax

:BUS<n>:FLEXray:SOURce <source>

:BUS<n>:FLEXray:SOURce?

Description

Sets or queries the source channel of FlexRay decoding.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4} ——

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:BUS1:FlexRay:SOURce D0 /*Sets the source channel of FlexRay decoding to D0.*/

:BUS1:FlexRay:SOURce? /*The query returns D0.*/

MSO5000-E Programming Guide 2-37

RIGOL

Chapter 2 Command System

:BUS<n>:FLEXray:SPOint

Syntax

:BUS<n>:FLEXray:SPOint <spoint>

:BUS<n>:FLEXray:SPOint?

Description

Sets or queries the sample point position of FlexRay decoding (expressed in %).

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

Default

——

<spoint> Integer 10 to 90 50

Remarks

Sample point is a point within a bit’s time. The oscilloscope samples the bit level at this point. The sample point position is expressed as the ratio of "time from the bit start to the sample point" to "bit time", in %.

Return

Format

The query returns an integer ranging from 10 to 90.

Example

:BUS1:FLEXray:SPOint 70 /*Sets the sample point position of FlexRay decoding to

70%.*/

:BUS1:FLEXray:SPOint? /*The query returns 70.*/

:BUS<n>:FLEXray:STYPe

Syntax

:BUS<n>:FLEXray:STYPe <stype>

:BUS<n>:FLEXray:STYPe?

Description

Sets or queries the signal type of FlexRay decoding.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<stype> Discrete {BP|BM|RT}

——

BP

Return

Format

The query returns BP, BM, or RT.

Example

:BUS1:FLEXray:STYPe BM /*Sets the signal type of FlexRay decoding to BM.*/

:BUS1:FLEXray:STYPe? /*The query returns BM.*/

2-38 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BUS<n>:LIN (Option)

The :BUS<n>:LIN commands are used to set relevant parameters for LIN decoding.

Command List:

:BUS<n>:LIN:BAUD

:BUS<n>:LIN:POLarity

:BUS<n>:LIN:SOURce

:BUS<n>:LIN:STANdard

:BUS<n>:LIN:BAUD

Syntax

:BUS<n>:LIN:BAUD <baud>

:BUS<n>:LIN:BAUD?

Description

Sets or queries the baud rate of LIN decoding. The default unit is bps

Parameter Name

<n>

Type

Discrete

Range

{1|2|3|4}

Default

——

<baud> Integer 2.4 kbps to 20 Mbps 19200 bps

Remarks

If the baud rate is set to a value with "M", then "A" should be added at the end of the value. For example, if you send 5M, you need to send 5MA.

Return

Format

The query returns an integer ranging from 2.4 kbps to 20 Mbps.

Example

:BUS1:LIN:BAUD 9600 /*Sets the baud rate of LIN decoding to 9600 bps.*/

:BUS1:LIN:BAUD? /*The query returns 9600.*/

:BUS<n>:LIN:POLarity

Syntax

:BUS<n>:LIN:POLarity <bool>

:BUS<n>:LIN:POLarity?

Description

Sets or queries the parity bit of LIN decoding.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4} ——

<bool> Bool

The query returns 0 or 1.

{{1|ON}|{0|OFF}} 0|OFF

Return

Format

Example

:BUS1:LIN:POLarity ON /*Sets the parity bit to be included in LIN decoding.*/

:BUS1:LIN:POLarity? /*The query returns 1.*/

MSO5000-E Programming Guide 2-39

RIGOL

Chapter 2 Command System

:BUS<n>:LIN:SOURce

Syntax

:BUS<n>:LIN:SOURce <source>

:BUS<n>:LIN:SOURce?

Description

Sets or queries the source of LIN bus.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|

D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

——

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:BUS1:LIN:SOURce D0 /*Sets the source of LIN bus to D0.*/

:BUS1:LIN:SOURce? /*The query returns D0.*/

:BUS<n>:LIN:STANdard

Syntax

:BUS<n>:LIN:STANdard <value>

:BUS<n>:LIN:STANdard?

Description

Sets or queries the version of LIN bus.

Parameter

Name Type Range Default

<n> Discrete

<value> Discrete

{1|2|3|4}

{V1X|V2X|MIXed}

——

MIXed

Return

Format

The query returns V1X, V2X, or MIX.

Example

:BUS1:LIN:STANdard V2X /*Sets the version of LIN bus to V2X.*/

:BUS1:LIN:STANdard? /*The query returns V2X.*/

2-40 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BUS<n>:IIS (Option)

The :BUS<n>:IIC commands are used to set relevant parameters for I2S decoding.

Command List:

:BUS<n>:IIS:SOURce:CLOCk

:BUS<n>:IIS:SOURce:DATA

:BUS<n>:IIS:SOURce:WSELect

:BUS<n>:IIS:ALIGnment

:BUS<n>:IIS:CLOCk:SLOPe

:BUS<n>:IIS:RWIDth

:BUS<n>:IIS:SOURce:CLOCk

Syntax

:BUS<n>:IIS:SOURce:CLOCk <source>

:BUS<n>:IIS:SOURce:CLOCk?

Description

Sets or queries the clock source of the I2S decoding.

Parameter

Name Type Range

<n> Discrete {1|2|3|4}

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

——

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:BUS1:IIS:SOURce:CLOCk D0 /*Sets the clock source of the I2S decoding to D0.*/

:BUS1:IIS:SOURce:CLOCk? /*The query returns D0.*/

:BUS<n>:IIS:SOURce:DATA

Syntax

:BUS<n>:IIS:SOURce:DATA<source>

:BUS<n>:IIS:SOURce:DATA?

Description

Sets or queries the data source of the I2S decoding.

Parameter Name

<n>

Type Range

Discrete {1|2|3|4}

Default

——

CHANnel2

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:BUS1:IIS:SOURce:DATA D0 /*Sets the data source of the I2S decoding to D0.*/

:BUS1:IIS:SOURce:DATA? /*The query returns D0.*/

MSO5000-E Programming Guide 2-41

RIGOL

Chapter 2 Command System

:BUS<n>:IIS:SOURce:WSELect

Syntax

:BUS<n>:IIS:SOURce:WSELect <source>

:BUS<n>:IIS:SOURce:WSELect?

Description

Sets or queries the audio channel of the I2S trigger.

Parameter

Name

<n>

Type Range

Discrete {1|2|3|4}

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

——

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:BUS1:IIS:SOURce:WSELect CHANnel2 /*Sets the audio channel to CHANnel2.*/

:BUS1:IIS:SOURce:WSELect? /*The query returns CHAN2.*/

:BUS<n>:IIS:ALIGnment

Syntax

:BUS<n>:IIS:ALIGnment <align>

:BUS<n>:IIS:ALIGnment?

Description

Sets or queries the alignment mode of the I2S decoding.

Parameter Name Type Range

<n>

<align>

Discrete {1|2|3|4}

Discrete {IIS|RJ|LJ}

Default

——

IIS

Remarks

IIS: first sends MSB of each sample data and then sends LSB.

RJ: data transmission (MSB first) is right-justified to the WS transition.

Return

Format

LJ: data transmission (MSB first) begins at the edge of the WS transition.

The query returns IIS, RJ, or LJ.

Example

:BUS1:IIS:ALIGnment RJ /*Sets the alignment mode of the I2S decoding to RJ.*/

:BUS1:IIS:ALIGnment? /*The query returns RJ.*/

:BUS<n>:IIS:CLOCk:SLOPe

Syntax

:BUS<n>:IIS:CLOCk:SLOPe <slope>

:BUS<n>:IIS:CLOCk:SLOPe?

Description

Sets or queries the clock edge type of I2S decoding.

Parameter

Name Type Range Default

<n> Discrete

<slope> Discrete

{1|2|3|4}

{NEGative|POSitive}

——

POSitive

Return

Format

The query returns POS or NEG.

Example

:BUS1:IIS:CLOCk:SLOPe NEGative /*Sets the clock edge of I2S decoding to

NEGative.*/

:BUS1:IIS:CLOCk:SLOPe? /*The query returns NEG.*/

2-42 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:BUS<n>:IIS:RWIDth

Syntax

:BUS<n>:IIS:RWIDth <val>

:BUS<n>:IIS:RWIDth?

Description

Sets or queries the word size of the I2S decoding.

Parameter

Name Type

<n> Discrete

Range

{1|2|3|4}

Default

——

4 <val> Integer 4 to 32

Return

Format

The query returns an integer ranging from 4 to 32.

Example

:BUS1:IIS:RWIDth 5 /*Sets the word size of I2S decoding to 5.*/

:BUS1:IIS:RWIDth? /*The query returns 5.*/

MSO5000-E Programming Guide 2-43

RIGOL

Chapter 2 Command System

:BUS<n>:M1553 (Option)

The :BUS<n>:M1553 commands are used to set relevant parameters for the M1553 decoding.

Command List:

:BUS<n>:M1553:SOURce

:BUS<n>:M1553:SOURce

Syntax

:BUS<n>:M1553:SOURce <source>

:BUS<n>:M1553:SOURce?

Description

Sets or queries the source of the M1553 decoding.

Parameter

Name Type Range

<n> Discrete {1|2|3|4}

<source> Discrete {CHANnel1|CHANnel2}

Return

Format

The query returns CHAN1 or CHAN2.

Example

:BUS1:M1553:SOURce CHANnel2

/* Sets the source of the M1553 decoding to CHANnel2.*/

:BUS1:M1553:SOURce?

/*The query returns CHAN2.*/

Default

——

CHANnel1

2-44 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:CHANnel<n> Commands

The :CHANnel<n> commands are used to set or query the bandwidth limit, coupling, vertical scale, vertical offset, and other vertical system parameters of the analog channel.

Command List:

:CHANnel<n>:BWLimit

:CHANnel<n>:COUPling

:CHANnel<n>:DISPlay

:CHANnel<n>:INVert

:CHANnel<n>:OFFSet

:CHANnel<n>:TCALibrate

:CHANnel<n>:SCALe

:CHANnel<n>:PROBe

:CHANnel<n>:UNITs

:CHANnel<n>:VERNier

:CHANnel<n>:POSition

:CHANnel<n>:BWLimit

Syntax

:CHANnel<n>:BWLimit <type>

:CHANnel<n>:BWLimit?

Description

Sets or queries the bandwidth limit of the specified channel.

Parameter

Name Type Range Default

<n>

<type>

Discrete

Discrete

{1|2}

Refer to

Remarks

1

OFF

Remarks

The range of <type> is related to the instrument model.

MSO5152-E

{20M|OFF}

20M: When you enable the bandwidth limit and limit it to 20 MHz, the high frequency components found in the signal under test that are greater than 20 MHz are attenuated.

OFF: disables the bandwidth limit function. The high-frequency components in the signal under test can pass through the channel.

Return

Format

The query returns 20M or OFF.

Example

:CHANnel1:BWLimit 20M /*Enables the 20 MHz bandwidth limit.*/

:CHANnel1:BWLimit? /*The query returns 20M.*/

MSO5000-E Programming Guide 2-45

RIGOL

Chapter 2 Command System

:CHANnel<n>:COUPling

Syntax

:CHANnel<n>:COUPling <coupling>

:CHANnel<n>:COUPling?

Description

Sets or queries the coupling mode of the specified channel.

Parameter

Name Type Range

<n> Discrete

<coupling> Discrete

{1|2}

{AC|DC|GND}

Default

1

DC

Remarks

AC: the DC components of the signal under test are blocked.

DC: both DC and AC components of the signal under test can pass through the channel.

Return

Format

GND: the DC and AC components of the signal under test are both blocked.

The query returns AC, DC or GND.

Example

:CHANnel1:COUPling AC /*Selects the AC coupling mode.*/

:CHANnel1:COUPling? /*The query returns AC.*/

:CHANnel<n>:DISPlay

Syntax

:CHANnel<n>:DISPlay <bool>

:CHANnel<n>:DISPlay?

Description

Turns on or off the specified channel; or queries the on/off status of the specified channel.

Parameter Name Type Range Default

<n>

<bool>

Discrete

Bool

{1|2}

{{1|ON}|{0|OFF}}

1

0|OFF

Return

Format

The query returns 1 or 0.

Example

:CHANnel1:DISPlay ON /*Enables CH1.*/

:CHANnel1:DISPlay? /*The query returns 1.*/

:CHANnel<n>:INVert

Syntax

:CHANnel<n>:INVert <bool>

:CHANnel<n>:INVert?

Description

Turns on or off the waveform invert for the specified channel; or queries the on/off status of the waveform invert for the specified channel.

Parameter

Name Type Range Default

<n> Discrete

<bool> Bool

{1|2}

{{1|ON}|{0|OFF}}

1

0|OFF

Remarks

When the waveform invert is turned off, the waveform is displayed normally; when the waveform invert is turned on, the voltage values of the displayed waveform are inverted.

2-46 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Return Format

The query returns 1 or 0.

Example

:CHANnel1:INVert ON /*Enables the waveform invert for CH1.*/

:CHANnel1:INVert? /*The query returns 1.*/

:CHANnel<n>:OFFSet

Syntax

:CHANnel<n>:OFFSet <offset>

:CHANnel<n>:OFFSet?

Description

Sets or queries the vertical offset of the specified channel. The default unit is V.

Parameter

Name Type Range Default

<n>

<offset>

Discrete {1|2}

± 1 V (1 mV/div to 50 mV/div).

Real

± 30 V (51 mV/div to 260 mV/div)

± 100 V (265 mV/div to 10 V/div)

The query returns the vertical offset in scientific notation.

1

0 V

Return

Format

Example

:CHANnel1:OFFSet 0.01 /*Sets the vertical offset of CH1 to 10 mV.*/

:CHANnel1:OFFSet? /*The query returns 1E-2.*/

:CHANnel<n>:TCALibrate

Syntax

:CHANnel<n>:TCALibrate <val>

:CHANnel<n>:TCALibrate?

Description

Sets or queries the delay calibration time (used to calibrate the zero offset of the corresponding channel) of the specified channel. The default unit is s.

Parameter

Name Type Range Default

<n> Discrete {1|2} 1

<val> Real -100 ns to 100 ns 0 s

Remarks

Set the parameter <val> to a specific value at a specified step. If the parameter value is not within the settable range, select the value that is closest to the range automatically.

In different horizontal time bases, the step values for the parameter are different.

When the horizontal time base is greater than 10 μs , the parameter <val> cannot be set.

The query returns the delay calibration time in scientific notation.

Return

Format

Example

:CHANnel1:TCALibrate 0.00000002 /*Sets the delay calibration time to 20 ns.*/

:CHANnel1:TCALibrate? /*The query returns 2.000000E-8.*/

MSO5000-E Programming Guide 2-47

RIGOL

Chapter 2 Command System

:CHANnel<n>:SCALe

Syntax

:CHANnel<n>:SCALe <scale>

:CHANnel<n>:SCALe?

Description

Sets or queries the vertical scale of the specified channel. The default unit is V.

Parameter

Name Type Range Default

<n>

<scale>

Discrete {1|2}

Real The probe ratio is 1X: 500µV to 10 V

1

100 mV

Remarks

You can use the :CHANnel<n>:VERNier command to enable or disable the fine

adjustment setting for the vertical scale of the specified channel. By default, the fine adjustment is Off. At this time, you can set the vertical scale at 1-2-5 step, i.g. 10 mV, 20 mV, 50 mV…100 V. When the fine adjustment is enabled, you can further adjust the vertical scale within a relatively smaller range to improve vertical resolution. If the amplitude of the input waveform is a little bit greater than the full scale under the current scale and the amplitude would be a little bit lower if the next scale is used, fine adjustment can be used to improve the amplitude of waveform display to view signal details.

Return

Format

The query returns the vertical scale in scientific notation.

Example

:CHANnel1:SCALe 1 /*Sets the vertical scale of CH1 to 1 V.*/

:CHANnel1:SCALe? /*The query returns 1.*/

:CHANnel<n>:PROBe

Syntax

:CHANnel<n>:PROBe <atten>

:CHANnel<n>:PROBe?

Description

Sets or queries the probe ratio of the specified channel.

Parameter

Name Type Range

<n> Discrete

<atten> Discrete

{1|2}

{0.0001|0.0002|0.0005|0.001|0.002|0.005|

0.01|0.02|0.05|0.1|0.2|0.5|1|2|5|10|20|50

|100|200|500|1000|2000|5000|10000|2000

0|50000}

Default

1

1

Remarks

Sets the probe ratio. That is, multiply the acquired signal by a specified number (not affect the actual amplitude of the signal).

The set probe ratio affects the settable range of the current vertical scale.

Return

Format

The query returns 0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2,

0.5, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, or 50000.

Example

:CHANnel1:PROBe 10 /*Sets the probe ratio of CH1 to 10X.*/

:CHANnel1:PROBe? /*The query returns 10.*/

2-48 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:CHANnel<n>:UNITs

Syntax

:CHANnel<n>:UNITs <units>

:CHANnel<n>:UNITs?

Description

Sets or queries the amplitude display unit of the specified analog channel.

Parameter

Name Type Range Default

<n> Discrete {1|2}

<units> Discrete {VOLTage|WATT|AMPere|UNKNown}

1

VOLTage

Return

Format

The query returns VOLT, WATT, AMP, or UNKN.

Example

:CHANnel1:UNITs VOLTage /*Sets the amplitude display unit of CH1 to VOLTage.*/

:CHANnel1:UNITs? /*The query returns VOLT.*/

:CHANnel<n>:VERNier

Syntax

:CHANnel<n>:VERNier <bool>

:CHANnel<n>:VERNier?

Description

Enables or disables the fine adjustment of the vertical scale of the specified analog channel; or queries the on/off status of the fine adjustment function of the vertical scale of the specified analog channel.

Parameter

Name Type Range Default

<n> Discrete {1|2}

<bool> Bool {{1|ON}|{0|OFF}}

1

0|OFF

Remarks

By default, the fine adjustment is Off. At this time, you can set the vertical scale at 1-2-5 step, i.g. 10 mV, 20 mV, 50 mV, 100 mV …100 V. When the fine adjustment is enabled, you can further adjust the vertical scale within a relatively smaller range to improve vertical resolution. If the amplitude of the input waveform is a little bit greater than the full scale under the current scale and the amplitude would be a little bit lower if the next scale is used, fine adjustment can be used to improve the amplitude of waveform display to view signal details.

Return

Format

The query returns 1 or 0.

Example

:CHANnel1:VERNier ON /*Enables the fine adjustment of the vertical scale of CH1.*/

:CHANnel1:VERNier? /*The query returns 1.*/

MSO5000-E Programming Guide 2-49

RIGOL

Chapter 2 Command System

:CHANnel<n>:POSition

Syntax

:CHANnel<n>:POSition <offset>

:CHANnel<n>:POSition?

Description

Sets or queries the offset calibration voltage for calibrating the zero point of the specified analog channel.

Parameter Name Type Range

<n> Discrete {1|2}

<offset> Real

± 1 V (1 mV/div to 50 mV/div).

± 30 V (51 mV/div to 260 mV/div)

± 100 V (265 mV/div to 10 V/div)

Default

1

0 V

Return

Format

The query returns the offset calibration voltage for calibrating the zero point of the specified analog channel in scientific notation.

Example

:CHANnel1:POSition 10 /*Sets the offset calibration voltage for calibrating the zero point of CH1 to 10 V.*/

:CHANnel1:POSition? /*The query returns 1E1.*/

2-50 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:COUNter Commands

Command List:

:COUNter:CURRent?

:COUNter:ENABle

:COUNter:SOURce

:COUNter:MODE

:COUNter:NDIGits

:COUNter:TOTalize:ENABle

:COUNter:TOTalize:CLEar

:COUNter:CURRent?

Syntax

:COUNter:CURRent?

Description

Queries the measurement value of the frequency counter.

Return

Format

The query returns the current measurement value in scientific notation.

:COUNter:ENABle

Syntax

:COUNter:ENABle <bool>

:COUNter:ENABle?

Description

Enables or disables the frequency counter; or queries the on/off status of the frequency counter.

Parameter Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Return

Format

The query returns 1 or 0.

Example

:COUNter:ENABle ON /*Enables the frequency counter.*/

:COUNter:ENABle? /*The query returns 1.*/

:COUNter:SOURce

Syntax

:COUNter:SOURce <source>

:COUNter:SOURce?

Description

Sets or queries the source of the frequency counter.

Parameter

Name Type Range Default

Return

Format

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|

D8|D9|D10|D11|D12|D13|D14

|D15|CHANnel1|CHANnel2}

CHANnel1

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

MSO5000-E Programming Guide 2-51

RIGOL

Chapter 2 Command System

Example

:COUNter:SOURce CHANnel2 /*Sets the source of the frequency counter to

CHANnel2.*/

:COUNter:SOURce? /*The query returns CHAN2.*/

:COUNter:MODE

Syntax

:COUNter:MODE <mode>

:COUNter:MODE?

Description

Sets or queries the mode of the frequency counter.

Parameter

Name Type Range Default

<mode> Discrete {FREQuency|PERiod|TOTalize} FREQuency

Return

Format

The query returns FREQ, PER, or TOT.

Example

:COUNter:MODE PERiod /*Sets the mode of the frequency counter to PERiod.*/

:COUNter:MODE? /*The query returns PER.*/

:COUNter:NDIGits

Syntax

:COUNter:NDIGits <val>

:COUNter:NDIGits?

Description

Sets or queries the resolution of the frequency counter.

Parameter

Name Type Range

<val> Integer 3 to 6

Default

5

Remarks

The resolution setting is only available for "Period" and "Frequency", and unavailable for "Totalize".

Return

Format

The query returns an integer ranging from 3 to 6.

Example

:COUNter:NDIGits 4 /*Sets the resolution of the frequency counter to 4.*/

:COUNter:NDIGits? /*The query returns 4.*/

:COUNter:TOTalize:ENABle

Syntax

:COUNter:TOTalize:ENABle <bool>

:COUNter:TOTalize:ENABle?

Description

Enables or disables the statistical function of the frequency counter; or queries the on/off status of the statistical function of the frequency counter.

Parameter

Name Type

<bool> Bool

Range

{{1|ON}|{0|OFF}}

Default

0|OFF

Remarks

The statistical function is available for "Period" and "Frequency", but unavailable for

"Totalize".

Return

Format

The query returns 1 or 0.

2-52 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Example

:COUNter:TOTalize:ENABle ON /*Enables the statistical function of the frequency counter.*/

:COUNter:TOTalize:ENABle? /*The query returns 1.*/

:COUNter:TOTalize:CLEar

Syntax

:COUNter:TOTalize:CLEar

Description

Clears the total count.

Description

Available when "Totalize" is selected under "Measure".

MSO5000-E Programming Guide 2-53

RIGOL

Chapter 2 Command System

:CURSor Commands

The :CURSor commands are used to measure the X axis values (e.g. Time) and Y axis values (e.g. Voltage) of the waveform on the screen.

Command List:

:CURSor:MODE

:CURSor:MANual

:CURSor:TRACk

:CURSor:XY

:CURSor:MEASure:INDicator

:CURSor:MODE

Syntax

:CURSor:MODE <mode>

:CURSor:MODE?

Description

Sets or queries the mode of the cursor measurement.

Parameter Name Type

<mode> Discrete

Range

{OFF|MANual|TRACk|XY|MEASure }

Default

OFF

Remarks

OFF: disables the cursor measurement function.

MANual: enables the manual mode of cursor measurement.

TRACk: enables the track cursor mode.

XY: enables the XY cursor measurement mode. This mode is valid when you select

"XY" for the horizontal time base.

Return

Format

MEASure: eanbles the measure mode of cursor measurement.

The query returns OFF, MAN, TRAC, XY, or MEAS.

Example

:CURSor:MODE MANual /*Selects the manual cursor measurement mode.*/

:CURSor:MODE? /*The query returns MAN.*/

2-54 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:CURSor:MANual

Command List:

:CURSor:MANual:TYPE

:CURSor:MANual:SOURce

:CURSor:MANual:TUNit

:CURSor:MANual:VUNit

:CURSor:MANual:CAX

:CURSor:MANual:CBX

:CURSor:MANual:CAY

:CURSor:MANual:CBY

:CURSor:MANual:AXValue?

:CURSor:MANual:AYValue?

:CURSor:MANual:BXValue?

:CURSor:TRACk:BYValue?

:CURSor:MANual:XDELta?

:CURSor:MANual:IXDelta?

:CURSor:MANual:YDELta?

:CURSor:MANual:TYPE

Syntax

:CURSor:MANual:TYPE <type>

:CURSor:MANual:TYPE?

Description

Sets or queries the cursor type in the manual mode of cursor measurement.

Parameter

Name Type Range

<type> Discrete {TIME|AMPLitude}

Default

AMPLitude

Remarks

TIME: indicates X cursor, which is often used to measure the time parameters.

Return

Format

AMPLitude: indicates Y cursor, which is often used to measure the voltage parameters.

The query returns TIME or AMPL.

Example

:CURSor:MANual:TYPE AMPLitude /*Sets the cursor type to AMPLitude.*/

:CURSor:MANual:TYPE? /*The query returns AMPL.*/

MSO5000-E Programming Guide 2-55

RIGOL

Chapter 2 Command System

:CURSor:MANual:SOURce

Syntax

:CURSor:MANual:SOURce <source>

:CURSor:MANual:SOURce?

Description

Sets or queries the channel source of the manual mode of cursor measurement.

Parameter

Name Type Range Default

CHANnel1

Remarks

Return

Format

Only the currently enabled channel can be selected as the channel source.

When LA is selected, the cursor type cannot be set to Y ( :CURSor:MANual:TYPE ).

The query returns CHAN1, CHAN2, MATH1, MATH2, MATH3, MATH4, LA, or NONE.

Example

:CURSor:MANual:SOURce CHANnel2 /*Sets the channel source to CHANnel2.*/

:CURSor:MANual:SOURce? /*The query returns CHAN2.*/

:CURSor:MANual:TUNit

Syntax

:CURSor:MANual:TUNit <unit>

:CURSor:MANual:TUNit?

Description

Sets or queries the horizontal unit in the manual mode of cursor measurement.

Parameter

Name Type Range Default

<unit> Discrete {SECond|HZ|DEGRee|PERCent} SECond

Remarks

SECond: in the measurement results, AX, BX, and

X are expressed in "s"; 1/

X in

"Hz".

HZ: in the measurement results, AX, BX, and △ X are expressed in "Hz"; 1/

X in "s".

DEGRee: in the measurement results, AX, BX, and

X are expressed in "°".

PERCent: in the measurement results, AX, BX, and

X are expressed in percentage.

Return

Format

The query returns SEC, HZ, DEGR, or PERC.

Example

:CURSor:MANual:TUNit DEGRee /*Sets the horizontal unit to DEGRee.*/

:CURSor:MANual:TUNit? /*The query returns DEGR.*/

2-56 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:CURSor:MANual:VUNit

Syntax

:CURSor:MANual:VUNit <unit>

:CURSor:MANual:VUNit?

Description

Sets or queries the vertical unit in the manual mode of cursor measurement.

Parameter

Name Type Range Default

<unit> Discrete {SOURce|PERCent} SOUR

Remarks

SOURce: in the measurement results, the unit of AY, BY, and

Y are automatically set to the unit of the current source.

PERCent: in the measurement results, the unit of AY, BY, and △ Y are expressed in percentage.

The query returns SOUR or PERC.

Return

Format

Example

:CURSor:MANual:VUNit PERCent /*Sets AY, BY, and

Y to be expressed in percentage in the measurement results.*/

:CURSor:MANual:VUNit? /*The query returns PERC.*/

:CURSor:MANual:CAX

Syntax

:CURSor:MANual:CAX <ax>

:CURSor:MANual:CAX?

Description

Sets or queries the horizontal position of Cursor A in the manual mode of cursor measurement.

Parameter

Name

<ax>

Type

Integer

Range

0 to 999

Default

400

Remarks

The horizontal and vertical position of the cursor is defined by the screen pixel coordinate.

The range of the screen pixel coordinate is from (0,0) to (999,479). Wherein, (0,0) is a location at the upper-left corner of the screen, and (999,479) is a location at the lower-right corner of the screen. The pixel range in the horizontal direction is from 0 to

999, and the pixel range in the vertical direction is from 0 to 479.

Return

Format

The query returns an integer ranging from 0 to 999.

Example

:CURSor:MANual:CAX 200 /*Sets the horizontal position of Cursor A to 200.*/

:CURSor:MANual:CAX? /*The query returns 200.*/

MSO5000-E Programming Guide 2-57

RIGOL

Chapter 2 Command System

:CURSor:MANual:CBX

Syntax

:CURSor:MANual:CBX <bx>

:CURSor:MANual:CBX?

Description

Sets or queries the horizontal position of Cursor B in the manual mode of cursor measurement.

Parameter

Name

<bx>

Type

Integer

Range

0 to 999

Default

600

Remarks

The horizontal and vertical position of the cursor is defined by the screen pixel coordinate.

The range of the screen pixel coordinate is from (0,0) to (999,479). Wherein, (0,0) is a location at the upper-left corner of the screen, and (999,479) is a location at the lower-right corner of the screen. The pixel range in the horizontal direction is from 0 to

999, and the pixel range in the vertical direction is from 0 to 479.

Return

Format

The query returns an integer ranging from 0 to 999.

Example

:CURSor:MANual:CBX 200 /*Sets the horizontal position of Cursor B to 200.*/

:CURSor:MANual:CBX? /*The query returns 200.*/

:CURSor:MANual:CAY

Syntax

:CURSor:MANual:CAY <ay>

:CURSor:MANual:CAY?

Description

Sets or queries the vertical position of Cursor A in the manual mode of cursor measurement.

Parameter

Name

<ay>

Type

Integer

Range

0 to 479

Default

180

Remarks

The horizontal and vertical position of the cursor is defined by the screen pixel coordinate. The range of the screen pixel coordinate is from (0,0) to (999,479).

Wherein, (0,0) is a location at the upper-left corner of the screen, and (999,479) is a location at the lower-right corner of the screen. The pixel range in the horizontal direction is from 0 to 999, and the pixel range in the vertical direction is from 0 to

479.

When you select LA as the channel source in the manual mode of cursor measurement, this command is invalid.

The query returns an integer ranging from 0 to 479.

Return

Format

Example

:CURSor:MANual:CAY 200 /*Sets the vertical position of Cursor A to 200.*/

:CURSor:MANual:CAY? /*The query returns 200.*/

2-58 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:CURSor:MANual:CBY

Syntax

:CURSor:MANual:CBY <by>

:CURSor:MANual:CBY?

Description

Sets or queries the vertical position of Cursor B in the manual mode of cursor measurement.

Parameter

Name

<by>

Type

Integer

Range

0 to 479

Default

300

Remarks

Return

Format

The horizontal and vertical position of the cursor is defined by the screen pixel coordinate. The range of the screen pixel coordinate is from (0,0) to (999,479).

Wherein, (0,0) is a location at the upper-left corner of the screen, and (999,479) is a location at the lower-right corner of the screen. The pixel range in the horizontal direction is from 0 to 999, and the pixel range in the vertical direction is from 0 to 479.

When you select LA as the channel source in the manual mode of cursor measurement, this command is invalid.

The query returns an integer ranging from 0 to 479.

Example

:CURSor:MANual:CBY 200 /*Sets the vertical position of Cursor B to 200.*/

:CURSor:MANual:CBY? /*The query returns 200.*/

:CURSor:MANual:AXValue?

Syntax

:CURSor:MANual:AXValue?

Description

Queries the X value at Cursor A in the manual mode of cursor measurement. The unit is determined by the currently selected horizontal unit.

Return

Format

The query returns the X value at Cursor A in scientific notation.

:CURSor:MANual:AYValue?

Syntax

:CURSor:MANual:AYValue?

Description

Queries the Y value at Cursor A in the manual mode of cursor measurement. The unit is determined by the currently selected vertical unit.

Return

Format

When the channel source is CHANnel1, CHANnel2, MATH1, MATH2, MATH3, or

MATH4, the query returns the Y value at Cursor A in scientific notation.

When the channel source is LA, the query returns a decimal integer that corresponds to the binary or hex weighted sum of the bits (D15-D0) at Cursor A.

For the disabled channel, the query returns 0 by default.

:CURSor:MANual:BXValue?

Syntax

:CURSor:MANual:BXValue?

Description

Queries the X value at Cursor B in the manual mode of cursor measurement. The unit is determined by the currently selected horizontal unit.

Return Format

The query returns the X value at Cursor B in scientific notation.

MSO5000-E Programming Guide 2-59

RIGOL

Chapter 2 Command System

:CURSor:MANual:BYValue?

Syntax

:CURSor:MANual:BYValue?

Description

Queries the Y value at Cursor B in the manual mode of cursor measurement. The unit is determined by the currently selected vertical unit.

Return

Format

When the channel source is CHANnel1, CHANnel2, MATH1, MATH2, MATH3, or

MATH4, the query returns the Y value at Cursor B in scientific notation.

When the channel source is LA, the query returns a decimal integer that corresponds to the binary or hex weighted sum of the bits (D15-D0) at Cursor B. For the disabled channel, the query returns 0 by default.

Example

:CURSor:MANual:BYValue? /*The query returns -2.000000E+0.*/

:CURSor:MANual:XDELta?

Syntax

:CURSor:MANual:XDELta?

Description

Queries the difference (

X) between the X value at Cursor A and the X value at Cursor B in the manual mode of cursor measurement. The unit is determined by the currently selected horizontal unit.

Return

Format

The query returns the current difference in scientific notation.

:CURSor:MANual:IXDelta?

Syntax

:CURSor:MANual:IXDelta?

Description

Queries the reciprocal (1/ △ X) of the absolute difference between the X value at Cursor A and the X value at Cursor B in the manual mode of cursor measurement. The unit is determined by the currently selected horizontal unit.

Return

Format

The query returns 1/ △ X in scientific notation.

:CURSor:MANual:YDELta?

Syntax

:CURSor:MANual:YDELta?

Description

Queries the difference (

Y) between the Y value at Cursor A and the Y value at Cursor B in the manual mode of cursor measurement. The unit is determined by the currently selected vertical unit.

Return

Format

The query returns the current difference value in scientific notation.

2-60 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:CURSor:TRACk

Command List:

:CURSor:TRACk:SOURce1

:CURSor:TRACk:SOURce2

:CURSor:TRACk:CAX

:CURSor:TRACk:CBX

:CURSor:TRACk:CAY?

:CURSor:TRACk:CBY?

:CURSor:TRACk:AXValue?

:CURSor:TRACk:AYValue?

:CURSor:TRACk:BXValue?

:CURSor:TRACk:BYValue?

:CURSor:TRACk:XDELta?

:CURSor:TRACk:YDELta?

:CURSor:TRACk:IXDelta?

:CURSor:TRACk:SOURce1

Syntax

:CURSor:TRACk:SOURce1 <source>

:CURSor:TRACk:SOURce1?

Description

Sets or queries the channel source of Cursor A in the track mode of cursor measurement.

Parameter

Name Type Range Default

<source> Discrete

{CHANnel1|CHANnel2|MATH1|MATH2|MATH3

|MATH4|NONE}

CHANnel1

Remarks

Only the currently enabled channel can be selected as the channel source.

Return

Format

The query returns CHAN1, CHAN2, MATH1, MATH2, MATH3, MATH4, or NONE.

Example

:CURSor:TRACk:SOURce1 CHANnel2 /*Sets the channel source to CHANnel2.*/

:CURSor:TRACk:SOURce1? /*The query returns CHAN2.*/

MSO5000-E Programming Guide 2-61

RIGOL

Chapter 2 Command System

:CURSor:TRACk:SOURce2

Syntax

:CURSor:TRACk:SOURce2 <source>

:CURSor:TRACk:SOURce2?

Description

Sets or queries the channel source of Cursor B in the track mode of cursor measurement.

Parameter

Name Type Default

<source> Discrete

Range

{CHANnel1|CHANnel2|MATH1|MATH2|MATH3

|MATH4|NONE}

CHANnel1

Remarks

Only the currently enabled channel can be selected as the channel source.

Return

Format

The query returns CHAN1, CHAN2, MATH1, MATH2, MATH3, MATH4, or NONE.

Example

:CURSor:TRACk:SOURce2 CHANnel2 /*Sets the channel source to CHANnel2.*/

:CURSor:TRACk:SOURce2? /*The query returns CHAN2.*/

:CURSor:TRACk:CAX

Syntax

:CURSor:TRACk:CAX <ax>

:CURSor:TRACk:CAX?

Description

Sets or queries the horizontal position of Cursor A in the track mode of cursor measurement.

Parameter

Name Type Range Default

<ax> Integer 0 to 999 400

Remarks

The horizontal and vertical position of the cursor is defined by the screen pixel coordinate. The range of the screen pixel coordinate is from (0,0) to (999,479).

Wherein, (0,0) is a location at the upper-left corner of the screen, and (999,479) is a location at the lower-right corner of the screen. The pixel range in the horizontal direction is from 0 to 999, and the pixel range in the vertical direction is from 0 to 479.

Return

Format

The query returns an integer ranging from 0 to 999.

Example

:CURSor:TRACk:CAX 200 /*Sets the horizontal position of Cursor A to 200.*/

:CURSor:TRACk:CAX? /*The query returns 200.*/

2-62 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:CURSor:TRACk:CBX

Syntax

:CURSor:TRACk:CBX <bx>

:CURSor:TRACk:CBX?

Description

Sets or queries the horizontal position of Cursor B in the track mode of cursor measurement.

Parameter

Name

<bx>

Type

Integer

Range

0 to 999

Default

600

Remarks

The horizontal and vertical position of the cursor is defined by the screen pixel coordinate. The range of the screen pixel coordinate is from (0,0) to (999,479).

Wherein, (0,0) is a location at the upper-left corner of the screen, and (999,479) is a location at the lower-right corner of the screen. The pixel range in the horizontal direction is from 0 to 999, and the pixel range in the vertical direction is from 0 to 479.

Return

Format

The query returns an integer ranging from 0 to 999.

Example

:CURSor:TRACk:CBX 200 /*Sets the horizontal position of Cursor B to 200.*/

:CURSor:TRACk:CBX? /*The query returns 200.*/

:CURSor:TRACk:CAY?

Syntax

:CURSor:TRACk:CAY?

Description

Queries the vertical position of Cursor A in the track mode of cursor measurement.

Remarks

The horizontal and vertical position of the cursor is defined by the screen pixel coordinate. The range of the screen pixel coordinate is from (0,0) to (999,479).

Wherein, (0,0) is a location at the upper-left corner of the screen, and (999,479) is a location at the lower-right corner of the screen. The pixel range in the horizontal direction is from 0 to 999, and the pixel range in the vertical direction is from 0 to 479.

Return

Format

The query returns an integer.

:CURSor:TRACk:CBY?

Syntax

:CURSor:TRACk:CBY?

Description

Queries the vertical position of Cursor B in the track mode of cursor measurement.

Remarks

The horizontal and vertical position of the cursor is defined by the screen pixel coordinate. The range of the screen pixel coordinate is from (0,0) to (999,479).

Wherein, (0,0) is a location at the upper-left corner of the screen, and (999,479) is a location at the lower-right corner of the screen. The pixel range in the horizontal direction is from 0 to 999, and the pixel range in the vertical direction is from 0 to 479.

Return

Format

The query returns an integer.

Example

:CURSor:TRACk:CBY? /*The query returns 200.*/

MSO5000-E Programming Guide 2-63

RIGOL

Chapter 2 Command System

:CURSor:TRACk:AXValue?

Syntax

:CURSor:TRACk:AXValue?

Description

Queries the X value at Cursor A in the track mode of cursor measurement. The unit is determined by the amplitude unit selected for the currently corresponding channel.

Return Format

The query returns the X value at Cursor A in scientific notation.

:CURSor:TRACk:AYValue?

Syntax

:CURSor:TRACk:AYValue?

Description

Queries the Y value at Cursor A in the track mode of cursor measurement. The unit is the same as that selected for the current channel.

Return Format

The query returns the Y value at Cursor A in scientific notation.

:CURSor:TRACk:BXValue?

Syntax

:CURSor:TRACk:BXValue?

Description

Queries the X value at Cursor B in the track mode of cursor measurement. The unit is determined by the amplitude unit selected for the currently corresponding channel.

Return Format

The query returns the X value at Cursor B in scientific notation.

:CURSor:TRACk:BYValue?

Syntax

:CURSor:TRACk:BYValue?

Description

Queries the Y value at Cursor B in the track mode of cursor measurement. The unit is the same as that selected for the current channel.

Return Format

The query returns the Y value at Cursor B in scientific notation.

:CURSor:TRACk:XDELta?

Syntax

:CURSor:TRACk:XDELta?

Description

Queries the difference (

X) between the X value at Cursor A and the X value at Cursor

B in the track mode of cursor measurement. The default unit is s.

Return Format

The query returns the current difference in scientific notation.

:CURSor:TRACk:YDELta?

Syntax

:CURSor:TRACk:YDELta?

Description

Queries the difference (

Y) between the Y value at Cursor A and the Y value at Cursor

B in the track mode of cursor measurement. The unit is the same as that selected for the current channel.

Return Format

The query returns the current difference in scientific notation.

2-64 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:CURSor:TRACk:IXDelta?

Syntax

:CURSor:TRACk:IXDelta?

Description

Queries the reciprocal (1/

X) of the absolute difference between the X value at Cursor A and the X value at Cursor B in the track mode of cursor measurement. The default unit is

Hz.

Return

Format

The query returns 1/

X in scientific notation.

MSO5000-E Programming Guide 2-65

RIGOL

Chapter 2 Command System

:CURSor:XY

The :CURSor:XY commands are only available when the horizontal time base mode is set to XY.

Command List:

:CURSor:XY:AX

:CURSor:XY:BX

:CURSor:XY:AY

:CURSor:XY:BY

:CURSor:XY:AXValue?

:CURSor:XY:AYValue?

:CURSor:XY:BXValue?

:CURSor:XY:BYValue?

:CURSor:XY:AX

Syntax

:CURSor:XY:AX <x>

:CURSor:XY:AX?

Description

Sets or queries the horizontal position of Cursor A in the XY cursor measurement mode.

Parameter Name

<x>

Type

Integer

Range

0 to 479

Default

100

Remarks

In the XY time base mode, the horizontal and vertical position of the cursor is defined by the pixel coordinate in the XY display region. The range of the screen pixel coordinate is from (0,0) to (479,479). Wherein, (0,0) is a location at the upper-left corner of the screen, and (479,479) is a located the lower-right corner of the screen.

The pixel range in the horizontal and vertical direction is from 0 to 479.

Return

Format

The query returns an integer ranging from 0 to 479.

Example

:CURSor:XY:AX 200 /*Sets the horizontal position of Cursor A to 200.*/

:CURSor:XY:AX? /*The query returns 200.*/

2-66 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:CURSor:XY:BX

Syntax

:CURSor:XY:BX <x>

:CURSor:XY:BX?

Description

Sets or queries the horizontal position of Cursor B in the XY cursor measurement mode.

Parameter

Name

<x>

Type

Integer

Range

0 to 479

Default

300

Remarks

In the XY time base mode, the horizontal and vertical position of the cursor is defined by the pixel coordinate in the XY display region. The range of the screen pixel coordinate is from (0,0) to (479,479). Wherein, (0,0) is a location at the upper-left corner of the screen, and (479,479) is a located the lower-right corner of the screen.

The pixel range in the horizontal and vertical direction is from 0 to 479.

Return

Format

The query returns an integer ranging from 0 to 479.

Example

:CURSor:XY:BX 200 /*Sets the horizontal position of Cursor B to 200.*/

:CURSor:XY:BX? /*The query returns 200.*/

:CURSor:XY:AY

Syntax

:CURSor:XY:AY <y>

:CURSor:XY:AY?

Description

Sets or queries the vertical position of Cursor A in the XY cursor measurement mode.

Parameter Name

<y>

Type

Integer

Range

0 to 479

Default

100

Remarks

In the XY time base mode, the horizontal and vertical position of the cursor is defined by the pixel coordinate in the XY display region. The range of the screen pixel coordinate is from (0,0) to (479,479). Wherein, (0,0) is a location at the upper-left corner of the screen, and (479,479) is a located the lower-right corner of the screen.

The pixel range in the horizontal and vertical direction is from 0 to 479.

Return

Format

The query returns an integer ranging from 0 to 479.

Example

:CURSor:XY:AY 200 /*Sets the vertical position of Cursor A to 200.*/

:CURSor:XY:AY? /*The query returns 200.*/

MSO5000-E Programming Guide 2-67

RIGOL

Chapter 2 Command System

:CURSor:XY:BY

Syntax

:CURSor:XY:BY <y>

:CURSor:XY:BY?

Description

Sets or queries the vertical position of Cursor B in the XY cursor measurement mode.

Parameter

Name

<y>

Type

Integer

Range

0 to 479

Default

300

Remarks

In the XY time base mode, the horizontal and vertical position of the cursor is defined by the pixel coordinate in the XY display region. The range of the screen pixel coordinate is from (0,0) to (479,479). Wherein, (0,0) is a location at the upper-left corner of the screen, and (479,479) is a located the lower-right corner of the screen.

The pixel range in the horizontal and vertical direction is from 0 to 479.

Return Format

The query returns an integer ranging from 0 to 479.

Example

:CURSor:XY:BY 200 /*Sets the vertical position of Cursor B to 200.*/

:CURSor:XY:BY? /*The query returns 200.*/

:CURSor:XY:AXValue?

Syntax

:CURSor:XY:AXValue?

Description

Queries the X value at Cursor A in the XY cursor measurement mode. The unit is determined by the amplitude unit selected for the currently corresponding channel.

Return Format

The query returns the X value at Cursor A in scientific notation.

:CURSor:XY:AYValue?

Syntax

:CURSor:XY:AYValue?

Description

Queries the X value at Cursor A in the XY cursor measurement mode. The unit is determined by the amplitude unit selected for the currently corresponding channel.

Return Format

The query returns the Y value at Cursor A in scientific notation.

:CURSor:XY:BXValue?

Syntax

:CURSor:XY:BXValue?

Description

Queries the X value at Cursor B in the XY cursor measurement mode. The unit is determined by the amplitude unit selected for the currently corresponding channel.

Return Format

The query returns the X value at Cursor B in scientific notation.

:CURSor:XY:BYValue?

Syntax

:CURSor:XY:BYValue?

Description

Queries the Y value at Cursor B in the XY cursor measurement mode. The unit is determined by the amplitude unit selected for the currently corresponding channel.

Return Format

The query returns the Y value at Cursor B in scientific notation.

2-68 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:CURSor:MEASure:INDicator

Syntax

:CURSor:MEASure:INDicator <bool>

:CURSor:MEASure:INDicator?

Description

Sets or queries the on/off status of the measurement auto cursor.

Parameter

Name Type Range

<bool> Bool {{1|ON}|{0|OFF}}

Default

0|OFF

Return

Format

The query returns 1 or 0.

Example

:CURSor:MEASure:INDicator 1 /*Enables the the measurement auto cursor for measure mode of cursor measurement.*/

:CURSor MEASure:INDicator? /*The query returns 1.*/

MSO5000-E Programming Guide 2-69

RIGOL

Chapter 2 Command System

:DISPlay Commands

The :DISPlay commands can be used to set the displayed type of the waveform, persistence time, intensity, grid type, grid brightness, etc.

Command List:

:DISPlay:CLEar

:DISPlay:TYPE

:DISPlay:GRADing:TIME

:DISPlay:WBRightness

:DISPlay:GRID

:DISPlay:GBRightness

:DISPlay:DATA?

:DISPlay:RULers

:DISPlay:COLor

:DISPlay:CLEar

Syntax

:DISPlay:CLEar

Description

Clears all the waveforms on the screen.

Remarks

If the oscilloscope is in the "RUN" state, new waveforms will continue being displayed after being cleared.

This command functions the same as the

CLEAR

key on the front panel. You can

also send the :CLEar command to clear all the waveforms on the screen.

:DISPlay:TYPE

Syntax

:DISPlay:TYPE <type>

:DISPlay:TYPE?

Description

Sets or queries the display type of the waveforms on the screen.

Parameter

Name

<type>

Type

Discrete

Range

{VECTors|DOTS}

Default

VECTors

Remarks

VECTors: The sample points are connected by lines and displayed. In most cases, this mode can provide the most vivid waveform for you to view the steep edge of the waveform (such as square waveform)

DOTS: displays the sample points directly. You can directly view each sample point and use the cursor to measure the X and Y values of the sample point.

The query returns VECT or DOTS.

Return

Format

Example

:DISPlay:TYPE DOTS /*Selects the dots display mode.*/

:DISPlay:TYPE? /*The query returns DOTS.*/

2-70 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:DISPlay:GRADing:TIME

Syntax

:DISPlay:GRADing:TIME <time>

:DISPlay:GRADing:TIME?

Description

Sets or queries the persistence time. The default unit is s.

Parameter

Name Type Range

<time> Discrete {MIN|0.1|0.2|0.5|1|2|5|10|INFinite}

Default

MIN

Remarks

MIN: sets the persistence time to its minimum value to view how the waveform changes at a high refresh rate.

➢ specified value (e.g. 0.1, 0.2, 0.5, 1, 2, 5, 10): sets the persistence time to any of the above specific value to observe glitch that changes relatively slowly or glitch with low occurrence probability.

Return

Format

INFinite: In this mode, the oscilloscope displays the waveform newly acquired without clearing the waveforms acquired formerly. It can be used to measure noise and jitter and to capture incidental events.

The query returns MIN, 0.1, 0.2, 0.5, 1, 2, 5, 10, or INF.

Example

:DISPlay:GRADing:TIME 0.1 /*Sets the persistence time to 0.1 s.*/

:DISPlay:GRADing:TIME? /*The query returns 0.1.*/

:DISPlay:WBRightness

Syntax

:DISPlay:WBRightness <time>

:DISPlay:WBRightness?

Description

Sets or queries the brightness of the waveforms on the screen, expressed in percentage.

Parameter

Name Type Range Default

<time> Integer 1 to 100 50

Return

Format

The query returns an integer ranging from 1 to 100.

Example

:DISPlay:WBRightness 50 /*Sets the waveform brightness to 50%.*/

:DISPlay:WBRightness? /*The query returns 50.*/

:DISPlay:GRID

Syntax

:DISPlay:GRID <grid>

:DISPlay:GRID?

Description

Sets or queries the display type of the screen grid.

Parameter

Name Type Range Default

<grid> Discrete {FULL|HALF|NONE|IRE} FULL

Remarks

FULL: turns on the background grid and coordinates.

HALF: turns the background grid off and turns the coordinate on.

NONE: turns the background grid and coordinate off.

IRE: the IRE command is only valid when the trigger type is Video trigger and the

MSO5000-E Programming Guide 2-71

RIGOL

Chapter 2 Command System

Return

Format

scale is 140 mV.

The query returns FULL, HALF, NONE, or IRE.

Example

:DISPlay:GRID NONE /*Turns off the background grid and coordinates.*/

:DISPlay:GRID? /*The query returns NONE.*/

:DISPlay:GBRightness

Syntax

:DISPlay:GBRightness <brightness>

:DISPlay:GBRightness?

Description

Sets or queries the brightness of the screen grid, expressed in percentage.

Parameter

Name Type Range Default

<brightness> Integer 1 to 100 30

Return Format

The query returns an integer ranging from 1 to 100.

Example

:DISPlay:GBRightness 60 /*Sets the screen grid brightness to 60%.*/

:DISPlay:GBRightness? /*The query returns 60.*/

:DISPlay:DATA?

Syntax

:DISPlay:DATA?

Description

Queries the bitmap data stream of the currently displayed image.

Return Format

The query returns the binary data stream of the screenshot in ".bmp" format.

:DISPlay:RULers

Syntax

:DISPlay:RULers <bool>

:DISPlay:RULers?

Description

Enables or disables the ruler display; or queries the on/off status of the ruler.

Parameter Name Type Range Default

0|OFF <bool> Bool {{1|ON}|{0|OFF}}

Return Format

The query returns 1 or 0.

Example

:DISPlay:RULers ON /*Enables the display of the ruler.*/

:DISPlay:RULers? /*The query returns 1.*/

2-72 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:DISPlay:COLor

Syntax

:DISPlay:COLor <val>

:DISPlay:COLor?

Description

Enables or disables the color grade display; or queries the on/off status of the color grade display.

Parameter Name

<bool>

Type

Bool

Range

{{1|ON}|{0|OFF}}

Return Format

The query returns 1 or 0.

Example

:DISPlay:COLor ON /*Enables the color grade display.*/

:DISPlay:COLor? /*The query returns 1.*/

Default

0|OFF

MSO5000-E Programming Guide 2-73

RIGOL

Chapter 2 Command System

:DVM Commands

Command List:

:DVM:CURRent?

:DVM:ENABle

:DVM:SOURce

:DVM:MODE

:DVM:CURRent?

Syntax

:DVM:CURRent?

Description

Queries the current voltage value under test.

:DVM:ENABle

Syntax

:DVM:ENABle <bool>

:DVM:ENABle?

Description

Enables or disables the digital voltmeter; or queries the on/off status of the digital voltmeter.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Return

Format

The query returns 1 or 0.

Example

:DVM:ENABle ON /*Enables the digital voltmeter.*/

:DVM:ENABle? /*The query returns 1.*/

:DVM:SOURce

Syntax

:DVM:SOURce <source>

:DVM:SOURce?

Description

Sets or queries the source of the digital voltmeter.

Parameter

Name Type Range Default

<source> Discrete {CHANnel1|CHANnel2} CHANnel1

Return

Format

The query returns CHAN1 or CHAN2.

Example

:DVM:SOURce CHANnel1 /*Sets the source of DVM to CHANnel1.*/

:DVM:SOURce? /*The query returns CHAN1.*/

2-74 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:DVM:MODE

Syntax

:DVM:MODE <mode>

:DVM:MODE?

Description

Sets or queries the mode of the digital voltmeter.

Parameter

Name

<mode>

Type

Discrete

Range

{ACRMs|DC|DCRMs}

Default

ACRMs

Description

ACRMs: displays the root-mean-square value of the acquired data, with the DC component removed.

DC: displays the average value of the acquired data.

DCRMs: displays the root-mean-square value of the acquired data.

Return

Format

The query returns ACRM, DC, or DCRM.

Example

:DVM:MODE DC /*Sets the mode of the digital voltmeter to DC.*/

:DVM:MODE? /*The query returns DC.*/

MSO5000-E Programming Guide 2-75

RIGOL

Chapter 2 Command System

:HISTogram Commands

Command List:

:HISTogram:DISPlay

:HISTogram:TYPE

:HISTogram:SOURce

:HISTogram:SIZE

:HISTogram:STATic

:HISTogram:RESet

:HISTogram:BLIMit

:HISTogram:LLIMit

:HISTogram:RLIMit

:HISTogram:TLIMit

:HISTogram:DISPlay

Syntax

:HISTogram:DISPlay <bool>

:HISTogram:DISPlay?

Description

Enables or disables the histogram function; or queries the status of the histogram.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Return

Format

The query returns 1 or 0.

Example

:HISTogram:DISPlay ON /*Enables the histogram.*/

:HISTogram:DISPlay? /*The query returns 1.*/

:HISTogram:TYPE

Syntax

:HISTogram:TYPE <type>

:HISTogram:TYPE?

Description

Sets or queries the type of the histogram.

Parameter

Name Type Range

Return

Format

<type> Discrete {HORizontal|VERTical|MEAS}

The query returns HOR, VERT, or MEAS.

Example

:HISTogram:TYPE VERTical /*Sets the type of the histogram to

VERTical.*/

:HISTogram:TYPE? /*The query returns VERT.*/

Default

HORizontal

2-76 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:HISTogram:SOURce

Syntax

:HISTogram:SOURce <source>

:HISTogram:SOURce?

Description

Sets or queries the source of the histogram.

Parameter

Name Type Range

<source> Discrete {CHANnel1|CHANnel2|OFF}

Default

CHANnel1

Return

Format

The query returns CHAN1, CHAN2, or OFF.

Example

:HISTogram:SOURce CHANnel2 /*Sets the source of the histogram to CHANnel2.*/

:HISTogram:SOURce? /*The query returns CHAN2.*/

:HISTogram:SIZE

Syntax

:HISTogram:SIZE <size>

:HISTogram:SIZE?

Description

Sets or queries the height of the histogram.

Parameter

Name Type Range

<size> Integer 1 to 4

Default

2

Return

Format

The query returns an integer ranging from 1 to 4.

Example

:HISTogram:SIZE 2 /*Sets the height of the histogram to 2.*/

:HISTogram:SIZE? /*The query returns 2.*/

:HISTogram:STATic

Syntax

:HISTogram:STATic <bool>

:HISTogram:STATic?

Description

Enables or disables the statistical function; or queries the status of the statistical function.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}}

Return

Format

The query returns 1 or 0.

Example

:HISTogram:STATic ON /*Enables the statistical function.*/

:HISTogram:STATic? /*The query returns 1.*/

:HISTogram:RESet

Syntax

:HISTogram:RESet

Description

Resets the statistics.

0|OFF

MSO5000-E Programming Guide 2-77

RIGOL

Chapter 2 Command System

:HISTogram:BLIMit

Syntax

:HISTogram:BLIMit <y>

:HISTogram:BLIMit?

Description

Sets or queries the histogram's bottom boundary limit.

Parameter

Name Type Range Default

<y> Real

(-4× VerticalScale) to

(4× VerticalScale)

(vertical scale of the channel source of the histogram)

——

Return

Format

The query returns the histogram's bottom boundary limit in scientific notation.

Example

:HISTogram:BLIMit -2 /*Sets the histogram's bottom boundary limit to -2 V.*/

:HISTogram:BLIMit? /*The query returns -2.000000E0.*/

:HISTogram:LLIMit

Syntax

:HISTogram:LLIMit <x>

:HISTogram:LLIMit?

Description

Sets or queries the histogram's left boundary limit.

Parameter

Name Type Range

<x> Real

(-5× Horizontal Time Base) to

(5× Horizontal Time Base)

Default

——

Return

Format

The query returns the histogram's left boundary limit in scientific notation.

Example

:HISTogram:LLIMit -2 /*Sets the histogram's left boundary limit to -2s.*/

:HISTogram:LLIMit? /*The query returns -2.000000E0.*/

:HISTogram:RLIMit

Syntax

:HISTogram:RLIMit <x>

:HISTogram:RLIMit?

Description

Sets or queries the histogram's right boundary limit.

Parameter

Name Type Range

<x> Real

(-5× Horizontal Scale) to

(5× Horizontal Scale)

Default

——

Return

Format

The query returns the histogram's right boundary limit in scientific notation.

Example

:HISTogram:RLIMit -2 /*Sets the histogram's right boundary limit to -2s.*/

:HISTogram:RLIMit? /*The query returns -2.000000E0.*/

2-78 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:HISTogram:TLIMit

Syntax

:HISTogram:TLIMit <y>

:HISTogram:TLIMit?

Description

Sets or queries the histogram's top boundary limit.

Parameter

Name Type Range Default

<y> Real

(-4× VerticalScale) to

(4× VerticalScale)

(vertical scale of the channel source of the histogram)

0 V

Return

Format

The query returns the histogram's top boundary limit in scientific notation.

Example

:HISTogram:TLIMit -2 /*Sets the histogram's top boundary limit to -2 mV.*/

:HISTogram:TLIMit? /*The query returns -2.000000E0.*/

MSO5000-E Programming Guide 2-79

RIGOL

Chapter 2 Command System

IEEE488.2 Common Commands

The IEEE488.2 common commands are used to query the basic information of the instrument or executing basic operations. These commands usually start with "*", and the keywords in a command contain 3 characters.

Command List:

*CLS

*ESE

*ESR?

*IDN?

*OPC

*SAV

*RCL

*RST

*SRE

*STB?

*TST?

*WAI

*CLS

Syntax

*CLS

Description

Clears all the event registers, and also clears the error queue.

*ESE

Syntax

*ESE <maskargument>

*ESE?

Description

Sets or queries the enable register bit of the standard event register set.

Parameter

Name Type Range Default

<maskargument> Integer 0 to 255 0

Return

Format

The query returns an integer. The integer equals to the binary-weighted sum of all the bits set in the register.

Example

*ESE 16 /*Enable the bit 4 (16 in decimal) in the register.*/

*ESE? /*The query returns the enable value of the register 16.*/

2-80 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

*ESR?

Syntax

*ESR?

Description

Queries and clears the event register of the standard event status register.

Remarks

Bit 1 and Bit 6 in the standard event status register are not used and are always treated as 0; therefore, the range of the returned value is a decimal number corresponding to a binary number X0XXXX0X (X is 1 or 0).

Return

Format

*IDN?

The query returns an integer. The integer equals to the binary-weighted sum of all the bits set in the register.

Syntax

*IDN?

Description

Queries the ID string of the instrument.

Return

Format

The query returns RIGOL TECHNOLOGIES,<model>,<serial number>,<software version>.

Wherein,

<model>: indicates the model number of the instrument.

<serial number>: indicates the serial number of the instrument.

<software version>: indicates the software version of the instrument.

*OPC

Syntax

*OPC

*OPC?

Description

The *OPC command sets bit 0 (Operation Complete, OPC) in the standard event status register to 1 after the current operation is finished. The OPC? command queries whether the current operation is finished.

Return

Format

*SAV

The query returns 1 after the current operation is finished; otherwise, the query returns

0.

Syntax

*SAV <value>

Description

Saves the current instrument state to the selected register.

Parameter

Name Type Range Default

0 <value> Integer 0 to 49

Example

*SAV 1 /*Saves the current instrument state to Register 1.*/

*RCL

Syntax

*RCL

Description

Recalls the instrument state in the specified location.

MSO5000-E Programming Guide 2-81

RIGOL

Chapter 2 Command System

*RST

Syntax

*RST

Description

Restores the instrument to its factory default settings.

*SRE

Syntax

*SRE <maskargument>

*SRE?

Description

Sets or queries the enable register of the status byte register set.

Parameter

Name Type Range

<maskargument> Integer 0 to 255

Default

0

Remarks

This command queries the standard event enable register value. Bit 3 and Bit 6 in the standard event status register are not used and are always treated as 0. Therefore, the range of <maskargument> is a decimal that corresponds to a binary number

X0XX0XXX (X is 1 or 0).

Return

Format

The query returns an integer. The integer equals to the binary-weighted sum of all the bits set in the register.

Example

*SRE 16 /*Enables the bit 4 (16 in decimal) in the register.*/

*SRE? /*The query returns the enable value of the register 16.*/

*STB?

Syntax

*STB?

Description

Queries the event register for the status byte register. After executing the command, the value in the status byte register is cleared.

Remarks

Bit 0 and Bit 1 in the status byte register are not used and are always treated as 0; therefore, the range of the returned value is a decimal number corresponding to a binary number X0XXXX0X (X is 1 or 0).

Return

Format

*TST?

The query returns an integer. The integer equals to the binary-weighted sum of all the bits set in the register.

Syntax

*TST?

Description

Performs a self-test and queries the self-test result.

Return

Format

*WAI

The query returns a decimal integer.

Syntax

*WAI

Description

Waits for all the pending operations to complete before executing any additional commands.

Remarks

This operation command does not have any functions, only to be compatible with other devices.

2-82 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:LA Commands

The :LA commands are used to perform relevant operations on the digital channels. PLA2216 active logic probe option is required to be ordered.

Command List:

:LA:STATe

:LA:ACTive

:LA:AUTOsort

:LA:DELete

:LA:DIGital:DISPlay

:LA:DIGital:POSition

:LA:DIGital:LABel

:LA:POD<n>:DISPlay

:LA:DISPlay

:LA:POD<n>:THReshold

:LA:SIZE

:LA:TCALibrate

:LA:GROup:APPend

:LA:STATe

Syntax

:LA:STATe <bool>

:LA:STATe?

Description

Enables or disables LA function; or queries the on/off status of LA function.

Parameter Name

<bool>

Type

Bool

Range

{{1|ON}|{0|OFF}}

Return

Format

The query returns 1 or 0.

Example

:LA:STATe ON /*Enables LA function.*/

:LA:STATe? /*The query returns 1.*/

Default

0|OFF

MSO5000-E Programming Guide 2-83

RIGOL

Chapter 2 Command System

:LA:ACTive

Syntax

:LA:ACTive <digital>

:LA:ACTive?

Description

Sets or queries the current active channel.

Parameter

Name Type Range Default

<digital> Discrete {D0|D1|D2|D3|D4|D5|D6|D7| ——

Remarks

The parameter <digital> can be any of the digital channels (D0-D15). The channel label and waveform of the selected channel are displayed in red.

When you send the parameter NONE, it means that no channel is selected.

Only the currently enabled digital channel can be selected. Please refer to

the :LA:DIGital:DISPlay

command or the :LA:DISPlay command to enable the

desired channel.

Return

Format

The query returns the current active channel D0, D1, D2, D3, D4, D5, D6, D7,

D8, D9, D10, D11, D12, D13, D14, D15, or NONE.

Example

:LA:ACTive D3 /*Sets the current active channel to D3.*/

:LA:ACTive? /*The query returns D3.*/

:LA:AUTOsort

Syntax

:LA:AUTOsort <n>

Description

Sets the auto sorting mode for the waveforms of the currently selected channels on the screen.

Parameter

Name Type Range Default

<n>

Remarks

Discrete {0|1} 1

<n> = 0: the waveforms on the screen are D0-D15 in sequence from top to bottom.

:LA:DELete

<n> = 1: the waveforms on the screen are D15-D0 in sequence from top to bottom.

Syntax

:LA:DELete <group>

Description

Cancels the group settings for the channel groups (GROup1-GROup4).

Parameter Name Type Range

<group> Discrete {GROup1|GROup2|GROup3|GROup4}

Default

——

Remarks

This command only performs the canceling operation for digital channels or user-defined channel group that have been group set.

2-84 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:LA:DIGital:DISPlay

Syntax

:LA:DIGital:DISPlay <digital>,<bool>

:LA:DIGital:DISPlay? <digital>

Description

Turns on or off the specified digital channel; or queries the on/off status of the specified digital channel.

Parameter Name Type Default

<digital> Integer

<bool> Bool

Range

{D0|D1|D2|D3|D4|D5|D6|D7|

D8|D9|D10|D11|D12|D13|D14|D15}

{{1|ON}|{0|OFF}}

——

0|OFF

Remarks

The currently enabled channel can be selected as the active channel by sending

the :LA:ACTive command.

Return

Format

The query returns 1 or 0.

Example

:LA:DIGital:DISPlay D3,ON /*Enables D3.*/

:LA:DIGital:DISPlay? D3 /*The query returns 1.*/

:LA:DIGital:POSition

Syntax

:LA:DIGital:POSition <digital>,<position>

:LA:DIGital:POSition? <digital>

Description

Sets or queries the position of the displayed waveforms of the specified digital channel on the screen.

Parameter Name Type Range Default

<digital> Integer

<position> Integer

{D0|D1|D2|D3|D4|D5|D6|D7|

D8|D9|D10|D11|D12|D13|D14|D15}

When the waveform display size is

Small: 0 to 31

When the waveform display size is

Medium: 0 to 15

When the waveform display size is

Large: 0 to 7

——

——

Remarks

The value of the parameter <position> indicates the position of the waveforms displayed on the screen.

Return

Format

This setting command is only valid when the specified digital channel is currently enabled.

The query returns an integer ranging from 0 to 31, 0 to 15, or from 0 to 7.

Example

:LA:DIGital:POSition D1,3 /*Sets the displayed position of D1 to 3.*/

:LA:DIGital:POSition? D1 /*The query returns 3.*/

MSO5000-E Programming Guide 2-85

RIGOL

Chapter 2 Command System

:LA:DIGital:LABel

Syntax

:LA:DIGital:LABel <digital>,<label>

:LA:DIGital:LABel? <digital>

Description

Sets or queries the label of the specified digital channel.

Parameter

Name Type Range Default

<digital>

<label>

Integer

ASCII

String

{D0|D1|D2|D3|D4|D5|D6|D7|

D8|D9|D10|D11|D12|D13|D14|D15}

The label can contain English letters and numbers, as well as some symbols.

Return

Format

The query returns the label of the specified digital channel in ASCII strings.

Example

:LA:DIGital:LABel D0,ACK /*Sets the label of D0 to ACK.*/

:LA:DIGital:LABel? D0 /*The query returns ACK.*/

:LA:POD<n>:DISPlay

——

——

Syntax

:LA:POD<n>:DISPlay <bool>

:LA:POD<n>:DISPlay?

Description

Enables or disables the specified default channel group; or queries the on/off status of the specified default channel group.

Parameter

Name Type Range Default

<n> Integer 1 to 2

——

<bool> Bool {{1|ON}|{0|OFF}}

——

Remarks

2 default channel groups: POD1 (D0 to D7) and POD2 (D8 to D15).

Return

Format

The query returns 1 or 0.

Example

:LA:POD1:DISPlay 1 /*Enables POD1 (D0 to D7).*/

:LA:POD1:DISPlay? /*The query returns 1.*/

:LA:DISPlay

Syntax

:LA:DISPlay <channel>,<bool>

:LA:DISPlay? <channel>

Description

Turns on or off the specified digital channel, user-defined channel group, or the default channel group; or queries the on/off status of the specified digital channel, user-defined channel group, or the default channel group.

Parameter

Name Type Range Default

<channel> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|

D8|D9|D10|D11|D12|D13|D14|D15|GROup1|

GROup2|GROup3|GROup4|POD1|POD2}

——

<bool> Bool {{1|ON}|{0|OFF}} ——

Remarks

You can set the digital channels contained in the specified user-defined channel group. Note that any one of the digital channels can only belong to one of the

2-86 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

specified user-defined channel group.

The currently enabled channel can be selected as the active channel by sending

the :LA:ACTive command.

POD1: D0 to D7; POD2: D8 to D15

The query returns 1 or 0.

Return

Format

Example

:LA:DISPlay D0,ON /*Enables D0.*/

:LA:DISPlay? D0 /*The query returns 1.*/

:LA:POD<n>:THReshold

Syntax

:LA:POD<n>:THReshold <thre>

:LA:POD<n>:THReshold?

Description

Sets or queries the threshold of the specified default channel group. The default unit is

V.

Parameter Name Type Range Default

<n> Integer

<thre> Real

1 to 2

-15.0 V to +15.0 V

——

1.40V

Remarks

2 default channel groups: POD1 (D0 to D7) or POD2 (D8 to D15).

Return

Format

The query returns the current threshold of the specified channel group in scientific notation.

Example

:LA:POD1:THReshold 3.3 /*Sets the threshold of POD1 (D0 to D7) to 3.3 V.*/

:LA:POD1:THReshold? /*The query returns 3.300000E0.*/

:LA:SIZE

Syntax

:LA:SIZE <size>

:LA:SIZE?

Description

Sets or queries the size of the waveforms of the enabled channel on the screen.

Parameter

Name Type Range Default

<size> Discrete {SMALl|LARGe|MEDium} MEDium

Remarks

L (large) can only be used when the number of the currently enabled channels is no more than 8.

Return

Format

The query returns SMAL, LARG, or MED.

Example

:LA:SIZE SMALl /*Sets the waveform display size to SMALl.*/

:LA:SIZE? /*The query returns SMAL.*/

MSO5000-E Programming Guide 2-87

RIGOL

Chapter 2 Command System

:LA:TCALibrate

Syntax

:LA:TCALibrate <tcal>

:LA:TCALibrate?

Description

Sets or queries the delay calibration time of the digital channel. The default unit is s.

Parameter

Name Type Range Default

<tcal> Real -1000 ns to 100 ns 0.00 s

Remarks

When you use an oscilloscope to make actual measurements, the transmission delay of the probe cable may bring relatively greater errors (zero offset). Zero offset is defined as the offset of the crossing point (between the waveforms and the threshold level) from the trigger position. You can set a delay time for calibrating the zero offset of the corresponding channel.

Return

Format

The query returns the delay calibration time in scientific notation.

Example

:LA:TCALibrate 0.00000002 /*Sets the delay calibration time to 20 ns.*/

:LA:TCALibrate? /*The query returns 2.000000E-8.*/

:LA:GROup:APPend

Syntax

:LA:GROup:APPend

<group>,<digital0>[,<digital1>[,<digital2>[,<digita3>[,<digital4>[,<digital5>[,<di gital6>[,<digital7>[,<digital8>[,<digital9>[,<digital10>[,<digital11>[,<digital12>[,

<digital13>[,<digital14>[,<digital15>]]]]]]]]]]]]]]]

Description

Adds a channel to the specified user-defined group.

Parameter

Name Type Range Default

<group> Discrete

{GROup1|GROup2|

GROup3|GROup4}

——

<digital0>/<digital1>/

<digital2>/<digita3>/

<digital4>/<digital5>/

<digital6>/<digital7>/

<digital8>/<digital9>/

<digital10>/<digital11>/

<digital12>/<digital13>/

Discrete

{D0|D1|D2|D3|D4|

D5|D6|D7|D8|D9|D

10|D11|D12|D13|D

14|D15}

——

<digital14>/<digital15>

Example

:LA:GROup:APPend GROup2,D0,D1 /*Adds D0 and D1 to Group2.*/

2-88 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:LAN Commands

The :LAN commands are used to set and query the LAN parameters.

:LAN:DHCP

:LAN:AUToip

:LAN:GATeway

:LAN:DNS

:LAN:MAC?

:LAN:DSErver?

:LAN:MANual

:LAN:IPADdress

:LAN:SMASk

:LAN:STATus?

:LAN:VISA?

:LAN:MDNS

:LAN:HOST:NAME

:LAN:DESCription

:LAN:APPLy

:LAN:DHCP

Syntax

:LAN:DHCP <bool>

:LAN:DHCP?

Description

Turns on or off the DHCP configuration mode; or queries the on/off status of the current DHCP configuration mode.

Parameter Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 1|ON

Remarks

When the three IP configuration types (DHCP, Auto IP, and Static IP) are all turned on, the priority of the parameter configuration from high to low is

"DHCP", "Auto IP", and "Static IP". The three IP configuration types cannot be all turned off at the same time.

When DHPC is valid, the DHCP server in the current network will assign the network parameters (such as the IP address) for the oscilloscope.

After the :LAN:APPLy command is executed, the configuration type can take

effect immediately.

The query returns 1 or 0.

Return

Format

Example

:LAN:DHCP OFF /*Disables DHCP configuration mode.*/

:LAN:DHCP? /*The query returns 0.*/

MSO5000-E Programming Guide 2-89

RIGOL

Chapter 2 Command System

:LAN:AUToip

Syntax

:LAN:AUToip <bool>

:LAN:AUToip?

Description

Turns on or off the Auto IP configuration mode; or queries the on/off status of the current Auto IP configuration mode.

Parameter Name

<bool>

Type

Bool

Range

{{1|ON}|{0|OFF}}

Default

1|ON

Remarks

When the auto IP mode is valid, disable DHCP manually. You can self-define the gateway and DNS address for the oscilloscope.

Return

Format

The query returns 1 or 0.

Example

:LAN:AUToip OFF /*Disables the Auto IP configuration mode.*/

:LAN:AUToip? /*The query returns 0.*/

:LAN:GATeway

Syntax

:LAN:GATeway <string>

:LAN:GATeway?

Description

Sets or queries the default gateway.

Parameter

Name Type Range Default

<string> ASCII String Refer to

Remarks

——

Remarks

The format of <string> is nnn,nnn,nnn,nnn. The range of the first section of "nnn" is from 0 to 223 (except 127), and the ranges of the other three sections of "nnn" are from 0 to 255.

When you use this command, the IP configuration mode should be Auto IP or

Static IP mode.

Return

Format

The query returns the current gateway in strings.

Example

:LAN:GATeway 192.168.1.1 /*Sets the default gateway to 192.168.1.1.*/

:LAN:GATeway? /*The query returns the current gateway.*/

:LAN:DNS

Syntax

:LAN:DNS <string>

:LAN:DNS?

Description

Sets or queries the DNS address.

Parameter

Name

<string>

Type

ASCII String

Range

Refer to

Remarks

Default

——

Remarks

The format of <string> is nnn,nnn,nnn,nnn. The range of the first section of "nnn" is from 0 to 223 (except 127), and the ranges of the other three sections of "nnn" are from 0 to 255.

When you use this command, the IP configuration mode should be Auto IP or

Static IP mode.

2-90 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Return

Format

The query returns the current DNS address in strings.

Example

:LAN:DNS 192.168.1.1 /*Sets the DNS address to 192.168.1.1.*/

:LAN:DNS? /*The query returns the current DNS address.*/

:LAN:MAC?

Syntax

:LAN:MAC?

Description

Queries the MAC address of the instrument.

Return

Format

The query returns the MAC address in strings. For example, 00:19:AF:00:11:22.

:LAN:DSErver?

Syntax

:LAN:DSErver?

Description

Queries the address of the DHCP server.

Return

Format

The query returns the address of the DHCP server in strings.

:LAN:MANual

Syntax

:LAN:MANual <bool>

:LAN:MANual?

Description

Turns on or off the static IP configuration mode; or queries the on/off status of the static IP configuration mode.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Remarks

When the static IP mode is valid, disable DHCP and Auto IP manually. You can self-define the network parameters of the oscilloscope, such as IP address, subnet mask, gateway, and DNS address. For the setting of the IP address, refer to

the :LAN:IPADdress command. For the setting of the subnet mask, refer to the :LAN:SMASk

command. For the setting of the gateway, refer to the :LAN:GATeway command. For the setting of DNS, refer to the :LAN:DNS

command.

Return

Format

The query returns 1 or 0.

Example

:LAN:MANual ON /*Enables the static IP configuration mode.*/

:LAN:MANual? /*The query returns 1.*/

MSO5000-E Programming Guide 2-91

RIGOL

Chapter 2 Command System

:LAN:IPADdress

Syntax

:LAN:IPADdress <string>

:LAN:IPADdress?

Description

Sets or queries the IP address of the instrument.

Parameter

Name Type Range

<string> ASCII String Refer to

Remarks

Default

——

Remarks

The format of <string> is nnn,nnn,nnn,nnn. The range of the first section of "nnn" is from 0 to 223 (except 127), and the ranges of the other three sections of "nnn" are from 0 to 255.

Return

Format

When you use the command, the IP configuration mode should be static IP.

Besides, the DHCP and auto IP should be disabled.

The query returns the current IP address in strings.

Example

:LAN:IPADdress 192.168.1.10 /*Sets the IP address to 192.168.1.10.*/

:LAN:IPADdress? /*The query returns the current IP address.*/

:LAN:SMASk

Syntax

:LAN:SMASk <string>

:LAN:SMASk?

Description

Sets or queries the subnet mask.

Parameter

Name Type Range

<string> ASCII String Refer to

Remarks

Default

——

Remarks

The format of <string> is nnn,nnn,nnn,nnn. The range of the section "nnn" is from 0 to 255.

Return

Format

When you use the command, the IP configuration mode should be static IP. The

DHCP and auto IP should be disabled.

The query returns the current subnet mask in strings.

Example

:LAN:SMASk 255.255.255.0 /*Sets the subnet mask to 255.255.255.0*/

:LAN:SMASk? /*The query returns the current subnet mask.*/

:LAN:STATus?

Syntax

:LAN:STATus?

Description

Queries the current network configuration status.

Return

Format

The query returns UNLINK, CONNECTED, INIT, IPCONFLICT, BUSY, CONFIGURED,

DHCPFAILED, INVALIDIP, or IPLOSE.

UNLINK: not connected.

CONNECTED: the network is successfully connected.

INIT: the instrument is acquiring an IP address.

IPCONFLICT: there is an IP address conflict.

BUSY: please waiting …

CONFIGURED: the network configuration has been successfully configured.

2-92 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

DHCPFAILED: the DHCP configuration has failed.

INVALIDIP: invalid IP.

IPLOSE: IP lost.

:LAN:VISA?

Syntax

:LAN:VISA?

Description

Queries the VISA address of the instrument.

Return Format

The query returns the VISA address in strings.

:LAN:MDNS

Syntax

:LAN:MDNS <bool>

:LAN:MDNS?

Description

Enables or disables MDNS; or queries the MDNS status.

Parameter

Name Type Range

<bool> Bool

Return Format

The query returns 1 or 0.

{{1|ON}|{0|OFF}}

Example

:LAN:MDNS ON /*Enables MDNS.*/

:LAN:MDNS? /*The query returns 1.*/

:LAN:HOST:NAME

Syntax

:LAN:HOST:NAME <name>

:LAN:HOST:NAME?

Description

Sets or queries the host name.

Parameter Name Type

<name> ASCII String

Range

The name can contain English letters and numbers, as well as some symbols.

Return Format

The query returns the host name in ASCII strings.

:LAN:DESCription

Syntax

:LAN:DESCription <name>

:LAN:DESCription?

Description

Sets or queries the description.

Parameter

Name Type Range

<name> ASCII String

The parameter <name> can contain

English letters and numbers, as well as some symbols.

Return Format

The query returns the description in ASCII strings.

Default

0|OFF

Default

——

Default

——

MSO5000-E Programming Guide 2-93

RIGOL

:LAN:APPLy

Syntax

:LAN:APPLy

Description

Applies the network configuration.

Chapter 2 Command System

2-94 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:MASK Commands

The :MASK commands are used to set or query the relevant parameters of the pass/fail test.

Command List:

:MASK:ENABle

:MASK:SOURce

:MASK:OPERate

:MASK:MDISplay

:MASK:X

:MASK:Y

:MASK:CREate

:MASK:PASSed?

:MASK:FAILed?

:MASK:TOTal?

:MASK:RESet

:MASK:ENABle

Syntax

:MASK:ENABle <bool>

:MASK:ENABle?

Description

Enables or disables the pass/fail test function; or queries the on/off status of the pass/fail test function.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Remarks

The pass/fail test function is invalid in the following conditions: when the horizontal time base mode is XY or ROLL; when in the delayed sweep mode (Zoom).

Return

Format

The query returns 1 or 0.

Example

:MASK:ENABle ON /*Enables the pass/fail test function.*/

:MASK:ENABle? /*The query returns 1.*/

:MASK:SOURce

Syntax

:MASK:SOURce <source>

:MASK:SOURce?

Description

Sets or queries the measurement source of the pass/fail test.

Parameter

Name Type Range Default

CHANnel1 <source> Discrete {CHANnel1|CHANnel2}

Remarks

This command can only set the enabled channel, and you can send

the :CHANnel<n>:DISPlay command to enable the desired channel.

Return

The query returns CHAN1 or CHAN2.

MSO5000-E Programming Guide 2-95

RIGOL

Chapter 2 Command System

Format

Example

:MASK:SOURce CHANnel2

/*Sets the measurement source of the pass/fail test to CHANnel2.*/

:MASK:SOURce?

/*The query returns CHAN2.*/

:MASK:OPERate

Syntax

:MASK:OPERate <oper>

:MASK:OPERate?

Description

Runs or stops the pass/fail test; or queries the operating status of the pass/fail test.

Parameter

Name Type Range Default

<oper> Discrete {RUN|STOP} STOP

Description

Before running this command, send the :MASK:ENABle command to enable the pass/fail

test function.

Return

Format

The query returns RUN or STOP.

Example

:MASK:OPERate RUN /*Runs the pass/fail test function.*/

:MASK:OPERate? /*The query returns RUN.*/

:MASK:MDISplay

Syntax

:MASK:MDISplay <bool>

:MASK:MDISplay?

Description

Enables or disables the statistical function; or queries the on/off status of the statistical function when the pass/fail test is enabled.

Parameter

Name Type Range Default

Description

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Before running this command, send the :MASK:ENABle command to enable the

pass/fail test function.

When the statistics is enabled, the following test results are displayed on the screen, as shown in the figure below.

Return

Format

The query returns 1 or 0.

Example

:MASK:MDISplay ON /*Enables the statistics.*/

:MASK:MDISplay? /*The query returns 1.*/

2-96 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:MASK:X

Syntax

:MASK:X <x>

:MASK:X?

Description

Sets or queries the horizontal adjustment parameter of the pass/fail test mask. The default unit is div.

Parameter Name

<x>

Type

Real

Range

0.01 div to 2 div

Default

0.24 div

Return

Format

The query returns the current horizontal adjustment parameter in scientific notation.

Example

:MASK:X 0.28 /*Sets the horizontal adjustment parameter to 0.28 div.*/

:MASK:X? /*The query returns 2.800000E-1.*/

:MASK:Y

Syntax

:MASK:Y <y>

:MASK:Y?

Description

Sets or queries the vertical adjustment parameter of the pass/fail test mask. The default unit is div.

Parameter

Name Type Range Default

<y> Real 0.04 div to 2 div 0.48 div

Return

Format

The query returns the current vertical adjustment parameter in scientific notation.

Example

:MASK:Y 0.36 /*Sets the vertical adjustment parameter to 0.36 div.*/

:MASK:Y? /*The query returns 3.600000E-1.*/

:MASK:CREate

Syntax

:MASK:CREate

Description

Creates the pass/fail test mask with the currently set horizontal and vertical adjustment parameters.

Description

This command is only valid when the pass/fail test function is enabled and not in running state.

:MASK:PASSed?

Syntax

:MASK:PASSed?

Description

Queries the number of passed frames in the pass/fail test.

Return

Format

The query returns an integer.

MSO5000-E Programming Guide 2-97

RIGOL

Chapter 2 Command System

:MASK:FAILed?

Syntax

:MASK:FAILed?

Description

Queries the number of failed frames in the pass/fail test.

Return

Format

The query returns an integer.

:MASK:TOTal?

Syntax

:MASK:TOTal?

Description

Queries the total number of frames in the pass/fail test.

Return

Format

The query returns an integer.

:MASK:RESet

Syntax

:MASK:RESet

Description

Resets the number of frames that passed and failed the pass/fail test, as well as the total number of frames.

2-98 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:MATH<n> Commands

The :MATH<n> commands are used to set various math operation function of the waveform between channels.

Note:

The math operations include the following types: arithmetic operations: A+B, A-B, A× B, A/B spectrum operation: FFT

Logic operation: A&&B, A||B, A^B, !A function operation: Intg, Diff, Sqrt, Lg, Ln, Exp, Abs, AX+B digital filter: Low Pass Filter, High Pass Filter, Band Pass Filter, Band Stop Filter

For the logic operation, the waveform data involved in the operation and the preset threshold are compared with each other, and then transferred to 0 or 1. Therefore, the operation results are only reduced to 0 and 1.

Command List:

:MATH<n>:DISPlay

:MATH<n>:OPERator

:MATH<n>:SOURce1

:MATH<n>:SOURce2

:MATH<n>:LSOUrce1

:MATH<n>:LSOUrce2

:MATH<n>:SCALe

:MATH<n>:OFFSet

:MATH<n>:INVert

:MATH<n>:RESet

:MATH<n>:FFT:SOURce

:MATH<n>:FFT:WINDow

:MATH<n>:FFT:UNIT

:MATH<n>:FFT:SCALe

:MATH<n>:FFT:OFFSet

:MATH<n>:FFT:HSCale

:MATH<n>:FFT:HCENter

:MATH<n>:FFT:FREQuency:STARt

:MATH<n>:FFT:FREQuency:END

:MATH<n>:FFT:SEARch:ENABle

:MATH<n>:FFT:SEARch:NUM

:MATH<n>:FFT:SEARch:THReshold

:MATH<n>:FFT:SEARch:EXCursion

:MATH<n>:FFT:SEARch:ORDer

:MATH<n>:FILTer:TYPE

MSO5000-E Programming Guide 2-99

RIGOL

Chapter 2 Command System

:MATH<n>:FILTer:W1

:MATH<n>:FILTer:W2

:MATH<n>:SENSitivity

:MATH<n>:DISTance

:MATH<n>:THReshold1

:MATH<n>:THReshold2

:MATH<n>:DISPlay

Syntax

:MATH<n>:DISPlay <bool>

:MATH<n>:DISPlay?

Description

Enables or disables the math operation function; or queries the status of the math operation function.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<bool> Bool {{1|ON}|{0|OFF}}

——

0|OFF

Return

Format

The query returns 1 or 0.

Example

:MATH1:DISPlay ON /*Enables the operation function of Math1.*/

:MATH1:DISPlay? /*The query returns 1.*/

:MATH<n>:OPERator

Syntax

:MATH<n>:OPERator <opt>

:MATH<n>:OPERator?

Description

Sets or queries the operator of math operation.

Parameter

Name Type Range

<n>

<opt>

Discrete {1|2|3|4}

Discrete

{ADD|SUBTract|MULTiply|DIVision|AND|OR|X

OR|NOT|FFT|INTG|DIFF|SQRT|LOG|LN|EXP|

ABS|LPASs|HPASs|BPASs|BSTop|AXB}

Default

——

ADD

Return

Format

The query returns ADD, SUBT, MULT, DIV, AND, OR, XOR, NOT, FFT, INTG, DIFF, SQRT,

LOG, LN, EXP, ABS, LPAS, HPAS, BPAS, BST, or AXB.

Example

:MATH1:OPERator INTG /*Sets the math operator of Math1 to Integrate.*/

:MATH1:OPERator? /*The query returns INTG.*/

2-100 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:MATH<n>:SOURce1

Syntax

:MATH<n>:SOURce1 <src>

:MATH<n>:SOURce1?

Description

Sets or queries the source or Source A of arithmetic operation, function operation, and filter operation.

Parameter Name Type Range Default

<n> Discrete {1|2|3|4} ——

<src> Discrete

{CHANnel1|CHANnel2|REF1|REF2|REF3|REF

4|REF5|REF6|REF7|REF8|REF9|REF10|MATH

1|MATH2|MATH3}

CHANnel1

Remarks

For arithmetic operation, this command is used to set Source A.

For function operation, use this command only to set the source.

Return

Format

The query returns CHAN1, CHAN2, REF1, REF2, REF3, REF4, REF5, REF6, REF7, REF8,

REF9, REF10, MATH1, MATH2, or MATH3.

Example

:MATH1:SOURce1 CHANnel2 /*Sets Source A of the arithmetic operation to

CHANnel2.*/

:MATH1:SOURce1? /*The query returns CHAN2.*/

:MATH<n>:SOURce2

Syntax

:MATH<n>:SOURce2 <src>

:MATH<n>:SOURce2?

Description

Sets or queries Source B of arithmetic operation.

Parameter Name Type Range

<n> Discrete {1|2|3|4}

<src> Discrete {CHANnel1|CHANnel2|REF1|REF2|REF3|REF

4|REF5|REF6|REF7|REF8|REF9|REF10|MATH

1|MATH2|MATH3}

Default

——

CHANnel1

Remarks

This command is only available for arithmetic operation (containing two sources).

Return

Format

The query returns CHAN1, CHAN2, REF1, REF2, REF3, REF4, REF5, REF6, REF7, REF8,

REF9, REF10, MATH1, MATH2, or MATH3.

Example

:MATH1:SOURce2 CHANnel2 /*Sets Source B of the arithmetic operation to

CHANnel2.*/

:MATH1:SOURce2? /*The query returns CHAN2.*/

MSO5000-E Programming Guide 2-101

RIGOL

Chapter 2 Command System

:MATH<n>:LSOUrce1

Syntax

:MATH<n>:LSOUrce1 <src>

:MATH<n>:LSOUrce1?

Description

Sets or queries Source A of the logic operation.

Parameter

Name Type Range

<n> Discrete {1|2|3|4}

Default

——

<src> Discrete {D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1 CHANnel1

Remarks

The logic operations include A&&B, A||B, A^B, and !A.

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:MATH1:LSOUrce1 D3 /*Sets Source A of the logic operation to D3.*/

:MATH1:LSOUrce1? /*The query returns D3.*/

:MATH<n>:LSOUrce2

Syntax

:MATH<n>:LSOUrce2 <src>

:MATH<n>:LSOUrce2?

Description

Sets or queries Source B of the logic operation.

Parameter

Name Type Range

<n> Discrete

<src> Discrete

{1|2|3|4}

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

——

CHANnel1

Remarks

The logic operations include A&&B, A||B, A^B, and !A.

This command is only available for the logic operation that contains two sources.

It is used to set Source B.

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:MATH1:LSOUrce2 D4 /*Sets Source B of the logic operation to D4.*/

:MATH1:LSOUrce2? /*The query returns D4.*/

:MATH<n>:SCALe

Syntax

:MATH<n>:SCALe <scale>

:MATH<n>:SCALe?

Description

Sets or queries the vertical scale of the operation results. The unit is related to the currently selected operator and the unit selected by the source.

Parameter

Name Type Range Default

<n> Discrete

<scale> Real

{1|2|3|4}

Refer to

Remarks

——

——

Remarks

The setting range of vertical scale is related to the currently selected operator and the scale of the source channel. For integration and differentiation operations, the actual

2-102 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Return

Format

range of <scale> is also related to the current horizontal time base.

The query returns the vertical scale of the current operation results in scientific notation.

Example

:MATH1:SCALe 0.2 /*Sets the vertical scale to 200 mV.*/

:MATH1:SCALe? /*The query returns 2.000000E-1.*/

:MATH<n>:OFFSet

Syntax

:MATH<n>:OFFSet <offset>

:MATH<n>:OFFSet?

Description

Sets or queries the vertical offset of the operation results. The unit is related to the currently selected operator and the unit selected by the source.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<offset> Real -1 GV to +1 GV

——

0.00 V

Return

Format

The query returns the vertical offset of the current operation results in scientific notation.

Example

:MATH1:OFFSet 8 /*Sets the vertical offset to 8 V.*/

:MATH1:OFFSet? /*The query returns 8.000000E0.*/

:MATH<n>:INVert

Syntax

:MATH<n>:INVert <bool>

:MATH<n>:INVert?

Description

Enables or disables the inverted display of the operation results; or queries the status of the inverted display of the operation results.

Parameter

Name Type Range Default

<n>

<bool>

Discrete {1|2|3|4}

Bool {{1|ON}|{0|OFF}}

Remarks

This command is invalid for FFT operation.

——

0|OFF

Return

Format

The query returns 1 or 0.

Example

:MATH1:INVert ON /*Enables the inverted display.*/

:MATH1:INVert? /*The query returns 1.*/

:MATH<n>:RESet

Syntax

:MATH<n>:RESet

Description

After you send this command, the instrument will adjust the vertical scale of the operation results to an optimal value based on the currently selected operator and the horizontal time base of the source.

MSO5000-E Programming Guide 2-103

RIGOL

Chapter 2 Command System

:MATH<n>:FFT:SOURce

Syntax

:MATH<n>:FFT:SOURce <src>

:MATH<n>:FFT:SOURce?

Description

Sets or queries the channel source of FFT operation.

Parameter

Name Type Range

<n>

<src>

Discrete {1|2|3|4}

Discrete {CHANnel1|CHANnel2}

Default

——

CHANnel1

Return

Format

The query returns CHAN1 or CHAN2.

Example

:MATH1:FFT:SOURce CHANnel2 /*Sets the channel source of FFT operation to CH2.*/

:MATH1:FFT:SOURce? /*The query returns CHAN2.*/

:MATH<n>:FFT:WINDow

Syntax

:MATH<n>:FFT:WINDow <wnd>

:MATH<n>:FFT:WINDow?

Description

Sets or queries the window function of FFT operation.

Parameter

Name Type Range

<n> Discrete {1|2|3|4}

Default

——

<wnd> HANNing

Remarks

Spectral leakage can be considerably decreased when a window function is used.

Different window functions are applicable to measurements of different waveforms.

You need to select the window function according to the different waveforms to be measured and their characteristics.

Return

Format

The query returns RECT, BLAC, HANN, HAMM, FLAT, or TRI.

Example

:MATH1:FFT:WINDow BLACkman /*Sets the window function of FFT operation to

Blackman-Harris.*/

:MATH1:FFT:WINDow? /*The query returns BLAC.*/

:MATH<n>:FFT:UNIT

Syntax

:MATH<n>:FFT:UNIT <unit>

:MATH<n>:FFT:UNIT?

Description

Sets or queries the vertical unit of FFT operation results.

Parameter

Name Type Range Default

<n>

<unit>

Discrete

Discrete

{1|2|3|4}

{VRMS|DB}

——

DB

Return

Format

The query returns VRMS or DB.

Example

:MATH1:FFT:UNIT VRMS /*Sets the vertical unit of FFT operation results to Vrms.*/

2-104 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:MATH1:FFT:UNIT? /*The query returns VRMS.*/

:MATH<n>:FFT:SCALe

Syntax

:MATH<n>:FFT:SCALe <scale>

:MATH<n>:FFT:SCALe?

Description

Sets or queries the vertical scale of FFT operation results.

Parameter Name Type Range

<n>

<scale>

Discrete

Real

{1|2|3|4}

1 ndB to 5 GdB

Default

——

2 dB

Return

Format

The query returns the current vertical scale in scientific notation.

Example

:MATH1:FFT:SCALe 0.3 /*Sets the vertical scale of the FFT operation results to 300 mdB.*/

:MATH1:FFT:SCALe? /*The query returns 3.000000E-1.*/

:MATH<n>:FFT:OFFSet

Syntax

:MATH<n>:FFT:OFFSet <offset>

:MATH<n>:FFT:OFFSet?

Description

Sets or queries the vertical offset of FFT operation results.

Parameter Name

<n>

Type

Discrete

Range

{1|2|3|4}

Default

——

<offset> Real -1 GdB to 1 GdB 0 dB

Return

Format

The query returns the current vertical offset in scientific notation.

Example

:MATH1:FFT:OFFSet 0.3 /*Sets the vertical offset of the FFT operation results to

300 mdB*/

:MATH1:FFT:OFFSet? /*The query returns 3.000000E-1.*/

:MATH<n>:FFT:HSCale

Syntax

:MATH<n>:FFT:HSCale <hsc>

:MATH<n>:FFT:HSCale?

Description

Sets or queries the frequency range of FFT operation results. The default unit is Hz.

Parameter Name Type Range Default

<hsc> Real 10 Hz to 5 GHz 10 MHz

Remarks

You can reduce the frequency range to observe the details of the spectrum.

Return

Format

The query returns the current frequency range in scientific notation.

Example

:MATH1:FFT:HSCale 500000 /*Sets the frequency range of FFT operation results to

MSO5000-E Programming Guide 2-105

RIGOL

Chapter 2 Command System

500 kHz.*/

:MATH1:FFT:HSCale? /*The query returns 5.000000E+5.*/

:MATH<n>:FFT:HCENter

Syntax

:MATH<n>:FFT:HCENter <cent>

:MATH<n>:FFT:HCENter?

Description

Sets or queries the center frequency of FFT operation results, i.g. the frequency relative to the horizontal center of the screen. The default unit is Hz.

Parameter

Name Type Range Default

<n>

<cent>

Discrete

Real

{1|2|3|4}

-2.5 GHz to 2.5 GHz

——

5 MHz

Return

Format

The query returns the current center frequency in scientific notation.

Example

:MATH1:FFT:HCENter 10000000 /*Sets the center frequency of the FFT operation results to 10 MHz.*/

:MATH1:FFT:HCENter? /*The query returns 1.000000E+7.*/

:MATH<n>:FFT:FREQuency:STARt

Syntax

:MATH<n>:FFT:FREQuency:STARt <value>

:MATH<n>:FFT:FREQuency:STARt?

Description

Sets or queries the start frequency of FFT operation results.

Parameter Name Type Range

<n>

<value>

Discrete {1|2|3|4}

Real -2.5 GHz to 2.5 GHz

Default

——

0 Hz

Return

Format

The query returns the start frequency of the operation results in scientific notation.

Example

:MATH1:FFT:FREQuency:STARt 10000000 /*Sets the start frequency of the FFT operation results to 10 MHz.*/

:MATH1:FFT:FREQuency:STARt? /*The query returns 1.000000E+7.*/

:MATH<n>:FFT:FREQuency:END

Syntax

:MATH<n>:FFT:FREQuency:END <value>

:MATH<n>:FFT:FREQuency:END?

Description

Sets or queries the stop frequency of FFT operation results.

Parameter

Name Type Range Default

Return

Format

<n> Discrete {1|2|3|4}

<value> Real -2.5 GHz to 2.5 GHz

——

10 MHz

The query returns the stop frequency of the operation results in scientific notation.

2-106 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Example

:MATH1:FFT:FREQuency:END 10000000 /*Sets the stop frequency of the FFT operation results to 10 MHz.*/

:MATH1:FFT:FREQuency:END? /*The query returns 1.000000E+7.*/

:MATH<n>:FFT:SEARch:ENABle

Syntax

:MATH<n>:FFT:SEARch:ENABle <bool>

:MATH<n>:FFT:SEARch:ENABle?

Description

Enables or disables the FFT peak search; or queries the on/off status of the FFT peak search function.

Parameter

Name Type Range Default

Return

Format

<n>

<bool>

Discrete

Bool

The query returns 1 or 0.

{1|2|3|4}

{{1|ON}|{0|OFF}}

——

0|OFF

Example

:MATH1:FFT:SEARch:ENABle ON /*Enables the FFT peak search.*/

:MATH1:FFT:SEARch:ENABle? /*The query returns 1.*/

:MATH<n>:FFT:SEARch:NUM

Syntax

:MATH<n>:FFT:SEARch:NUM <num>

:MATH<n>:FFT:SEARch:NUM?

Description

Sets or queries the maximum number of the FFT peak search.

Parameter Name Type Range

<n>

<num>

Discrete

Integer

{1|2|3|4}

1 to 15

Default

——

5

Return

Format

The query returns an integer ranging from 1 to 15.

Example

:MATH1:FFT:SEARch:NUM 10 /*Sets the maximum number of the FFT peak search to

10.*/

:MATH1:FFT:SEARch:NUM? /*The query returns 10.*/

:MATH<n>:FFT:SEARch:THReshold

Syntax

:MATH<n>:FFT:SEARch:THReshold <thres>

:MATH<n>:FFT:SEARch:THReshold?

Description

Sets or queries the threshold of the FFT peak search.

Parameter

Name Type Range

<n>

<thres>

Discrete

Real

{1|2|3|4}

Related to the vertical scale and vertical offset of

FFT operation

Return

The query returns the threshold in scientific notation.

Default

——

5.5 dB

MSO5000-E Programming Guide 2-107

RIGOL

Chapter 2 Command System

Format

Example

:MATH1:FFT:SEARch:THReshold 0.5 /*Sets the threshold of the FFT peak search to 500 mdB.*/

:MATH1:FFT:SEARch:THReshold? /*The query returns 5.000000E-1.*/

:MATH<n>:FFT:SEARch:EXCursion

Syntax

:MATH<n>:FFT:SEARch:EXCursion <excur>

:MATH<n>:FFT:SEARch:EXCursion?

Description

Sets or queries the excursion of the FFT peak search.

Parameter

Name Type Range

<n> Discrete {1|2|3|4}

Default

——

<excur> Real

0 to (8xVerticalScale)

(vertical scale of FFT)

1.8 dB

Remarks

VerticalScale indicates the vertical scale of FFT.

Return

Format

The query returns the excursion of the FFT peak search in scientific notation.

Example

:MATH1:FFT:SEARch:EXCursion 0.5 /*Sets the excursion of the FFT peak search to 500 mdB.*/

:MATH1:FFT:SEARch:EXCursion? /*The query returns 5.000000E-1.*/

:MATH<n>:FFT:SEARch:ORDer

Syntax

:MATH<n>:FFT:SEARch:ORDer <order>

:MATH<n>:FFT:SEARch:ORDer?

Description

Sets or queries the sequence of the FFT peak search results.

Parameter

Name Type Range Default

<n> Discrete

<order> Discrete

{1|2|3|4}

{AMPorder|FREQorder}

——

AMPorder

Return

Format

The query returns AMP or FREQ.

Example

:MATH1:FFT:SEARch:ORDer AMPorder /*Sets the sequence of the FFT peak search results to AMPorder.*/

:MATH1:FFT:SEARch:ORDer? /*The query returns AMP.*/

2-108 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:MATH<n>:FILTer:TYPE

Syntax

:MATH<n>:FILTer:TYPE <type>

:MATH<n>:FILTer:TYPE?

Description

Sets or queries the filter type.

Parameter

Name Type Range

<n> Discrete

<type> Discrete

{1|2|3|4}

{LPASs|HPASs|BPASs|BSTop}

Default

——

——

Remarks

MSO5000-E provides 4 practical filters (Low Pass Filter, High Pass Filter, Band

Pass Filter, and Band Stop Filter), which can filter the specified frequencies in the

signal by setting the bandwidth. You can use the :MATH<n>:SOURce1

command to set or query the channel source of the filter.

LPASs: indicates low pass filter, which only allows the signals whose frequencies are smaller than the current cut-off frequency to pass.

HPASs: indicates high pass filter, which only allows the signals whose frequencies are greater than the current cut-off frequency to pass.

Return

Format

BPASs: indicates band pass filter, which only allows the signals whose frequencies are greater than the current cut-off frequency 1 and smaller than the current cut-off frequency 2 to pass.

Note:

The cut-off frequency 1 must be smaller than the cut-off frequency 2.

BSTop: indicates band stop filter, which only allows the signals whose frequencies are smaller than the current cut-off frequency 1 or greater than the current cut-off frequency 2 to pass.

Note:

The cut-off frequency 1 must be smaller than the cut-off frequency 2.

The query returns LPAS, HPAS, BPAS, or BST.

Example

:MATH1:FILTer:TYPE LPASs /*Sets the filter type to LPASs.*/

:MATH1:FILTer:TYPE? /*The query returns LPAS.*/

:MATH<n>:FILTer:W1

Syntax

:MATH<n>:FILTer:W1 <freq1>

:MATH<n>:FILTer:W1?

Description

Sets or queries the cut-off frequency of Low Pass Filter/High Pass Filter; or the cut-off frequency 1 of Band Pass Filter/Band Stop Filter. The default unit is Hz.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<freq1> Real

Refer to

Remarks

——

Related to the filter type

LPASs|BPASs|BSTop: 0.005× screen sample rate

HPASs: 0.1× screen sample rate

Remarks

When the filter type is set to LPASs (Low Pass Filter) or HPASs (High Pass Filter), you need to set one cut-off frequency. At this time, the range of <freq1> is from

(0.005× screen sample rate) to (0.1× screen sample rate), at a step of

(0.005× screen sample rate). Wherein, screen sample rate = 100/horizontal time base.

When the filter type is set to BPASs (Band Pass Filter) or BSTop (Band Stop Filter),

MSO5000-E Programming Guide 2-109

RIGOL

Chapter 2 Command System

Return

Format

you need to set two cut-off frequencies. Run this command to set the cut-off

frequency 1, and run the :MATH<n>:FILTer:W2 command to set the cut-off

frequency 2. At this time, the range of <freq1> is from (0.005× screen sample rate) to (0.095× screen sample rate), at a step of (0.005× screen sample rate). Wherein, screen sample rate = 100/horizontal time base.

Note:

The cut-off frequency 1 must be smaller than the cut-off frequency 2.

The query returns the current cut-off frequency or cut-off frequency 1 in scientific notation.

Example

:MATH1:FILTer:W1 1000000 /*Sets the cut-off frequency of Low Pass Filter to 1 MHz.*/

:MATH1:FILTer:W1? /*The query returns 1.000000E+6.*/

:MATH<n>:FILTer:W2

Syntax

:MATH<n>:FILTer:W2 <freq2>

:MATH<n>:FILTer:W2?

Description

Sets or queries the cut-off frequency 2 of Band Pass Filter/Band Stop Filter. The default unit is Hz.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<freq2> Real

Refer to

Remarks

——

0.1× screen sample rate

Remarks

When the filter type is set to BPASs (Band Pass Filter) or BSTop (Band Stop Filter), you

need to set two cut-off frequencies. Run the :MATH<n>:FILTer:W1 command to set

the cut-off frequency 1, and run this command to set the cut-off frequency 2. At this time, the range of <freq2> is from (0.01× screen sample rate) to (0.1× screen sample rate), at a step of (0.005× screen sample rate). Wherein, screen sample rate =

100/horizontal time base

Note:

The cut-off frequency 2 must be greater than the cut-off frequency 1.

Return

Format

The query returns the current cut-off frequency 2 in scientific notation.

Example

:MATH1:FILTer:W2 1500000 /*Sets the cut-off frequency 2 of Band Pass Filter to

1.5 MHz.*/

:MATH1:FILTer:W2? /*The query returns 1.500000E+6.*/

:MATH<n>:SENSitivity

Syntax

:MATH<n>:SENSitivity <sens>

:MATH<n>:SENSitivity?

Description

Sets or queries the sensitivity of the logic operation. The default unit is div.

Parameter

Name Type Range Default

<n> Discrete {1|2|3|4}

<sens> Real 100 mdiv to 1 div

——

300 mdiv

Return

Format

The query returns the sensitivity of the logic operation in scientific notation.

Example

:MATH1:SENSitivity 0.2 /*Sets the sensitivity of the logic operation to 0.2 div.*/

2-110 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:MATH1:SENSitivity? /*The query returns 2.000000E-1.*/

:MATH<n>:DISTance

Syntax

:MATH<n>:DISTance <dist>

:MATH<n>:DISTance?

Description

Sets or queries the smoothing window width of differential operation.

Parameter

Name Type Range Default

<n>

<dist>

Discrete {1|2|3|4}

Integer 5 to 10000

——

5

Return

Format

The query returns an integer ranging from 5 to 10000.

Example

:MATH1:DISTance 20/*Sets the smoothing window width of differential operation to 20.*/

:MATH1:DISTance? /*The query returns 20.*/

:MATH<n>:THReshold1

Syntax

:MATH<n>:THReshold1 <thre>

:MATH<n>:THReshold1?

Description

Sets or queries threshold level of Analog Channel 1 in the logic operation. The default unit is V.

Parameter

Name Type Range Default

<n>

<thre>

Discrete {1|2|3|4}

Real

(-4 × VerticalScale - VerticalOffset) to

(4 × VerticalScale - VerticalOffset)

——

0 V

Description

This command is only available in the following conditions: logic operations (A&&B,

A||B, A^B, and !A).

Return

Format

VerticalScale indicates the vertical scale of Analog Channel 1.

VerticalOffset indicates the vertical offset of Analog Channel 1.

The step value is VerticalScale/10.

The query returns the threshold level of Analog Channel 1 in scientific notation.

Example

:MATH1:THReshold1 0.8 /*Sets the threshold level of Analog Channel 1 in logic operation to 800 mV.*/

:MATH1:THReshold1? /*The query returns 8.000000E-1.*/

MSO5000-E Programming Guide 2-111

RIGOL

Chapter 2 Command System

:MATH<n>:THReshold2

Syntax

:MATH<n>:THReshold2 <thre>

:MATH<n>:THReshold2?

Description

Sets or queries threshold level of Analog Channel 2 in the logic operation. The default unit is V.

Parameter

Name Type Range Default

<n>

<thre>

Discrete {1|2|3|4}

Real

(-4 × VerticalScale - VerticalOffset) to

(4 × VerticalScale - VerticalOffset)

——

0 V

Description

This command is only available in the following conditions: logic operations (A&&B,

A||B, A^B, and !A).

VerticalScale indicates the vertical scale of Analog Channel 2.

VerticalOffset indicates the vertical offset of Analog Channel 2.

The step value is VerticalScale/10.

Return

Format

The query returns the threshold level of Analog Channel 2 in scientific notation.

Example

:MATH1:THReshold2 0.8 /*Sets the threshold level of Analog Channel 2 in logic operation to 800 mV.*/

:MATH1:THReshold2? /*The query returns 8.000000E-1.*/

2-112 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:MEASure Commands

The :MEASure commands are used to set and query the relevant parameters for measurement.

Command List:

:MEASure:SOURce

:MEASure:CLEar

:MEASure:THReshold:SOURce

:MEASure:THReshold:DEFault

:MEASure:MODE

:MEASure:AMSource

:MEASure:SETup:MAX

:MEASure:SETup:MID

:MEASure:SETup:MIN

:MEASure:SETup:PSA

:MEASure:SETup:PSB

:MEASure:SETup:DSA

:MEASure:SETup:DSB

:MEASure:STATistic:DISPlay

:MEASure:STATistic:RESet

:MEASure:STATistic:ITEM

:MEASure:ITEM

:MEASure:AREA

:MEASure:CREGion:CAX

:MEASure:CREGion:CBX

:MEASure:CATegory

:MEASure:SOURce

Syntax

:MEASure:SOURce <sour>

:MEASure:SOURce?

Description

Sets or queries the channel source of the current measurement parameter.

Parameter

Name Type Range Default

<sour> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D

11|D12|D13|D14|D15|CHANnel1|CHANnel2

|MATH1|MATH2|MATH3|MATH4}

CHANnel1

Remarks

Only the currently enabled channels can be selected.

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, MATH1, MATH2, MATH3, or MATH4.

Example

:MEASure:SOURce CHANnel2

MSO5000-E Programming Guide 2-113

RIGOL

Chapter 2 Command System

/*Sets the channel source for the parameter to CHANnel2.*/

:MEASure:SOURce? /*The query returns CHAN2.*/

:MEASure:CLEar

Syntax

:MEASure:CLEar <item>

Description

Clears any one or all of the 10 measurement items that have been turned on.

Parameter Name Type Range Default

<item> Discrete

{ITEM1|ITEM2|ITEM3|ITEM4|ITEM5|ITEM6|I

TEM7|ITEM8|ITEM9|ITEM10|ALL}

——

Remarks

Run the :MEASure:ITEM command to open one of the 41 parameters that is required to

be measured. The 10 measurement items turned on last time are determined by the order in which you turned them on, and they will not be affected if you delete one or multiple measurement items.

Example

:MEASure:CLEar ITEM1 /*Clears a measurement item ITEM1.*/

:MEASure:THReshold:SOURce

Syntax

:MEASure:THReshold:SOURce <source>

Description

Sets the threshold source.

Parameter Name Type Default

<source> Discrete

Range

{CHANnel1|CHANnel2|MATH1|MATH2|MATH

3|MATH4}

CHANnel1

Remarks

Modifying the threshold will affect the measurement results of time, delay, and phase parameters.

Example

:MEASure:THReshold:SOURce CHANnel2 /*Sets the threshold source to CHANnel2.*/

:MEASure:THReshold:DEFault

Syntax

:MEASure:THReshold:DEFault

Description

Sets the threshold level of the analog channel in auto measurement to a default value.

:MEASure:MODE

Syntax

:MEASure:MODE <mode>

:MEASure:MODE?

Description

Sets or queries the measurement mode.

Parameter

Name Type Range

<mode> Discrete {NORMal|PRECision}

Default

NORMal

Remarks

NORMal: executes measurement of up to 1 Mpts.

PRECision: executes measurement of up to 200 Mpts, improving the resolution of measurement results. Note, in this mode, the refresh rate of the waveforms may be reduced.

2-114 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Example

The query returns NORM or PREC.

:MEASure:MODE PRECision /*Sets the measurement mode to PRECision.*/

:MEASure:MODE? /*The query returns PREC.*/

:MEASure:AMSource

Syntax

:MEASure:AMSource <chan>

:MEASure:AMSource?

Description

Sets the source and displays all measurement values of the set source; or queries the channel source(s) of the all measurement function.

Parameter

Name Type Range Default

OFF

Return

Format

<chan> Discrete {CHANnel1|CHANnel2|OFF}

The query returns CHAN1, CHAN2, or OFF.

Example

:MEASure:AMSource CHANnel1 /*Sets the source to CHANnel1.*/

:MEASure:AMSource? /*The query returns CHAN1.*/

:MEASure:SETup:MAX

Syntax

:MEASure:SETup:MAX <value>

:MEASure:SETup:MAX?

Description

Sets or queries the threshold level upper limit of the analog channel in auto measurement.

Parameter

Name Type Range Default

<value> Integer Refer to

Remarks

Remarks

——

When the threshold type is percentage, its range is from 0% to 100%; when the threshold type is absolute, its range is from -100 mV to 100 mV.

Return

Format

When the set upper limit is smaller than the current middle value, a prompt message "set at lower limit" will be displayed, and the middle value will not be modified.

The query returns an integer.

Example

:MEASure:SETup:MAX 95 /*Sets the upper limit of the threshold level to 95%.*/

:MEASure:SETup:MAX? /*The query returns 95.*/

:MEASure:SETup:MID

Syntax

:MEASure:SETup:MID <value>

:MEASure:SETup:MID?

Description

Sets or queries the threshold level middle value of the analog channel in auto measurement.

Parameter

Name Type Range Default

<value> Integer Refer to

Remarks

——

MSO5000-E Programming Guide 2-115

RIGOL

Chapter 2 Command System

Remarks

When the threshold type is percentage, its range is from 0% to 100%; when the threshold type is absolute, its range is from -100 mV to 100 mV.

The set middle value must be smaller than the currently set upper limit and greater than the currently set lower limit.

Return

Format

The query returns an integer.

Example

:MEASure:SETup:MID 89 /*Sets the middle value of the threshold level to 89%.*/

:MEASure:SETup:MID? /*The query returns 89.*/

:MEASure:SETup:MIN

Syntax

:MEASure:SETup:MIN <value>

:MEASure:SETup:MIN?

Description

Sets or queries the threshold level lower limit of the analog channel in auto measurement.

Parameter Name Type Range Default

<value> Integer Refer to

Remarks

——

Description

When the threshold type is percentage, its range is from 0% to 100%; when the threshold type is absolute, its range is from -100 mV to 100 mV.

Return

Format

When the lower limit is greater than the current middle value, a prompt message

"set at upper limit" will be displayed, and the middle value will not be modified.

The query returns an integer.

Example

:MEASure:SETup:MIN 53 /*Sets the lower limit of the threshold level to 53%.*/

:MEASure:SETup:MIN? /*The query returns 53.*/

:MEASure:SETup:PSA

Syntax

:MEASure:SETup:PSA <source>

:MEASure:SETup:PSA?

Description

Sets or queries Source A in the phase or delay measurement.

Parameter Name Type Range

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D

12|D13|D14|D15|CHANnel1|CHANnel2|MATH1|

MATH2|MATH3|MATH4}

Remarks

This command has the same function as the :MEASure:SOURce

and :MEASure:SETup:DSA commands.

Default

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, MATH1, MATH2, MATH3, or MATH4.

Example

:MEASure:SETup:PSA CHANnel1

/*Sets Source A of the phase measurement to CHANnel1.*/

:MEASure:SETup:PSA?

/*The query returns CHAN1.*/

2-116 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:MEASure:SETup:PSB

Syntax

:MEASure:SETup:PSB <source>

:MEASure:SETup:PSB?

Description

Sets or queries Source B in the phase or delay measurement.

Parameter

Name Type Range Default

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D

12|D13|D14|D15|CHANnel1|CHANnel2|MATH1|

MATH2|MATH3|MATH4}

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, MATH1, MATH2, MATH3, or MATH4.

Example

:MEASure:SETup:PSB CHANnel2

/*Sets Source B of the phase measurement to CHANnel2.*/

:MEASure:SETup:PSB?

/*The query returns CHAN2.*/

:MEASure:SETup:DSA

Syntax

:MEASure:SETup:DSA <source>

:MEASure:SETup:DSA?

Description

Sets or queries Source A in the phase or delay measurement.

Parameter Name Type

<source> Discrete

Range

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D

12|D13|D14|D15|CHANnel1|CHANnel2|MATH1|

MATH2|MATH3|MATH4}

Default

CHANnel1

Remarks

This command has the same function as the :MEASure:SOURce

and :MEASure:SETup:PSA command.

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, MATH1, MATH2, MATH3, or MATH4.

Example

:MEASure:SETup:DSA CHANnel1

/*Sets Source A of the delay measurement to CHANnel1.*/

:MEASure:SETup:DSA?

/*The query returns CHAN1.*/

:MEASure:SETup:DSB

Syntax

:MEASure:SETup:DSB <source>

:MEASure:SETup:DSB?

Description

Sets or queries Source B in the phase or delay measurement.

Parameter

Name Type Range

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D

12|D13|D14|D15|CHANnel1|CHANnel2|MATH1|

MATH2|MATH3|MATH4}

Default

CHANnel1

MSO5000-E Programming Guide 2-117

RIGOL

Chapter 2 Command System

Remarks

Return

Format

This command has the same function as the

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, MATH1, MATH2, MATH3, or MATH4.

Example

:MEASure:SETup:DSB CHANnel2

:MEASure:SETup:PSB command.

/*Sets Source B of the delay measurement to CHANnel2.*/

:MEASure:SETup:DSB?

/*The query returns CHAN2.*/

:MEASure:STATistic:DISPlay

Syntax

:MEASure:STATistic:DISPlay <bool>

:MEASure:STATistic:DISPlay?

Description

Enables or disables the statistical function; or queries the status of the statistical function.

Parameter Name

<bool>

Type

Bool

Range

{{1|ON}|{0|OFF}}

Default

0|OFF

Remarks

When the statistical function is enabled, the instrument makes statistics of the measurement results for at most 10 measurement items that are turned on last time and displays the statistical results.

Return

Format

The query returns 1 or 0.

Example

:MEASure:STATistic:DISPlay ON /*Enables the statistical function.*/

:MEASure:STATistic:DISPlay? /*The query returns 1.*/

:MEASure:STATistic:RESet

Syntax

:MEASure:STATistic:RESet

Description

Clears the history statistics data and makes statistics again.

:MEASure:STATistic:ITEM

Syntax

:MEASure:STATistic:ITEM <item>[,<src>[,<src>]]

:MEASure:STATistic:ITEM? <type>,<item>[,<src>[,<src>]]

Description

Enables the statistical function of any waveform parameter of the specified source, or queries the statistical results of any waveform parameter of the specified source.

Parameter

Name Type Range Default

<item> Discrete

{VMAX|VMIN|VPP|VTOP|VBASe|VAMP|VA

VG|VRMS|OVERshoot|PREShoot|MARea|

MPARea|PERiod|FREQuency|RTIMe|FTIM e|PWIDth|NWIDth|PDUTy|NDUTy|TVMax|

TVMin|PSLewrate|NSLewrate|VUPPer|VMI

D|VLOWer|VARiance|PVRMs|PPULses|NP

ULses|PEDGes|NEDGes|RRDelay|RFDelay

|FRDelay|FFDelay|RRPHase|RFPHase|FRP

Hase|FFPHase}

——

2-118 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Remarks

<src>

<type>

Discrete

Discrete

Refer to

Remarks

{MAXimum|MINimum|CURRent|AVERages

|DEViation|CNT}

——

——

The parameter [,<src>[,<src>]] is used to set the source of the parameter under measurement.

If the parameter <item> is set to PERiod, FREQuency, PWIDth, NWIDth, PDUTy,

NDUTy, RRDelay, RFDelay, FRDelay, FFDelay, RRPHase, RFPHase, FRPHase, or

FFPHase, the range of the parameter <src> is any one of the values in

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D12|D13|D14|D15|CHANnel1|C

HANnel2|MATH1|MATH2|MATH3|MATH4}.

If the measurement parameter is a single source, you only need to set one source. If the parameter <src> is omitted, then the source is, by default, the one that you've selected in the last sent command

( :MEASure:SOURce ,

:MEASure:SETup:PSA

, or :MEASure:SETup:DSA command).

If the measurement parameter is a dual channel source, observe the following rules to determine the source that you've selected. That is, if the parameter

<src> is omitted, the first source is, by default, the one that you've selected in

the last sent command ( :MEASure:SOURce ,

:MEASure:SETup:PSA ,

or :MEASure:SETup:DSA command); the second source is, by default, the one that you've selected in the last sent command ( :MEASure:SETup:PSB or :MEASure:SETup:DSB command).

The query returns the statistical results in scientific notation.

Return

Format

Example

:MEASure:STATistic:ITEM VPP,CHANnel2 /*Enables the statistical function of the peak-peak value of CH2.*/

:MEASure:STATistic:ITEM? MAXimum,VPP /*The query returns 9.120000E-1.*/

:MEASure:ITEM

Syntax

:MEASure:ITEM <item>[,<src>[,<src>]]

:MEASure:ITEM? <item>[,<src>[,<src>]]

Description

Measures any waveform parameter of the specified source, or queries the statistical results of any waveform parameter of the specified source.

Parameter

Name

<item>

Type

Discrete

Range

{VMAX|VMIN|VPP|VTOP|VBASe|VAMP|VAVG|

VRMS|OVERshoot|PREShoot|MARea|MPARea

|PERiod|FREQuency|RTIMe|FTIMe|PWIDth|

NWIDth|PDUTy|NDUTy|TVMax|TVMin|PSLew rate|NSLewrate|VUPPer|VMID|VLOWer|VARia nce|PVRMs|PPULses|NPULses|PEDGes|NEDG es|RRDelay|RFDelay|FRDelay|FFDelay|RRPH ase|RFPHase|FRPHase|FFPHase}

Default

——

<src> Discrete Refer to

Remarks

——

Remarks

The parameter [,<src>[,<src>]] is used to set the source of the parameter under measurement.

If the parameter <item> is set to PERiod, FREQuency, PWIDth, NWIDth, PDUTy,

NDUTy, RRDelay, RFDelay, FRDelay, FFDelay, RRPHase, RFPHase, FRPHase, or

MSO5000-E Programming Guide 2-119

RIGOL

Chapter 2 Command System

FFPHase, the range of the parameter <src> is any one of the values in

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D12|D13|D14|D15|CHANnel1|CH

ANnel2|MATH1|MATH2|MATH3|MATH4}.

If the measurement parameter is a single source, you only need to set one source.

If the parameter <src> is omitted, then the source is, by default, the one that you've selected in the last sent command

( :MEASure:SOURce ,

:MEASure:SETup:PSA

, or :MEASure:SETup:DSA command).

If the measurement parameter is a dual channel source, observe the following rules to determine the source that you've selected. That is, if the parameter <src> is omitted, the first source is, by default, the one that you've selected in the last

sent command ( :MEASure:SOURce ,

:MEASure:SETup:PSA ,

or :MEASure:SETup:DSA command); the second source is, by default, the one that you've selected in the last sent command ( :MEASure:SETup:PSB or :MEASure:SETup:DSB command).

Return

Format

The query returns the current measurement value in scientific notation.

Example

:MEASure:ITEM OVERshoot,CHANnel2 /*Enables the overshoot measurement of

CH2.*/

:MEASure:ITEM? OVERshoot,CHANnel2 /*The query returns 8.888889E-3.*/

:MEASure:AREA

Syntax

:MEASure:AREA <area>

:MEASure:AREA?

Description

Sets or queries the type of the measurement range.

Parameter Name Type Range

<area> Discrete {MAIN|ZOOM|CURSor}

Default

MAIN

Remarks

MAIN: indicates that the measurement range is within the main time base region.

ZOOM: indicates that the measurement range is within the zoomed time base region. Note that only when you enable the delayed sweep function first, can

"Zoom" be enabled.

Return

Format

CURSor: when you select it, two cursor lines will be displayed on the screen.

The query returns MAIN, ZOOM, or CURS.

Example

:MEASure:AREA ZOOM /*Sets the type of the measurement range to ZOOM.*/

:MEASure:AREA? /*The query returns ZOOM.*/

:MEASure:CREGion:CAX

Syntax

:MEASure:CREGion:CAX <cax>

:MEASure:CREGion:CAX?

Description

Sets or queries the position of Cursor A when the measurement range is the "cursor region".

Parameter

Name Type Range Default

<cax> Integer 0 to 1,000 600

2-120 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Remarks

The position of the cursor is defined by the pixel coordinate of the screen. The range of the pixel coordinate on the screen horizontally is from 0 to 1,000 (from left to right).

Return

Format

You can run the :MEASure:AREA command to set the measurement range to

"cursor region".

The query returns the position of Cursor A in integer.

Example

:MEASure:CREGion:CAX 100 /*Sets the position of Cursor A to 100.*/

:MEASure:CREGion:CAX? /*The query returns 100.*/

:MEASure:CREGion:CBX

Syntax

:MEASure:CREGion:CBX <cbx>

:MEASure:CREGion:CBX?

Description

Sets or queries the position of Cursor B when the measurement range is the "cursor region".

Parameter

Name

<cbx>

Type

Integer

Range

0 to 1,000

Default

600

Remarks

The position of the cursor is defined by the pixel coordinate of the screen. The range of the pixel coordinate on the screen horizontally is from 0 to 1,000 (from left to right).

You can run the :MEASure:AREA command to set the measurement range to

"cursor region".

The query returns the position of Cursor B in integer.

Return

Format

Example

:MEASure:CREGion:CBX 100 /*Sets the position of Cursor B to 100.*/

:MEASure:CREGion:CBX? /*The query returns 100.*/

:MEASure:CATegory

Syntax

:MEASure:CATegory <val>

:MEASure:CATegory?

Description

Sets or queries the measurement type.

Parameter

Name Type Range

<val> Integer 0 to 2

Remarks

0: horizontal; 1: vertical; 2: other

Return

Format

The query returns an integer ranging from 0 to 2.

Example

:MEASure:CATegory 1 /*Sets the vertical measurement.*/

:MEASure:CATegory? /*The query returns 1.*/

Default

0

MSO5000-E Programming Guide 2-121

RIGOL

Chapter 2 Command System

:POWer Commands

Command List:

:POWer:TYPE

:POWer:CURRentsource

:POWer:VOLTagesource

:POWer:QUALity:FREQreference

:POWer:REFLevel:METHod

:POWer:REFLevel:PERCent:HIGH

:POWer:REFLevel:PERCent:LOW

:POWer:REFLevel:PERCent:MID

:POWer:TYPE

Syntax

:POWer:TYPE <type>

:POWer:TYPE?

Description

Sets or queries the power analysis type.

Parameter Name

<type>

Type

Discrete

Range

{QUALity|RIPPle}

Default

QUALity

Description

QUALity: By analyzing the power quality, you can test the quality of AC input lines.

RIPPle: indicates the ripple quantity of the output DC voltage.

Return

Format

The query returns QUAL or RIPP.

Example

:POWer:TYPE RIPPle /*Sets the power analysis type to RIPPle.*/

:POWer:TYPE? /*The query returns RIPP.*/

:POWer:CURRentsource

Syntax

:POWer:CURRentsource <source>

:POWer:CURRentsource?

Description

Sets or queries the current source of power quality.

Parameter Name Type Range

<source> Discrete {CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns CHAN1 or CHAN2.

Example

:POWer:CURRentsource CHANnel2 /*Sets the current source to CHANnel2.*/

:POWer:CURRentsource? /*The query returns CHAN2.*/

2-122 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:POWer:VOLTagesource

Syntax

:POWer:VOLTagesource <source>

:POWer:VOLTagesource?

Description

Sets or queries the voltage source of power quality.

Parameter

Name Type Range

<source> Discrete {CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns CHAN1 or CHAN2.

Example

:POWer:VOLTagesource CHANnel2 /*Sets the voltage source to CHANnel2.*/

:POWer:VOLTagesource? /*The query returns CHAN2.*/

:POWer:QUALity:FREQreference

Syntax

:POWer:QUALity:FREQreference <source>

:POWer:QUALity:FREQreference?

Description

Sets or queries the frequency reference source of power quality.

Parameter

Name Type Range

<source> Discrete {VOLTage|CURRent}

Default

VOLTage

Return

Format

The query returns VOLT or CURR.

Example

:POWer:QUALity:FREQreference CURRent /*Sets the frequency reference source of power quality to CURRent.*/

:POWer:QUALity:FREQreference? /*The query returns CURR.*/

:POWer:REFLevel:METHod

Syntax

:POWer:REFLevel:METHod <method>

:POWer:REFLevel:METHod?

Description

Sets or queries the reference level type of power quality.

Parameter

Name Type Range

<method> Discrete {ABSolute|PERCent}

Default

PERCent

Return

Format

The query returns ABS or PERC.

Example

:POWer:REFLevel:METHod ABSolute /*Sets the reference level type of power quality to ABSolute.*/

:POWer:REFLevel:METHod? /*The query returns ABS.*/

MSO5000-E Programming Guide 2-123

RIGOL

Chapter 2 Command System

:POWer:REFLevel:PERCent:HIGH

Syntax

:POWer:REFLevel:PERCent:HIGH <value>

:POWer:REFLevel:PERCent:HIGH?

Description

Sets or queries the reference level percentage upper limit of power quality.

Parameter

Name Type Range Default

<value> Integer (median+1) to 100 90

Remarks

upper limit>median>lower limit

Return

Format

The query returns an integer ranging from (median+1) to 100.

Example

:POWer:REFLevel:PERCent:HIGH 20 /*Sets the reference level percentage upper limit of power quality to 20%.*/

:POWer:REFLevel:PERCent:HIGH? /*The query returns 20.*/

:POWer:REFLevel:PERCent:LOW

Syntax

:POWer:REFLevel:PERCent:LOW <value>

:POWer:REFLevel:PERCent:LOW?

Description

Sets or queries the reference level percentage lower limit of power quality.

Parameter

Name Type Range Default

<value> Integer (median-1) to 0 10

Return

Format

The query returns an integer ranging from (median-1) to 0.

Example

:POWer:REFLevel:PERCent:LOW 20 /*Sets the reference level percentage lower limit of power quality to 20%.*/

:POWer:REFLevel:PERCent:LOW? /*The query returns 20.*/

:POWer:REFLevel:PERCent:MID

Syntax

:POWer:REFLevel:PERCent:MID <value>

:POWer:REFLevel:PERCent:MID?

Description

Sets or queries the reference level percentage median of power quality.

Parameter

Name Type Range Default

<value> Integer (upper limit-1) to (lower limit+1) 50

Return

Format

The query returns an integer ranging from (upper limit-1) to (lower limit+1).

Example

:POWer:REFLevel:PERCent:MID 20 /* Sets the reference level percentage median of power quality to 20%.*/

:POWer:REFLevel:PERCent:MID? /*The query returns 20.*/

2-124 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:QUICK Command

The :QUICK command is used to set and query the relevant parameters for shortcut keys.

Command List:

:QUICK:OPERation

:QUICK:OPERation

Syntax

:QUICK:OPERation <type>

:QUICK:OPERation?

Description

Sets or queries the type of the shortcut keys.

Parameter

Name Type Range

<type> Discrete {SIMage|SWAVe|SSETup|AMEasure|SRESet}

Remarks

SIMage: indicates the screen image.

SWAVe: indicates the waveform saving.

SSETup: indicates the setup saving.

AMEasure: indicates all measurement.

SRESet: indicates statistics reset.

Return

Format

The query returns SIM, SWAV, SSET, AME, or SRES.

Example

:QUICK:OPERation SWAVe /*Sets the type of the shortcut key to SWAVe.*/

:QUICK:OPERation? /*The query returns SWAV.*/

Default

SIMage

MSO5000-E Programming Guide 2-125

RIGOL

Chapter 2 Command System

:RECord Commands

Command List:

:RECord:ENABle

:RECord:STARt

:RECord:PLAY

:RECord:CURRent

:RECord:FRAMes

:RECord:ENABle

Syntax

:RECord:ENABle <bool>

:RECord:ENABle?

Description

Enables or disables the waveform recording function; or queries the on/off status of the waveform recording function.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Return

Format

The query returns 1 or 0.

Example

:RECord:ENABle ON /*Enables the waveform recording function.*/

:RECord:ENABle? /*The query returns 1.*/

:RECord:STARt

Syntax

:RECord:STARt <bool>

:RECord:STARt?

Description

Sets to start or stop the waveform recording, or queries whether the waveform recording starts or stops.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}}

Return

Format

The query returns 1 or 0.

Example

:RECord:STARt ON /*Sets to start recording the waveforms.*/

:RECord:STARt? /*The query returns 1.*/

0|OFF

2-126 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:RECord:PLAY

Syntax

:RECord:PLAY <bool>

:RECord:PLAY?

Description

Enables or disables the waveform playing function; or queries the on/off status of the waveform playing function.

Parameter Name Type

<bool> Bool

Range

{{1|ON}|{0|OFF}}

Return

Format

The query returns 1 or 0.

Example

:RECord:PLAY ON /*Sets to play the waveforms.*/

:RECord:PLAY? /*The query returns 1.*/

:RECord:CURRent

Default

0|OFF

Syntax

:RECord:CURRent <value>

:RECord:CURRent?

Description

Sets or queries the current frame in waveform playing.

Parameter

Name Type Range

<value> Integer

1 to the maximum number of frames recorded

Default

The maximum number of frames recorded

Return

Format

The query returns an integer.

Example

:RECord:CURRent 300 /*Sets the current frame for waveform playing to 300.*/

:RECord:CURRent? /*The query returns 300.*/

:RECord:FRAMes

Syntax

:RECord:FRAMes <value>

:RECord:FRAMes?

Description

Sets or queries the number of frames for waveform recording.

Parameter

Name Type Range Default

<value> Integer

1 to the maximum number of frames that can be recorded currently

1,000

Return

Format

The query returns an integer ranging from 1 to the maximum number of frames that can be recorded currently.

Example

:RECord:FRAMes 300 /*Sets the number of recorded frames to 300.*/

:RECord:FRAMes? /*The query returns 300.*/

MSO5000-E Programming Guide 2-127

RIGOL

Chapter 2 Command System

:REFerence Commands

The :REFerence commands are used to set relevant parameters for reference waveforms.

Command List:

:REFerence:DISPlay

:REFerence:SOURce

:REFerence:VSCale

:REFerence:VOFFset

:REFerence:RESet

:REFerence:CURRent

:REFerence:SAVE

:REFerence:COLor

:REFerence:LABel:ENABle

:REFerence:LABel:CONTent

:REFerence:DISPlay

Syntax

:REFerence:DISPlay <bool>

:REFerence:DISPlay?

Description

Turns on or off the REF function; or queries the on/off status of the REF function.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Return

Format

The query returns 1 or 0.

Example

:REFerence:DISPlay ON /*Enables the REF function.*/

:REFerence:DISPlay? /*The query returns 1.*/

:REFerence:SOURce

Syntax

:REFerence:SOURce <ref>,<chan>

:REFerence:SOURce? <ref>

Description

Sets or queries the source of the specified reference channel.

Parameter

Name Type Range

<ref>

<source>

Discrete

Discrete

{1|2|3|4|5|6|7|8|9|10}

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D1

0|D11|D12|D13|D14|D15|CHANnel1|CH

ANnel2|MATH1|MATH2|MATH3|MATH4}

Default

——

CHANnel1

Remarks

Only the currently enabled channel can be selected as the source of the specified reference channel.

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, MATH1, MATH2, MATH3, or MATH4.

2-128 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Example

:REFerence:SOURce 1,CHANnel1 /*Sets the source of the reference channel 1 to

CHANnel1.*/

:REFerence:SOURce? 1 /*The query returns CHAN1.*/

:REFerence:VSCale

Syntax

:REFerence:VSCale <ref>,<scale>

:REFerence:VSCale? <ref>

Description

Sets or queries the vertical scale of the specified reference channel. The unit is the same as that of the current source.

Parameter

Name Type Range Default

<ref> Discrete

<scale> Real

{1|2|3|4|5|6|7|8|9|10}

Related to the probe ratio setting

When the probe ratio is 1X, the value of

<scale> ranges from 1 mV to 10 V.

When the probe ratio is 10X, the value of

<scale> ranges from 10 mV to 100 V.

——

1 V

Remarks

This command is only available when the specified reference channel has saved the reference waveforms.

Return Format

The query returns the vertical scale in scientific notation.

Example

:REFerence:VSCale 1,2 /*Sets the vertical scale of reference channel 1 to 2 V.*/

:REFerence:VSCale? 1 /*The query returns 2.000000E0.*/

:REFerence:VOFFset

Syntax

:REFerence:VOFFset <ref>,<offset>

:REFerence:VOFFset? <ref>

Description

Sets or queries the vertical offset of the specified reference channel. The unit is the same as that of the current source.

Parameter

Name Type Range Default

<ref> Discrete ——

<offset> Real

{1|2|3|4|5|6|7|8|9|10}

(-10 × RefVerticalScale) to (10 ×

RefVerticalScale)

0 V

Remarks

RefVerticalScale indicates the vertical scale of the currently set reference channel.

Return Format

The query returns the vertical position in scientific notation.

Example

:REFerence:VOFFset 1,0.5 /*Sets the vertical offset of reference channel 1 to 500 mV.*/

:REFerence:VOFFset? 1 /*The query returns 5.000000E-1.*/

MSO5000-E Programming Guide 2-129

RIGOL

Chapter 2 Command System

:REFerence:RESet

Syntax

:REFerence:RESet <ref>

Description

Resets the vertical scale and vertical offset of the specified reference channel to the defaults.

Parameter

Name Type Range Default

<ref>

:REFerence:CURRent

Discrete {1|2|3|4|5|6|7|8|9|10} ——

Syntax

:REFerence:CURRent <ref>

Description

Selects the specified reference channel.

Parameter Name Type Range

<ref> Discrete {1|2|3|4|5|6|7|8|9|10}

Default

1

Remarks

Only the currently enabled channel can be selected as the current reference channel.

:REFerence:SAVE

Syntax

:REFerence:SAVE <ref>

Description

Saves the waveform of the specified reference channel to the internal memory as the reference waveform.

Parameter

Name Type Range Default

—— <ref>

:REFerence:COLor

Discrete {1|2|3|4|5|6|7|8|9|10}

Syntax

:REFerence:COLor <ref>,<color>

:REFerence:COLor? <ref>

Description

Sets or queries the display color of the specified reference channel.

Parameter Name

<ref>

Type

Discrete

Range

{1|2|3|4|5|6|7|8|9|10}

Default

——

<color> Discrete {GRAY|GREen|BLUE|RED|ORANge} ——

Return Format

The query returns GRAY, GRE, BLUE, RED, or ORAN.

Example

:REFerence:COLor 1,GREen /*Sets the display color of the reference channel 1 to

GREen.*/

:REFerence:COLor? 1 /*The query returns GRE.*/

2-130 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:REFerence:LABel:ENABle

Syntax

:REFerence:LABel:ENABle <bool>

:REFerence:LABel:ENABle?

Description

Enables or disables the display of all the labels; or queries the on/off display of all the labels.

Parameter Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Return Format

The query returns 1 or 0.

Example

:REFerence:LABel:ENABle ON /*Enables the display of all the labels.*/

:REFerence:LABel:ENABle? /*The query returns 1.*/

:REFerence:LABel:CONTent

Syntax

:REFerence:LABel:CONTent <ref>,<str>

:REFerence:LABel:CONTent? <ref>

Description

Sets or queries the label of the specified reference channel.

Parameter Name

<ref>

<str>

Type

Discrete

ASCII

String

Range

{1|2|3|4|5|6|7|8|9|10}

The string can contain English letters and numbers, as well as some symbols.

Default

——

——

Return Format

The query returns the label of the specified reference channel in strings.

Example

:REFerence:LABel:CONTent 1,REF1 /*Sets the label of reference channel 1 to

REF1.*/

:REFerence:LABel:CONTent? 1 /*The query returns REF1.*/

MSO5000-E Programming Guide 2-131

RIGOL

Chapter 2 Command System

:SAVE and :LOAD Commands

Command List:

:SAVE:CSV

:SAVE:CSV:LENGth

:SAVE:CSV:CHANnel

:SAVE:IMAGe

:SAVE:IMAGe:TYPE

:SAVE:IMAGe:INVert

:SAVE:IMAGe:COLor

:SAVE:SETup

:SAVE:WAVeform

:SAVE:STATus?

:LOAD:SETup

:SAVE:CSV

Syntax

:SAVE:CSV <path>

Description

Saves the waveform data displayed on the screen to the internal or external memory in

"*.csv" format.

Parameter

Name Type Range Default

<path> ASCII String Refer to

Remarks

——

Remarks

<path> includes the file storage location and the filename with a suffix. If the specified storage location already contains a file with the same filename, the original file will be overwritten.

The stored "*.csv" file can be opened and edited in Excel.

Example

:SAVE:CSV D:\123.csv /*Stores the waveform data displayed on the screen into the external memory Disk D, with the filename 123.csv.*/

:SAVE:CSV:LENGth

Syntax

:SAVE:CSV:LENGth <len>

:SAVE:CSV:LENGth?

Description

Sets or queries the data length type in saving the "*.csv" file.

Parameter

Name Type Range

<len> Discrete {DISPlay|MAXimum}

Default

DISPlay

Remarks

DISPlay: only stores the points within the screen region, i.g. 1 kpts to 1 Mpts.

MAXimum: stores all the points in the internal memory (equal to the current memory depth).

Return

Format

The query returns DISP or MAX.

2-132 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Example

:SAVE:CSV:LENGth MAXimum /*Sets the data length type to MAXimum.*/

:SAVE:CSV:LENGth? /*The query returns MAX.*/

:SAVE:CSV:CHANnel

Syntax

:SAVE:CSV:CHANnel <channel>,<bool>

:SAVE:CSV:CHANnel? <channel>

Description

Sets or queries the on/off status of the storage channel.

Parameter Name Type Range

<channel> Discrete {CHANnel1|CHANnel2|POD1|POD2}

<bool> Bool {{1|ON}|{0|OFF}}

Default

CHANnel1

0|OFF

Return

Format

The query returns 1 or 0.

Example

:SAVE:CSV:CHANnel CHANnel2,ON /*Enables the storage channel Channel 2.*/

:SAVE:CSV:CHANnel? CHANnel2 /*The query returns 1.*/

:SAVE:IMAGe

Syntax

:SAVE:IMAGe <path>

Description

Stores the contents displayed on the screen into the internal or external memory in image format.

Parameter Name

<path>

Type Range

ASCII String Refer to

Remarks

Default

——

Remarks

<path> includes the file storage location and the filename with a suffix. The suffix of the filename can be .bmp, .png, .jpg, or .tif. If the specified storage location already contains a file with the same filename, the original file will be overwritten.

Example

:SAVE:IMAGe D:\123.png /*Stores the contents displayed on the screen into the external memory Disk D, with the filename 123.png*/

:SAVE:IMAGe:TYPE

Syntax

:SAVE:IMAGe:TYPE <type>

:SAVE:IMAGe:TYPE?

Description

Sets or queries in what format is the image saved.

Parameter

Name Type Range Default

<type> Discrete {BMP24|JPEG|PNG|TIFF} PNG

Return

Format

The query returns BMP24, JPEG, PNG, or TIFF.

Example

:SAVE:IMAGe:TYPE JPEG /*Sets the image storage format to JPEG.*/

:SAVE:IMAGe:TYPE? /*The query returns JPEG.*/

MSO5000-E Programming Guide 2-133

RIGOL

Chapter 2 Command System

:SAVE:IMAGe:INVert

Syntax

:SAVE:IMAGe:INVert <bool>

:SAVE:IMAGe:INVert?

Description

Enables or disables the invert function when saving the image; or queries whether the invert function is enabled when saving the image.

Parameter Name

<bool>

Type

Bool

Range

{{1|ON}|{0|OFF}}

Default

0|OFF

Return

Format

The query returns 1 or 0.

Example

:SAVE:IMAGe:INVert ON /*Enables the invert function when saving the image.*/

:SAVE:IMAGe:INVert? /*The query returns 1.*/

:SAVE:IMAGe:COLor

Syntax

:SAVE:IMAGe:COLor <bool>

:SAVE:IMAGe:COLor?

Description

Sets the image color for image saving to Color or Gray; or queries image color for image saving.

Parameter

Name Type Range Default

<bool> Bool {COLor|GRAY} COLor

Return

Format

The query returns COL or GRAY.

Example

:SAVE:IMAGe:COLor GRAY /*Sets the image color for image saving to GRAY.*/

:SAVE:IMAGe:COLor? /*The query returns GRAY.*/

:SAVE:SETup

Syntax

:SAVE:SETup <path>

Description

Saves the current setup parameters of the oscilloscope to the internal or external memory as a file.

Parameter

Name Type Range Default

<path> ASCII String Refer to

Remarks

——

Remarks

In the internal storage, if a file already exists in the specified storage location, the original file will be overwritten.

In the external storage, <path> includes the file storage location and the filename with a suffix. If the specified storage location already contains a file with the same filename, the original file will be overwritten.

Example

:SAVE:SETup D:\123.stp /*Stores the current setup parameters of the oscilloscope into the external memory Disk D, with the filename

123.stp.*/

2-134 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:SAVE:WAVeform

Syntax

:SAVE:WAVeform <path>

Description

Saves the waveform data to the internal or external memory as a file.

Parameter

Name Type Range Default

<path> ASCII String Refer to

Remarks

——

Remarks

<path> includes the file storage location and the filename with a suffix. By default, its suffix is in ".bin" format. The filename suffixed with ".csv" and ".wfm" are also supported. If the specified storage location already contains a file with the same filename, the original file will be overwritten.

Example

:SAVE:WAVeform D:\123.wfm /*Saves the waveform file to the external memory

Disk D, with the filename 123.wfm.*/

:SAVE:STATus?

Syntax

:SAVE:STATus?

Description

Queries the saving status of the internal memory or the external USB storage device.

Return

Format

The query returns 0 or 1 (when the saving operation is completed).

:LOAD:SETup

Syntax

:LOAD:SETup <path>

Description

Loads the setup file of the oscilloscope from the specified path.

Parameter

Name Type Range Default

<path> ASCII String Refer to

Remarks

——

Remarks

<path> includes the file storage location and the filename with a suffix. By default, its suffix is in ".stp" format.

Example

:LOAD:SETup D:\123.stp /*Loads the setup file "123.stp" from the external memory

Disk D.*/

MSO5000-E Programming Guide 2-135

RIGOL

Chapter 2 Command System

:SEARch Commands

Command List:

:SEARch:COUNt ?

:SEARch:VALue ?

:SEARch:STATe

:SEARch:MODE

:SEARch:EVENt

:SEARch:EDGE:SLOPe

:SEARch:EDGE:SOURce

:SEARch:EDGE:THReshold

:SEARch:PULSe:POLarity

:SEARch:PULSe:QUALifier

:SEARch:PULSe:SOURce

:SEARch:PULSe:UWIDth

:SEARch:PULSe:LWIDth

:SEARch:PULSe:THReshold

:SEARch:RUNT:POLarity

:SEARch:RUNT:QUALifier

:SEARch:RUNT:SOURce

:SEARch:RUNT:WUPPer

:SEARch:RUNT:WLOWer

:SEARch:RUNT:THReshold1

:SEARch:RUNT:THReshold2

:SEARch:SLOPe:POLarity

:SEARch:SLOPe:QUALifier

:SEARch:SLOPe:SOURce

:SEARch:SLOPe:TUPPer

:SEARch:SLOPE:TLOWer

:SEARch:SLOPE:THReshold1

:SEARch:SLOPE:THReshold2

:SEARch:COUNt?

Syntax

:SEARch:COUNt?

Description

Queries the total number of search events.

Return

Format

The query returns the total number of search events in integer.

2-136 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:SEARch:VALue?

Syntax

:SEARch:VALue? <x>

Description

Queries the time that corresponds to the specified event number.

Parameter

Name Type Range

<x> Integer 0 to 1,000

Default

--

Return

Format

The query returns the time that corresponds to the specified event number in scientific notation.

Example

SEARch:VALue? 1 /*The query returns 1.000000E-2.*/

Syntax

:SEARch:VALue? <x>

Description

Queries the time that corresponds to the specified event number.

Parameter

Name Type Range Default

<x> Integer 0 to 1,000 --

Return

Format

The query returns the time that corresponds to the specified event number in scientific notation.

Example

SEARch:VALue? 1 /*The query returns 1.000000E-2.*/

:SEARch:STATe

Syntax

:SEARch:STATe <bool>

:SEARch:STATe?

Description

Enables or disables the search function; or queries the on/off status of the search function.

Parameter

Name Type Range Default

0|OFF

Return

Format

<bool> Bool

The query returns 1 or 0.

{{1|ON}|{0|OFF}}

Example

:SEARch:STATe ON /*Enables the search function.*/

:SEARch:STATe? /*The query returns 1.*/

:SEARch:MODE

Syntax

:SEARch:MODE <value>

:SEARch:MODE?

Description

Sets the search type.

Parameter

Name

<value>

Type

Bool

Range Default

{EDGE|PULSe|RUNT|SLOPe|RS232|I2C|SPI} EDGE

Remarks

EDGE: selects "Edge" as the search type.

PULSe: selects "Pulse" as the search type.

RUNT: selects "Runt" as the search type.

SLOPe: selects "Slope" as the search type.

MSO5000-E Programming Guide 2-137

RIGOL

Chapter 2 Command System

RS232: selects "RS232" as the search type.

I2C: selects "I2C" as the search type.

SPI: selects "SPI" as the search type.

The query returns EDGE, PULS, RUNT, SLOP, RS232, I2C, or SPI.

Return

Format

Example

:SEARch:MODE PULSe /*Selects the search type to PULSe.*/

:SEARch:MODE? /*The query returns PULS.*/

:SEARch:EVENt

Syntax

:SEARch:EVENt <value>

:SEARch:EVENt?

Description

Sets to navigate a search event.

Parameter

Name Type Range

<value> Integer 0 to (the number of searched events – 1)

Return

Format

The query returns an integer.

Example

:SEARch:EVENt 1 /*Sets to navigate to Search Event 1.*/

:SEARch:EVENt? /*The query returns 1.*/

:SEARch:EDGE:SLOPe

Default

0

Syntax

:SEARch:EDGE:SLOPe <slope>

:SEARch:EDGE:SLOPe?

Description

Sets or queries the edge for the "Edge" search type.

Parameter

Name Type Range

<slope> Discrete {POSitive|NEGative|EITHer}

Remarks

POSitive: indicates the rising edge.

NEGative: indicates the falling edge.

Return

Format

EITHer: indicates the rising or falling edge.

The query returns POS, NEG, or EITH.

Example

:SEARch:EDGE:SLOPe NEGative /*Sets the edge type to NEGative.*/

:SEARch:EDGE:SLOPe? /*The query returns NEG.*/

Default

POSitive

2-138 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:SEARch:EDGE:SOURce

Syntax

:SEARch:EDGE:SOURce <source>

:SEARch:EDGE:SOURce?

Description

Sets or queries the source for the "Edge" search type.

Parameter

Name Type Range Default

<source> Discrete {CHANnel1|CHANnel2} CHANnel1

Return

Format

The query returns CHAN1 or CHAN2.

Example

:SEARch:EDGE:SOURce CHANnel1 /*Sets the source to CHANnel1.*/

:SEARch:EDGE:SOURce? /*The query returns CHAN1.*/

:SEARch:EDGE:THReshold

Syntax

:SEARch:EDGE:THReshold <thre>

:SEARch:EDGE:THReshold?

Description

Sets or queries the threshold for the "Edge" search type.

Parameter Name

<thre>

Type

Real

Range

-500 mV to 500mV

Default

0.000 V

Return

Format

The query returns the threshold for the Edge search type in scientific notation.

Example

:SEARch:EDGE:THReshold 0.01 /*Sets the threshold for Edge search type to 0.01.*/

:SEARch:EDGE:THReshold? /*The query returns 1.000000E-2.*/

Syntax

:SEARch:EDGE:THReshold <thre>

:SEARch:EDGE:THReshold?

Description

Sets or queries the threshold for the "Edge" search type.

Parameter

Name

Return

Format

<thre>

Type

Real

Range

-500 mV to 500mV

Default

0.000 V

The query returns the threshold for the Edge search type in scientific notation.

Example

:SEARch:EDGE:THReshold 0.01 /*Sets the threshold for Edge search type to 0.01.*/

:SEARch:EDGE:THReshold? /*The query returns 1.000000E-2.*/

:SEARch:PULSe:POLarity

Syntax

:SEARch:PULSe:POLarity <polarity>

:SEARch:PULSe:POLarity?

Description

Sets or queries the polarity for "Pulse" search type.

Parameter Name Type Range

<polarity> Discrete {POSitive|NEGative}

Default

POSitive

MSO5000-E Programming Guide 2-139

RIGOL

Chapter 2 Command System

Return

Format

The query returns POS or NEG.

Example

:SEARch:PULSe:POLarity POSitive /*Sets the polarity for "Pulse" search type to

POSitive.*/

:SEARch:PULSe:POLarity? /*The query returns POS.*/

:SEARch:PULSe:QUALifier

Syntax

:SEARch:PULSe:QUALifier <qualifier>

:SEARch:PULSe:QUALifier?

Description

Sets or queries the search condition for "Pulse" search type.

Parameter

Name Type Range

<qualifier> Discrete {GREater|LESS|GLESs}

Default

GREater

Remarks

GREater: the positive/negative pulse width of the input signal is greater than the specified pulse width.

LESS: the positive/negative pulse width of the input signal is smaller than the specified pulse width.

Return

Format

GLESs: the positive/negative pulse width of the input signal is greater than the specified lower limit of pulse width and smaller than the specified upper limit of pulse width.

The query returns GRE, LESS, or GLES.

Example

:SEARch:PULSe:QUALifier LESS /*Sets the search condition for "Pulse" search type to

LESS.*/

:SEARch:PULSe:QUALifier? /*The query returns LESS.*/

:SEARch:PULSe:SOURce

Syntax

:SEARch:PULSe:SOURce <source>

:SEARch:PULSe:SOURce?

Description

Sets or queries the source for "Pulse" search type.

Parameter

Name Type Range

<source> Discrete {CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns CHAN1 or CHAN2.

Example

:SEARch:PULSe:SOURce CHANnel1 /*Sets the source to CHANnel1.*/

:SEARch:PULSe:SOURce? /*The query returns CHAN1.*/

:SEARch:PULSe:UWIDth

Syntax

:SEARch:PULSe:UWIDth <width>

:SEARch:PULSe:UWIDth?

Description

Sets or queries the pulse upper limit for "Pulse" search type.

2-140 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Parameter

Name

<width>

Type

Real

Range

800 ps to 10 s

Default

2 us

Return

Format

The query returns the pulse upper limit in scientific notation.

Example

:SEARch:PULSe:UWIDth 1 /*Sets the pulse upper limit to 1.*/

:SEARch:PULSe:UWIDth? /*The query returns 1.000000E0.*/

:SEARch:PULSe:LWIDth

Syntax

:SEARch:PULSe:LWIDth <width>

:SEARch:PULSe:LWIDth?

Description

Sets or queries the pulse lower limit for "Pulse" search type.

Parameter

Name Type Range

<width> Real 800 ps to 10 s

Return

Format

The query returns the pulse lower limit in scientific notation.

Example

:SEARch:PULSe:LWIDth 0.2 /*Sets the pulse lower limit to 0.2.*/

:SEARch:PULSe:LWIDth? /*The query returns 2.000000E-1.*/

:SEARch:PULSe:THReshold

Syntax

:SEARch:PULSe:THReshold <thre>

:SEARch:PULSe:THReshold?

Description

Sets or queries the threshold for the "Edge" search type.

Parameter

Name Type Range

Default

1 us

Default

Return

Format

<thre> Real -500 mV to 500mV 0.000 V

The query returns the threshold for the Edge search type in scientific notation.

Example

:SEARch:EDGE:THReshold 0.01 /*Sets the threshold for Edge search type to 0.01.*/

:SEARch:EDGE:THReshold? /*The query returns 1.000000E-2.*/

:SEARch:RUNT:POLarity

Syntax

:SEARch:RUNT:POLarity <polarity>

:SEARch:RUNT:POLarity?

Description

Sets or queries the polarity for "Runt" search type.

Parameter

Name Type

<polarity> Discrete

Range

{POSitive|NEGative}

Default

POSitive

Return

Format

The query returns POS or NEG.

Example

:SEARch:RUNT:POLarity NEGative /*Sets the polarity of "Runt" search type to

NEGative.*/

:SEARch:RUNT:POLarity? /*The query returns NEG.*/

MSO5000-E Programming Guide 2-141

RIGOL

Chapter 2 Command System

:SEARch:RUNT:QUALifier

Syntax

:SEARch:RUNT:QUALifier <qualifier>

:SEARch:RUNT:QUALifier?

Description

Sets or queries the search condition for "Runt" search type.

Parameter

Name Type Range

<qualifier> Discrete {NONE|GREater|LESS|GLESs}

Default

NONE

Remarks

NONE: indicates not setting the trigger condition of Runt trigger.

GREater: triggers when the runt pulse width is greater than the lower limit of pulse width.

LESS: triggers when the runt pulse width is smaller than the upper limit of pulse width.

GLESs: triggers when the runt pulse width is greater than the lower limit and smaller than the upper limit of pulse width. Note: The lower limit of the pulse width must be smaller than the upper limit.

Return

Format

The query returns NONE, GRE, LESS, or GLES.

Example

:SEARch:RUNT:QUALifier LESS /*Sets the search condition for "Runt" search type to

LESS.*/

:SEARch:RUNT:QUALifier? /*The query returns LESS.*/

:SEARch:RUNT:SOURce

Syntax

:SEARch:RUNT:SOURce <source>

:SEARch:RUNT:SOURce?

Description

Sets or queries the source for "Runt" search type.

Parameter

Name Type Range

<source> Discrete {CHANnel1|CHANnel2}

Return

Format

The query returns CHAN1 or CHAN2.

Example

:SEARch:RUNT:SOURce CHANnel1 /*Sets the source to CHANnel1.*/

:SEARch:RUNT:SOURce? /*The query returns CHAN1.*/

:SEARch:RUNT:WUPPer

Syntax

:SEARch:RUNT:WUPPer <width>

:SEARch:RUNT:WUPPer?

Description

Sets or queries the pulse upper limit for "Runt" search type.

Parameter

Name Type Range

<width> Real 800 ps to 10 s

Return

Format

The query returns the runt upper limit in scientific notation.

Example

:SEARch:RUNT:WUPPer 1 /*Sets the runt upper limit to 1.*/

:SEARch:RUNT:WUPPer? /*The query returns 1.000000E0.*/

Default

CHANnel1

Default

2 us

2-142 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:SEARch:RUNT:WLOWer

Syntax

:SEARch:RUNT:WLOWer <width>

:SEARch:RUNT:WLOWer?

Description

Sets or queries the pulse lower limit for "Runt" search type.

Parameter

Name Type Range

<width> Real 800 ps to 10 s

Return

Format

The query returns the runt lower limit in scientific notation.

Example

:SEARch:RUNT:WLOWer 1 /*Sets the runt lower limit to 1.*/

:SEARch:RUNT:WLOWer? /*The query returns 1.000000E0.*/

:SEARch:RUNT:THReshold1

Default

8 ns

Syntax

:SEARch:RUNT:THReshold1 <thre>

:SEARch:RUNT:THReshold1?

Description

Sets or queries Threshold A for the "Runt" search type.

Parameter

Name Type Range

<thre> Real -500 mV to 500mV

Default

0.000 V

Return

Format

The query returns Threshold A for the Runt search type in scientific notation.

Example

:SEARch:RUNT:THReshold1 0.01 /*Sets Threshold A for Runt search type to 0.01.*/

:SEARch:RUNT:THReshold1? /*The query returns 1.000000E-2.*/

:SEARch:RUNT:THReshold2

Syntax

:SEARch:RUNT:THReshold2 <thre>

:SEARch:RUNT:THReshold2?

Description

Sets or queries Threshold B for the "Runt" search type.

Parameter

Name Type Range Default

Return

Format

<thre> Real -500 mV to 500mV 0.000 V

The query returns Threshold B for the Runt search type in scientific notation.

Example

:SEARch:RUNT:THReshold1 0.01 /*Sets Threshold B for Runt search type to 0.01.*/

:SEARch:RUNT:THReshold1? /*The query returns 1.000000E-2.*/

MSO5000-E Programming Guide 2-143

RIGOL

Chapter 2 Command System

:SEARch:SLOPe:POLarity

Syntax

:SEARch:SLOPe:POLarity <polarity>

:SEARch:SLOPe:POLarity?

Description

Sets or queries the edge type for "Slope" search type.

Parameter

Name Type Range

<polarity> Discrete {POSitive|NEGative}

Default

POSitive

Return

Format

The query returns POS or NEG.

Example

:SEARch:SLOPe:POLarity NEGative /*Sets the edge type of "Slope" search type to

NEGative.*/

:SEARch:SLOPe:POLarity? /*The query returns NEG.*/

:SEARch:SLOPe:QUALifier

Syntax

:SEARch:SLOPe:QUALifier <qualifier>

:SEARch:SLOPe:QUALifier?

Description

Sets or queries the search condition for "Slope" search type.

Parameter

Name Type Range

<qualifier> Discrete {GREater|LESS|GLESs}

Default

GREater

Remarks

GREater: the positive slope time of the input signal is greater than the specified time.

LESS: the positive slope time of the input signal is smaller than the specified time.

GLESs: the positive slope time of the input signal is greater than the specified lower limit of time and smaller than the specified upper limit of time.

The query returns GRE, LESS, or GLES.

Return

Format

Example

:SEARch:SLOPe:QUALifier LESS /*Sets the search condition for "Slope" search type to

LESS.*/

:SEARch:SLOPe:QUALifier? /*The query returns LESS.*/

:SEARch:SLOPe:SOURce

Syntax

:SEARch:SLOPe:SOURce <source>

:SEARch:SLOPe:SOURce?

Description

Sets or queries the source for "Slope" search type.

Parameter Name

<source>

Type Range

Discrete {CHANnel1|CHANnel2}

Return

Format

The query returns CHAN1 or CHAN2.

Example

:SEARch:SLOPe:SOURce CHANnel1 /*Sets the source to CHANnel1.*/

:SEARch:SLOPe:SOURce? /*The query returns CHAN1.*/

Default

CHANnel1

2-144 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:SEARch:SLOPe:TUPPer

Syntax

:SEARch:SLOPe:TUPPer <time>

:SEARch:SLOPe:TUPPer?

Description

Sets or queries the time upper limit for "Slope" search type.

Parameter

Name Type Range

<width> Real 800 ps to 10 s

Return

Format

The query returns the time upper limit in scientific notation.

Example

:SEARch:SLOPE:WUPPer 1 /*Sets the time upper limit to 1.*/

:SEARch:SLOPE:WUPPer? /*The query returns 1.000000E0.*/

:SEARch:SLOPE:TLOWer

Default

1.01 us

Syntax

:SEARch:SLOPE:TLOWer <width>

:SEARch:SLOPE:TLOWer?

Description

Sets or queries the time lower limit for "Slope" search type.

Parameter

Name Type Range

<width> Real 800 ps to 10 s

Return

Format

The query returns the time lower limit in scientific notation.

Example

:SEARch:SLOPE:TLOWer 1 /*Sets the time lower limit to 1.*/

:SEARch:SLOPE:TLOWer? /*The query returns 1.000000E0.*/

:SEARch:SLOPE:THReshold1

Default

1 us

Syntax

:SEARch:SLOPE:THReshold1 <thre>

:SEARch:SLOPE:THReshold1?

Description

Sets or queries Threshold A for the "Slope" search type.

Parameter

Name Type Range Default

Return

Format

<thre> Real -500 mV to 500mV 0.000 V

The query returns Threshold A for the Slope search type in scientific notation.

Example

:SEARch:SLOPE:THReshold1 0.01 /*Sets Threshold A for Slope search type to

0.01.*/

:SEARch:SLOPE:THReshold1? /*The query returns 1.000000E-2.*/

MSO5000-E Programming Guide 2-145

RIGOL

Chapter 2 Command System

:SEARch:SLOPE:THReshold2

Syntax

:SEARch:SLOPE:THReshold2 <thre>

:SEARch:SLOPE:THReshold2?

Description

Sets or queries Threshold B for the "Slope" search type.

Parameter

Name Type Range

<thre> Real -500 mV to 500mV

Default

0.000 V

Return

Format

The query returns Threshold B for the Slope search type in scientific notation.

Example

:SEARch:SLOPE:THReshold1 0.01 /*Sets Threshold B for Slope search type to

0.01.*/

:SEARch:SLOPE:THReshold1? /*The query returns 1.000000E-2.*/

2-146 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

[:SOURce[<n>]] Commands

The [:SOURce[<n>]] commands are used to set the relevant parameters of the built-in function/arbitrary waveform generator. The commands are only available for the model installed with the MSO5000-E-AWG option.

Command List:

[:SOURce[<n>]]:FREQuency[:FIXed]

[:SOURce[<n>]]:PHASe[:ADJust]

[:SOURce[<n>]]:PHASe:INITiate

[:SOURce[<n>]]:FUNCtion[:SHAPe]

[:SOURce[<n>]]:FUNCtion:RAMP:SYMMetry

[:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate][:AMPLitude]

[:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate]:OFFSet

[:SOURce[<n>]]:PULSe:DCYCle

[:SOURce[<n>]]:TYPE

[:SOURce[<n>]]:MOD:TYPE

[:SOURce[<n>]]:MOD:AM[:DEPTh]

[:SOURce[<n>]]:MOD:AM:INTernal:FREQuency

[:SOURce[<n>]]:MOD:FM:INTernal:FREQuency

[:SOURce[<n>]]:MOD:AM:INTernal:FUNCtion

[:SOURce[<n>]]:MOD:FM:INTernal:FUNCtion

[:SOURce[<n>]]:MOD:FM[:DEVIation]

[:SOURce[<n>]]:SWEep:TYPE

:SOURce[<n>]:SWEep:STIMe

:SOURce[<n>]:SWEep:BTIMe

[:SOURce[<n>]]:BURSt:TYPE

:SOURce[<n>]:BURSt:CYCLes

:SOURce[<n>]:BURSt:DELay

[:SOURce[<n>]]:APPLy?

[:SOURce[<n>]]:APPLy:NOISe

[:SOURce[<n>]]:APPLy:PULSe

[:SOURce[<n>]]:APPLy:RAMP

[:SOURce[<n>]]:APPLy:SINusoid

[:SOURce[<n>]]:APPLy:SQUare

[:SOURce[<n>]]:APPLy:USER

[:SOURce[<n>]]:OUTPut[<n>][:STATe]

[:SOURce[<n>]]:OUTPut[<n>]:IMPedance

MSO5000-E Programming Guide 2-147

RIGOL

Chapter 2 Command System

[:SOURce[<n>]]:FREQuency[:FIXed]

Syntax

[:SOURce[<n>]]:FREQuency[:FIXed] <frequency>

[:SOURce[<n>]]:FREQuency[:FIXed]?

Description

If modulation is not enabled for the specified function/arbitrary waveform generator channel, this command is used to set or query the output frequency of the specified function/arbitrary waveform generator channel. If modulation is enabled for the specified function/arbitrary waveform generator channel, this command is used to set or query the carrier frequency of the specified function/arbitrary waveform generator channel. By default, the unit is Hz.

Parameter

Name Type Range Default

[<n>]

<frequency>

Discrete {1}

Real

Sine: 100 mHz to 25 MHz

Square: 100 mHz to 15 MHz

Pulse: 100 mHz to 1 MHz

Ramp: 100 mHz to 100 kHz

Arb: 100 mHz to 10 MHz

1

1 kHz

Return

Format

The query returns the frequency value in scientific notation. For example

2.000000E+5.

Example

:FREQuency 1000 /*Sets the output frequency of GI to 1 kHz.*/

:FREQuency? /*The query returns 1.000000E+3.*/

[:SOURce[<n>]]:PHASe[:ADJust]

Syntax

[:SOURce[<n>]]:PHASe[:ADJust] <phase>

[:SOURce[<n>]]:PHASe[:ADJust]?

Description

Sets or queries the start phase of the signal of the specified function/arbitrary waveform generator channel. By default, the unit is °.

Parameter

Name Type Range Default

[<n>]

<phase>

Discrete {1}

Real 0 to 360

1

0

Return

Format

The query returns the start phase in scientific notation.

Example

:PHASe 90 /*Sets the start phase of GI to 90°.*/

:PHASe? /*The query returns 9.000000E+1.*/

[:SOURce[<n>]]:PHASe:INITiate

Syntax

[:SOURce[<n>]]:PHASe:INITiate

Description

Performs the "align phase" operation.

Parameter

Name

[<n>]

Type Range

Discrete {1}

Default

1

Remarks

When you perform the "align phase" operation, the instrument will re-configure the two channels to output according to the preset frequency and phase.

For two signals whose frequencies are the same or in multiple relationship, this operation can align their phases.

2-148 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

[:SOURce[<n>]]:FUNCtion[:SHAPe]

Syntax

[:SOURce[<n>]]:FUNCtion[:SHAPe] <wave>

[:SOURce[<n>]]:FUNCtion[:SHAPe]?

Description

If modulation is not enabled for the specified function/arbitrary waveform generator channel, this command is used to select or query the output signal waveform. If modulation is enabled for the specified function/arbitrary waveform generator channel, this command is used to select or query the modulated carrier waveform. At this time, if you select PULSe, NOISe, or DC, the modulation function is automatically disabled.

Parameter Name Type Range Default

[<n>] Discrete {1} 1

<wave> Discrete

{SINusoid|SQUare|RAMP|PULSe|

NOISe|DC|SINC|EXPRise|EXPFall|

ECG|GAUSs|LORentz|HAVersine|

ARBitrary}

SINusoid

Remarks

The MSO5000-E series provides 7 kinds of built-in waveforms, including Sinc, ExpRise,

ExpFall, ECG, Gauss, Lorentz, and Haversine.

Return

Format

The query returns SIN, SQU, RAMP, PULS, NOIS, DC, SINC, EXPR, EXPF, ECG, GAUS,

LOR, HAV, or ARB.

Example

:FUNCtion SQUare /*Sets the waveforms output from GI to SQUare.*/

:FUNCtion? /*The query returns SQU.*/

[:SOURce[<n>]]:FUNCtion:RAMP:SYMMetry

Syntax

[:SOURce[<n>]]:FUNCtion:RAMP:SYMMetry <val>

[:SOURce[<n>]]:FUNCtion:RAMP:SYMMetry?

Description

Sets or queries the symmetry of the Ramp waveforms output from the specified function/arbitrary waveform generator channel.

Parameter

Name Type Range Default

[<n>]

<val>

Discrete {1}

Real 1 to 100

1

50

Remarks

Symmetry is defined as the percentage that the rising period of the ramp takes up in the whole period.

t Symmetry=t/T*100%

T

The query returns the current symmetry in scientific notation.

Return

Format

Example

:FUNCtion:RAMP:SYMMetry 50 /*Sets the symmetry of Ramp waveform output from GI to 50%.*/

:FUNCtion:RAMP:SYMMetry? /*The query returns 5.000000E+1.*/

MSO5000-E Programming Guide 2-149

RIGOL

Chapter 2 Command System

[:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate][:AMPLitude]

Syntax

[:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate][:AMPLitude] <amplitude>

[:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate][:AMPLitude]?

Description

Sets or queries the amplitude of the signal output from the specified function/arbitrary waveform generator channel. By default, the unit is Vpp.

Parameter Name

[<n>]

Type Range

Discrete {1}

<amplitude> Real

Related to the current output impedance

HighZ: 20 mVpp to 5 Vpp

50Ω: 10 m Vpp to 2.5 Vpp

Default

1

500 mV

Remarks

Send the [:SOURce[<n>]]:OUTPut[<n>]:IMPedance command to set the output

impedance.

Return

Format

The query returns the amplitude value in scientific notation.

Example

:VOLTage 2 /*Sets the output amplitude of GI to 2 V.*/

:VOLTage? /*The query returns 2.000000E0.*/

[:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate]:OFFSet

Syntax

[:SOURce[<n>]]:VOLTage[:LEVel] [:IMMediate]:OFFSet <offset>

[:SOURce[<n>]]:VOLTage[:LEVel] [:IMMediate]:OFFSet?

Description

Sets or queries the DC offset of the signal output from the specified function/arbitrary waveform generator channel. By default, the unit is V

DC

.

Parameter Name Type Range Default

[<n>] 1

<offset>

Discrete {1}

Real

Related to the current output impedance and amplitude

HighZ: (-2.5 V + current amplitude/2) to

(2.5 V - current amplitude/2)

5 0Ω: ( -1.25 V + current amplitude/2) to

(1.25 V - current amplitude/2)

0 V

DC

Remarks

Send the [:SOURce[<n>]]:OUTPut[<n>]:IMPedance command to set the output

impedance.

Send the

[ :SOURce[<n>]]:VOLTage[:LEVel][:IMMediate][:AMPLitude] command to set the

current amplitude.

The query returns the DC offset in scientific notation.

Return

Format

Example

:VOLTage:OFFSet 0.5 /*Sets the DC offset of GI to 500 mV

:VOLTage:OFFSet? /*The query returns 5.000000E-1.*/

DC

.*/

2-150 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

[:SOURce[<n>]]:PULSe:DCYCle

Syntax

[:SOURce[<n>]]:PULSe:DCYCle <percent>

[:SOURce[<n>]]:PULSe:DCYCle?

Description

Sets or queries the duty cycle of the pulse output from the specified function/arbitrary waveform generator channel, i.g. the ratio of high level to a pulse period.

Parameter Name

[<n>]

Type Range

Discrete {1}

Default

1

<percent> Real 10 to 90 20

Remarks

Duty cycle is defined as the percentage that the high level takes up in the whole pulse period.

t

Duty Cycle=t/T*100%

Return

Format

T

The query returns the current duty cycle in scientific notation.

Example

:PULSe:DCYCle 50 /*Sets the duty cycle of GI pulse to 50%.*/

:PULSe:DCYCle? /*The query returns 5.000000E+1.*/

[:SOURce[<n>]]:TYPE

Syntax

[:SOURce[<n>]]:TYPE <type>

[:SOURce[<n>]]:TYPE?

Description

Sets or queries the type of the specified signal generator.

Parameter Name Type Range Default

[<n>] Discrete {1|2}

When omitted, by default, the operations are carried out on GI.

<type> Discrete {NONE|MOD|SWEep|BURst} NONE

Return

Format

The query returns NONE, MOD, SWEep, or BURst.

Example

:TYPE MOD /*Sets the type of GI to MOD.*/

:TYPE? /*The query returns MOD.*/

MSO5000-E Programming Guide 2-151

RIGOL

Chapter 2 Command System

[:SOURce[<n>]]:MOD:TYPE

Syntax

[:SOURce[<n>]]:MOD:TYPE <type>

[:SOURce[<n>]]:MOD:TYPE?

Description

Sets or queries the modulation type of the specified function/arbitrary waveform generator channel.

Parameter Name

[<n>]

Type Range

Discrete {1}

Default

1

<type> Discrete {AM|FM|FSK} AM

Remarks

AM: Amplitude Modulation. The amplitude of the carrier waveform changes with the amplitude of the modulating waveform.

FM: Frequency Modulation. The frequency of the carrier waveform changes with the the modulating waveform.

FSK: Frequency-shift Keying Modulation. Control the carrier frequency changes with the digital signal

.

The Sine, Square, Ramp, Built-in Waveform, or Non-DC signal's arbitrary waveforms can be regarded as carrier waveforms.

You can select Sine, Square, Triangle, or Noise as the modulating waveforms.

The query returns AM, FM, or FSK.

Return

Format

Example

:MOD:TYPE AM /*Sets the modulation type of GI to AM.*/

:MOD:TYPE? /*The query returns AM.*/

[:SOURce[<n>]]:MOD:AM[:DEPTh]

Syntax

[:SOURce[<n>]]:MOD:AM[:DEPTh] <depth>

[:SOURce[<n>]]:MOD:AM[:DEPTh]?

Description

Sets or queries the depth of AM of the specified function/arbitrary waveform generator channel. The modulation depth refers to the strength of the AM and is expressed in percentage.

Parameter

Name Type Range Default

[<n>] Discrete

<depth> Integer

{1} 1

0% to 120% 100%

Remarks

When the modulation depth is 0%, the output amplitude is half of the amplitude of the carrier signal.

When the modulation depth is 100%, the output amplitude is equal to the amplitude of the carrier signal.

When the modulation depth is greater than 100%, envelop distortion will occur.

This should be avoided in actual circuit. At this time, the output of the instrument will not exceed 5 Vpp (the l oad is 50 Ω).

The query returns an integer ranging from 0 to 120.

Return

Format

Example

:MOD:AM 80 /*Sets the AM modulation depth of GI to 80%.*/

:MOD:AM? /*The query returns 80.*/

2-152 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

[:SOURce[<n>]]:MOD:AM:INTernal:FREQuency

[:SOURce[<n>]]:MOD:FM:INTernal:FREQuency

Syntax

[:SOURce[<n>]]:MOD:AM:INTernal:FREQuency <frequency>

[:SOURce[<n>]]:MOD:AM:INTernal:FREQuency?

[:SOURce[<n>]]:MOD:FM:INTernal:FREQuency <frequency>

[:SOURce[<n>]]:MOD:FM:INTernal:FREQuency?

Description

Sets or queries the modulating waveform frequency of AM or FM of the specified function/arbitrary waveform generator channel.

Parameter

Name Type Range Default

[<n>] Discrete {1} 1

Remarks

<frequency> Integer 1 Hz to 50 kHz 1 kHz

You can send the [:SOURce[<n>]]:MOD:TYPE command to set the modulation type.

AM: Amplitude Modulation. The amplitude of the carrier waveform changes with the amplitude of the modulating waveform.

FM: Frequency Modulation. The frequency of the carrier waveform changes with the modulating waveform.

Return

Format

You can select Sine, Square, Triangle, or Noise as the modulating waveforms.

The query returns an integer ranging from 1 Hz to 50 kHz.

Example

:MOD:AM:INTernal:FREQuency 100 /*Sets the modulating waveform frequency of AM of

GI to 100 Hz.*/

:MOD:AM:INTernal:FREQuency? /*The query returns 100.*/

[:SOURce[<n>]]:MOD:AM:INTernal:FUNCtion

[:SOURce[<n>]]:MOD:FM:INTernal:FUNCtion

Syntax

[:SOURce[<n>]]:MOD:AM:INTernal:FUNCtion <wave>

[:SOURce[<n>]]:MOD:AM:INTernal:FUNCtion?

[:SOURce[<n>]]:MOD:FM:INTernal:FUNCtion <wave>

[:SOURce[<n>]]:MOD:FM:INTernal:FUNCtion?

Description

Sets or queries the modulating waveform of AM or FM of the specified function/arbitrary waveform generator channel.

Parameter

Name Type Range Default

[<n>] Discrete {1} 1

<wave> Discrete {SINusoid|SQUare|RAMP|NOISe} SINusoid

Remarks

You can select SINusoid (Sine), SQUare (Square), RAMP (Ramp), or NOISe (Noise) as the modulating waveforms. Send the

[:SOURce[<n>]]:MOD:AM:INTernal:FREQuency or

[:SOURce[<n>]]:MOD:FM:INTernal:FREQuency command to set the frequency of

the selected modulating waveforms.

You can send the [:SOURce[<n>]]:MOD:TYPE command to set the modulation type.

AM: Amplitude Modulation. The amplitude of the carrier waveform changes with the

MSO5000-E Programming Guide 2-153

RIGOL

Chapter 2 Command System

amplitude of the modulating waveform.

FM: Frequency Modulation. The frequency of the carrier waveform changes with the modulating waveform.

Return

Format

The query returns SIN, SQU, RAMP, or NOIS.

Example

:MOD:AM:INTernal:FUNCtion SQUare /*Sets the modulating waveforms of AM of GI to

SQUare.*/

:MOD:AM:INTernal:FUNCtion? /*The query returns SQU.*/

[:SOURce[<n>]]:MOD:FM[:DEVIation]

Syntax

[:SOURce[<n>]]:MOD:FM[:DEVIation] <dev>

[:SOURce[<n>]]:MOD:FM[:DEVIation]?

Description

Sets or queries the frequency offset of FM of the specified function/arbitrary waveform generator channel. By default, the unit is Hz.

Parameter Name Type Range Default

[<n>] Discrete 1

<dev> Real

{1}

0 Hz to the currently set carrier frequency

1 kHz

Remarks

Send the [:SOURce[<n>]]:FREQuency[:FIXed] command to set the carrier

frequency, and send the [:SOURce[<n>]]:MOD:FM:INTernal:FREQuency command

to set the FM frequency.

When the modulating waveform amplitude reaches the maximum value, the frequency of the carrier is increased by "frequency offset". When the modulating waveform amplitude reaches the minimum value, the frequency of the carrier is decreased by "frequency offset".

Return

Format

Only when FM is selected for the specified function/arbitrary waveform generator channel, can the frequency offset of FM be set.

The query returns the frequency offset in scientific notation.

Example

:MOD:FM 100 /*Sets the frequency offset of FM of GI to 100 Hz.*/

:MOD:FM? /*The query returns 1.000000E+2.*/

[:SOURce[<n>]]:SWEep:TYPE

Syntax

[:SOURce[<n>]]:SWEep:TYPE <type>

[:SOURce[<n>]]:SWEep:TYPE?

Description

Sets or queries the sweep type of the specified signal source channel.

Parameter

Name Type Range Default

[<n>] Discrete

<type> Discrete

{1}

{LINear|LOG|STEP}

1

LINear

Remarks

LINear: the frequency of the signal changes linearly.

LOG: the frequency of the signal changes in log form.

STEP: the frequency of the signal changes with ladder-like step.

2-154 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Return

Format

The query returns LIN, LOG, or STEP.

Example

:SWEep:TYPE LOG /*Sets the sweep type of GI to LOG.*/

:SWEep:TYPE? /*The query returns LOG.*/

:SOURce[<n>]:SWEep:STIMe

Syntax

:SOURce[<n>]:SWEep:STIMe <time>

:SOURce[<n>]:SWEep:STIMe?

Description

Sets or queries the sweep time of the specified signal source channel.

Parameter

Name Type Range Default

[<n>] Discrete

<time> Integer

{1}

1 ms to 500 s

1

1 s

Remarks

After modifying the sweep time, the function/arbitrary waveform generator will restart to output from the specified "Start Freq".

Return

Format

The query returns the sweep time in scientific notation.

Example

:SOURce1:SWEep:STIMe 30 /*Sets the sweep time of GI to 30 s.*/

:SOURce1:SWEep:STIMe? /*The query returns 3.000000E+1.*/

:SOURce[<n>]:SWEep:BTIMe

Syntax

:SOURce[<n>]:SWEep:BTIMe <time>

:SOURce[<n>]:SWEep:BTIMe?

Description

Sets or queries the return time of the specified signal source channel.

Parameter

Name Type Range Default

[<n>] Discrete

<time> Integer

{1}

0 s to 500 s

1

0 s

Remarks

Return time indicates the time that the output signal restores from "End Freq" to "Start

Freq" after the Function/Arbitrary Waveform Generator sweeps from "Start Freq" to "End

Freq" and the "End Keep" time expires.

Return

Format

The query returns the return time in scientific notation.

Example

:SOURce1:SWEep:BTIMe 30 /*Sets the return time of GI to 30 s.*/

:SOURce1:SWEep:BTIMe? /*The query returns 3.000000E+1.*/

[:SOURce[<n>]]:BURSt:TYPE

Syntax

[:SOURce[<n>]]:BURSt:TYPE <type>

[:SOURce[<n>]]:BURSt:TYPE?

Description

Sets or queries the burst type of the specified signal source channel.

Parameter

Name Type Range Default

[<n>] Discrete {1} 1

<type> Discrete {NCYCle|INFinite} NCYCle

MSO5000-E Programming Guide 2-155

RIGOL

Chapter 2 Command System

Remarks

NCYCle: outputs the burst waveforms with a specified number of cycles once receiving the trigger signal.

Return

Format

INFinite: sets the number of cycles to Infinite. It outputs continuous waveforms once receiving the trigger signal.

The query returns NCYC or INF.

Example

:BURSt:TYPE INFinite /*Sets the burst type of GI to INFinite.*/

:BURSt:TYPE? /*The query returns INF.*/

:SOURce[<n>]:BURSt:CYCLes

Syntax

:SOURce[<n>]:BURSt:CYCLes <count>

:SOURce[<n>]:BURSt:CYCLes?

Description

Sets or queries the number of burst cycles of the specified signal source channel.

Parameter Name

[<n>]

Type

Discrete

<count> Integer

Range

{1}

1 to 1,000,000

Default

1

1

Remarks

This command is invalid when the burst type is "Infinite".

Return

Format

The query returns an integer ranging from 1 to 1,000,000.

Example

:SOURce1:BURSt:CYCLes 3 /*Sets the burst cycles of GI to 3.*/

:SOURce1:BURSt:CYCLes? /*The query returns 3.*/

:SOURce[<n>]:BURSt:DELay

Syntax

:SOURce[<n>]:BURSt:DELay <time>

:SOURce[<n>]:BURSt:DELay?

Description

Sets or queries the burst delay time of the specified signal source channel.

Parameter

Name Type Range Default

[<n>] Discrete

<time> Integer

{1}

Refer to

Remarks

1

0 s

Remarks

Burst delay indicates the time from when receiving the trigger signal to starting to output N Cycle of bursts or Infinite burst.

Return

Format

The available range of the delay time is related to the burst cycles.

The query returns the burst delay time in scientific notation.

Example

:SOURce1:BURSt:DELay 3 /*Sets the burst delay time of GI to 3 s.*/

:SOURce1:BURSt:DELay? /*The query returns 3.000000E+03s.*/

2-156 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

[:SOURce[<n>]]:APPLy?

Syntax

[:SOURce[<n>]]:APPLy?

Description

Queries the current output configuration of the specified function/arbitrary waveform generator channel.

Parameter

Name Type Range Default

[<n>] Discrete {1} 1

Return

Format

The query returns the current output configuration in "<waveform name>,<frequency>,<amplitude>,<offset>,<start phase>" format. If no corresponding parameter is found, DEF is replaced with the specified parameter value.

Example

:APPLy? /*The query returns SIN,1000.000000,2.000000,0.500000,90.000000.*/

[:SOURce[<n>]]:APPLy:NOISe

[:SOURce[<n>]]:APPLy:PULSe

[:SOURce[<n>]]:APPLy:RAMP

[:SOURce[<n>]]:APPLy:SINusoid

[:SOURce[<n>]]:APPLy:SQUare

[:SOURce[<n>]]:APPLy:USER

Syntax

[:SOURce[<n>]]:APPLy:NOISe [<amp>[,<offset>]]

[:SOURce[<n>]]:APPLy:PULSe [<freq>[,<amp>[,<offset>[,<phase>]]]]

[:SOURce[<n>]]:APPLy:RAMP [<freq>[,<amp>[,<offset>[,<phase>]]]]

[:SOURce[<n>]]:APPLy:SINusoid [<freq>[,<amp>[,<offset>[,<phase>]]]]

[:SOURce[<n>]]:APPLy:SQUare [<freq>[,<amp>[,<offset>[,<phase>]]]]

[:SOURce[<n>]]:APPLy:USER [<freq>[,<amp>[,<offset>[,<phase>]]]]

Description

Configures the specified function/arbitrary waveform generator channel to output the signal with the specified waveforms and parameters.

Parameter Name

[<n>]

Type Range

Discrete {1}

Default

1

<freq>

<amp>

Real

Real

<offset> Real

Sine: 0.1 Hz to 25 MHz

Square: 0.1 Hz to 15 MHz

Pulse: 0.1 Hz to 1 MHz

Ramp: 0.1 Hz to 100 kHz

Arb: 0.1 Hz to 10 MHz

Related to the currently set output impedance

HighZ: 20 mVpp to 5 Vpp

50Ω: 10 mVpp to 2.5 Vpp

Related to the current output impedance and amplitude

HighZ: (-2.5V + current amplitude/2) to (2.5V - current amplitude/2)

50Ω: ( -1.25V + current

1 kHz

500 mV

0 V

DC

MSO5000-E Programming Guide 2-157

RIGOL

Chapter 2 Command System

<phase> Real amplitude/2) to (1.25V - current amplitude/2)

0° to 360° 0°

Remarks

This series of commands are used to select the waveform shape.

NOISe: noise

PULSe: pulse

RAMP: ramp waveform

SINusoid: sine waveform

SQUare: square waveform

ARBitrary: arbitrary waveform

<freq>: sets the frequency of the specified waveform (this parameter is not available for Noise waveform). By default, the unit is Hz.

<amp>: sets the amplitude of the specified waveform. By default, the unit is

Vpp.

<offset>: sets the DC offset of the specified waveform. By default, the unit is

V

DC

.

<phase>: sets the start phase of the specified waveform (this parameter is not available for Noise waveform). By default, the unit is degree (°).

This series of commands allow users to omit one or multiple parameters. When all the parameters are omitted, the commands only configure the specified function/arbitrary waveform generator channel to the specified waveform, without modifying the corresponding parameters.

The four parameters <freq>, <amp>, <offset>, and <phase> should be appeared in sequence. In the command, the parameters are configured in sequence, and you are not allowed to set the latter parameter without setting the former one. For example, you cannot set the parameter <amp> directly by omitting the parameter <freq>.

[:SOURce[<n>]]:OUTPut[<n>][:STATe]

Syntax

[:SOURce[<n>]]:OUTPut[<n>][:STATe] <bool>

[:SOURce[<n>]]:OUTPut[<n>][:STATe]?

Description

Enables or disables the output of the specified function/arbitrary waveform generator channel; or queries the output status of the specified function/arbitrary waveform generator channel.

Parameter

Name Type Range Default

[<n>]

<bool>

Discrete {1}

Bool {{1|ON}|{0|OFF}}

1

0|OFF

Remarks

The [:SOURce[<n>]] and :OUTPut[<n>] are used to specify the channel of the function/arbitrary waveform generator. The former has a high priority over the latter.

That is, when the former is omitted, the latter is used to specify the channel; when the former is not omitted, the former is used to specify the channel.

Return

Format

The query returns 0 or 1.

Example

:OUTPut 1 /*Enables the output of GI.*/

:OUTPut? /*The query returns ON.*/

2-158 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

[:SOURce[<n>]]:OUTPut[<n>]:IMPedance

Syntax

[:SOURce[<n>]]:OUTPut[<n>]:IMPedance <impedance>

[:SOURce[<n>]]:OUTPut[<n>]:IMPedance?

Description

Sets or queries the impedance of the specified function/arbitrary waveform generator channel.

Parameter Name

[<n>]

Type Range

Discrete {1}

Default

1

<impedance> Discrete {OMEG|FIFTy} OMEG

Remarks

OMEG: indicates HighZ; FIFTy: indic ates 50Ω.

Return

Format

The query returns OMEG or FIFT.

Example

:OUTPut:IMPedance FIFTy /*Sets the input impedance of GI to FIFTy.*/

:OUTPut:IMPedance? /*The query returns FIFT.*/

MSO5000-E Programming Guide 2-159

RIGOL

Chapter 2 Command System

:SYSTem Commands

The :SYSTem commands are used to set sound, language, and other relevant system settings.

Command List:

:SYSTem:AOUTput

:SYSTem:AUToscale

:SYSTem:BEEPer

:SYSTem:DATE

:SYSTem:ERRor[:NEXT]?

:SYSTem:GAMount?

:SYSTem:GPIB

:SYSTem:KEY:PRESs

:SYSTem:KEY:INCRease

:SYSTem:KEY:DECRease

:SYSTem:LANGuage

:SYSTem:PON

:SYSTem:OPTion:INSTall

:SYSTem:OPTion:UNINstall

:SYSTem:OPTion:STATus?

:SYSTem:RAMount?

:SYSTem:SETup

:SYSTem:SSAVer:TIME

:SYSTem:TIME

:SYSTem:LOCKed

:SYSTem:MODules?

2-160 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:SYSTem:AOUTput

Syntax

:SYSTem:AOUTput <aux output>

:SYSTem:AOUTput?

Description

Sets or queries the type of the signal output from the

[TRIG OUT]

connector on the rear panel.

Parameter

Name Type Range

<aux output> Discrete {TOUT|PFAil}

Default

TOUT

Remarks

TOUT: after you select this type, the oscilloscope initiates a trigger and then a signal which reflects the current capture rate of the oscilloscope can be output from the

[TRIG OUT]

connector.

Return

Format

PFAil: after you select this type, a pulse signal will be output from the

[TRIG

OUT]

connector once the oscilloscope detects a successful or failed event.

The query returns TOUT or PFA.

Example

:SYSTem:AOUTput PFAil /*Sets the signal type to PFAil.*/

:SYSTem:AOUTput? /*The query returns PFA.*/

:SYSTem:AUToscale

Syntax

:SYSTem:AUToscale <bool>

:SYSTem:AUToscale?

Description

Enables or disables the function of the front-panel

AUTO

key; or queries the on/off status of the

AUTO

key on the front panel.

Parameter

Name

<bool>

Type

Bool

Range

{{1|ON}|{0|OFF}}

Default

1|ON

Remarks

You can send this command or use the menu key to disable the function of the

AUTO

key.

After the function of the

AUTO

key is disabled, you cannot perform the Auto

Scale operation. The :AUToscale command is invalid.

The query returns 1 or 0.

Return

Format

Example

:SYSTem:AUToscale ON /*Enables the function of the front-panel

AUTO

key.*/

:SYSTem:AUToscale? /*The query returns 1.*/

MSO5000-E Programming Guide 2-161

RIGOL

Chapter 2 Command System

:SYSTem:BEEPer

Syntax

:SYSTem:BEEPer <bool>

:SYSTem:BEEPer?

Description

Turns on or off the beeper; or queries the on/off status of the beeper.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}}

Return

Format

The query returns 1 or 0.

Example

:SYSTem:BEEPer ON /*Enables the beeper.*/

:SYSTem:BEEPer? /*The query returns 1.*/

:SYSTem:DATE

0|OFF

Syntax

:SYSTem:DATE <year>,<month>,<day>.

:SYSTem:DATE?

Description

Sets or queries the system date.

Parameter

Name

Return

Format

<year>

Type

Integer

Range

2017 to 2099

Default

——

<month> Integer 1 to 12

——

<day> Integer 1 to 31 (28, 29, or 30)

——

The query returns the system date in strings. The year, month, and date are separated by commas.

Example

:SYSTem:DATE 2017,10,17 /*Sets the system date to 2017/10/17.*/

:SYSTem:DATE? /*The query returns 2017,10,17.*/

:SYSTem:ERRor[:NEXT]?

Syntax

:SYSTem:ERRor[:NEXT]?

Description

Queries and clears the latest error message.

Return

Format

The query is in <Message Number>,<Message Content> format. Wherein, <Message

Number> is an integer and <Message Content> is a double-quoted ASCII string. For example, -113,"Undefined header; command cannot be found".

:SYSTem:GAMount?

Syntax

:SYSTem:GAMount?

Description

Queries the number of grids in the horizontal direction of the screen.

Return

Format

The query returns the number of grids in integer. For this oscilloscope, the query returns a fixed value 10.

2-162 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:SYSTem:GPIB

Syntax

:SYSTem:GPIB <adr>

:SYSTem:GPIB?

Description

Sets or queries the GPIB address.

Parameter

Name Type Range

<adr> Integer 1 to 30

Return

Format

The query returns an integer ranging from 1 to 30.

Example

:SYSTem:GPIB 2 /*Sets the GPIB address to 2.*/

:SYSTem:GPIB? /*The query returns 2.*/

:SYSTem:KEY:PRESs

Default

1

Syntax

:SYSTem:KEY:PRESs <key>

Description

Press down the specified key on the front panel of the oscilloscope.

Parameter

Name Type

<key> Discrete

Range

{CH1|CH2|MATH|REF|LA|DECode|MOFF|F1|F2|F3

|F4|F5|F6|F7|NPRevious|NNEXt|NSTop|VOFFset1|

VOFFset2|VSCale1|VSCale2|HSCale|HPOSition|KF

UNction|TLEVel|TMENu|TMODe|DEFault|CLEar|AU

TO|RSTop|SINGle|QUICk|MEASure|ACQuire|STOR age|CURSor|DISPlay|UTILity|FORCe|GENerator1|

BACK|TOUCh|ZOOM|SEARch}

Default

——

Remarks

The value of the parameter <key> corresponds to the specified key on the front panel.

The definitions for the key are as follows:

CH1|CH2|MATH|REF|LA|DECode|DEFault|CLEar|AUTO|SINGle|QUICk|MEASure|AC

Quire|STORage|CURSor|DISPlay|UTILity|FORCe|BACK|TOUCh|ZOOM|SEARch: press the specified key on the front panel.

MOFF: hides or display the menu at the right side of the screen.

F1|F2|F3|F4|F5|F6|F7: press the 7 menu softkeys at the right side of the screen.

NPRevious|NNEXt|NSTop: press the navigation key.

VOFFset1: press down the CH1 vertical offset knob, i.g. sets the vertical offset of

CH1 to 0.

VOFFset2: press down the CH2 vertical offset knob, i.g. sets the vertical offset of

CH2 to 0.

VSCale1: press down the vertical scale knob of CH1, i.g. switch the vertical scale of

CH1 to "Coarse" or "Fine".

VSCale2: press down the vertical scale knob of CH2, i.g. switch the vertical scale of

CH2 to "Coarse" or "Fine".

GENerator1: press down

Gen

.

HSCale: press down the horizontal time base adjustment knob, i.g. switch the horizontal time base to "Coarse" or "Fine".

HPOSition: press down the horizontal position knob, i.g. set the horizontal position to

0.

MSO5000-E Programming Guide 2-163

RIGOL

Chapter 2 Command System

KFUNction: press down the multifunction knob.

TLEVel: press down the trigger level adjustment knob, i.g. set the trigger level to

50% of the peak-peak value.

TMENu: press the

MENU

key in the trigger control area.

TMODe: press the

MODE

key in the trigger control area.

RSTop: press the

RUN/STOP

key.

Example

:SYSTem:KEY:PRESs CH1/*Press the CH1 key on the front panel of the oscilloscope.*/

:SYSTem:KEY:INCRease

:SYSTem:KEY:DECRease

Syntax

:SYSTem:KEY:INCRease <key>[,<val>]

:SYSTem:KEY:DECRease <key>[,<val>]

Description

Rotate the specified knob clockwise.

Rotate the specified knob counterclockwise.

Parameter

Name Type

<key>

<val>

Discrete

Integer

Range

{VOFFset1|VOFFset2|VSCale1|VSCale2|HSCal e|HPOSition|KFUNction|TLEVel}

Determined by the range of the parameter

<key> and the current setting of the parameter.

Default

——

1

Remarks

The value of the parameter <key> corresponds to the specified knob on the front panel. The definitions for the knob are as follows:

VOFFset1: the CH1 vertical offset knob.

VOFFset2: the CH2 vertical offset knob.

VSCale1: the vertical scale adjustment knob of CH1.

VSCale2: the vertical scale adjustment knob of CH2.

HSCale: the horizontal time base adjustment knob.

HPOSition: the horizontal position adjustment knob.

KFUNction: the multifunction knob.

TLEVel: the trigger level adjustment knob.

The parameter <val> defines the specified rotation times of the knob. By default, it is 1.

Example

:SYSTem:KEY:INCRease VOFFset2 /*Rotates the vertical offset adjustment knob of

CH2 clockwise.*/

:SYSTem:LANGuage

Syntax

:SYSTem:LANGuage <language>

:SYSTem:LANGuage?

Description

Sets or queries the system language.

Parameter

Name Type Range Default

<language> Discrete

{SCHinese|TCHinese|KORean|JAPanese|EN

GLish|GERMan|PORTuguese|POLish|FRENch

|RUSSian|SPAN|THAI|INDonesian }

SCHinese

2-164 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Remarks

The language settings are not affected by factory default settings (send the *RST

command).

Return

Format

The query returns SCH, TCH, KOR, JAP, ENGL, GERM, PORT, POL, FREN, RUSS, SPAN,

THAI, or IND.

Example

:SYSTem:LANGuage ENGLish /*Sets the system language to ENGLish.*/

:SYSTem:LANGuage? /*The query returns ENGL.*/

:SYSTem:PON

Syntax

:SYSTem:PON <power_on>

:SYSTem:PON?

Description

Sets or queries the configuration type recalled by the oscilloscope when it is powered on again after power-off.

Parameter

Name Type Range Default

<power_on> Discrete {LATest|DEFault} DEFault

Return

Format

The query returns LAT or DEF.

Example

:SYSTem:PON LATest /*Sets the oscilloscope to recall Last value after it is powered on again.*/

:SYSTem:PON? /*The query returns LAT.*/

:SYSTem:OPTion:INSTall

Syntax

:SYSTem:OPTion:INSTall <license>

Description

Installs an option.

Parameter

Name Type Range

<license> ASCII String Refer to

Remarks

Default

——

Remarks

To install the option, first purchase the required option to obtain the key, and then use the key to obtain the option license according to the following steps.

Log in to the

RIGOL

official website (www.rigol.com), click

License

Activation

to enter the "Registered product license code" interface.

In the interface, enter the correct key, serial number (press

Utility

System

About

to obtain the serial number of the instrument. You can also open the

"Help" function menu, and then press

About

to obtain the serial number), and the verification code. Click

Generate

to obtain the download link of the option license file. If you need to use the option license file, click to download the file to the specified directory of the USB storage device.

The license is a fixed length of strings. Each instrument has a unique license.

Example

:SYSTem:OPTion:INSTall

MSO5000-E-AWG@A7DEC6C1E10D42EE8E3AF0728C3D272F507E646EB54B9C97E6CC

BA98468A46A863FED814C24D47B8B40C894B1822660B94852E6778392281A20B54B4

E723E3FD

MSO5000-E Programming Guide 2-165

RIGOL

Chapter 2 Command System

:SYSTem:OPTion:UNINstall

Syntax

:SYSTem:OPTion:UNINstall

Description

Uninstalls all the official options.

Remarks

After the option has been uninstalled, you need to restart the instrument.

:SYSTem:OPTion:STATus?

Syntax

:SYSTem:OPTion:STATus? <type>

Description

Queries the status of the options of the oscilloscope.

Parameter

Name

<type>

Type

Discrete

Range

{RL1|BND|COMP|EMBD|AUTO|FLEX|AUDI

O|AERO|AWG|PWR}

Default

——

说明

RL1: memory depth option. Maximum memory depth up to 100 Mpts.

BND: function and application bundle option, MSO5000-COMP, MSO5000-EMBD,

MSO5000-AUTO, MSO5000-FLEX, MSO5000-AUDIO, MSO5000-AERO,

MSO5000-E-AWG, and MSO5000-PWR.

COMP: PC serial bus trigger and analysis option (RS232/UART).

EMBD: embedded serial bus trigger and analysis option (I2C and SPI).

AUTO: auto serial bus trigger and analysis option (CAN and LIN).

FLEX: FlexRay serial bus trigger and analysis option (FlexRay).

AUDIO: audio serial bus trigger and analysis (I2S).

AERO: MIL-STD-1553 serial bus trigger and analysis option (MIL-STD-1553).

AWG: 25 MHz Arbitrary Waveform Generator.

PWR: built-in power analysis option.

Return

Format

The query returns 0 or 1.

0: indicates that the option is not installed.

1: indicates that the official option has been installed.

:SYSTem:RAMount?

Syntax

:SYSTem:RAMount?

Description

Queries the number of analog channels of the current instrument.

Return

Format

The query returns the number of analog channels of the current instrument in integer.

2-166 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:SYSTem:SETup

Syntax

:SYSTem:SETup <setup_data>

:SYSTem:SETup?

Description

Sends or reads the data stream of the system setup file.

Parameter

Name Type Range

<setup_data> ASCII String Refer to

Remarks

Default

——

Remarks

<setup_data> is a binary data block, which consists of the TMC data block header and setup data.

The format of the TMC data block header is

#NX…X

. Wherein,

#

is the start identifier of the data stream; the N-digit data "X...X" (

N≤9

) following the start identifier indicate the length of the data stream (the number of bytes).

For example, #9000002506.

Wherein,

N

is

9

,

000002506

following it represents that the data stream contains 2506 bytes of effective data.

The setup data are expressed in ASCII format.

When sending the command, directly place the data stream after the command string, then complete the whole sending process in one time. When reading the data stream, ensure that there is enough buffer space to receive the data stream; otherwise, errors might occur in reading the program.

:SYSTem:SSAVer:TIME

Syntax

:SYSTem:SSAVer:TIME <time>

:SYSTem:SSAVer:TIME?

Description

Sets or queries the screen saver time. The default unit for the value is minute.

Parameter

Name

<time>

Type

Integer

Range

1 to 999

Default

30

Remarks

When the oscilloscope enters the idle state and holds for a specified time, the screen saver program will be enabled.

Return

Format

The query returns an integer ranging from 1 to 999.

Example

:SYSTem:SSAVer:TIME 10 /*Sets the screen saver time to 10 minutes.*/

:SYSTem:SSAVer:TIME? /*The query returns 10.*/

:SYSTem:TIME

Syntax

:SYSTem:TIME <hours>,<minutes>,<seconds>

:SYSTem:TIME?

Description

Sets or queries the system time.

Parameter

Name

<hours>

Type

Integer

Range

0 to 23

<minutes> Integer

<seconds> Integer

0 to 59

0 to 59

Default

——

——

——

MSO5000-E Programming Guide 2-167

RIGOL

Chapter 2 Command System

Remarks

There is a certain delay between the return time value and the set time value due to the command response time and other factors.

Return

Format

The query returns the system time in strings.

Example

:SYSTem:TIME 16,10,17 /*Sets the system time to 16:10:17.*/

:SYSTem:TIME? /*The query returns 16,10,17*/

:SYSTem:LOCKed

Syntax

:SYSTem:LOCKed <bool>

:SYSTem:LOCKed?

Description

Turns on or off the keyboard lock function; or queries whether the keyboard is locked or unlocked.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Return

Format

The query returns 1 or 0.

Example

:SYSTem:LOCKed ON /*Enables the keyboard lock function.*/

:SYSTem:LOCKed? /*The query returns 1.*/

:SYSTem:MODules?

Syntax

:SYSTem:MODules?

Description

Queries the hardware modules.

Return

Format

The query returns a value such as 1,0,0,0,0. The first figure indicates LA; the second figure indicates DG; and the others are not defined currently. 1 indicates not null, and 0 indicates null.

2-168 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

[:TRACe[<n>]] Command

The [:TRACe[<n>]] commands are used to set the arbitrary waveform parameters of the built-in signal sources. <n> can be 1 which denotes the built-in signal source channel.

Command List:

[:TRACe[<n>]]:DATA:DAC16

[:TRACe[<n>]]:DATA:DAC16

Syntax

[:TRACe[<n>]]:DATA:DAC16 volatile,<flag>,<binary_block_data>

Description

Download binary data block to the volatile memory of the specified signal source.

Parameter

Name

<n>

<flag>

Type Range

Discrete {1}

Discrete {END}

Default

1

--

<binary_block_data> Refer to

Remarks

Remarks

This command consists of two parts: the command string

([:TRACe[<n>]]:DATA:DAC16 volatile,<flag>,) and the binary data

(<binary_block_data>).

<flag> denotes the data transmission status and can only be set to END which denotes the data transmission finishes.

<binary_block_data> denotes the binary data to be downloaded. The data length ranges from 4Bytes (2pt) to 32kBytes (16kpts). <binary_block_data> is a binary data block starts with #. For example,

#516384 binary data

; the number

5

behind

#

denotes that the data length information (

16384

) occupies 5 characters.

16384

denotes the number of bytes of the

binary data

. As each waveform point corresponds to two bytes of binary number (the range is from 0000 to 3FFF; 0000 and 3FFF correspond to the minimum and maximum values of the waveform amplitude respectively), the number of bytes must be an even number.

When END (data transmission complete indicator) is recieved, the instrument switches to arbitrary waveform output automatically.

MSO5000-E Programming Guide 2-169

RIGOL

Chapter 2 Command System

:TIMebase Commands

The :TIMebase commands are used to set the horizontal system. For example, enable the delayed sweep, set the horizontal time base mode, etc.

Command List:

:TIMebase:DELay:ENABle

:TIMebase:DELay:OFFSet

:TIMebase:DELay:SCALe

:TIMebase[:MAIN]:OFFSet

:TIMebase[:MAIN]:SCALe

:TIMebase:MODE

:TIMebase:HREFerence:MODE

:TIMebase:HREFerence:POSition

:TIMebase:VERNier

:TIMebase:DELay:ENABle

Syntax

:TIMebase:DELay:ENABle <bool>

:TIMebase:DELay:ENABle?

Description

Turns on or off the delayed sweep; or queries the on/off status of the delayed sweep.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Remarks

Delayed sweep can be used to enlarge a length of waveform horizontally to view waveform details.

Return

Format

The query returns 1 or 0.

Example

:TIMebase:DELay:ENABle ON /*Enables the delayed sweep.*/

:TIMebase:DELay:ENABle? /*The query returns 1.*/

:TIMebase:DELay:OFFSet

Syntax

:TIMebase:DELay:OFFSet <offset>

:TIMebase:DELay:OFFSet?

Description

Sets or queries the offset of the delayed time base. The default unit is s.

Parameter

Name Type Range Default

<offset> Real

-(LeftTime - DelayRange/2) to (RightTime -

DelayRange/2)

0

Remarks

LeftTime = 5 × MainScale - MainOffset

RightTime = 5 × MainScale + MainOffset

DelayRange = 10 × DelayScale

Wherein, MainScale indicates the current main time base scale, MainOffset indicates the current main time base offset, and DelayScale indicates the current delay time base

2-170 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Return

Format

scale.

The query returns the offset of the delayed time base in scientific notation.

Example

:TIMebase:DELay:OFFSet 0.000002 /*Sets the offset of the delayed time base to 2

μs.*/

:TIMebase:DELay:OFFSet? /*The query returns 2.000000E-6.*/

:TIMebase:DELay:SCALe

Syntax

:TIMebase:DELay:SCALe <scale>

:TIMebase:DELay:SCALe?

Description

Sets or queries the scale of the delayed time base. The default unit is s/div.

Parameter

Name Type Range Default

<scale> Real Refer to

Remarks

500 ns/div

Remarks

The maximum value of the parameter <scale> is the current main time base scale, and the minimum value is 2 ns/div.

The delayed time base scale can only be the maximum value or the values acquired by reducing from the maximum value at 1-2-5 step. If the minimum value calculated from the above formula is not one of the settable values, take the minimum settable value that is greater than the minimum value calculated.

Return Format

The query returns the delayed time base scale in scientific notation.

Example

:TIMebase:DELay:SCALe 0.00000005 /*Sets the delayed time base scale to 50 ns/div.*/

:TIMebase:DELay:SCALe? /*The query returns 5.000000E-8.*/

:TIMebase[:MAIN]:OFFSet

Syntax

:TIMebase[:MAIN]:OFFSet <offset>

:TIMebase[:MAIN]:OFFSet?

Description

Sets or queries the offset of the main time base. The default unit is s.

Parameter

Name

<offset>

Type

Real

Range

Refer to

Remarks

Default

0

Remarks

The range of <offset> is related to the current horizontal time base mode and the operating status of the oscilloscope.

Return Format

The query returns the offset of the main time base in scientific notation.

Example

:TIMebase:MAIN:OFFSet 0.0002 /*Sets the offset of the main time base to 200

μ s.*/

:TIMebase:MAIN:OFFSet? /*The query returns 2.000000E-4.*/

MSO5000-E Programming Guide 2-171

RIGOL

Chapter 2 Command System

:TIMebase[:MAIN]:SCALe

Syntax

:TIMebase[:MAIN]:SCALe <scale>

:TIMebase[:MAIN]:SCALe?

Description

Sets or queries the scale of the main time base.

Parameter

Name Type Range

<scale> Real Refer to

Remarks

Default

1 μs /div

Remarks

The range of <scale> is related to the current horizontal time base mode of the oscilloscope and its model.

YT mode

MSO5152-E: 2 ns to 1,000 s

Roll mode

200 ms to 1,000 s

Return Format

The query returns the main time base scale in scientific notation.

Example

:TIMebase:MAIN:SCALe 0.0002 /*Sets the main time base scale to 200 μs/div.*/

:TIMebase:MAIN:SCALe? /*The query returns 2.000000E-4.*/

:TIMebase:MODE

Syntax

:TIMebase:MODE <mode>

:TIMebase:MODE?

Description

Sets or queries the horizontal time base mode.

Parameter

Name Type Range

<mode> Discrete {MAIN|XY|ROLL}

Default

MAIN

Remarks

MAIN: indicates the YT mode.

XY: indicates the XY mode.

ROLL: indicates the Roll mode.

Return Format

The query returns MAIN, XY, or ROLL.

Example

:TIMebase:MODE XY /*Sets the horizontal time base mode to XY.*/

:TIMebase:MODE? /*The query returns XY.*/

:TIMebase:HREFerence:MODE

Syntax

:TIMebase:HREFerence:MODE <href>

:TIMebase:HREFerence:MODE?

Description

Sets or queries the horizontal reference mode.

Parameter

Name

<href>

Type

Discrete

Range

{CENTer|LB|RB|TRIG|USER}

Default

CENTer

Remarks

CENTer: when the horizontal time base is modified, the waveform displayed will be expanded or compressed horizontally relative to the screen center.

LB: when the horizontal time base is modified, the waveform displayed will be expanded or compressed relative to the left border of the screen.

2-172 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

RB: when the horizontal time base is modified, the waveform displayed will be expanded or compressed relative to the right border of the screen.

TRIG: when the horizontal time base is modified, the waveform displayed will be expanded or compressed horizontally relative to the trigger position.

USER: when the horizontal time base is modified, the waveform displayed will be expanded or compressed horizontally relative to the user-defined reference position.

Return Format

The query returns CENT, LB, RB, TRIG, or USER.

Example

:TIMebase:HREFerence:MODE TRIG /*Sets the horizontal reference mode to trigger position.*/

:TIMebase:HREFerence:MODE? /*The query returns TRIG.*/

:TIMebase:HREFerence:POSition

Syntax

:TIMebase:HREFerence:POSition <pos>

:TIMebase:HREFerence:POSition?

Description

Sets or queries the user-defined reference position when the waveforms are expanded or compressed horizontally.

Parameter

Name Type Range Default

Return

Format

<pos> Discrete -500 to 500

The query returns an integer ranging from -500 to 500.

0

Example

:TIMebase:HREFerence:POSition 60/*Sets the user-defined reference position to 60.*/

:TIMebase:HREFerence:POSition? /*The query returns 60.*/

:TIMebase:VERNier

Syntax

:TIMebase:VERNier <bool>

:TIMebase:VERNier?

Description

Enables or disables the fine adjustment function of the horizontal scale; or queries the on/off status of the fine adjustment function of the horizontal scale.

Parameter

Name

<bool>

Type

Discrete

Range

{{1|ON}|{0|OFF}}

Default

0|OFF

Return

Format

The query returns 1 or 0.

Example

:TIMebase:VERNier ON /*Sets the fine adjustment function of the horizontal scale to ON .*/

:TIMebase:VERNier? /*The query returns 1.*/

MSO5000-E Programming Guide 2-173

RIGOL

:TRIGger Commands

The :TRIGger commands are used to set the trigger system of the oscilloscope.

Command List:

:TRIGger:MODE

:TRIGger:COUPling

:TRIGger:STATus?

:TRIGger:SWEep

:TRIGger:HOLDoff

:TRIGger:NREJect

:TRIGger:EDGE

:TRIGger:PULSe

:TRIGger:SLOPe

:TRIGger:VIDeo

:TRIGger:PATTern

:TRIGger:DURation

:TRIGger:TIMeout

:TRIGger:RUNT

:TRIGger:WINDows

:TRIGger:DELay

:TRIGger:SHOLd

:TRIGger:NEDGe

:TRIGger:RS232 (Option)

:TRIGger:IIC (Option)

:TRIGger:CAN (Option)

:TRIGger:SPI (Option)

:TRIGger:FLEXray (Option)

:TRIGger:IIS (Option)

:TRIGger:LIN (Option)

:TRIGger:M1553 (Option)

Chapter 2 Command System

2-174 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:MODE

Syntax

:TRIGger:MODE <mode>

:TRIGger:MODE?

Description

Selects or queries the trigger type.

Parameter

Name Type Range

<mode> Discrete

{EDGE|PULSe|SLOPe|VIDeo|PATTern|DURation|

TIMeout|RUNT|WINDow|DELay|SETup|NEDGe|

RS232|IIC|SPI|CAN|FLEXray|LIN|IIS|M1553}

Default

EDGE

Return

Format

The query returns EDGE, PULS, SLOP, VID, PATT, DUR, TIM, RUNT, WIND, DEL, SET,

NEDG, RS232, IIC, SPI, CAN, CANF, FLEX, LIN, IIS, or M1553.

Example

:TRIGger:MODE SLOPe /*Selects the Slope trigger.*/

:TRIGger:MODE? /*The query returns SLOP.*/

:TRIGger:COUPling

Syntax

:TRIGger:COUPling <couple>

:TRIGger:COUPling?

Description

Selects or queries the trigger coupling type.

Parameter

Name Type Range Default

<couple> Discrete {AC|DC|LFReject|HFReject} DC

Remarks

This command is only available for the Edge trigger in which the analog channel is selected as the source.

AC: blocks any DC components.

DC: allows DC and AC components to pass the trigger path.

LFReject: blocks the DC components and rejects the low frequency components.

HFReject: rejects the high frequency components.

Return

Format

The query returns AC, DC, LFR, or HFR.

Example

:TRIGger:COUPling LFReject /*Sets the trigger coupling type to low frequency rejection.*/

:TRIGger:COUPling? /*The query returns LFR.*/

:TRIGger:STATus?

Syntax

:TRIGger:STATus?

Description

Queries the current trigger status.

Return

Format

The query returns TD, WAIT, RUN, AUTO, or STOP.

MSO5000-E Programming Guide 2-175

RIGOL

Chapter 2 Command System

:TRIGger:SWEep

Syntax

:TRIGger:SWEep <sweep>

:TRIGger:SWEep?

Description

Sets or queries the trigger mode.

Parameter

Name Type Range

<sweep> Discrete {AUTO|NORMal|SINGle}

Default

AUTO

Remarks

AUTO: Auto trigger. The waveforms are displayed no matter whether the trigger conditions are met.

NORMal: normal trigger. The waveforms are displayed when trigger conditions are met. If the trigger conditions are not met, the oscilloscope displays the original waveforms and waits for another trigger.

SINGle: single trigger. The oscilloscope waits for a trigger, displays the waveforms when the trigger conditions are met, and then stops.

Return

Format

The query returns AUTO, NORM, or SING.

Example

:TRIGger:SWEep SINGle /*Selects the single trigger mode.*/

:TRIGger:SWEep? /*The query returns SING.*/

:TRIGger:HOLDoff

Syntax

:TRIGger:HOLDoff <value>

:TRIGger:HOLDoff?

Description

Sets or queries the trigger holdoff time. The default unit is s.

Parameter

Name Type Range Default

<value> Real

Remarks

8 ns to 10 s 8 ns

Trigger holdoff can be used to stably trigger complex waveforms (such as pulse waveform). Holdoff time indicates the time that the oscillscope waits for re-arming the trigger module. The oscilloscope will not trigger before the holdoff time expires.

Holdoff time is no available for Video trigger, Timeout trigger, Setup&Hold trigger, Nth Edge trigger, RS232 trigger, I2C trigger, SPI trigger, CAN trigger,

FlexRay trigger, LIN trigger, I2S trigger, or 1553B trigger.

Return

Format

The query returns the trigger holdoff time in scientific notation.

Example

:TRIGger:HOLDoff 0.0000002 /*Sets the trigger holdoff time to 200 ns.*/

:TRIGger:HOLDoff? /*The query returns 2.000000E-7.*/

2-176 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:NREJect

Syntax

:TRIGger:NREJect <bool>

:TRIGger:NREJect?

Description

Turns on or off noise rejection; or queries the on/off status of noise rejection.

Parameter

Name Type Range Default

<bool> Bool {{1|ON}|{0|OFF}} 0|OFF

Remarks

Noise rejection reduces the possibility of the Noise trigger.

This command is only available when the analog channel is selected as the source.

Return

Format

The query returns 1 or 0.

Example

:TRIGger:NREJect ON /*Enables the noise rejection function.*/

:TRIGger:NREJect? /*The query returns 1.*/

MSO5000-E Programming Guide 2-177

RIGOL

Chapter 2 Command System

:TRIGger:EDGE

Command List:

:TRIGger:EDGE:SOURce

:TRIGger:EDGE:SLOPe

:TRIGger:EDGE:LEVel

:TRIGger:EDGE:SOURce

Syntax

:TRIGger:EDGE:SOURce <source>

:TRIGger:EDGE:SOURce?

Description

Sets or queries the trigger source of Edge trigger.

Parameter

Name Type

<source> Discrete

Range

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D

11|D12|D13|D14|D15|CHANnel1|CHANnel2

|EXT|EXT5|ACLine}

Default

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, EXT, EXT5, or ACL.

Example

:TRIGger:EDGE:SOURce CHANnel1 /*Sets the trigger source to CHANnel1.*/

:TRIGger:EDGE:SOURce? /*The query returns CHAN1.*/

:TRIGger:EDGE:SLOPe

Syntax

:TRIGger:EDGE:SLOPe <slope>

:TRIGger:EDGE:SLOPe?

Description

Sets or queries the edge type of Edge trigger.

Parameter

Name Type Range Default

<slope> Discrete {POSitive|NEGative|RFALl} POSitive

Remarks

POSitive: indicates the rising edge.

NEGative: indicates the falling edge.

Return

Format

RFALl: indicates the rising or falling edge.

The query returns POS, NEG, or RFAL.

Example

:TRIGger:EDGE:SLOPe NEGative /*Sets the edge type to Falling Edge.*/

:TRIGger:EDGE:SLOPe? /*The query returns NEG.*/

:TRIGger:EDGE:LEVel

Syntax

:TRIGger:EDGE:LEVel <level>

:TRIGger:EDGE:LEVel?

Description

Sets or queries the trigger level of Edge trigger. The unit is the same as that of current amplitude of the selected source.

Parameter

Name Type Range Default

2-178 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Remarks

<level> Real

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

0

For VerticalScale, refer to the :CHANnel<n>:SCALe command. For OFFSet, refer

to the :CHANnel<n>:OFFSet command.

Only when the selected source is an analog channel, a digital channel, or an external trigger, can this setting command is valid.

The query returns the trigger level in scientific notation.

Return

Format

Example

:TRIGger:EDGE:LEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:EDGE:LEVel? /*The query returns 1.600000E-1.*/

MSO5000-E Programming Guide 2-179

RIGOL

Chapter 2 Command System

:TRIGger:PULSe

Command List:

:TRIGger:PULSe:SOURce

:TRIGger:PULSe:WHEN

:TRIGger:PULSe:UWIDth

:TRIGger:PULSe:LWIDth

:TRIGger:PULSe:LEVel

:TRIGger:PULSe:SOURce

Syntax

:TRIGger:PULSe:SOURce <source>

:TRIGger:PULSe:SOURce?

Description

Sets or queries the trigger source of Pulse trigger.

Parameter

Name Type Range Default

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|

D12|D13|D14|D15|CHANnel1|CHANnel2}

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:PULSe:SOURce CHANnel1 /*Sets the trigger source to CHANnel1.*/

:TRIGger:PULSe:SOURce? /*The query returns CHAN1.*/

:TRIGger:PULSe:WHEN

Syntax

:TRIGger:PULSe:WHEN <when>

:TRIGger:PULSe:WHEN?

Description

Sets or queries the trigger condition of Pulse trigger.

Parameter

Name Type Range Default

<when> Discrete {GREater|LESS|GLESs} GREater

Remarks

GREater: triggers when the positive/negative pulse width of the input signal is greater than the specified pulse width.

LESS: triggers when the positive/negative pulse width of the input signal is smaller than the specified pulse width.

GLESs: triggers when the positive/negative pulse width of the input signal is greater than the pulse lower limit and smaller than the specified pulse upper limit.

The query returns GRE, LESS, or GLES.

Return

Format

Example

:TRIGger:PULSe:WHEN LESS /*Sets the trigger condition to LESS.*/

:TRIGger:PULSe:WHEN? /*The query returns LESS.*/

2-180 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:PULSe:UWIDth

Syntax

:TRIGger:PULSe:UWIDth <width>

:TRIGger:PULSe:UWIDth?

Description

Sets or queries the pulse upper limit of the Pulse trigger. The default unit is s.

Parameter

Name

<width>

Type Range

Real Pulse lower limit to 10 s

Default

2 μs

Remarks

The set upper limit cannot be smaller than the lower limit, otherwise, the lower limit will be automatically changed.

Return

Format

The query returns the upper limit of the pulse width in scientific notation.

Example

:TRIGger:PULSe:UWIDth 0.000003 /*Sets the upper limit of the pulse width to 3 μs.*/

:TRIGger:PULSe:UWIDth? /*The query returns 3.000000E-6.*/

:TRIGger:PULSe:LWIDth

Syntax

:TRIGger:PULSe:LWIDth <width>

:TRIGger:PULSe:LWIDth?

Description

Sets or queries the pulse lower limit of the Pulse trigger. The default unit is s.

Parameter

Name Type Range Default

<width> Real 800 ps to pulse upper limit 1 μs

Remarks

The set lower limit must be smaller than the upper limit, otherwise, the upper limit will be automatically changed.

Return

Format

The query returns the lower limit of the pulse width in scientific notation.

Example

:TRIGger:PULSe:LWIDth 0.000003 /*Sets the lower limit of the pulse width to 3 μs.*/

:TRIGger:PULSe:LWIDth? /*The query returns 3.000000E-6.*/

:TRIGger:PULSe:LEVel

Syntax

:TRIGger:PULSe:LEVel <level>

:TRIGger:PULSe:LEVel?

Description

Sets or queries the trigger level of Pulse trigger. The unit is the same as that of the current amplitude.

Parameter Name

<level>

Type Range

Real

Default

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

0

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet,

refer to the :CHANnel<n>:OFFSet command.

Only when the selected source is an analog channel or an external trigger, can this setting command is valid.

Return Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:PULSe:LEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:PULSe:LEVel? /*The query returns 1.600000E-1.*/

MSO5000-E Programming Guide 2-181

RIGOL

Chapter 2 Command System

:TRIGger:SLOPe

Command List:

:TRIGger:SLOPe:SOURce

:TRIGger:SLOPe:WHEN

:TRIGger:SLOPe:TUPPer

:TRIGger:SLOPe:TLOWer

:TRIGger:SLOPe:WINDow

:TRIGger:SLOPe:ALEVel

:TRIGger:SLOPe:BLEVel

:TRIGger:SLOPe:SOURce

Syntax

:TRIGger:SLOPe:SOURce <channel>

:TRIGger:SLOPe:SOURce?

Description

Sets or queries the trigger source of Slope trigger.

Parameter

Name Type Range

<channel> Discrete {CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns CHAN1 or CHAN2.

Example

:TRIGger:SLOPe:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:SLOPe:SOURce? /*The query returns CHAN2.*/

:TRIGger:SLOPe:WHEN

Syntax

:TRIGger:SLOPe:WHEN <when>

:TRIGger:SLOPe:WHEN?

Description

Sets or queries the trigger condition of Slope trigger.

Parameter Name

<when>

Type Range

Discrete {GREater|LESS|GLESs}

Default

GREater

Remarks

GREater: the positive slope time of the input signal is greater than the specified time value.

LESS: the negative slope time of the input signal is smaller than the specified time value.

GLESs: the positive slope time of the input signal is greater than the specified lower time limit and smaller than the specified upper time limit.

Return

Format

The query returns GRE, LESS, or GLES.

Example

:TRIGger:SLOPe:WHEN LESS /*Sets the trigger conditions to LESS*/

:TRIGger:SLOPe:WHEN? /*The query returns LESS.*/

2-182 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:SLOPe:TUPPer

Syntax

:TRIGger:SLOPe:TUPPer <time>

:TRIGger:SLOPe:TUPPer?

Description

Sets or queries the upper time limit value of the Slope trigger. The default unit is s.

Parameter

Name

<time>

Type

Real

Range

Lower limit to 10 s

Default

1 μs

Remarks

The set upper limit cannot be smaller than the lower limit, otherwise, the lower limit will be automatically changed.

Return

Format

The query returns the upper time limit in scientific notation.

Example

:TRIGger:SLOPe:TUPPer 0.000003 /*Sets the upp er time limit to 3 μs.*/

:TRIGger:SLOPe:TUPPer? /*The query returns 3.000000E-6.*/

:TRIGger:SLOPe:TLOWer

Syntax

:TRIGger:SLOPe:TLOWer <time>

:TRIGger:SLOPe:TLOWer?

Description

Sets or queries the lower time limit value of the Slope trigger. The default unit is s.

Parameter

Name Type Range Default

<time> Real 800 ps to upper limit 1 μs

Remarks

The set lower limit must be smaller than the upper limit, otherwise, the upper limit will be automatically changed.

Return

Format

The query returns the lower time limit in scientific notation.

Example

:TRIGger:SLOPe:TLOWer 0.000000020 /*Sets the lower time limit to 20 ns.*/

:TRIGger:SLOPe:TLOWer? /*The query returns 2.000000E-8.*/

:TRIGger:SLOPe:WINDow

Syntax

:TRIGger:SLOPe:WINDow <window>

:TRIGger:SLOPe:WINDow?

Description

Sets or queries the vertical window type of Slope trigger.

Parameter

Name Type Range Default

<window> Discrete {TA|TB|TAB} TA

Remarks

TA: only adjusts the upper limit of the trigger level.

TB: only adjust the lower limit of the trigger level.

TAB: adjusts the upper and lower limits of the trigger level at the same time.

The query returns TA, TB, or TAB.

Return

Format

Example

:TRIGger:SLOPe:WINDow TB /*Sets the vertical window type to TB.*/

:TRIGger:SLOPe:WINDow? /*The query returns TB.*/

MSO5000-E Programming Guide 2-183

RIGOL

Chapter 2 Command System

:TRIGger:SLOPe:ALEVel

Syntax

:TRIGger:SLOPe:ALEVel <level>

:TRIGger:SLOPe:ALEVel?

Description

Sets or queries the upper limit of the trigger level of Slope trigger. The unit is the same as that of the current amplitude.

Parameter

Name

<level>

Type Range

Real

Lower limit of the trigger level to

(5 × VerticalScale - OFFSet)

Default

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the upper limit of the trigger level in scientific notation.

Example

:TRIGger:SLOPe:ALEVel 0.16 /*Sets the upper limit of the trigger level to 160 mV.*/

:TRIGger:SLOPe:ALEVel? /*The query returns 1.600000E-1.*/

:TRIGger:SLOPe:BLEVel

Syntax

:TRIGger:SLOPe:BLEVel <level>

:TRIGger:SLOPe:BLEVel?

Description

Sets or queries the lower limit of the trigger level of Slope trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

<level> Real

(-5 × VerticalScale - OFFSet) to upper limit of the trigger level

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the lower limit of the trigger level in scientific notation.

Example

:TRIGger:SLOPe:BLEVel 0.16 /*Sets the lower limit of the trigger level to 160 mV.*/

:TRIGger:SLOPe:BLEVel? /*The query returns 1.600000E-1.*/

2-184 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:VIDeo

Command List:

:TRIGger:VIDeo:SOURce

:TRIGger:VIDeo:POLarity

:TRIGger:VIDeo:MODE

:TRIGger:VIDeo:LINE

:TRIGger:VIDeo:STANdard

:TRIGger:VIDeo:LEVel

:TRIGger:VIDeo:SOURce

Syntax

:TRIGger:VIDeo:SOURce <channel>

:TRIGger:VIDeo:SOURce?

Description

Sets or queries the trigger source of Video trigger.

Parameter

Name Type Range

<source> Discrete {CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns CHAN1 or CHAN2.

Example

:TRIGger:VIDeo:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:VIDeo:SOURce? /*The query returns CHAN2.*/

:TRIGger:VIDeo:POLarity

Syntax

:TRIGger:VIDeo:POLarity <polarity>

:TRIGger:VIDeo:POLarity?

Description

Sets or queries the video polarity of Video trigger.

Parameter

Name Type Range Default

<polarity> Discrete {POSitive|NEGative} POSitive

Return

Format

The query returns POS or NEG.

Example

:TRIGger:VIDeo:POLarity NEGative /*Sets the video polarity to NEGative.*/

:TRIGger:VIDeo:POLarity? /*The query returns NEG.*/

MSO5000-E Programming Guide 2-185

RIGOL

Chapter 2 Command System

:TRIGger:VIDeo:MODE

Syntax

:TRIGger:VIDeo:MODE <mode>

:TRIGger:VIDeo:MODE?

Description

Sets or queries the sync type of Video trigger.

Parameter

Name Type

<mode> Discrete

Range

{ODDField|EVENfield|LINE|ALINes}

Default

ALINes

Remarks

ODDField: indicates the odd field. The oscilloscope triggers on the rising edge of the first ramp waveform in the odd field. It is available when the video standard is

NTSC or PAL/SECAM.

Return

Format

EVENfield: indicates the even field. The oscilloscope triggers on the rising edge of the first ramp waveform in the even field. It is available when the video standard is

NTSC or PAL/SECAM.

LINE: for NTSC and PAL/SECAM video standards, the oscilloscope triggers on the specified line in the odd or even field. For 480P and 576P video standards, the oscilloscope triggers on the specified line.

ALINes: triggers on all the horizontal sync pulses.

The query returns ODDF, EVEN, LINE, or ALIN.

Example

:TRIGger:VIDeo:MODE ODDField /*Sets the sync type to ODDField.*/

:TRIGger:VIDeo:MODE? /*The query returns ODDF.*/

:TRIGger:VIDeo:LINE

Syntax

:TRIGger:VIDeo:LINE <line>

:TRIGger:VIDeo:LINE?

Description

Sets or queries the sync type of Video trigger to Line.

Parameter

Name Type Range Default

Refer to

Remarks

1 <line> Integer

Remarks

PALSecam: 1 to 625

NTSC: 1 to 525

480P: 1 to 525

576P: 1 to 625

720P60: 1 to 750

720P50: 1 to 750

720P30: 1 to 750

720P25

1 to 750

720P24: 1 to 750

1080P60: 1 to 1125

1080P50: 1 to 1125

1080P30: 1 to 1125

1080P25: 1 to 1125

2-186 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

1080P24: 1 to 1125

1080I60: 1 to 1125

1080I50: 1 to 1125

The query returns an integer.

Return

Format

Example

:TRIGger:VIDeo:LINE 100 /*Sets the line number to 100.*/

:TRIGger:VIDeo:LINE? /*The query returns 100.*/

:TRIGger:VIDeo:STANdard

Syntax

:TRIGger:VIDeo:STANdard <standard>

:TRIGger:VIDeo:STANdard?

Description

Sets or queries the video standard of Video trigger.

Parameter Name Type Range Default

<standard>

Discrete

{PALSecam|NTSC|480P|576P|720P60|720P50|

720P30|720P25|720P24|1080P60|1080P50|10

80P30|1080P25|1080P24|1080I60|1080I50}

NTSC

Remarks

Video

Standard

PALSecam

NTSC

480P

576P

720P60

720P50

720P30

720P25

720P24

1080P60

1080P50

1080P30

1080P25

1080P24

1080I60

1080I50

30

25

24

60

50

60

50

60

50

30

25

24

60

50

Frame Frequency

(Frame)

25

30

Scan Type

Interlaced Scan

Interlaced Scan

Progressive Scan

Progressive Scan

Progressive Scan

Progressive Scan

Progressive Scan

Progressive Scan

Progressive Scan

Progressive Scan

Progressive Scan

Progressive Scan

Progressive Scan

Progressive Scan

Interlaced Scan

Interlaced Scan

TV Scan Line

750

750

1125

1125

1125

1125

1125

1125

1125

625

525

525

625

750

750

750

Return

Format

The query returns PALS, NTSC, 480P, 576P, 720P60, 720P50, 720P30, 720P25, 720P24,

1080P60, 1080P50, 1080P30, 1080P25, 1080P24, 1080I60, or 1080I50.

Example

:TRIGger:VIDeo:STANdard NTSC /*Selects NTSC as the video standard.*/

:TRIGger:VIDeo:STANdard? /*The query returns NTSC.*/

MSO5000-E Programming Guide 2-187

RIGOL

Chapter 2 Command System

:TRIGger:VIDeo:LEVel

Syntax

:TRIGger:VIDeo:LEVel <level>

:TRIGger:VIDeo:LEVel?

Description

Sets or queries the trigger level of Video trigger. The unit is the same as that of the current amplitude.

Parameter

Name

<level>

Type

Real

Range

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Default

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command. For OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:VIDeo:LEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:VIDeo:LEVel? /*The query returns 1.600000E-1.*/

2-188 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:PATTern

Command List:

:TRIGger:PATTern:PATTern

:TRIGger:PATTern:LEVel

:TRIGger:PATTern:SOURce

:TRIGger:PATTern:PATTern

Syntax

:TRIGger:PATTern:PATTern

<pch1>[,<pch2>[,<pla0>[,<pla1>[,<pla2>[,<pla3>[,<pla4>[,<pla5>[,<pla6>[,<p la7>[,<pla8>[,<pla9>[,<pla10>[,<pla11>[,<pla12>[,<pla13>[,<pla14>[,<pla15>]

]]]]]]]]]]]]]]]]

:TRIGger:PATTern:PATTern?

Description

Sets or queries the channel pattern of Pattern trigger.

Parameter

Name Type Range Default

<pch1>

<pch2>

……

Discrete {H|L|X|R|F}

Discrete {H|L|X|R|F}

... ...

X

X

...

<pla15> Discrete {H|L|X|R|F} X

Remarks

The parameter "<pch1> to <pch2>" sets the patterns of the analog channels

"CH1 to CH2". The parameter "<pla0> to <pla15>" sets the patterns of the digital channels "D0 to D15".

In the parameter range, H indicates high level (higher than the threshold level of the channel), L indicates low level (lower than the threshold level of the channel), and X indicates omitting the channel (This channel is not used as a part of the pattern. When all the channels are set to X, the oscilloscope will not trigger.) R indicates rising edge, and F indicates falling edge.

Return

Format

➢ Only one edge (rising or falling) can be specified in the pattern. If one edge item is currently defined and then another edge item is defined in another channel in the pattern, then a prompt message "Invalid input" is displayed. Then, the latter defined edge item will be replaced by X.

The query returns the currently set pattern of all the channels. The channels are separated by commas.

Example

:TRIGger:PATTern:PATTern H,R /*Sets the patterns of "CH1 to CH2" to H,R. Other channel pattern remains unchanged.*/

:TRIGger:PATTern:PATTern?

/*The query returns H,R,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X.*/

:TRIGger:PATTern:LEVel

Syntax

:TRIGger:PATTern:LEVel <source>,<level>

:TRIGger:PATTern:LEVel? <source>

Description

Sets or queries the trigger level of the specified channel in Pattern trigger. The unit is the same as that of the current amplitude.

MSO5000-E Programming Guide 2-189

RIGOL

Chapter 2 Command System

Parameter

Name Type

<source> Discrete

Range

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

CHANnel1

<level> Real

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command. For OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:PATTern:LEVel CHANnel2,0.16 /*Sets the trigger level of CH2 to 160 mV.*/

:TRIGger:PATTern:LEVel? CHANnel2 /*The query returns 1.600000E-1.*/

:TRIGger:PATTern:SOURce

Syntax

:TRIGger:PATTern:SOURce <source>

Description

:TRIGger:PATTern:SOURce?

Sets or queries the trigger source of Pattern trigger.

Parameter

Name Type Range Default

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:PATTern:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:PATTern:SOURce? /*The query returns CHAN2.*/

2-190 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:DURation

Command List:

:TRIGger:DURation:SOURce

:TRIGger:DURation:TYPE

:TRIGger:DURation:WHEN

:TRIGger:DURation:TUPPer

:TRIGger:DURation:TLOWer

:TRIGger:DURation:LEVel

:TRIGger:DURation:SOURce

Syntax

:TRIGger:DURation:SOURce <source>

:TRIGger:DURation:SOURce?

Description

Sets or queries the trigger source of Duration trigger.

Parameter

Name Type Range Default

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|

D12|D13|D14|D15|CHANnel1|CHANnel2}

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:DURation:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:DURation:SOURce? /*The query returns CHAN2.*/

:TRIGger:DURation:TYPE

Syntax

:TRIGger:DURation:TYPE

<pch1>[,<pch2>[,<pla0>[,<pla1>[,<pla2>[,<pla3>[,<pla4>[,<pla5>[,<pla6>[,<p la7>[,<pla8>[,<pla9>[,<pla10>[,<pla11>[,<pla12>[,<pla13>[,<pla14>[,<pla15>]

]]]]]]]]]]]]]]]]

:TRIGger:DURation:TYPE?

Description

Sets or queries the channel pattern of Duration trigger.

Parameter

Name Type

<pch1> Discrete

Range

{H|L|X}

Default

X

<pch2> Discrete

<pla0> Discrete

... ...

<pla15> Discrete

{H|L|X}

{H|L|X}

...

{H|L|X}

X

X

...

X

Remarks

The parameter "<pch1> to <pch2>" sets the patterns of the analog channels

"CH1 to CH2". The parameter "<pla0> to <pla15>" sets the patterns of the digital channels "D0 to D15".

In the parameter range, H indicates high level (higher than the threshold level of the channel), L indicates low level (lower than the threshold level of the channel), and X indicates omitting the channel (This channel is not used as a part of the

MSO5000-E Programming Guide 2-191

RIGOL

Chapter 2 Command System

Return

Format

pattern. When all the channels are set to X, the oscilloscope will not trigger.)

The query returns the currently set pattern of all the channels. The channels are separated by commas.

Example

:TRIGger:DURation:TYPE L,X /*Sets the patterns of "CH1 to CH2" to L,X. Other channel pattern remains unchanged.*/

:TRIGger:DURation:TYPE? /*The query returns

L,X, X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X.*/

:TRIGger:DURation:WHEN

Syntax

:TRIGger:DURation:WHEN <when>

:TRIGger:DURation:WHEN?

Description

Sets or queries the trigger condition of Duration trigger.

Parameter Name Type Range

<when> Discrete {GREater|LESS|GLESs|UNGLess}

Default

GREater

Remarks

GREater: triggers when the set duration time of the pattern is greater than the preset time.

LESS: triggers when the set duration time of the pattern is smaller than the preset time.

Return

Format

GLESs: triggers when the set duration time of the pattern is smaller than the preset upper time limit and greater than the preset lower time limit.

UNGLess: triggers when the set duration time of the pattern is greater than the preset upper time limit and smaller than the preset lower time limit.

The query returns GRE, LESS, GLES, or UNGL.

Example

:TRIGger:DURation:WHEN LESS /*Sets the trigger condition to LESS.*/

:TRIGger:DURation:WHEN? /*The query returns LESS.*/

:TRIGger:DURation:TUPPer

Syntax

:TRIGger:DURation:TUPPer <time>

:TRIGger:DURation:TUPPer?

Description

Sets or queries the upper limit of the duration time of Duration trigger. The default unit is s.

Parameter

Name Type Range Default

<time> Real 800 ps to 10 s 2 μs

Remarks

This command is only available when the trigger conditions are LESS and GLESs.

Return

Format

The query returns the upper limit of the duration time in scientific notation.

Example

:TRIGger:DURation:TUPPer 0.000003 /*Sets the upper limit of the duration time to 3

μs.*/

:TRIGger:DURation:TUPPer? /*The query returns 3.000000E-6.*/

2-192 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:DURation:TLOWer

Syntax

:TRIGger:DURation:TLOWer <time>

:TRIGger:DURation:TLOWer?

Description

Sets or queries the lower limit of the duration time of Duration trigger. The default unit is s.

Parameter

Name

<time>

Type

Real

Range

800 ps to 10 s

Default

1 μs

Remarks

This command is only available when the trigger conditions are GREater and GLESs.

Return

Format

The query returns the lower limit of the duration time in scientific notation.

Example

:TRIGger:DURation:TLOWer 0.000003 /*Sets the lower limit of the duration time to 3

μs.*/

:TRIGger:DURation:TLOWer? /*The query returns 3.000000E-6.*/

:TRIGger:DURation:LEVel

Syntax

:TRIGger:DURation:LEVel <source>,<level>

:TRIGger:DURation:LEVel? <source>

Description

Sets or queries the trigger level of the specified channel in Duration trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

CHANnel1

<level> Real

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command. For OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:DURation:LEVel CHANnel2,0.16 /*Sets the trigger level of CH2 to 160 mV.*/

:TRIGger:DURation:LEVel? CHANnel2 /*The query returns 1.600000E-1.*/

MSO5000-E Programming Guide 2-193

RIGOL

Chapter 2 Command System

:TRIGger:TIMeout

Command List:

:TRIGger:TIMeout:SOURce

:TRIGger:TIMeout:SLOPe

:TRIGger:TIMeout:TIME

:TRIGger:TIMeout:LEVel

:TRIGger:TIMeout:SOURce

Syntax

:TRIGger:TIMeout:SOURce <source>

:TRIGger:TIMeout:SOURce?

Description

Sets or queries the trigger source of Timeout trigger.

Parameter

Name Type Range Default

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|

D9|D10|D11|D12|D13|D14|D15|

CHANnel1|CHANnel2}

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:TIMeout:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:TIMeout:SOURce? /*The query returns CHAN2.*/

:TRIGger:TIMeout:SLOPe

Syntax

:TRIGger:TIMeout:SLOPe <slope>

:TRIGger:TIMeout:SLOPe?

Description

Sets or queries the edge type of Timeout trigger.

Parameter

Name Type Range Default

<slope> Discrete {POSitive|NEGative|RFALl} POSitive

Remarks

POSitive: starts timing when the rising edge of the input signal passes through the trigger level.

NEGative: starts timing when the falling edge of the input signal passes through the trigger level.

RFALl: starts timing when any edge of the input signal passes through the trigger level.

The query returns POS, NEG, or RFAL.

Return

Format

Example

:TRIGger:TIMeout:SLOPe NEGative /*Sets the edge type to NEGative.*/

:TRIGger:TIMeout:SLOPe? /*The query returns NEG.*/

2-194 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:TIMeout:TIME

Syntax

:TRIGger:TIMeout:TIME <time>

:TRIGger:TIMeout:TIME?

Description

Sets or queries the timeout value of Timeout trigger. The default unit is s.

Parameter

Name

<time>

Type

Real

Range

16 ns to 10 s

Default

1 μs

Return

Format

The query returns the timeout value in scientific notation.

Example

:TRIGger:TIMeout:TIME 0.002 /*Sets the timeout value to 2 ms.*/

:TRIGger:TIMeout:TIME? /*The query returns 2.000000E-3.*/

:TRIGger:TIMeout:LEVel

Syntax

:TRIGger:TIMeout:LEVel <level>

:TRIGger:TIMeout:LEVel?

Description

Sets or queries the trigger level of Timeout trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

<level> Real

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:TIMeout:LEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:TIMeout:LEVel? /*The query returns 1.600000E-1.*/

MSO5000-E Programming Guide 2-195

RIGOL

Chapter 2 Command System

:TRIGger:RUNT

Command List:

:TRIGger:RUNT:SOURce

:TRIGger:RUNT:POLarity

:TRIGger:RUNT:WHEN

:TRIGger:RUNT:WUPPer

:TRIGger:RUNT:WLOWer

:TRIGger:RUNT:ALEVel

:TRIGger:RUNT:BLEVel

:TRIGger:RUNT:SOURce

Syntax

:TRIGger:RUNT:SOURce <source>

:TRIGger:RUNT:SOURce?

Description

Sets or queries the trigger source of Runt trigger.

Parameter

Name Type Range

<source> Discrete {CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns CHAN1 or CHAN2.

Example

:TRIGger:RUNT:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:RUNT:SOURce? /*The query returns CHAN2.*/

:TRIGger:RUNT:POLarity

Syntax

:TRIGger:RUNT:POLarity <polarity>

:TRIGger:RUNT:POLarity?

Description

Sets or queries the polarity of Runt trigger.

Parameter Name Type Range

<polarity> Discrete {POSitive|NEGative}

Default

POSitive

Remarks

POSitive: indicates the positive polarity. The oscilloscope triggers on the positive polarity of Runt trigger.

Return

Format

NEGative: indicates the negative polarity. The oscilloscope triggers on the negative polarity of Runt trigger.

The query returns POS or NEG.

Example

:TRIGger:RUNT:POLarity NEGative /*Sets the polarity of Runt trigger to NEGative.*/

:TRIGger:RUNT:POLarity? /*The query returns NEG.*/

2-196 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:RUNT:WHEN

Syntax

:TRIGger:RUNT:WHEN <when>

:TRIGger:RUNT:WHEN?

Description

Sets or queries the qualifier of Runt trigger.

Parameter

Name Type

<when> Discrete

Range

{NONE|GREater|LESS|GLESs}

Default

NONE

Remarks

NONE: indicates not setting the trigger condition of Runt trigger.

GREater: triggers when the Runt pulse width is greater than the set lower limit of pulse width.

Return

Format

LESS: triggers when the Runt pulse width is smaller than the set upper limit of pulse width.

GLESs: triggers when the Runt pulse width is greater than the set lower limit and smaller than the set upper limit of pulse width.

The lower limit of the pulse width must be smaller than the upper limit.

The query returns NONE, GRE, LESS, or GLES.

Example

:TRIGger:RUNT:WHEN LESS /*Sets the qualifier to LESS.*/

:TRIGger:RUNT:WHEN? /*The query returns LESS.*/

:TRIGger:RUNT:WUPPer

Syntax

:TRIGger:RUNT:WUPPer <width>

:TRIGger:RUNT:WUPPer?

Description

Sets or queries the upper limit of the pulse width of Runt trigger. The default unit is s.

Parameter

Name Type Range Default

<width> Real 8.01 ns to 10 s 2 μs

Remarks

This command is only available when the qualifier is LESS or GLESs.

Return

Format

When the qualifier is set to "GLESs", the upper limit of the pulse width must be greater than the lower limit of the pulse width.

The query returns the upper limit of the pulse width in scientific notation.

Example

:TRIGger:RUNT:WUPPer 0.02 /*Sets the upper limit of the pulse width to 20 ms.*/

:TRIGger:RUNT:WUPPer? /*The query returns 2.000000E-2.*/

MSO5000-E Programming Guide 2-197

RIGOL

Chapter 2 Command System

:TRIGger:RUNT:WLOWer

Syntax

:TRIGger:RUNT:WLOWer <width>

:TRIGger:RUNT:WLOWer?

Description

Sets or queries the lower limit of the pulse width of Runt trigger. The default unit is s.

Parameter

Name Type Range Default

<width>

Real

8 ns to 9.9 s 8 ns

Remarks

This command is only available when the qualifier is set to GREater or GLESs.

Return

Format

When the qualifier is set to "GLESs", the lower limit of the pulse width must be smaller than the upper limit of the pulse width.

The query returns the lower limit of the pulse width in scientific notation.

Example

:TRIGger:RUNT:WLOWer 0.01 /*Sets the lower limit of the pulse width to 10 ms.*/

:TRIGger:RUNT:WLOWer? /*The query returns 1.000000E-2.*/

:TRIGger:RUNT:ALEVel

Syntax

:TRIGger:RUNT:ALEVel <level>

:TRIGger:RUNT:ALEVel?

Description

Sets or queries the upper limit of the trigger level of Runt trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

Return

Format

<level> Real Lower limit to (5 × VerticalScale - OFFSet) 0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

The query returns the upper limit of the trigger level in scientific notation.

Example

:TRIGger:RUNT:ALEVel 0.16 /*Sets the upper limit of the trigger level to 160 mV.*/

:TRIGger:RUNT:ALEVel? /*The query returns 1.600000E-1.*/

:TRIGger:RUNT:BLEVel

Syntax

:TRIGger:RUNT:BLEVel <level>

:TRIGger:RUNT:BLEVel?

Description

Sets or queries the lower limit of the trigger level of Runt trigger. The unit is the same as that of the current amplitude.

Parameter Name Type Range Default

<level> Real (-5 × VerticalScale - OFFSet) to upper limit 0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the lower limit of the trigger level in scientific notation.

Example

:TRIGger:RUNT:BLEVel 0.16 /*Sets the lower limit of the trigger level to 160 mV.*/

:TRIGger:RUNT:BLEVel? /*The query returns 1.600000E-1.*/

2-198 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:WINDows

Command List:

:TRIGger:WINDows:SOURce

:TRIGger:WINDows:SLOPe

:TRIGger:WINDows:POSition

:TRIGger:WINDows:TIME

:TRIGger:WINDows:ALEVel

:TRIGger:WINDows:BLEVel

:TRIGger:WINDows:SOURce

Syntax

:TRIGger:WINDows:SOURce <source>

:TRIGger:WINDows:SOURce?

Description

Sets or queries the trigger source of Window trigger.

Parameter

Name Type Range

<source> Discrete {CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns CHAN1 or CHAN2.

Example

:TRIGger:WINDows:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:WINDows:SOURce? /*The query returns CHAN2.*/

:TRIGger:WINDows:SLOPe

Syntax

:TRIGger:WINDows:SLOPe <type>

:TRIGger:WINDows:SLOPe?

Description

Sets or queries the window type of Window trigger.

Parameter

Name Type Range Default

<type> Discrete {POSitive|NEGative|RFALl} POSitive

Remarks

POSitive: triggers on the rising edge of the input signal when the voltage level is greater than the preset high trigger level.

NEGative: triggers on the falling edge of the input signal when the voltage level is smaller than the preset low trigger level.

RFALl: triggers on either the rising or falling edge of the input signal when the voltage level meets the preset trigger level.

The query returns POS, NEG, or RFAL.

Return

Format

Example

:TRIGger:WINDows:SLOPe NEGative /*Sets the window type to NEGative.*/

:TRIGger:WINDows:SLOPe? /*The query returns NEG.*/

MSO5000-E Programming Guide 2-199

RIGOL

Chapter 2 Command System

:TRIGger:WINDows:POSition

Syntax

:TRIGger:WINDows:POSition <pos>

:TRIGger:WINDows:POSition?

Description

Sets or queries the trigger position of Window trigger.

Parameter

Name

<type>

Type

Discrete

Range

{EXIT|ENTer|TIME}

Default

ENTer

Remarks

EXIT: triggers when the input signal exits the specified trigger level range.

ENTer: triggers when the input signal enters the specified trigger level range.

Return

Format

TIME: triggers when the accumulated hold time after the trigger signal enters the specified trigger level range is equal to the window time.

The query returns EXIT, ENT, or TIME.

Example

:TRIGger:WINDows:POSition ENT /*Sets the trigger position to ENT.*/

:TRIGger:WINDows:POSition? /*The query returns ENT.*/

:TRIGger:WINDows:TIME

Syntax

:TRIGger:WINDows:TIME <time>

:TRIGger:WINDows:TIME?

Description

Sets or queries the window time of Window trigger.

Parameter

Name Type Range Default

<time> Real 8 ns to 10 s 1 μs

Return

Format

The query returns the window time in scientific notation.

Example

:TRIGger:WINDows:TIME 0.002 /*Sets the window time to 2 ms.*/

:TRIGger:WINDows:TIME? /*The query returns 2.000000E-3.*/

:TRIGger:WINDows:ALEVel

Syntax

:TRIGger:WINDows:ALEVel <level>

:TRIGger:WINDows:ALEVel?

Description

Sets or queries the upper limit of the trigger level of Window trigger. The unit is the same as that of the current amplitude.

Parameter Name

<level>

Type

Real

Range

Lower limit to (5 × VerticalScale - OFFSet)

Default

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the upper limit of the trigger level in scientific notation.

Example

:TRIGger:WINDows:ALEVel 0.16 /*Sets the upper limit of the trigger level to 160 mV.*/

:TRIGger:WINDows:ALEVel? /*The query returns 1.600000E-1.*/

2-200 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:WINDows:BLEVel

Syntax

:TRIGger:WINDows:BLEVel <level>

:TRIGger:WINDows:BLEVel?

Description

Sets or queries the lower limit of the trigger level of Window trigger. The unit is the same as that of the current amplitude.

Parameter

Name

<level>

Type

Real

Range Default

(-5 × VerticalScale - OFFSet) to upper limit 0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the lower limit of the trigger level in scientific notation.

Example

:TRIGger:WINDows:BLEVel 0.05 /*Sets the lower limit of the trigger level to 50 mV.*/

:TRIGger:WINDows:BLEVel? /*The query returns 5.000000E-2.*/

MSO5000-E Programming Guide 2-201

RIGOL

Chapter 2 Command System

:TRIGger:DELay

Command List:

:TRIGger:DELay:ALEVel

:TRIGger:DELay:BLEVel

:TRIGger:DELay:SA

:TRIGger:DELay:SLOPA

:TRIGger:DELay:SB

:TRIGger:DELay:SLOPB

:TRIGger:DELay:TYPE

:TRIGger:DELay:TUPPer

:TRIGger:DELay:TLOWer

:TRIGger:DELay:ALEVel

Syntax

:TRIGger:DELay:ALEVel <level>

:TRIGger:DELay:ALEVel?

Description

Sets or queries the trigger level of Source A in Delay trigger. The unit is the same as that of the current amplitude.

Parameter Name Type Range Default

<level> Real

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return Format

The query returns the trigger level of Source A in Delay trigger in scientific notation.

Example

:TRIGger:DELay:ALEVel 0.16 /*Sets the trigger level of Source A to 160 mV.*/

:TRIGger:DELay:ALEVel? /*The query returns 1.600000E-1.*/

:TRIGger:DELay:BLEVel

Syntax

:TRIGger:DELay:BLEVel <level>

:TRIGger:DELay:BLEVel?

Description

Sets or queries the trigger level of Source B in Delay trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

<level> Real

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

2-202 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

the :CHANnel<n>:OFFSet command.

Return Format

The query returns the trigger level of Source B in Delay trigger in scientific notation.

Example

:TRIGger:DELay:BLEVel 0.16 /*Sets the trigger level of Source B to 160 mV.*/

:TRIGger:DELay:BLEVel? /*The query returns 1.600000E-1.*/

:TRIGger:DELay:SA

Syntax

:TRIGger:DELay:SA <Source>

:TRIGger:DELay:SA?

Description

Sets or queries the trigger source of Source A in Delay trigger.

Parameter

Name Type Range Default

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:DELay:SA CHANnel2 /*Sets trigger source A to CHANnel2.*/

:TRIGger:DELay:SA? /*The query returns CHAN2.*/

:TRIGger:DELay:SLOPA

Syntax

:TRIGger:DELay:SLOPA <slope>

:TRIGger:DELay:SLOPA?

Description

Sets or queries the edge type of Edge A in Delay trigger.

Parameter

Name Type Range

<slope> Discrete {POSitive|NEGative}

Default

POSitive

Return

Format

The query returns POS or NEG.

Example

:TRIGger:DELay:SLOPA NEGative /*Sets the type of Edge A to NEGative.*/

:TRIGger:DELay:SLOPA? /*The query returns NEG.*/

:TRIGger:DELay:SB

Syntax

:TRIGger:DELay:SB <source>

:TRIGger:DELay:SB?

Description

Sets or queries the trigger source of Source B in Delay trigger.

Parameter

Name Type

<source> Discrete

Range

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|

D11|D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

CHANnel2

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:DELay:SB CHANnel2 /*Sets trigger source B to CHANnel2.*/

:TRIGger:DELay:SB? /*The query returns CHAN2.*/

MSO5000-E Programming Guide 2-203

RIGOL

Chapter 2 Command System

:TRIGger:DELay:SLOPB

Syntax

:TRIGger:DELay:SLOPB <slope>

:TRIGger:DELay:SLOP?

Description

Sets or queries the edge type of Edge B in Delay trigger.

Parameter

Name Type Range

<slope> Discrete {POSitive|NEGative}

Return

Format

The query returns POS or NEG.

Default

POSitive

Example

:TRIGger:DELay:SLOPB NEGative /*Sets the type of Edge B to NEGative.*/

:TRIGger:DELay:SLOPB? /*The query returns NEG.*/

:TRIGger:DELay:TYPE

Syntax

:TRIGger:DELay:TYPE <type>

:TRIGger:DELay:TYPE?

Description

Sets or queries the delay type of Delay trigger.

Parameter

Name Type Range

<type> Discrete {GREater|LESS|GLESs|GOUT}

Default

GREater

Remarks

GREater: triggers when the time difference (

T) between the specified edges of

Source A and Source B is greater than the preset time limit.

LESS: triggers when the time difference (

T) between the specified edges of

Source A and Source B is smaller than the preset time limit.

Return

Format

GLESs: triggers when the time difference (

T) between the specified edges of

Source A and Source B is greater than the lower limit of the preset time and smaller than the upper limit of the preset time. Note: The lower time limit must be smaller than the upper time limit.

GOUT: triggers when the time difference (

T) between the specified edges of

Source A and Source B is smaller than the lower limit of the preset time or greater than the upper limit of the preset time. Note: The lower time limit must be smaller than the upper time limit.

The query returns GRE, LESS, GLES, or GOUT.

Example

:TRIGger:DELay:TYPE GOUT /*Sets the delay type to "><".*/

:TRIGger:DELay:TYPE? /*The query returns GOUT.*/

:TRIGger:DELay:TUPPer

Syntax

:TRIGger:DELay:TUPPer <time>

:TRIGger:DELay:TUPPer?

Description

Sets or queries the upper limit of delay time of the Delay trigger. The default unit is s.

Parameter Name

<time>

Type Range

Real 8.01 ns to 10 s

Default

2 μs

2-204 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Remarks

This command is available when the delay type is LESS, GOUT, or GLESs.

Return

Format

The query returns the upper limit of delay time in scientific notation.

Example

:TRIGger:DELay:TUPPer 0.002 /*Sets the upper limit of delay time to 2 ms.*/

:TRIGger:DELay:TUPPer? /*The query returns 2.000000E-3.*/

:TRIGger:DELay:TLOWer

Syntax

:TRIGger:DELay:TLOWer <time>

:TRIGger:DELay:TLOWer?

Description

Sets or queries the lower limit of delay time of the Delay trigger. The default unit is s.

Parameter Name Type Range Default

<time> Real 8 ns to 9.9 s 1 μs

Remarks

This command is available when the delay type is GREater, GOUT, or GLESs.

Return

Format

The query returns the lower limit of delay time in scientific notation.

Example

:TRIGger:DELay:TLOWer 0.002 /*Sets the lower limit of delay time to 2 ms.*/

:TRIGger:DELay:TLOWer? /*The query returns 2.000000E-3.*/

MSO5000-E Programming Guide 2-205

RIGOL

Chapter 2 Command System

:TRIGger:SHOLd

Command List:

:TRIGger:SHOLd:DSRC

:TRIGger:SHOLd:CSRC

:TRIGger:SHOLd:SLOPe

:TRIGger:SHOLd:PATTern

:TRIGger:SHOLd:TYPE

:TRIGger:SHOLd:STIMe

:TRIGger:SHOLd:HTIMe

:TRIGger:SHOLd:DLEVel

:TRIGger:SHOLd:CLEVel

:TRIGger:SHOLd:DSRC

Syntax

:TRIGger:SHOLd:DSRC <source>

:TRIGger:SHOLd:DSRC?

Description

Sets or queries the data source of Setup&Hold trigger.

Parameter Name Type

<source> Discrete

Range

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

CHANnel2

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13,

D14, D15, CHAN1, or CHAN2.

Example

:TRIGger:SHOLd:DSRC CHANnel1 /*Sets the data source to CHANnel1.*/

:TRIGger:SHOLd:DSRC? /*The query returns CHAN1.*/

:TRIGger:SHOLd:CSRC

Syntax

:TRIGger:SHOLd:CSRC <source>

:TRIGger:SHOLd:CSRC?

Description

Sets or queries the clock source of Setup&Hold trigger.

Parameter

Return

Format

Name Type

<source> Discrete

Range

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

CHANnel1

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:SHOLd:CSRC CHANnel2 /*Sets the clock source to CHANnel2.*/

:TRIGger:SHOLd:CSRC? /*The query returns CHAN2.*/

2-206 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:SHOLd:SLOPe

Syntax

:TRIGger:SHOLd:SLOPe <slope>

:TRIGger:SHOLd:SLOPe?

Description

Sets or queries the edge type of Setup&Hold trigger.

Parameter

Name

<slope>

Type

Discrete

Range

{POSitive|NEGative}

Return

Format

The query returns POS or NEG.

Default

POSitive

Example

:TRIGger:SHOLd:SLOPe NEGative /*Sets the edge type to NEGative.*/

:TRIGger:SHOLd:SLOPe? /*The query returns NEG.*/

:TRIGger:SHOLd:PATTern

Syntax

:TRIGger:SHOLd:PATTern <pattern>

:TRIGger:SHOLd:PATTern?

Description

Sets or queries the data type of Setup&Hold trigger.

Parameter

Name Type Range

<pattern> Discrete {H|L}

Default

H

Remarks

H: indicates high level.

L: indicates low level.

Return

Format

The query returns H or L.

Example

:TRIGger:SHOLd:PATTern L /*Sets data type to L.*/

:TRIGger:SHOLd:PATTern? /*The query returns L.*/

:TRIGger:SHOLd:TYPE

Syntax

:TRIGger:SHOLd:TYPE <type>

:TRIGger:SHOLd:TYPE?

Description

Sets or queries the hold type of Setup&Hold trigger.

Parameter

Name Type Range Default

<type> Discrete {SETup|HOLD|SETHold} SETup

Remarks

SETup: the oscilloscope triggers when the setup time is smaller than the specified setup time.

HOLD: the oscilloscope triggers when the hold time is smaller than the specified hold time.

SETHold: the oscilloscope triggers when the setup time or hold time is smaller than the specified time value.

The query returns SET, HOLD, or SETH.

Return

Format

Example

:TRIGger:SHOLd:TYPE SETHold /*Sets the hold type to SETHold.*/

:TRIGger:SHOLd:TYPE? /*The query returns SETH.*/

MSO5000-E Programming Guide 2-207

RIGOL

Chapter 2 Command System

:TRIGger:SHOLd:STIMe

Syntax

:TRIGger:SHOLd:STIMe <time>

:TRIGger:SHOLd:STIMe?

Description

Sets or queries the setup time of Setup&Hold trigger. The default unit is s.

Parameter

Name

<time>

Type

Real

Range

8 ns to 1 s

Default

1 μs

Remarks

Setup time indicates the time that the data remain stable and unchanged before the clock signal of the trigger comes.

Return

Format

This command is only available when the hold type is SETup or SETHold.

The query returns the setup time value in scientific notation.

Example

:TRIGger:SHOLd:STIMe 0.002 /*Sets the setup time to 2 ms.*/

:TRIGger:SHOLd:STIMe? /*The query returns 2.000000E-3.*/

:TRIGger:SHOLd:HTIMe

Syntax

:TRIGger:SHOLd:HTIMe <time>

:TRIGger:SHOLd:HTIMe?

Description

Sets or queries the hold time of Setup&Hold trigger. The default unit is s.

Parameter

Name Type Range Default

<time> Real 8 ns to 1 s 1 μs

Remarks

Hold time indicates the time that the data remain stable and unchanged after the clock signal of the trigger comes.

Return

Format

This command is only available when the hold type is HOLD or SETHold.

The query returns the hold time value in scientific notation.

Example

:TRIGger:SHOLd:HTIMe 0.002 /*Sets the hold time to 2 ms.*/

:TRIGger:SHOLd:HTIMe? /*The query returns 2.000000E-3.*/

:TRIGger:SHOLd:DLEVel

Syntax

:TRIGger:SHOLd:DLEVel <level>

:TRIGger:SHOLd:DLEVel?

Description

Sets or queries the trigger level of the data source. The unit is the same as that of the current amplitude.

Parameter

Name Type Range

Analog channel:

Default

<level> Real

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

2-208 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

Return

Format

The query returns the trigger level of the data source in scientific notation.

Example

:TRIGger:SHOLd:DLEVel 0.16 /*Sets the trigger level of the data source to 160 mV.*/

:TRIGger:SHOLd:DLEVel? /*The query returns 1.600000E-1.*/

:TRIGger:SHOLd:CLEVel

Syntax

:TRIGger:SHOLd:CLEVel <level>

:TRIGger:SHOLd:CLEVel?

Description

Sets or queries the trigger level of the clock source. The unit is the same as that of the current amplitude.

Parameter Name

<level>

Type

Real

Range

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Default

0 V

Digital channel: -15 V to 15 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level of the clock source in scientific notation.

Example

:TRIGger:SHOLd:CLEVel 0.05 /*Sets the trigger level of the clock source to 50 mV.*/

:TRIGger:SHOLd:CLEVel? /*The query returns 5.000000E-2.*/

MSO5000-E Programming Guide 2-209

RIGOL

Chapter 2 Command System

:TRIGger:NEDGe

Command List:

:TRIGger:NEDGe:SOURce

:TRIGger:NEDGe:SLOPe

:TRIGger:NEDGe:IDLE

:TRIGger:NEDGe:EDGE

:TRIGger:NEDGe:LEVel

:TRIGger:NEDGe:SOURce

Syntax

:TRIGger:NEDGe:SOURce <source>

:TRIGger:NEDGe:SOURce?

Description

Sets or queries the trigger source of the Nth Edge trigger.

Parameter

Name Type Range Default

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:NEDGe:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:NEDGe:SOURce? /*The query returns CHAN2.*/

:TRIGger:NEDGe:SLOPe

Syntax

:TRIGger:NEDGe:SLOPe <slope>

:TRIGger:NEDGe:SLOPe?

Description

Sets or queries the edge type of the Nth Edge trigger.

Parameter

Name Type Range Default

<slope> Discrete {POSitive|NEGative} POSitive

Remarks

POSitive: indicates that the oscilloscope triggers on the rising edge of the input signal when the voltage level meets the preset trigger level.

Return

Format

NEGative: indicates that the oscilloscope triggers on the falling edge of the input signal when the voltage level meets the preset trigger level.

The query returns POS or NEG.

Example

:TRIGger:NEDGe:SLOPe NEGative /*Sets the edge type to NEGative.*/

:TRIGger:NEDGe:SLOPe? /*The query returns NEG.*/

2-210 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:NEDGe:IDLE

Syntax

:TRIGger:NEDGe:IDLE <time>

:TRIGger:NEDGe:IDLE?

Description

Sets or queries the idle time of the Nth Edge trigger. The default unit is s.

Parameter

Name

<time>

Type

Real

Range

16 ns to 10 s

Default

1 μs

Return

Format

The query returns the idle time in scientific notation.

Example

:TRIGger:NEDGe:IDLE 0.002 /*Sets the idle time to 2 ms.*/

:TRIGger:NEDGe:IDLE? /*The query returns 2.000000E-3.*/

:TRIGger:NEDGe:EDGE

Syntax

:TRIGger:NEDGe:EDGE <edge>

:TRIGger:NEDGe:EDGE?

Description

Sets or queries the number of edges of the Nth Edge trigger.

Parameter

Name Type Range

<edge> Integer 1 to 65535

Default

1

Return

Format

The query returns an integer ranging from 1 to 65535.

Example

:TRIGger:NEDGe:EDGE 20 /*Sets the number of edges to 20.*/

:TRIGger:NEDGe:EDGE? /*The query returns 20.*/

:TRIGger:NEDGe:LEVel

Syntax

:TRIGger:NEDGe:LEVel <level>

:TRIGger:NEDGe:LEVel?

Description

Sets or queries the trigger level of the Nth Edge trigger. The unit is the same as that of current amplitude.

Parameter

Name Type Range Default

<level> Real

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:NEDGe:LEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:NEDGe:LEVel? /*The query returns 1.600000E-1.*/

MSO5000-E Programming Guide 2-211

RIGOL

Chapter 2 Command System

:TRIGger:RS232 (Option)

Command List:

:TRIGger:RS232:SOURce

:TRIGger:RS232:WHEN

:TRIGger:RS232:PARity

:TRIGger:RS232:STOP

:TRIGger:RS232:DATA

:TRIGger:RS232:WIDTh

:TRIGger:RS232:BAUD

:TRIGger:RS232:LEVel

:TRIGger:RS232:SOURce

Syntax

:TRIGger:RS232:SOURce <source>

:TRIGger:RS232:SOURce?

Description

Sets or queries the trigger source of RS232 trigger.

Parameter

Name Type Range Default

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:RS232:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:RS232:SOURce? /*The query returns CHAN2.*/

:TRIGger:RS232:WHEN

Syntax

:TRIGger:RS232:WHEN <when>

:TRIGger:RS232:WHEN?

Description

Sets or queries the trigger condition of RS232 trigger.

Parameter Name Type Range

<when> Discrete {STARt|ERRor|CERRor|DATA}

Default

STARt

Remarks

STARt: triggers at the start of a frame.

ERRor: triggers when an error frame is found.

CERRor: triggers when the check error is found.

DATA: triggers on the last bit of the preset data bits.

Return

Format

The query returns STAR, ERR, CERR, or DATA.

Example

:TRIGger:RS232:WHEN ERRor /*Sets the trigger condition to ERRor.*/

:TRIGger:RS232:WHEN? /*The query returns ERR.*/

2-212 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:RS232:PARity

Syntax

:TRIGger:RS232:PARity <parity>

:TRIGger:RS232:PARity?

Description

Sets or queries the check mode of RS232 trigger.

Parameter

Name Type

<parity> Discrete

Range

{EVEN|ODD|NONE}

Default

NONE

Return Format

The query returns EVEN, ODD, or NONe.

Example

:TRIGger:RS232:PARity EVEN /*Sets the check mode to EVEN.*/

:TRIGger:RS232:PARity? /*The query returns EVEN.*/

:TRIGger:RS232:STOP

Syntax

:TRIGger:RS232:STOP <bit>

:TRIGger:RS232:STOP?

Description

Sets or queries the stop bits of RS232 trigger.

Parameter

Name

<bit>

Type

Discrete

Range

{1|1.5|2}

Default

1

Return Format

The query returns 1, 1.5 or 2.

Example

:TRIGger:RS232:STOP 2 /*Sets the stop bits to 2.*/

:TRIGger:RS232:STOP? /*The query returns 2.*/

:TRIGger:RS232:DATA

Syntax

:TRIGger:RS232:DATA <data>

:TRIGger:RS232:DATA?

Description

Sets or queries the data value of RS232 trigger when the trigger condition is

"Data".

Parameter

Name Type Range Default

<data> Integer 0 to 2 n - 1 0

Remarks

In the expression 2 n can be 5, 6, 7, or 8.

-1, n indicates the current data width, and its available value

Return Format

The query returns an integer.

Example

:TRIGger:RS232:DATA 10 /*Sets the data value to 10.*/

:TRIGger:RS232:DATA? /*The query returns 10.*/

MSO5000-E Programming Guide 2-213

RIGOL

Chapter 2 Command System

:TRIGger:RS232:WIDTh

Syntax

:TRIGger:RS232:WIDTh <width>

:TRIGger:RS232:WIDTh?

Description

Sets or queries the data width of RS232 trigger when the trigger condition is

"Data".

Parameter

Name

<width>

Type Range

Discrete {5|6|7|8}

Default

8

Return Format

The query returns 5, 6, 7, or 8.

Example

:TRIGger:RS232:WIDTh 6 /*Sets the data width to 6.*/

:TRIGger:RS232:WIDTh? /*The query returns 6.*/

:TRIGger:RS232:BAUD

Syntax

:TRIGger:RS232:BAUD <baud>

:TRIGger:RS232:BAUD?

Description

Sets or queries the baud rate of RS232 trigger. The default unit is bps.

Parameter

Name Type Range Default

<baud> Integer 1 bps to 20 Mbps 9600 bps

Remarks

If the baud rate is set to a value with "M", then "A" should be added at the end of the value. For example, if you send 5M, you need to send 5MA.

Return Format

The query returns an integer ranging from 1 bps to 20 Mbps.

Example

:TRIGger:RS232:BAUD 4800 /*Sets the baud rate to 4800bps.*/

:TRIGger:RS232:BAUD? /*The query returns 4800.*/

:TRIGger:RS232:LEVel

Syntax

:TRIGger:RS232:LEVel <level>

:TRIGger:RS232:LEVel?

Description

Sets or queries the trigger level of RS232 trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

<level> Real

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:RS232:LEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:RS232:LEVel? /*The query returns 1.600000E-1.*/

2-214 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:IIC (Option)

Command List:

:TRIGger:IIC:SCL

:TRIGger:IIC:SDA

:TRIGger:IIC:WHEN

:TRIGger:IIC:AWIDth

:TRIGger:IIC:ADDRess

:TRIGger:IIC:DIRection

:TRIGger:IIC:DATA

:TRIGger:IIC:CLEVel

:TRIGger:IIC:DLEVel

:TRIGger:IIC:DBYTes

:TRIGger:IIC:SCL

Syntax

:TRIGger:IIC:SCL <source>

:TRIGger:IIC:SCL?

Description

Sets or queries the source channel of the clock line of I2C trigger.

Parameter Name Type Range

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:IIC:SCL CHANnel2 /*Sets the clock source to CHANnel2.*/

:TRIGger:IIC:SCL? /*The query returns CHAN2.*/

:TRIGger:IIC:SDA

Syntax

:TRIGger:IIC:SDA <source>

:TRIGger:IIC:SDA?

Description

Sets or queries the source channel of the data line of I2C trigger.

Parameter

Name Type Range Default

CHANnel2

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:IIC:SDA CHANnel2 /*Sets the data source to CHANnel2.*/

:TRIGger:IIC:SDA? /*The query returns CHAN2.*/

MSO5000-E Programming Guide 2-215

RIGOL

Chapter 2 Command System

:TRIGger:IIC:WHEN

Syntax

:TRIGger:IIC:WHEN <when>

:TRIGger:IIC:WHEN?

Description

Sets or queries the trigger condition of I2C trigger.

Parameter

Name Type Range

<when>

Default

STARt

Remarks

STARt: indicates that the oscilloscope triggers when SCL is high level and SDA transitions from high level to low level.

RESTart: indicates that the oscilloscope triggers when another start condition occurs before a stop condition.

STOP: indicates that the oscilloscope triggers when SCL is high level and SDA transitions from low level to high level.

NACKnowledge: indicates missing acknowledgment. The oscilloscope triggers when SDA is high level during the acknowledgment of the SCL bit.

ADDRess: indicates that the oscilloscope searches for the specified address and triggers on the read/write bit.

DATA: indicates that the oscilloscope searches for the specified data on the data line (SDA) and triggers on the clock line (SCL) of the jumping edge of the last bit of the data.

ADATa: indicates that the oscilloscope searches for the specified address and data, and then triggers when both the address and data meet the conditions.

The query returns STAR, REST, NACK, REST, ADDR, DATA, or ADAT.

Return

Format

Example

:TRIGger:IIC:WHEN RESTart /*Sets the trigger condition to RESTart.*/

:TRIGger:IIC:WHEN? /*The query returns REST.*/

:TRIGger:IIC:AWIDth

Syntax

:TRIGger:IIC:AWIDth <bits>

:TRIGger:IIC:AWIDth?

Description

Sets or queries the address width of I2C trigger when the trigger condition is

"ADDRess" or "ADATa".

Parameter

Name

<bits>

Type Range

Discrete {7|8|10}

Default

7

Return

Format

The query returns 7, 8, or 10.

Example

:TRIGger:IIC:AWIDth 10 /*Sets the address width to 10.*/

:TRIGger:IIC:AWIDth? /*The query returns 10.*/

2-216 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:IIC:ADDRess

Syntax

:TRIGger:IIC:ADDRess <address>

:TRIGger:IIC:ADDRess?

Description

Sets or queries the address of I2C trigger when the trigger condition is "ADDRess" or "ADATa".

Parameter

Name

<adr>

Type Range

Integer 0 to 2 n

Default

- 1: 0 to 127, 0 to 255, or 0 to 1,023 0

Remarks

In the expression 2 n -1, n indicates the current address width.

Return Format

The query returns an integer.

Example

:TRIGger:IIC:ADDRess 100 /*Sets the address to 100.*/

:TRIGger:IIC:ADDRess?

/*The query returns 100.*/

:TRIGger:IIC:DIRection

Syntax

:TRIGger:IIC:DIRection <direction>

:TRIGger:IIC:DIRection?

Description

Sets or queries the data direction of I2C trigger when the trigger condition is

"ADDRess" or "ADATa".

Parameter

Name Type Range Default

<dir> Discrete {READ|WRITe|RWRite} WRITe

Remarks

This command is unavailable when the address width is set to 8.

Return Format

The query returns READ, WRIT, or RWR.

Example

:TRIGger:IIC:DIRection RWRite /*Sets the data direction to RWRite.*/

:TRIGger:IIC:DIRection? /*The query returns RWR.*/

:TRIGger:IIC:DATA

Syntax

:TRIGger:IIC:DATA <data>

:TRIGger:IIC:DATA?

Description

Sets or queries the data value of I2C trigger when the trigger condition is "DATA" or "ADATa".

Parameter

Name Type Range Default

<data> Integer

0 to 2 40 - 1

0

Remarks

The settable range of <data> is affected by the byte length. The maximum byte length can be set to 5, i.g. 40-bit binary data. Therefore, the range of <data> is from 0 to 2 40 - 1.

Return Format

The query returns an integer.

Example

:TRIGger:IIC:DATA 64 /*Sets the data value to 64.*/

:TRIGger:IIC:DATA? /*The query returns 64.*/

MSO5000-E Programming Guide 2-217

RIGOL

Chapter 2 Command System

:TRIGger:IIC:CLEVel

Syntax

:TRIGger:IIC:CLEVel <level>

:TRIGger:IIC:CLEVel?

Description

Sets or queries the trigger level of the clock line in I2C trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Range

Analog channel:

Default

<level> Real

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:IIC:CLEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:IIC:CLEVel? /*The query returns 1.600000E-1.*/

:TRIGger:IIC:DLEVel

Syntax

:TRIGger:IIC:DLEVel <level>

:TRIGger:IIC:DLEVel?

Description

Sets or queries the trigger level of the data line in I2C trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Default

<level> Real

Range

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:IIC:DLEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:IIC:DLEVel? /*The query returns 1.600000E-1.*/

2-218 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:IIC:DBYTes

Syntax

:TRIGger:IIC:DBYTes <bytes>

:TRIGger:IIC:DBYTes?

Description

Sets or queries the data bytes of I2C trigger when the trigger condition is "Data" or "A&D".

Parameter

Name Type Range

<bytes> Integer 1 to 5

Default

1

Return Format

The query returns an integer.

Example

:TRIGger:IIC:DBYTes 2 /*Sets the data bytes of I2C trigger to 2.*/

:TRIGger:IIC:DBYTes?

/*The query returns 2.*/

MSO5000-E Programming Guide 2-219

RIGOL

Chapter 2 Command System

:TRIGger:CAN (Option)

Command List:

:TRIGger:CAN:BAUD

:TRIGger:CAN:SOURce

:TRIGger:CAN:STYPe

:TRIGger:CAN:WHEN

:TRIGger:CAN:SPOint

:TRIGger:CAN:LEVel

:TRIGger:CAN:BAUD

Syntax

:TRIGger:CAN:BAUD <baud>

:TRIGger:CAN:BAUD?

Description

Sets or queries the signal rate of CAN trigger. The unit is bps.

Parameter

Name Type Range

<baud> Integer 10 kbps to 5 Mbps

Default

1 Mbps

Remarks

If the baud rate is set to a value with "M", then "A" should be added at the end of the value. For example, if you send 5M, you need to send 5MA.

Return

Format

The query returns an integer ranging from 10 kbps to 5 Mbps.

Example

:TRIGger:CAN:BAUD 125000 /*Sets the signal rate to 125000 bps.*/

:TRIGger:CAN:BAUD? /*The query returns 125000.*/

:TRIGger:CAN:SOURce

Syntax

:TRIGger:CAN:SOURce <source>

:TRIGger:CAN:SOURce?

Description

Sets or queries the trigger source of CAN trigger.

Parameter Name Type Range

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:CAN:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:CAN:SOURce? /*The query returns CHAN2.*/

2-220 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:CAN:STYPe

Syntax

:TRIGger:CAN:STYPe <stype>

:TRIGger:CAN:STYPe?

Description

Sets or queries the signal type of CAN trigger.

Parameter

Name

<stype>

Type

Discrete

Range

{H|L|RXTX|DIFFerential}

Return

Format

The query returns H, L, RXTX, or DIFF.

Default

H

Remarks

H: indicates the actual CAN_H differential bus signal.

L: indicates the actual CAN_L differential bus signal.

RXTX: indicates the Receive or Transmit signal from the CAN bus transceiver.

DIFFerential: indicates the CAN differential bus signal connected to an analog channel by using a differential probe. Connect the probe's positive lead to the

CAN_H bus signal and connect the negative lead to the CAN_L bus signal.

Example

:TRIGger:CAN:STYPe L /*Sets the signal type to CAN_L differential bus signal.*/

:TRIGger:CAN:STYPe? /*The query returns L.*/

:TRIGger:CAN:WHEN

Syntax

:TRIGger:CAN:WHEN <cond>

:TRIGger:CAN:WHEN?

Description

Sets or queries the trigger condition of CAN trigger.

Parameter

Remarks

Name

<cond>

Type

Discrete

Range

{SOF|EOF|IDRemote|OVERload|IDFRame

|DATafream|IDData|ERFReam|ERANswer|

ERCHeck|ERFormat|ERRandom|ERBit}

Default

SOF

SOF: indicates start of frame. It indicates that the oscilloscope triggers at the start of a data frame.

EOF: indicates end of frame. It indicates that the oscilloscope triggers at the end of a data frame.

IDRemote, OVERload, IDFRame, DATafream, IDData: indicates frame type. It indicates that the oscilloscope triggers on the specified type of a frame.

Return

Format

ERFReam, ERANswer, ERCHeck, ERFormat, ERRandom, ERBit: indicates the frame error. It indicates that the oscilloscope triggers on the specified type of error frame.

The query returns SOF, EOF, IDR, OVER, IDFR, DAT, IDD, ERFR, ERAN, ERCH, ERF,

ERR, or ERB.

Example

TRIGger:CAN:WHEN EOF /*Sets the trigger condition to EOF.*/

:TRIGger:CAN:WHEN? /*The query returns EOF.*/

MSO5000-E Programming Guide 2-221

RIGOL

Chapter 2 Command System

:TRIGger:CAN:SPOint

Syntax

:TRIGger:CAN:SPOint <spoint>

:TRIGger:CAN:SPOint?

Description

Sets or queries the sample point position of CAN trigger (expressed in %).

Parameter

Name

<spoint>

Type

Integer

Range

10 to 90

Default

50

Remarks

Sample point is a point within a bit’s time. The oscilloscope samples the bit level at this point. The sample point position is expressed as the ratio of "time from the bit start to the sample point" to "bit time", in %.

Return

Format

The query returns an integer ranging from 10 to 90.

Example

:TRIGger:CAN:SPOint 60 /*Sets the sample point position of CAN trigger to 60%.*/

:TRIGger:CAN:SPOint? /*The query returns 60.*/

:TRIGger:CAN:LEVel

Syntax

:TRIGger:CAN:LEVel <level>

:TRIGger:CAN:LEVel?

Description

Sets or queries the trigger level of CAN trigger. Its unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

<level> Real

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:CAN:LEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:CAN:LEVel? /*The query returns 1.600000E-1.*/

2-222 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:SPI (Option)

Command List:

:TRIGger:SPI:SCL

:TRIGger:SPI:SDA

:TRIGger:SPI:WHEN

:TRIGger:SPI:WIDTh

:TRIGger:SPI:DATA

:TRIGger:SPI:TIMeout

:TRIGger:SPI:SLOPe

:TRIGger:SPI:CLEVel

:TRIGger:SPI:DLEVel

:TRIGger:SPI:SLEVel

:TRIGger:SPI:MODE

:TRIGger:SPI:CS

:TRIGger:SPI:SCL

Syntax

:TRIGger:SPI:SCL <source>

:TRIGger:SPI:SCL?

Description

Sets or queries the channel source of the clock line of SPI trigger.

Parameter

Name Type Range

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:SPI:SCL CHANnel1

/*Sets the channel source of the clock line to CHANnel1.*/

:TRIGger:SPI:SCL?

/*The query returns CHAN1.*/

:TRIGger:SPI:SDA

Syntax

:TRIGger:SPI:SDA <source>

:TRIGger:SPI:SDA?

Description

Sets or queries the channel source of the data line of SPI trigger.

Parameter

Name Type Range Default

Return

Format

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

CHANnel2

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

MSO5000-E Programming Guide 2-223

RIGOL

Chapter 2 Command System

Example

:TRIGger:SPI:SDA CHANnel2

/*Sets the channel source of the data line to CHANnel2.*/

:TRIGger:SPI:SDA?

/*The query returns CHAN2.*/

:TRIGger:SPI:WHEN

Syntax

:TRIGger:SPI:WHEN <when>

:TRIGger:SPI:WHEN?

Description

Sets or queries the trigger condition of SPI trigger.

Parameter

Name Type Range

<when> Discrete {CS|TIMeout}

Default

CS

Remarks

When the trigger condition is "TIMeout", you can run the :TRIGger:SPI:TIMeout

command to set the timeout value.

Return

Format

The query returns CS or TIM.

Example

:TRIGger:SPI:WHEN TIMeout /*Sets the trigger condition to TIMeout.*/

:TRIGger:SPI:WHEN? /*The query returns TIM.*/

:TRIGger:SPI:WIDTh

Syntax

:TRIGger:SPI:WIDTh <width>

:TRIGger:SPI:WIDTh?

Description

Sets or queries the data width of data channel in SPI trigger.

Parameter

Name

<width>

Type

Integer

Range

4 to 32

Default

8

Return

Format

The query returns an integer.

Example

:TRIGger:SPI:WIDTh 10 /*Sets the data width to 10.*/

:TRIGger:SPI:WIDTh? /*The query returns 10.*/

:TRIGger:SPI:DATA

Syntax

:TRIGger:SPI:DATA <data>

:TRIGger:SPI:DATA?

Description

Sets or queries the data value of SPI trigger.

Parameter

Name Type Range Default

<data> Integer 0 to 2 32 - 1 82

Remarks

The range of the parameter <data> is related to the current data width. The available maximum data width is 32. Therefore, the range of <data> is from 0 to 2 32 - 1.

Return

Format

The query returns an integer.

Example

:TRIGger:SPI:DATA 5 /*Sets the data value to 5.*/

:TRIGger:SPI:DATA? /*The query returns 5.*/

2-224 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:SPI:TIMeout

Syntax

:TRIGger:SPI:TIMeout <time>

:TRIGger:SPI:TIMeout?

Description

Sets or queries the timeout value when the trigger condition of SPI trigger is

"Timeout". The default unit is s.

Parameter

Name Type

<time_value> Real

Range

8 ns to 10 s

Default

1 μs

Return

Format

The query returns the timeout value in scientific notation.

Example

:TRIGger:SPI:TIMeout 0.001 /*Sets the timeout value to 1 ms.*/

:TRIGger:SPI:TIMeout? /*The query returns 1.000000E-3.*/

:TRIGger:SPI:SLOPe

Syntax

:TRIGger:SPI:SLOPe <slope>

:TRIGger:SPI:SLOPe?

Description

Sets or queries the type of the clock edge of SPI trigger.

Parameter

Name Type Range

<slope> Discrete {POSitive|NEGative}

Default

POSitive

Remarks

Return

Format

POSitive: samples the SDA data on the rising edge of the clock.

NEGative: samples the SDA data on the falling edge of the clock.

The query returns POS or NEG.

Example

:TRIGger:SPI:SLOPe POSitive /*Sets the clock edge to POSitive.*/

:TRIGger:SPI:SLOPe? /*The query returns POS.*/

:TRIGger:SPI:CLEVel

Syntax

:TRIGger:SPI:CLEVel <level>

:TRIGger:SPI:CLEVel?

Description

Sets or queries the trigger level of the clock channel of SPI trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

<level> Real

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:SPI:CLEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:SPI:CLEVel? /*The query returns 1.600000E-1.*/

MSO5000-E Programming Guide 2-225

RIGOL

Chapter 2 Command System

:TRIGger:SPI:DLEVel

Syntax

:TRIGger:SPI:DLEVel <level>

:TRIGger:SPI:DLEVel?

Description

Sets or queries the trigger level of the data channel of SPI trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Range

Analog channel:

Default

<level> Real

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:SPI:DLEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:SPI:DLEVel? /*The query returns 1.600000E-1.*/

:TRIGger:SPI:SLEVel

Syntax

:TRIGger:SPI:SLEVel <level>

:TRIGger:SPI:SLEVel?

Description

Sets or queries the trigger level of the CS channel of SPI trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Default

<level> Real

Range

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:SPI:SLEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:SPI:SLEVel? /*The query returns 1.600000E-1.*/

2-226 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:SPI:MODE

Syntax

:TRIGger:SPI:MODE <mode>

:TRIGger:SPI:MODE?

Description

Sets or queries the CS mode of SPI trigger when the trigger condition is "CS".

Parameter

Name

<mode>

Type Range

Discrete {HIGH|LOW}

Default

LOW

Return

Format

The query returns HIGH or LOW.

Example

:TRIGger:SPI:MODE LOW /*Sets the CS mode to low level.*/

:TRIGger:SPI:MODE? /*The query returns LOW.*/

:TRIGger:SPI:CS

Syntax

:TRIGger:SPI:CS <source>

:TRIGger:SPI:CS?

Description

Sets or queries the source channel of the CS line when the trigger condition of SPI is set to CS.

Parameter

Name Type Range Default

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

CHANnel2

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:SPI:CS CHANnel2

/*Sets source channel of the CS line to CHANnel2 when the trigger condition of SPI is set to CS.*/

:TRIGger:SPI:CS?

/*The query returns CHAN2.*/

MSO5000-E Programming Guide 2-227

RIGOL

Chapter 2 Command System

:TRIGger:FLEXray (Option)

Command List:

:TRIGger:FLEXray:BAUD

:TRIGger:FLEXray:LEVel

:TRIGger:FLEXray:SOURce

:TRIGger:FLEXray:WHEN

:TRIGger:FLEXray:BAUD

Syntax

:TRIGger:FLEXray:BAUD <baud>

:TRIGger:FLEXray:BAUD?

Description

Sets or queries the signal rate of FlexRay trigger. The default unit is bps.

Parameter

Name Type Range Default

Return

Format

<baud> Discrete {2500000|5000000|10000000}

The query returns 2500000, 5000000, or 10000000.

10000000 bps

Example

:TRIGger:FLEXray:BAUD 5000000 /*Sets the signal rate to 5000000 bps.*/

:TRIGger:FLEXray:BAUD? /*The query returns 5000000.*/

:TRIGger:FLEXray:LEVel

Syntax

:TRIGger:FLEXray:LEVel <level>

:TRIGger:FLEXray:LEVel?

Description

Sets or queries the trigger level of FlexRay trigger. Its unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

<level> Real

Analog channel:

(-5 × VerticalScale - OFFSet) to

(5 × VerticalScale - OFFSet)

Digital channel: -15 V to 15 V

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:FLEXray:LEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:FLEXray:LEVel? /*The query returns 1.600000E-1.*/

2-228 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:FLEXray:SOURce

Syntax

:TRIGger:FLEXray:SOURce <source>

:TRIGger:FLEXray:SOURce?

Description

Sets or queries the trigger source of FlexRay trigger.

Parameter

Name Type

<source> Discrete

Range

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D1

1|D12|D13|D14|D15|CHANnel1|CHANnel2}

Return

Format

Default

CHANnel1

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, or CHAN2.

Example

:TRIGger:FLEXray:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:FLEXray:SOURce? /*The query returns CHAN2.*/

:TRIGger:FLEXray:WHEN

Syntax

:TRIGger:FLEXray:WHEN <cond>

:TRIGger:FLEXray:WHEN?

Description

Sets or queries the trigger condition of FLEXray trigger.

Parameter

Name Type Range Default

<cond> Discrete {FRAMe|SYMBol|ERRor|TSS} FRAMe

Remarks

FRAMe: triggers on the frame of the FlexRay bus.

SYMBol: triggers on the Channel Idle Delimiter (CID), Collision Avoidance

Symbol (CAS), Media Access Test Symbol (MTS), and Wakeup Pattern (WUP) of the FlexRay bus.

ERRor: triggers when an error occurs to the FlexRay bus, including Head CRC

Err, Tail CRC Err, Decode Err, and Random Err.

Return

Format

TSS: triggers on the transmission start sequence of the FlexRay bus.

The query returns FRAM, SYMB, ERR, or TSS.

Example

:TRIGger:FLEXray:WHEN FRAMe /*Sets the trigger condition to FRAMe.*/

:TRIGger:FLEXray:WHEN? /*The query returns FRAM.*/

MSO5000-E Programming Guide 2-229

RIGOL

Chapter 2 Command System

:TRIGger:IIS (Option)

Command List:

:TRIGger:IIS:ALIGnment

:TRIGger:IIS:CLOCk:SLOPe

:TRIGger:IIS:SOURce:CLOCk

:TRIGger:IIS:SOURce:DATA

:TRIGger:IIS:SOURce:WSELect

:TRIGger:IIS:WHEN

:TRIGger:IIS:AUDio

:TRIGger:IIS:DATA

:TRIGger:IIS:ALIGnment

Syntax

:TRIGger:IIS:ALIGnment <setting>

:TRIGger:IIS:ALIGnment?

Description

Sets or queries the alignment mode of the I2S trigger.

Parameter Name Type

<setting> Discrete

Range

{LJ|RJ|IIS}

Default

IIS

Description

RJ: data transmission (MSB first) is right-justified to the WS transition.

LJ: data transmission (MSB first) begins at the edge of the WS transition.

IIS: MSB (Most Significant Bit) of data for each sample is sent first, and LSB (Least

Significant Bit) is sent last. The MSB appears on the SDA line one bit clock after the edge of the WS transition.

Return

Format

The query returns LJ, RJ, or IIS.

Example

:TRIGger:IIS:ALIGnment LJ /*Sets the alignment mode of I2S trigger to LJ.*/

:TRIGger:IIS:ALIGnment? /*The query returns LJ.*/

:TRIGger:IIS:CLOCk:SLOPe

Syntax

:TRIGger:IIS:CLOCk:SLOPe <slope>

:TRIGger:IIS:CLOCk:SLOPe?

Description

Sets or queries the type of the clock edge of I2S trigger.

Parameter

Name

<slope>

Type

Discrete

Range

{NEGative|POSitive}

Default

POSitive

Return

Format

The query returns NEG or POS.

Example

:TRIGger:IIS:CLOCk:SLOPe NEGative /*Sets the clock edge to NEGative.*/

:TRIGger:IIS:CLOCk:SLOPe? /*The query returns NEG.*/

2-230 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:IIS:SOURce:CLOCk

Syntax

:TRIGger:IIS:SOURce:CLOCk <source>

:TRIGger:IIS:SOURce:CLOCk?

Description

Sets or queries the clock source of the I2S trigger.

Parameter

Name Type

<source> Discrete

Range

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D

10|D11|D12|D13|D14|D15|CHANnel1|

CHANnel2}

Default

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13,

D14, D15, CHAN1, or CHAN2.

Example

:TRIGger:IIS:SOURce:CLOCk CHANnel2

/*Sets the clock source to CHANnel2.*/

:TRIGger:IIS:SOURce:CLOCk?

/*The query returns CHAN2.*/

:TRIGger:IIS:SOURce:DATA

Syntax

:TRIGger:IIS:SOURce:DATA <source>

:TRIGger:IIS:SOURce:DATA?

Description

Sets or queries the data source of the I2S trigger.

Parameter

Name Type Range

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D

10|D11|D12|D13|D14|D15|CHANnel1|

CHANnel2}

Default

CHANnel2

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13,

D14, D15, CHAN1, or CHAN2.

Example

:TRIGger:IIS:SOURce:DATA CHANnel2 /*Sets the data source to CHANnel2.*/

:TRIGger:IIS:SOURce:DATA? /*The query returns CHAN2.*/

:TRIGger:IIS:SOURce:WSELect

Syntax

:TRIGger:IIS:SOURce:WSELect <source>

:TRIGger:IIS:SOURce:WSELect?

Description

Sets or queries the audio channel of the I2S trigger.

Parameter Name Type Default

<source> Discrete

Range

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D

10|D11|D12|D13|D14|D15|CHANnel1|

CHANnel2}

CHANnel2

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13,

D14, D15, CHAN1, or CHAN2.

Example

:TRIGger:IIS:SOURce:WSELect CHANnel2 /*Sets the audio channel to CHANnel2.*/

:TRIGger:IIS:SOURce:WSELect? /*The query returns CHAN2.*/

MSO5000-E Programming Guide 2-231

RIGOL

Chapter 2 Command System

:TRIGger:IIS:WHEN

Syntax

:TRIGger:IIS:WHEN <operator>

:TRIGger:IIS:WHEN?

Description

Sets or queries the trigger condition of I2S trigger.

Parameter

Name Type

<operator> Discrete

Range

{EQUal|NOTequal|LESSthan|GREaterthan|

INRange|OUTRange}

Default

EQUal

Description

EQUal: triggers on when the channel's data value equals the set value.

NOTequal: triggers on when the channel's data value does not equal the set value.

LESSthan: triggers on when the channel's data value is smaller than the set value.

GREaterthan: triggers on when the channel's data value is greater than the set value.

Return

Format

INRange: triggers on when the channel's data value is smaller than the set upper limit value and greater than the set lower limit value.

OUTRange: triggers on when the channel's data value is greater than the set upper limit value or smaller than the set lower limit value.

The query returns EQU, NOT, LESS, GRE, INR, or OUTR.

Example

:TRIGger:IIS:WHEN NOTequal /*Sets the trigger condition of I2S trigger to

NOTequal.*/

:TRIGger:IIS:WHEN? /*The query returns NOT.*/

:TRIGger:IIS:AUDio

Syntax

:TRIGger:IIS:AUDio <audio>

:TRIGger:IIS:AUDio?

Description

Sets or queries the audio state of I2S trigger.

Parameter

Name Type Range Default

<audio> Discrete {RIGHt|LEFT|EITHer}

Description

RIGHt: data of the right channel.

LEFT: data of the left channel.

Return

Format

EITHer: data of either of the channel.

The query returns RIGH, LEFT, or EITH.

Example

:TRIGger:IIS:AUDio RIGHt /*Sets the I2S audio to RIGHt.*/

:TRIGger:IIS:AUDio? /*The query returns RIGH.*/

LEFT

2-232 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:IIS:DATA

Syntax

:TRIGger:IIS:DATA <data>

:TRIGger:IIS:DATA?

Description

Sets or queries the data value of the I2S trigger.

Parameter

Name Type

<data> Integer

Range

0 to 2 32 -1

Default

0

Description

The settable range of <data> is affected by the byte length. The maximum byte length can be set to 4, i.g. 32-bit binary data. Therefore, the range of <data> is from

0 to 2 32 - 1.

Return

Format

The query returns an integer ranging from 0 to 2 32 - 1.

Example

:TRIGger:IIS:DATA 10 /*Sets the data value to 10.*/

:TRIGger:IIS:DATA? /*The query returns 10.*/

MSO5000-E Programming Guide 2-233

RIGOL

Chapter 2 Command System

:TRIGger:LIN (Option)

Command List:

:TRIGger:LIN:SOURce

:TRIGger:LIN:ID

:TRIGger:LIN:BAUD

:TRIGger:LIN:STANdard

:TRIGger:LIN:SAMPlepoint

:TRIGger:LIN:WHEN

:TRIGger:LIN:LEVel

:TRIGger:LIN:SOURce

Syntax

:TRIGger:LIN:SOURce <source>

:TRIGger:LIN:SOURce?

Description

Sets or queries the trigger source of LIN trigger.

Parameter

Name Type Range

Description

Sets or queries the ID value of LIN trigger.

Parameter Name Type Range

<id> Real 0 to 63

Return

Format

The query returns an integer ranging from 0 to 63.

Example

:TRIGger:LIN:ID 4 /*Sets the ID value of LIN trigger to 4.*/

:TRIGger:LIN:ID? /*The query returns 4.*/

Default

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D1

2|D13|D14|D15|CHANnel1|CHANnel2}

CHANnel1

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15,

CHAN1, or CHAN2.

Example

:TRIGger:LIN:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:LIN:SOURce? /*The query returns CHAN2.*/

:TRIGger:LIN:ID

Syntax

:TRIGger:LIN:ID <id>

:TRIGger:LIN:ID?

Default

0

2-234 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:LIN:BAUD

Syntax

:TRIGger:LIN:BAUD <baud>

:TRIGger:LIN:BAUD?

Description

Sets or queries the baud rate of LIN trigger. The default unit is bps.

Parameter

Name

<baud>

Type

Integer

Range

1 kbps to 20 Mbps

Default

9600 bps

Remarks

If the baud rate is set to a value with "M", then "A" should be added at the end of the value. For example, if you send 5M, you need to send 5MA.

Return Format

The query returns an integer ranging from 1 kbps to 20 Mbps.

Example

:TRIGger:LIN:BAUD 19200 /*Sets the baud rate of LIN trigger to 19200 bps.*/

:TRIGger:LIN:BAUD? /*The query returns 19200.*/

:TRIGger:LIN:STANdard

Syntax

:TRIGger:LIN:STANdard <std>

:TRIGger:LIN:STANdard?

Description

Sets or queries the protocol version of LIN trigger.

Parameter

Name Type Range Default

<std> Discrete {1X|2X|BOTH} BOTH

Return Format

The query returns 1X, 2X, or BOTH.

Example

:TRIGger:LIN:STANdard 2X /*Sets the protocol version of LIN trigger to 2X.*/

:TRIGger:LIN:STANdard? /*The query returns 2X.*/

:TRIGger:LIN:SAMPlepoint

Syntax

:TRIGger:LIN:SAMPlepoint <value>

:TRIGger:LIN:SAMPlepoint?

Description

Sets or queries the sample position of LIN trigger.

Parameter

Name Type

<value> Integer

Range

10 to 90

Default

50

Description

The sample position is expressed as the ratio of "time from the bit start to the sample point" to "bit time", in %.

Return Format

The query returns an integer ranging from 10 to 90.

Example

:TRIGger:LIN:SAMPlepoint 40

/*Sets the sample point position of LIN trigger to 40%.*/

:TRIGger:LIN:SAMPlepoint?

/*The query returns 40.*/

MSO5000-E Programming Guide 2-235

RIGOL

Chapter 2 Command System

:TRIGger:LIN:WHEN

Syntax

:TRIGger:LIN:WHEN <when>

:TRIGger:LIN:WHEN?

Description

Sets or queries the trigger condition of LIN trigger.

Parameter

Name Type Range Default

SYNCbreak

Description

SYNCbreak: triggers on the last bit of the sync field.

ID: triggers when the frames with the specified ID are found.

DATA: triggers when the data that meet the preset conditions are found.

IDData: triggers when the frames with the specified ID and data that meet the preset conditions are both found.

SLEep: triggers when the sleep frame is found.

WAKeup: triggers when the wakeup frame is found.

ERRor: triggers on the specified type of error frame.

Return Format

The query returns SYNC, ID, DATA, IDD, SLE, WAK, or ERR.

Example

:TRIGger:LIN:WHEN SYNCbreak /*Sets the trigger condition to SYNCbreak.*/

:TRIGger:LIN:WHEN? /*The query returns SYNC.*/

:TRIGger:LIN:LEVel

Syntax

:TRIGger:LIN:LEVel <level>

:TRIGger:LIN:LEVel?

Description

Sets or queries the trigger level of LIN trigger. Its unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

<level> Real

(-5 × VerticalScale - OFFSet) to

(7 × VerticalScale - OFFSet)

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the trigger level in scientific notation.

Example

:TRIGger:LIN:LEVel 0.16 /*Sets the trigger level to 160 mV.*/

:TRIGger:LIN:LEVel? /*The query returns 1.600000E-1.*/

2-236 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:TRIGger:M1553 (Option)

Command List:

:TRIGger:M1553:SOURce

:TRIGger:M1553:WHEN

:TRIGger:M1553:POLarity

:TRIGger:M1553:ALEVel

:TRIGger:M1553:BLEVel

:TRIGger:M1553:SOURce

Syntax

:TRIGger:M1553:SOURce <source>

:TRIGger:M1553:SOURce?

Description

Sets or queries the trigger source of M1553 trigger.

Parameter

Name Type Range

<source> Discrete {CHANnel1|CHANnel2}

Default

CHANnel1

Return

Format

The query returns CHAN1 or CHAN2.

Example

:TRIGger:M1553:SOURce CHANnel2 /*Sets the trigger source to CHANnel2.*/

:TRIGger:M1553:SOURce? /*The query returns CHAN2.*/

:TRIGger:M1553:WHEN

Syntax

:TRIGger:M1553:WHEN <when>

:TRIGger:M1553:WHEN?

Description

Sets or queries the trigger condition of M1553 trigger.

Parameter

Name Type Range Default

<when> Discrete {SYNCbreak|DATA|CMD|STATus|ERRor} SYNCbreak

Description

SYNCbreak: triggers on the specified sync type.

DATA: triggers on the specified data word.

CMD: triggers on the specified remote terminal address.

STATus: triggers on the RTA and the remaining 11 bits.

Return

Format

ERRor: triggers on the specified error type.

The query returns SYNC, DATA, CMD, STAT, or ERR.

Example

:TRIGger:M1553:WHEN CMD /*Sets the trigger condition to CMD.*/

:TRIGger:M1553:WHEN? /*The query returns CMD.*/

MSO5000-E Programming Guide 2-237

RIGOL

Chapter 2 Command System

:TRIGger:M1553:POLarity

Syntax

:TRIGger:M1553:POLarity <polarity>

:TRIGger:M1553:POLarity?

Description

Sets or queries the polarity of M1553 trigger.

Parameter

Name Type Range

<polarity> Discrete {POSitive|NEGative}

Return

Format

The query returns POS or NEG.

Default

POSitive

Example

:TRIGger:M1553:POLarity POSitive /*Sets the polarity of M1553 trigger to POSitive.*/

:TRIGger:M1553:POLarity? /*The query returns POS.*/

:TRIGger:M1553:ALEVel

Syntax

:TRIGger:M1553:ALEVel <level>

:TRIGger:M1553:ALEVel?

Description

Sets or queries the upper limit of the trigger level of M1553 trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

<level> Real

Lower limit to

(5 × VerticalScale - OFFSet)

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the upper limit of the trigger level in scientific notation.

Example

:TRIGger:M1553:ALEVel 0.16 /*Sets the upper limit of the trigger level to 160 mV.*/

:TRIGger:M1553:ALEVel? /*The query returns 1.600000E-1.*/

:TRIGger:M1553:BLEVel

Syntax

:TRIGger:M1553:BLEVel <level>

:TRIGger:M1553:BLEVel?

Description

Sets or queries the lower limit of the trigger level of M1553 trigger. The unit is the same as that of the current amplitude.

Parameter

Name Type Range Default

<level> Real

(-5 × VerticalScale - OFFSet) to upper limit

0 V

Remarks

For VerticalScale, refer to the :CHANnel<n>:SCALe command; for OFFSet, refer to

the :CHANnel<n>:OFFSet command.

Return

Format

The query returns the lower limit of the trigger level in scientific notation.

Example

:TRIGger:M1553:BLEVel 0.05 /*Sets the lower limit of the trigger level to 50 mV.*/

:TRIGger:M1553:BLEVel? /*The query returns 5.000000E-2.*/

2-238 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:WAVeform Commands

The :WAVeform commands are used to read waveform data and relevant settings. The :WAVeform:MODE

command is used to set the reading mode of waveform data. In different modes, the definitions for the parameters are different, as shown in Figure 2-1 and 2-2.

XINCrement=TimeScale/100

XREFerence XORigion

YORigion

YREFerence

YINCrement = VerticalScale/25

Figure 2-1 Parameter Definitions in NORMAL Mode

XINCrement = 1/SampleRate XREFerence

XORigion

YORigion

YREFerence

YINCrement [1]

Figure 2-2 Parameter Definitions in RAW Mode

Note [1] :

In RAW mode, YINCrement and Verticalscale of the memory waveforms are related to the currently selected

Verticalscale.

MSO5000-E Programming Guide 2-239

RIGOL

Chapter 2 Command System

Command List:

:WAVeform:SOURce

:WAVeform:MODE

:WAVeform:FORMat

:WAVeform:POINts

:WAVeform:DATA?

:WAVeform:XINCrement?

:WAVeform:XORigin?

:WAVeform:XREFerence?

:WAVeform:YINCrement?

:WAVeform:YORigin?

:WAVeform:YREFerence?

:WAVeform:STARt

:WAVeform:STOP

:WAVeform:PREamble?

:WAVeform:SOURce

Syntax

:WAVeform:SOURce <source>

:WAVeform:SOURce?

Description

Sets or queries the source channel of waveform data reading.

Parameter

Name Type Range Default

<source> Discrete

{D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D

11|D12|D13|D14|D15|CHANnel1|CHANnel2

|MATH1|MATH2|MATH3|MATH4}

CHANnel1

Remarks

When the channel source is set to MATH1-MATH4, :WAVeform:MODE

can only select the NORMal mode.

When the channel source is set to a digital channel, the query

command :WAVeform:DATA?

always returns the waveform data in byte format. If the command reads the screen waveform data, it returns the signal status of the currently selected channel source. One waveform point occupies 1 byte (8 bits). If the command reads the memory waveform data, it returns the signal status of the channel group where the currently selected channel sources reside. 1 byte represents the status of one group of digital signals.

Return

Format

The query returns D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14,

D15, CHAN1, CHAN2, MATH1, MATH2, MATH3, or MATH4.

Example

:WAVeform:SOURce CHANnel2 /*Sets the channel source to CHANnel2.*/

:WAVeform:SOURce? /*The query returns CHAN2.*/

2-240 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:WAVeform:MODE

Syntax

:WAVeform:MODE <mode>

:WAVeform:MODE?

Description

Sets or queries the mode of the :WAVeform:DATA?

command in reading data.

Parameter

Name Type Range Default

<mode> Discrete {NORMal|MAXimum|RAW} NORMal

Remarks

NORMal: reads the waveform data currently displayed on the screen.

MAXimum: reads the waveform data displayed on the screen when the oscilloscope is in the Run state; reads the waveform data in the internal memory when the oscilloscope is in the Stop state.

RAW: reads the waveform data in the internal memory. Note: The data in the internal memory can only be read when the oscilloscope is in the Stop state. You are not allowed to operate the instrument when it is reading data.

Return

Format

When the channel source is set to MATH, only the NORMal mode is valid.

The query returns NORM, MAX, or RAW.

Example

:WAVeform:MODE RAW /*Sets the reading mode of waveform data to RAW.*/

:WAVeform:MODE? /*The query returns RAW.*/

:WAVeform:FORMat

Syntax

:WAVeform:FORMat <format>

:WAVeform:FORMat?

Description

Sets or queries the return format of the waveform data.

Parameter

Name Type Range

<format> Discrete {WORD|BYTE|ASCii}

Default

BYTE

Remarks

WORD: Each waveform point occupies 2 bytes (16 bits). The lower 8 bits are valid and the higher 8 bits are 0.

BYTE: Each waveform point occupies one byte (8 bits).

ASCii: The query returns the actual voltage value of each waveform point in scientific notation; and the voltage values are separated by commas.

The query returns WORD, BYTE, or ASC.

Return

Format

Example

:WAVeform:FORMat WORD /*Sets the returned format of waveform data to WORD.*/

:WAVeform:FORMat? /*The query returns WORD.*/

MSO5000-E Programming Guide 2-241

RIGOL

Chapter 2 Command System

:WAVeform:POINts

Syntax

:WAVeform:POINts <point>

:WAVeform:POINts?

Description

Sets or queries the number of the waveform points to be read.

Parameter

Name Type Range

<point> Integer Refer to

Remarks

Default

——

Remarks

The range of <point> is related to the current reading mode of the waveform data.

NORMal: 1 to 1,000

RAW: 1 to the current maximum memory depth

MAXimum: 1 to the number of effective points on the current screen

Return

Format

The query returns the number of waveform points in integer.

:WAVeform:DATA?

Syntax

:WAVeform:DATA?

Description

Reads the waveform data.

Remarks

Procedures of reading the waveform data on the screen:

S1. :WAV:SOUR CHAN1 Sets the channel source to CH1.

S2. :WAV:MODE NORMal Sets the waveform reading mode to NORMal.

S3. :WAV:FORM BYTE

S4. :WAV:DATA?

Sets the return format of the waveform data to

BYTE.

Reads the waveform data on the screen.

Return

Format

Procedures of reading the waveform data in the internal memory:

S1. :WAV:SOUR CHAN1

S2. :WAV:MODE RAW

Sets the channel source to CH1.

Sets the waveform reading mode to RAW.

S3. :WAV:FORM BYTE Sets the return format of the waveform data to BYTE.

S4. :WAVeform:POINts 10000 Reads the number of memory waveform points to 10000.

S5. :WAV:DATA? Reads the waveform data from the internal memory.

The return format is related to the return format of the currently selected waveform data.

WORD or BYTE format: The read data format is TMC header + waveform data points

+ end identifier. The TMC header is in the form of #NXXXXXX. Wherein, # is the identifier, N indicates the N bytes following it. The length of the waveform data points is in the form of ASCII. The end identifier is used to indicate the ending of communication. For example, the data read for one time is #900000XXXX. XXXX indicates 1000 bytes.

ASCii: The query returns the actual voltage value of each waveform point in scientific notation; and the voltage values are separated by commas.

Note:

When the channel source of waveform data reading is set to a digital channel, the query command always returns the waveform data in BYTE format. If the command reads the screen waveform data, it returns the signal status of the currently selected channel source. One waveform point occupies 1 byte (8 bits). If

2-242 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

the command reads the memory waveform data, it returns the signal status of the channel group where the currently selected channel sources reside. 1 byte represents the status of one group of digital signals.

When the waveform data in the internal memory are read in batches, the waveform data returned each time might be the data in one area of the internal memory. In

"WORD" or "BYTE" return format, each returned data in blocks contain the TMC data block header. Waveform data in two adjacent data blocks are consecutive.

:WAVeform:XINCrement?

Syntax

:WAVeform:XINCrement?

Description

Queries the time interval between two neighboring points of the currently selected channel source in the X direction.

Remarks

The returned value is related to the current data reading mode:

In NORMal mode, XINCrement = TimeScale/100.

In RAW mode, XINCrement = 1/SampleRate.

In MAX mode, XINCrement = TimeScale/100 when the oscilloscope is in the Run state; XINCrement = 1/SampleRate when the oscilloscope is in the Stop state.

The unit is related to the current channel source.

Return

Format

The query returns the time difference in scientific notation.

:WAVeform:XORigin?

Syntax

:WAVeform:XORigin?

Description

Queries the start time of the waveform data of the currently selected channel source in the X direction.

Remarks

The returned value is related to the current data reading mode:

In NORMal mode, the query returns the start time of the waveform data displayed on the screen.

In RAW mode, the query returns the start time of the waveform data in the internal memory.

In MAX mode, the query returns the start time of the waveform data displayed on the screen when the instrument is in the RUN state; the query returns the start time of the waveform data in the internal memory when the instrument is in the Stop state.

The unit is related to the current channel source.

Return

Format

The query returns the time value in scientific notation.

:WAVeform:XREFerence?

Syntax

:WAVeform:XREFerence?

Description

Queries the reference time of the waveform points of the currently selected channel source in the X direction.

Return

Format

The query returns 0 (namely the first waveform point on the screen or in the internal memory).

MSO5000-E Programming Guide 2-243

RIGOL

Chapter 2 Command System

:WAVeform:YINCrement?

Syntax

:WAVeform:YINCrement?

Description

Queries the unit voltage of the current channel in the Y axis. Its unit is the same as that of the current amplitude.

Remarks

The returned value is related to the current data reading mode:

In NORMal mode, YINCrement = VerticalScale/25.

In RAW mode, YINCrement and VerticalScale of the memory waveforms are related to the currently selected VerticalScale.

In Max mode, YINCrement = VerticalScale/25 when the instrument is in the RUN state;

YINCrement is related to the VerticalScale of the internal waveform and the currently selected VerticalScale when the instrument is in the Stop state.

Return

Format

The query returns the unit voltage in scientific notation.

:WAVeform:YORigin?

Syntax

:WAVeform:YORigin?

Description

Queries the vertical offset relative to the vertical reference position of the currently selected channel source in the Y direction.

Remarks

The returned value is related to the current data reading mode:

In NORMal mode, YORigin = VerticalOffset/YINCrement.

In RAW mode, YORigin and VerticalScale of the memory waveforms are related to the currently selected VerticalScale.

In Max mode, YORigin = VerticalOffset/YINCrement when the instrument is in the RUN state; YORigin is related to the VerticalScale of the internal waveform and the currently selected VerticalScale when the instrument is in the Stop state.

Return

Format

The query returns an integer.

:WAVeform:YREFerence?

Syntax

:WAVeform:YREFerence?

Description

Queries the vertical reference position of the currently selected channel source in the Y direction.

Remarks

YREFerence is a fixed value 128.

Return

Format

The query returns an integer.

2-244 MSO5000-E Programming Guide

Chapter 2 Command System

RIGOL

:WAVeform:STARt

Syntax

:WAVeform:STARt <sta>

:WAVeform:STARt?

Description

Sets or queries the start position of waveform data reading.

Parameter

Name Type Range

<sta> Integer

NORMal: 1 to 1,000

MAX: 1 to the number of effective points on the current screen

RAW: 1 to the current maximum memory depth

Default

1

Remarks

When reading the waveform data in the internal memory, the actual settable ranges of the start point and stop point of a reading operation are related to the memory depth of the oscilloscope and the return format of the waveform data currently selected.

Return

Format

The query returns an integer.

Example

:WAVeform:STARt 100 /*Sets the start point to 100.*/

:WAVeform:STARt? /*The query returns 100.*/

:WAVeform:STOP

Syntax

:WAVeform:STOP <stop>

:WAVeform:STOP?

Description

Sets or queries the stop position of waveform data reading.

Parameter

Name Type

<stop> Integer

Range

NORMal: 1 to 1,000

MAX: 1 to the number of effective points on the current screen

RAW: 1 to the current maximum memory depth

Default

1,000

Remarks

When reading the waveform data in the internal memory, the actual settable ranges of the start point and stop point of a reading operation are related to the memory depth of the oscilloscope and the return format of the waveform data currently selected.

Return

Format

The query returns an integer.

Example

:WAVeform:STOP 500 /*Sets the stop point to 500.*/

:WAVeform:STOP? /*The query returns 500.*/

MSO5000-E Programming Guide 2-245

RIGOL

Chapter 2 Command System

:WAVeform:PREamble?

Syntax

:WAVeform:PREamble?

Description

Queries all the waveform parameters.

Return

Format

The query returns 10 waveform parameters, separated by commas.

<format>,<type>,<points>,<count>,<xincrement>,<xorigin>,<xreference>,<yincrem ent>,<yorigin>,<yreference>

Wherein,

<format>: indicates 0 (BYTE), 1 (WORD), or 2 (ASC).

<type>: indicates 0 (NORMal), 1 (MAXimum), or 2 (RAW).

<points>: After the memory depth option is installed, <points> is an integer ranging from

1 to 100,000,000.

<count>: indicates the number of averages in the average sample mode. The value of

<count> parameter is 1 in other modes.

<xincrement>: indicates the time difference between two neighboring points in the X direction.

<xorigin>: indicates the start time of the waveform data in the X direction.

<xreference>: indicates the reference time of the waveform data in the X direction.

<yincrement>: indicates the step value of the waveforms in the Y direction.

<yorigin>: indicates the vertical offset relative to the "Vertical Reference Position" in the Y direction.

<yreference>: indicates the vertical reference position in the Y direction.

Example

:WAVeform:PREamble?

/*The query returns

0,0,1000,1,1.000000E-8,-5.000000E-6,0.000000E-12,4.000000E-03,0,128.*/

2-246 MSO5000-E Programming Guide

Chapter 3 Programming Examples

RIGOL

Chapter 3 Programming Examples

This chapter illustrates how to control the MSO5000-E series digital oscilloscope by programming in Excel,

LabVIEW, Visual Basic, and Visual C++. These instances are programmed based on Virtual Instrument

Software Architecture (VISA) library.

Contents in this chapter:

Programming Preparations

Excel Programming Example

LabVIEW Programming Example

Visual Basic Programming Example

Visual C++ Programming Example

MSO5000-E Programming Guide 3-1

RIGOL

Chapter 3 Programming Examples

Programming Preparations

Before programming, you need to prepare the following tasks:

Install Ultra Sigma (PC) software. You can log in to the

RIGOL

official website (www.rigol.com) to download the software. Then install the software according to the installation wizard. After Ultra Sigma is installed successfully, NI-VISA library will be completely installed automatically. In this manual, the default installation path is C:\Program Files\IVI Foundation\VISA.

In the manual, the oscilloscope communicates with the PC via the USB interface. Connect the USB Device interface on the rear panel of the oscilloscope to the PC by using the USB cable. After the oscilloscope is properly connected to the PC, power on the instrument to start it. In this case, "Found New Hardware

Wizard" dialog box appears on the PC. Please install "USB Test and Measurement Device (IVI)" according to the instructions.

By now, the programming preparations are complete. The following parts will make a detailed introduction about the programming examples in Excel, LabVIEW, Visual Basic, and Visual C++.

3-2 MSO5000-E Programming Guide

Chapter 3 Programming Examples

RIGOL

Excel Programming Example

Program used in this instance:

Microsoft Excel 2007

Function realized in this example:

send the *IDN? command and read the instrument information.

1.

Open a new Macro-enabled Excel file and name it "MSO5000-E_Demo_Excel.xlsm".

2.

Run the MSO5000-E_Demo_Excel.xlsm file. Click

File

Options

at the upper-left corner of the Excel file to open the interface as shown in the figure below. Click

Customize Ribbon

at the left, check

Developer

and click

OK

. At this point, the Excel menu bar displays the

Developer

menu.

3.

Enter a device resource descriptor into a cell of the file as shown in the figure below. For example, the device resource descriptor is USB0::0x1AB1::0x0514::MSO5B200112345::INSTR. Input it into

SHEET1.CELLS(1,2) (i.g. the B1 cell in Sheet1). Click the

Developer

menu and select the

Visual

Basic

option to open the Microsoft Visual Basic.

MSO5000-E Programming Guide 3-3

RIGOL

Chapter 3 Programming Examples

4.

Click

Tools(T)

in the Microsoft Visual Basic menu bar and select

References

.

In the displayed dialog box, select

VISA Library

, and click

OK

to refer to VISA Library.

3-4

Remarks:

If you cannot find VISA Library in the left section of the above dialog box, please follow the method below to find it.

(1) Make sure that your PC has installed the NI-VISA library.

(2) Click

Browse...

at the right section to search visa32.dll from C:\WINDOWS\system32, as shown in the figure below.

MSO5000-E Programming Guide

Chapter 3 Programming Examples

RIGOL

5.

Click

View Code

under

Developer

menu to enter the interface of Microsoft Visual Basic. Add the following codes and save it.

Note:

If the Excel file created in Step 2 does not enable the Macros, a prompt message "The following features cannot be saved in macro-free workbooks" will be displayed. In this case, please save the file as a macro-enabled file type (filename with a suffix of ".xlsm").

Sub QueryIdn()

Dim viDefRm As Long

Dim viDevice As Long

Dim viErr As Long

Dim cmdStr As String

Dim idnStr As String * 128

Dim ret As Long

'Turn on the device, and the device resource descriptor is in CELLS(1,2) of SHEET1'

viErr = visa.viOpenDefaultRM(viDefRm)

viErr = visa.viOpen(viDefRm, Sheet1.Cells(1, 2), 0, 5000, viDevice)

'Send request, read the data, and the return value is in CELLS(2,2) of SHEET1'

cmdStr = "*IDN?"

viErr = visa.viWrite(viDevice, cmdStr, Len(cmdStr), ret)

viErr = visa.viRead(viDevice, idnStr, 128, ret)

Sheet1.Cells(2, 2) = idnStr

'Turn off the device'

visa.viClose (viDevice)

visa.viClose (viDefRm)

End Sub

6.

Add the button control. Click

Insert

under the

Developer

menu, and select a button control under the

Form Controls

menu item and put it into the Excel cell. At this time, the

Macro

dialog box is displayed, select "Sheet1.QueryIdn" and click

OK

.

MSO5000-E Programming Guide 3-5

RIGOL

Chapter 3 Programming Examples

The default name of the button is "Button1". Right-click the button and select

Edit Text

in the pop-up menu to change the button name to "*IDN?".

7.

Click the "*IDN?" button to send request and read data. The returned value is in CELLS(2,2) of

SHEET1.

3-6 MSO5000-E Programming Guide

Chapter 3 Programming Examples

LabVIEW Programming Example

Program used in this instance:

LabVIEW2010

Function realized in this example:

read the waveform data of CH1 on the screen.

1.

Run LabVIEW, create a VI file and name it as MSO5000-E_Demo.

2.

Add controls and create the front panel as shown in the figure below.

RIGOL

3.

Open the

Block Diagram

interface. Click

Instrument I/O

VISA

. Add the following functions:

VISA Open, VISA Read, VISA Write, and VISA Close.

4.

Change the default

Asynchronous

to

Synchronous

.

MSO5000-E Programming Guide 3-7

RIGOL

Chapter 3 Programming Examples

5.

Connect the

VISA resource name

with the

VISA Open

. Then, connect the VISA resource name outputs of all the functions with the

VISA resource name

and connect the error output with the error input, as shown in the figure below.

6.

Add string constant in the write buffer areas of the VISA Write function and input the following instructions in the figure below. Waveform data is read through the VISA Read function which requires users to input the total number of bytes to be read. In this example, the total number of bytes of waveform data to be read is less than 2048. Use the VISA Close function to close the VISA resource after the VISA operation is finished.

7.

The data format is TMC header + waveform data points + terminator. The TMC header is in #NXXXXXX format, wherein, # is the TMC header denoter, N represents that there are N bytes following. The length of the waveform data points is described in ASCII character, and the terminator represents the ending of the communication. For example, for #9000001000XXXX, 9 bytes are used to describe the length of the data, 000001000 represents the length of the waveform data (namely 1000 bytes). Use the following block diagram to obtain the number of bytes that the TMC header occupies. Ignore the

TMC header and delete the terminator at the end of the waveform data, and transfer the waveform data to the byte data and display it on the waveform diagram controls.

3-8

The available functions used in the above block diagram are as follows:

MSO5000-E Programming Guide

Chapter 3 Programming Examples

RIGOL

Used to obtain the TMC header"#N". After obtaining the number of bytes that the TMC header occupies, ignore the data header to obtain the waveform data strings.

Used to obtain the waveform data length bytes.

Used to delete the terminator at the end of the waveform data.

Used to transfer waveform data strings to the byte group.

8.

The complete program block diagram is as shown in the figure below.

9.

Select the device resource from the

VISA Resource Name

list box and run the program.

MSO5000-E Programming Guide 3-9

RIGOL

Chapter 3 Programming Examples

3-10 MSO5000-E Programming Guide

Chapter 3 Programming Examples

RIGOL

Visual Basic Programming Example

Program used in this example:

Visual Basic 6.0

Function realized in this example:

control the on/off state of any channel.

Enter the Visual Basic 6.0 programming environment, and perform the following procedures.

1.

Build a standard application program project (Standard EXE), and name it "Demo".

2.

Click

Project

Add Module

to open the

Add Module

dialog box. In the dialog box, click the

Existing

tab to search for the visa32.bas file in the "include" folder under the NI-VISA installation path and add the file.

3.

In the

Demo

dialog box, add two buttons to represent CH1 and CH2 respectively. Add two labels

(Label1(0) and Label1(1)) to represent the statuses of CH1 and CH2 respectively (when the channel is enabled, it displays the color of the channel; when the channel is disabled, it displays gray), as shown in the figure below.

4.

Click

Project

Project1 Properties

to open the

Project1 – Project Properties

dialog box. In the dialog box, click on the

General

tab and select

Form1

from the drop-down list under

Startup

Object

.

5.

Double-click

CH1

to enter the programming environment. Add the following codes to control CH1-CH2.

The codes of CH1 are as shown below; the code of CH2 is similar.

MSO5000-E Programming Guide 3-11

RIGOL

Chapter 3 Programming Examples

6.

Dim defrm As Long

Dim vi As Long

Dim strRes As String * 200

Dim list As Long

Dim nmatches As Long

Dim matches As String * 200 ' Reserve the obtained device number

Dim s32Disp As Integer

' Obtain the usb resource of visa

Call viOpenDefaultRM(defrm)

Call viFindRsrc(defrm, "USB?*", list, nmatches, matches)

' Turn on the instrument

Call viOpen(defrm, matches, 0, 0, vi)

' Send a command to query the status of CH1

Call viVPrintf(vi, ":CHAN1:DISP?" + Chr$(10), 0)

' Obtain the status of CH1

Call viVScanf(vi, "%t", strRes) s32Disp = CInt(strRes)

If (s32Disp = 1) Then

' Send the setting command

Call viVPrintf(vi, ":CHAN1:DISP 0" + Chr$(10), 0)

Label1(0).ForeColor = &H808080 'Gray

Else

Call viVPrintf(vi, ":CHAN1:DISP 1" + Chr$(10), 0)

Label1(0).ForeColor = &HFFFF& 'Yellow

End If

' Close the resource

Call viClose(vi)

Call viClose(defrm)

Save and run the project to obtain a single exe program for demo. When the oscilloscope is correctly connected to the PC, you can control the on/off status of any channel.

3-12 MSO5000-E Programming Guide

Chapter 3 Programming Examples

RIGOL

Visual C++ Programming Example

Program used in this example:

Visual C++6.0

Function realized in this example:

search for the instrument address, connect to the instrument, send and read commands.

Enter the Visual C++6.0 programming environment, and perform the following procedures.

1.

Create a MFC project based on a dialog box.

2.

Click

Project

Settings

to open the Project Setting dialog box. In the dialog box, click the

C/C++

tab, select

Code Generation

from the drop-down list under

Category

. Choose

Debug

Multithreaded DLL

from the drop-down list under

Use run-time library

. Click

OK

to close the dialog box.

3.

Click

Project

Settings

to open the

Project Setting

dialog box. In the dialog box, click the

Link

tab, add visa32.lib under

Object/library modules

, then click

OK

to close the dialog box.

MSO5000-E Programming Guide 3-13

RIGOL

Chapter 3 Programming Examples

4.

Click

Tools

Options

to open the

Options

dialog box. Then, click the

Directories

tab.

Select

Include files

from the drop-down list under

Show directories for

. Double click the empty space under

Directories

to enter the specified path of Include files: C:\Program Files\IVI

Foundation\VISA\WinNT\include. Click

OK

to close the dialog box.

Select

Library files

from the drop-down list under

Show directories for

. Double-click the empty space under

Directories

to enter the specified path of Library files: C:\Program Files\IVI

Foundation\VISA\WinNT\lib\msc. Click

OK

to close the dialog box.

Note:

By now, VISA library has been added.

5.

Add the

Text

,

Combo Box, Button

, and

Edit Box

controls. The layout interface for adding controls is as follows:

6.

Modify the control attributes.

1) Name

Text

as "Command".

2) Open the

Data

item in

Combo Box

attribute and input *IDN? Manually.

3) Open the

General

item in

Edit Box

attribute and select

Disabled

.

4) Name

Button

as

Send and Read

.

3-14 MSO5000-E Programming Guide

Chapter 3 Programming Examples

7.

Add the variables

m_combox

and

m_receive

to the

Combo Box

and

Edit Box

controls respectively.

RIGOL

8.

Add codes.

Double-click

Send and Read

to enter the programming environment. Declare the

#include

<visa.h>

of the VISA library in the header file and then add the following codes:

ViSession defaultRM, vi; char buf [256] = {0};

CString s,strTemp; char* stringTemp;

ViChar buffer [VI_FIND_BUFLEN];

ViRsrc matches=buffer;

ViUInt32 nmatches;

ViFindList list;

MSO5000-E Programming Guide 3-15

3-16

RIGOL

Chapter 3 Programming Examples

viOpenDefaultRM (&defaultRM);

//Acquire the USB resource of VISA viFindRsrc(defaultRM, "USB?*", &list,&nmatches, matches); viOpen (defaultRM,matches,VI_NULL,VI_NULL,&vi);

//Send the command received m_combox.GetLBText(m_combox.GetCurSel(),strTemp); strTemp = strTemp + "\n"; stringTemp = (char*)(LPCTSTR)strTemp; viPrintf (vi,stringTemp);

//Read the results viScanf (vi, "%t\n", &buf);

//Display the results

UpdateData (TRUE); m_receive = buf;

UpdateData (FALSE); viClose (vi); viClose (defaultRM);

9.

Save, compile, and run the project to obtain a single exe file. When the oscilloscope is correctly connected to the PC, enter a command (for example, *IDN?) and click

Send and Read

to execute the command. Then, the reading results will be returned.

MSO5000-E Programming Guide

advertisement

Related manuals

advertisement

Table of contents