Declaration SIGLENT products are protected by patent law in and outside of P.R.C. SIGLENT reserves the right to modify or change parts of or all the specifications or pricing policies at company’s sole decision. Information in this publication replaces all previously corresponding material.
Commands for Old Models”. Version E02B at Introduction The following are the main revisions: Adding commands for serial trigger and decode. Corrected the error description in the document. Version E02C at Introduction The following are the main revisions: WWW.SIGLENT.COM...
Page 4
Add education mode command, and classify it under system function. Corrected the error description in the document. Version E02D at Introduction The following are the main revisions: Make a distinction between different models of AWG commands. Update the example of WF command. WWW.SIGLENT.COM...
CHANNEL C ..........................40 OMMANDS CURSOR C ..........................51 OMMANDS DECODE C ..........................59 OMMANDS DIGITAL C ..........................72 OMMANDS DISPLAY C ..........................82 OMMANDS HISTORY C ..........................88 OMMANDS MATH C ............................95 OMMANDS MEASURE C ..........................113 OMMANDS WWW.SIGLENT.COM...
Page 6
XAMPLES OF SING OCKETS Python Example ..........................333 C Example ............................336 ......................... 338 OMMON OMMAND XAMPLES Read Waveform Data (WF) Example ....................338 Read Waveform Data of Digital Example .................... 339 Screen Dump (SCDP) Example ......................341 INDEX..............................343 WWW.SIGLENT.COM...
After you downloaded the file, follow these steps to install NI-VISA (The full version of NI-VISA 5.4 is used in this example. Newer versions are likely, and should be compatible with SIGLENT instrumentation. Download the latest version available for the operating system being used by the controlling computer): a.
Page 8
Click Unzip, the installation process will automatically launch after unzipping files. If your computer needs to install .NET Framework 4, it may auto start. c. The NI-VISA installing dialog is shown above. Click Next to start the installation process. WWW.SIGLENT.COM...
Page 9
Set the install path, default path is “C:\Program Files\National Instruments\”, you can change it. Click Next, dialog shown as above. e. Click Next twice, in the License Agreement dialog, select the “I accept the above 2 License Agreement(s).”,and click Next, dialog shown as below: WWW.SIGLENT.COM...
Click Next to begin installation. g. Now the installation is complete. Reboot your PC. Connect the Instrument Depending on the specific model, your oscilloscope may be able to communicate with a PC through the USB or LAN interface. WWW.SIGLENT.COM...
Page 11
PC will display the “Device Setup” screen as it automatically installs the device driver as shown below. Wait for the installation to complete and then proceed to the next step. WWW.SIGLENT.COM...
Windows operating systems use a command prompt style interface for the Telnet client. The steps are as follows: 1. On your PC, click Start > All Programs > Accessories > Command Prompt. telnet 2. At the command prompt, type in 3. Press the Enter key. The Telnet display screen will be displayed. WWW.SIGLENT.COM...
Page 13
IP address and 5024 is the port. You should see a response similar to the following: *IDN? 5. At the SCPI> prompt, input the SCPI commands such as to return the company name, model number, serial number, and firmware version number. WWW.SIGLENT.COM...
Socket API can be used to control the SDS1000X-E series via LAN without installing any other libraries. This can reduce the complexity of programming. SOCKET ADDRESS IP address + port number IP ADDRESS SDS IP address PORT NUMBER 5025 Please see section "Examples of Using Sockets" for the details. WWW.SIGLENT.COM...
The commands and queries listed here can be used for SIGLENTs Digital Oscilloscope Series as shown below. Models are arranged according to their initial release dates. Applicable to the following models SDS1000CFL non-SPO model SDS1000A non-SPO model SDS1000CML+/CNL+/DL+/E+/F+ non-SPO model SDS2000/2000X SPO model SDS1000X/1000X+ SPO model SDS1000X-E/X-C SPO model WWW.SIGLENT.COM...
The second line indicates that one of four channels must be chosen for the header path. And the third explains that the actual vertical gain can be set to any value between 2 mV and 10 WWW.SIGLENT.COM...
PASS/FAIL Commands PRINT Commands RECALL Commands REFERENCE Commands SAVE Commands STATUS Commands SYSTEM Commands TIMEBASE Commands TRIGGER Commands SERIAL TRIGGER Commands WGEN Commands Obsolete Commands for Old Models WWW.SIGLENT.COM...
Page 18
The IEEE 488.2 standard defines some general commands for querying the basic information of an instrument or performing common basic operations. These commands usually start with *, and the command key length is 3 characters. *IDN? (Identification Number) *OPC (Operation Complete) *RST (Reset) WWW.SIGLENT.COM...
Page 19
The response consists of four different fields providing information on the manufacturer, the scope model, the serial number and the firmware revision. *IDN? QUERY SYNTAX Siglent Technologies,<model>,<serial RESPONSE FORMAT number>,<firmware> <model>:= the model number of the instrument <serial number>:= A 14-digit decimal code.
Page 20
Standard Event Status Register when all pending device operations have finished. The *OPC? query places an ASCII "1" in the output queue when all pending device operations have completed. The interface hangs until this query returns. COMMAND SYNTAX *OPC QUERY SYNTAX *OPC? RESPONSE FORMAT *OPC 1 WWW.SIGLENT.COM...
Page 21
Digital Oscilloscope Series Programming Guide COMMON (*) *RST Command DESCRIPTION The *RST command initiates a device reset. This is the same as pressing Default on the front panel. COMMAND SYNTAX *RST EXAMPLE This example resets the oscilloscope. Command message: *RST WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide COMM_HEADER Commands CHDR WWW.SIGLENT.COM...
Page 23
OFF— header is omitted from the response and units in numbers are suppressed. Note: Default is the SHORT response format. QUERY SYNTAX COMM_HEADER? RESPONSE FORMAT COMM_HEADER <mode> EXAMPLE The following command sets the response header format to SHORT. Command message: CHDR SHORT WWW.SIGLENT.COM...
The ACQUIRE subsystem controls the way in which waveforms are acquired. These commands set the parameters for acquiring and storing data. STOP ACQW AVGA MSIZ SAST? SARA? SANU? SXSA XYDS WWW.SIGLENT.COM...
Page 25
Step 2: Send the query again to clear the register. Query message: INR? Response message: INR 0 Step 3: Now, send the command to start a new signal acquisition. Command message: Step 4: Send the query to see the effect of ARM. Query message: INR? Response message: WWW.SIGLENT.COM...
Page 26
Digital Oscilloscope Series Programming Guide INR 8193 RELATED COMMANDS STOP TRMD INR? WWW.SIGLENT.COM...
Page 27
STOP Command DESCRIPTION The STOP command stops the acquisition. This is the same as pressing the Stop key on the front panel. COMMAND SYNTAX STOP EXAMPLE The following command stops the acquisition process. Command message: STOP RELATED COMMANDS TRMD WWW.SIGLENT.COM...
Page 28
Note: The [HIGH_RES] option is valid for SPO models. See models on page <time>:={4,16,32,64,128,256,512,…} when <mode> = AVERAGE. Options vary from models. See the data sheet or the acquire menu of the oscilloscope. QUERY SYNTAX ACQUIRE_WAY? WWW.SIGLENT.COM...
Page 29
Digital Oscilloscope Series Programming Guide RESPONSE FORMAT ACQUIRE_WAY <mode>[,<time>] EXAMPLE The following command sets the acquisition mode to average mode and also sets the average time to 16. Command message: ACQW AVERAGE,16 RELATED COMMANDS AVGA WWW.SIGLENT.COM...
Page 30
Options of <time> vary from models. See the data sheet or the acquire menu of the oscilloscope for details. QUERY SYNTAX AVERAGE_ACQUIRE? RESPONSE FORMAT AVERAGE_ACQUIRE <time> EXAMPLE The following command turns the average times of average acquisition to 16. Command message: AVGA 16 RELATED COMMANDS ACQW WWW.SIGLENT.COM...
Page 31
Options of <size> vary from models. See the data sheet or the acquire menu of the oscilloscope for details. QUERY SYNTAX MEMORY_SIZE? RESPONSE FORMAT MEMORY_SIZE <size> EXAMPLE The following command sets the maximum depth of memory to 14M in interleave mode. Command message: MSIZ 14M WWW.SIGLENT.COM...
Page 32
SAMPLE_STATUS? | SAST? Query DESCRIPTION The SAST? query returns the acquisition status of the scope. QUERY SYNTAX SAST? RESPONSE FORMAT SAST <status> EXAMPLE The following query returns the acquisition status of the scope. Query message: SAST? Response message: SAST Trig'd WWW.SIGLENT.COM...
Page 33
Query message: SARA? Response message: SARA 5.00E+05Sa/s The following query returns the sample rate of the digital channel. Query message: DI:SARA? Response message: DI:SARA 5.00E+05Sa/s Note: The table shows the availability of “DI:SARA?” in each digital oscilloscope series. WWW.SIGLENT.COM...
Page 34
Digital Oscilloscope Series Programming Guide Model Valid? SDS2000X SDS1000X SDS1000X-E SDS2000X-E WWW.SIGLENT.COM...
Page 35
/1000X/1000X+ unit and physical unit, such as 28Mpts. others Numerical value, such as 1600. EXAMPLE The following query returns the number of sampled points available from last acquisition from Channel 2. Query message: SANU? C2 Response message: SANU 7.00E+05pts WWW.SIGLENT.COM...
Page 36
COMMAND SYNTAX SINXX_SAMPLE <state> <state>:={ON,OFF} ON — sine interpolation. OFF — linear interpolation. QUERY SYNTAX SINXX_SAMPLE? RESPONSE FORMAT SINXX_SAMPLE <state> EXAMPLE The following command sets the way of the interpolation to sine interpolation. Command message: SXSA ON WWW.SIGLENT.COM...
Page 37
The standard display mode plots voltage data vs. time. The XY_DISPLAY? query returns whether the XY format display is enabled. COMMAND SYNTAX XY_DISPLAY <state> <state>:={ON,OFF} QUERY SYNTAX XY_DISPLAY? RESPONSE FORMAT XY_DISPLAY <state> EXAMPLE The following command enables the XY format. Command message: XYDS ON WWW.SIGLENT.COM...
The AUTOSET subsystem commands control the function of automatic waveform setting. The oscilloscope will automatically adjust the vertical position, the horizontal time base and the trigger mode according to the input signal to make the waveform display to the best state. ASET WWW.SIGLENT.COM...
Page 39
The AUTO_SETUP command attempts to identify the waveform type and automatically adjusts controls to produce a usable display of the input signal. COMMAND SYNTAX AUTO_SETUP EXAMPLE The following command instructs the oscilloscope to perform an auto-setup. Command message: ASET WWW.SIGLENT.COM...
The channel index (1, 2, 3, or 4) specified in the command selects the analog channel that is affected by the command. ATTN OFST SKEW UNIT VDIV INVS WWW.SIGLENT.COM...
Page 41
The following command sets the attenuation factor of Channel 1 to 100:1. To ensure the data matches the true signal voltage values, the physical probe attenuation must match the scope attenuation values for that input channel. Command message: C1:ATTN 100 RELATED COMMANDS VDIV OFST WWW.SIGLENT.COM...
Page 42
QUERY SYNTAX BANDWIDTH_LIMIT? RESPONSE FORMAT BANDWIDTH_LIMIT <channel>,<mode>[,<channel>,<mode>[,<channel>,<mod e>[,<channel>,<mode>]]] EXAMPLE The following command turns on the bandwidth filter for all channels. Command message: BWL C1,ON,C2,ON,C3,ON,C4,ON The following command turns the bandwidth filter on for Channel 1 only. Command message: BWL C1,ON WWW.SIGLENT.COM...
Page 43
Options of <coupling> vary from models. See the data sheet or the channel menu of oscilloscope for details. QUERY SYNTAX <channel>:COUPLING? RESPONSE FORMAT <channel>:COUPLING <coupling> EXAMPLE The following command sets the coupling of Channel 2 to 50 Ω, DC. Command message: C2:CPL D50 WWW.SIGLENT.COM...
Page 44
<channel>:OFFSET <offset> <offset>:= Numerical value in E-notation with SI unit. EXAMPLE The following command sets the offset of Channel 2 to -3 Command message: C2:OFST -3V The following command sets the offset of Channel 1 to - 50 mV. WWW.SIGLENT.COM...
Page 45
Digital Oscilloscope Series Programming Guide Command message: C1:OFST -50mV RELATED COMMANDS VDIV ATTN WWW.SIGLENT.COM...
Page 46
Numerical value in E-notation with SDS2000X-E/ SI unit, such as 9.99E-08S. SDS1000X-U others Numerical value with measurement unit and physical unit, such as 0.00ns. EXAMPLE The following command sets skew value of Channel 1 to 3ns. Command message: C1:SKEW 3NS WWW.SIGLENT.COM...
Page 47
The TRACE? query returns the current display setting for the specified channel. COMMAND SYNTAX <trace>:TRACE <mode> <trace>:={C1,C2,C3,C4} <mode>:={ON,OFF} QUERY SYNTAX <trace>:TRACE? RESPONSE FORMAT <trace>:TRACE <mode> EXAMPLE The following command displays Channel 1. Command message: C1:TRA ON WWW.SIGLENT.COM...
Page 48
The UNIT? query returns the unit of the specified trace. COMMAND SYNTAX <channel>:UNIT <type> <channel>:={C1,C2,C3,C4} <type>:={V,A} QUERY SYNTAX <channel>:UNIT? RESPONSE FORMAT <channel>:UNIT <type> EXAMPLE The following command sets the unit of Channel 1 to V. Command message: C1:UNIT V WWW.SIGLENT.COM...
Page 49
If there is no unit (V/mV/uV) added, it defaults to volts (V). QUERY SYNTAX <channel>:VOLT_DIV? RESPONSE FORMAT <channel>:VOLT_DIV <v_gain> <v_gain>:= Numerical value in E-notation with SI unit. EXAMPLE The following command sets the vertical sensitivity of Channel 1 to 50 mV/div. Command message: C1:VDIV 50mV RELATED COMMANDS ATTN WWW.SIGLENT.COM...
Page 50
The INVERTSET? query returns the current state of the channel inversion. COMMAND SYNTAX <trace>:INVERTSET <state> <trace>:={C1,C2,C3,C4,MATH} <state>:= {ON,OFF} QUERY SYNTAX <trace>:INVERTSET? RESPONSE FORMAT <trace>:INVERTSET <state> EXAMPLE The following command inverts the trace of Channel 1. Command message: C1:INVS ON WWW.SIGLENT.COM...
Y-axis markers (Y1 and Y2 cursors). You can set and query the marker mode and source, the position of X and Y cursors, and query delta X and delta Y cursor values. CRMS CRST CRTY CRVA? WWW.SIGLENT.COM...
Page 52
The table on next page shows the available command format in each oscilloscope series. QUERY SYNTAX CURSOR_MEASURE? RESPONSE FORMAT CURSOR_MEASURE <mode> EXAMPLE The following command sets cursor function off on SDS1000X-E. Command message: CRMS OFF The following command sets cursor mode to track mode WWW.SIGLENT.COM...
Page 53
Command message: CRMS ON RELATED COMMANDS CRVA? CRST Format in Each Oscilloscope Series Model Command Format SDS1000CFL Format 1 SDS1000A Format 1 SDS1000CML+/CNL+/DL+/E+/F+ Format 1 SDS2000X Format 1 SDS1000X Format 1 SDS1000X-E Format 2 SDS2000X-E Format 2 SDS1000X-U Format 2 WWW.SIGLENT.COM...
Page 54
HREF — The time value of X1 (curA) under track mode. HDIF — The time value of X2 (curB) under track mode. <position>:= -(grid/2)*DIV to (grid/2)*DIV when <cursor>= {TREF,TDIF, HRDF, HDIF} (horizontal) grid: The grid numbers in horizontal direction. <position>:= -4*DIV 4*DIV when <cursor>= {VREF,VDIF} (vertical) WWW.SIGLENT.COM...
Page 55
When the current time base is 1 us, the cursor mode is track, the following command sets the X1 positions to -1 DIV, X2 position to 2 DIV, using Channel 1 as a reference. Command message: C1:CRST HREF,-1us,HDIF,2us RELATED COMMANDS CRMS CRVA? WWW.SIGLENT.COM...
Page 56
The CURSOR_TYPE query returns the current type of cursor. COMMAND SYNTAX CURSOR_TYPE <type> <mode>:={X,Y,X-Y} QUERY SYNTAX CURSOR_TYPE? RESPONSE FORMAT CURSOR_TYPE <type> EXAMPLE The following command sets cursor type to Y. Command message: CRTY Y RELATED COMMANDS CRMS WWW.SIGLENT.COM...
Page 57
For non-SPO models, VREL is the delta volt value under manual mode. See models on page 15. RESPONSE FORMAT <trace>:CURSOR_VALUE HREL,<delta>,<1/delta>,<value1>,<value2> <trace>:CURSOR_VALUE VREL,<delta>,<value1>,<value2> EXAMPLE When the cursor mode is manual, and the cursor type is Y, the following query returns the vertical value on channel WWW.SIGLENT.COM...
Page 58
Digital Oscilloscope Series Programming Guide Query message: C1:CRVA? VREL Response message: C1:CRVA VREL,-5.00E+00V,2.50E+00V,-2.50E+00V RELATED COMMANDS CRMS WWW.SIGLENT.COM...
They control the serial decode bus viewing, and other options. DCST DCPA B<n>:DCIC B<n>:DCSP B<n>:DCUT B<n>:DCCN B<n>:DCLN Availability of Decode Commands in Each Oscilloscope Series Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 60
The DCST command is used to set the state of decode. The DCST? query returns the state of decode. COMMAND SYNTAX DCST <state> <state>:={OFF,ON} QUERY SYNTAX DCST? RESPONSE FORMAT DCST <state> EXAMPLE The following command sets Decode function on. Command message: DCST ON WWW.SIGLENT.COM...
Page 61
Command message: DCPA BUS,B1 The following command sets the current decode bus to bus2, set format of bus2 data to hex, select the list of bus2 and set the list lines to 5. Command message: DCPA BUS,B2,LIST,D2,FOMT,HEX,LSNM,5 WWW.SIGLENT.COM...
Page 62
You need add the volt unit (V) to the value. If there is no unit added, it defaults to be V. Only international unit (V) is supported at present. The range of value is related to the vertical scale of the source. EXAMPLE The following command sets the threshold of SCL source WWW.SIGLENT.COM...
Page 63
IIC bus2 to 200mv separately. Command message: B2:DCIC SCLT,0.2V The following command sets IIC bus1 to display, sets the SCL source to D0, sets the SDA source to D1, and includes the R/W bit in the address. Command message: B1:DCIC DIS,ON,SCL,D0,SDA,D1,RW,ON WWW.SIGLENT.COM...
Page 64
D8,D9,D10,D11,D12,D13,D14,D15} value with unit {C1,C2,C3,C4,D0,D1,D2,D3,D4,D5,D6,D7, D8,D9,D10,D11,D12,D13,D14,D15} NCST value with unit value with unit {MSB,LSB} DLEN 4 to 32 DIS— Display the current bus. CLK— Set the CLK source for the SPI bus. CLK— Set the threshold of the CLK. WWW.SIGLENT.COM...
Page 65
CLK source to D0, sets the MOSI source to D1, sets the CS type to TIMEOUT and the timeout value to 2us, sets the bit order to MSB, and set the data length to 32. Command message: B1:DCSP DIS,ON,CLK,D0,MOSI,D1,CSTP,TIMEOUT,TIM,2uS,BIT, MSB,DLEN,32 WWW.SIGLENT.COM...
Page 66
DLEN— Set the data length for the UART bus. PAR— Set the parity check for the UART bus. STOP— Set the length of stop bit for the UART bus. POL— Set the idle level for the UART bus. BIT— Sets the bit order for the UART bus. WWW.SIGLENT.COM...
Page 67
RX source to D0, sets the baud rate to 9600 bit/s, sets the parity check to ODD, sets the stop bit length to 2, sets the idle level to HIGH and the bit order to MSB. Command message: B1:DCUT DIS,ON,RX,D0,BAUD,9600,PAR,ODD,STOP,2POL,HIG H,BIT,MSB WWW.SIGLENT.COM...
Page 68
You need add the volt unit (V) to the value. If there is no unit added, it defaults to be V. Only international unit (V) is supported at present. The range of value is related to the vertical scale of the source. WWW.SIGLENT.COM...
Page 69
CAN bus2 to 200mV separately. Command message: B2:DCCN CANH,0.2V The following command sets CAN bus1 to display, sets the CANH source to D0, sets the decode source to CANH and the baud rate to 9600 bit/s. Command message: B1:DCCN DIS,ON,CANH,D0,SRC,CANH,BAUD,9600 WWW.SIGLENT.COM...
Page 70
The following command sets the threshold of source for LIN bus2 to 200mV separately. Command message: B2:DCLN SRCT,0.2V The following command sets LIN bus1 to display, sets the decode source to D0 and the baud rate to 9600 bit/s. WWW.SIGLENT.COM...
Page 71
Digital Oscilloscope Series Programming Guide Command message: B1:DCCN DIS,ON,SRC,D0,BAUD,9600 WWW.SIGLENT.COM...
DGTH DI:SW Note: These commands are only valid for models which have installed the MSO option. Availability of Digital Commands in Each Oscilloscope Series Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 73
<digital>:DIGITAL_STATE? RESPONSE FORMAT <digital>:DIGITAL_STATE <state> EXAMPLE For SDS1000X+ series, the following command sets D8 display on. Command message: D8:DGCH ON Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS2000X SDS1000X SDS1000X-E SDS2000X-E WWW.SIGLENT.COM...
Page 74
DIGITAL_STATE? RESPONSE FORMAT DIGITAL_STATE <state> EXAMPLE For SDS1000X+ series, the following command sets Digital function on. Command message: DGST ON Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS2000X SDS1000X SDS1000X-E SDS2000X-E WWW.SIGLENT.COM...
Page 75
If you set the threshold to a value outside of the legal range, the threshold is automatically set to the nearest legal value. QUERY SYNTAX <group>:DIGITAL_THR? RESPONSE FORMAT Format 1: DIGITAL_THR <type> Format 2: DIGITAL_THR <group>,<level> <type> Response Format TTL/CMOS/CMOS3.3/CMOS2.5 Format 1 CUSTOM Format 2 WWW.SIGLENT.COM...
Page 76
For SDS1000X+ series, when the Digital function is on, the following command sets the threshold of D8-D15 to 3 Command message: C2:DGTH CUSTOM,3V Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS2000X SDS1000X SDS1000X-E SDS2000X-E WWW.SIGLENT.COM...
Page 77
DI:SWITCH? RESPONSE FORMAT DI:SWITCH <state> EXAMPLE For SDS1000X-E series, the following command sets Digital function on. Command message: DI:SWITCH ON Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS2000X SDS1000X SDS1000X-E SDS2000X-E WWW.SIGLENT.COM...
Page 78
<digital>:TRACE? RESPONSE FORMAT <digital>:TRACE <state> EXAMPLE For SDS1000X-E series, the following command sets D8 display on. Command message: D8:TRACE ON Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS2000X SDS1000X SDS1000X-E SDS2000X-E WWW.SIGLENT.COM...
Page 79
For SDS1000X-E series, when the Digital function is on, the following command sets the threshold of D0-D7 to LVLCMOS3.3. Command message: L8:TSM LVCMOS33 Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS2000X SDS1000X SDS1000X-E SDS2000X-E WWW.SIGLENT.COM...
Page 80
An out-of-range value will be adjusted to the closest legal value. QUERY SYNTAX <group>:CUSTOM? RESPONSE FORMAT <group>:CUSTOM <value> EXAMPLE For SDS1000X-E series, when the Digital function is on, the following command sets the threshold value of D8-D15 to 5 V. Command message: L8:CUSTOM 5V WWW.SIGLENT.COM...
Page 81
Digital Oscilloscope Series Programming Guide Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS2000X SDS1000X SDS1000X-E SDS2000X-E WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide DISPLAY Commands The DISPLAY subsystem is used to control how waveforms, and the graticules are displayed on the screen. DTJN GRDS INTS MENU PESU WWW.SIGLENT.COM...
Page 83
OFF — vectors. This is the default mode and draws lines between points. QUERY SYNTAX DOT_JOIN? RESPONSE FORMAT DOT_JOIN <state> EXAMPLE The following command turns off the interpolation lines. Command message: DTJN ON WWW.SIGLENT.COM...
Page 84
The GRID_DISPLAY? query returns the current type of grid. COMMAND SYNTAX GRID_DISPLAY <type> < type >:={FULL,HALF,OFF} QUERY SYNTAX GRID_DISPLAY? RESPONSE FORMAT GRID_DISPLAY <type> EXAMPLE The following command changes the type of grid to full grid. Command message: GRDS FULL WWW.SIGLENT.COM...
Page 85
You can also set the intensity level of the grid or trace using a key-value pair alone, see the example for details. QUERY SYNTAX INTENSITY? RESPONSE FORMAT INTENSITY TRACE,<value>,GRID,<value> EXAMPLE The following command changes the grid intensity level to 75%. Command message: INTS GRID,75 WWW.SIGLENT.COM...
Page 86
The MENU command enables or disables to display the menu. The MENU? query returns whether the menu is displayed. COMMAND SYNTAX MENU <state> <state>:={ON,OFF} QUERY SYNTAX MENU? RESPONSE FORMAT MENU <state> EXAMPLE The following command enables the display of the menu. Command message: MENU ON WWW.SIGLENT.COM...
Page 87
Options of <time> vary from models. See the data sheet or the display menu of the oscilloscope for details. QUERY SYNTAX PERSIST_SETUP? RESPONSE FORMAT PERSIST_SETUP <time> EXAMPLE The following command sets the variable persistence at 5 seconds. Command message: PESU 5 WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide HISTORY Commands The HISTORY subsystem commands control the waveform recording function and the history waveform play function. FRAM FTIM? HSMD HSLST WWW.SIGLENT.COM...
Page 89
FRAM <frame_num> Note: The query is only valid for SDS1000X-E series. EXAMPLE When the history function is on, the following command sets current frame number to 50. Then you can see the response on the screen as shown below. WWW.SIGLENT.COM...
Page 90
Digital Oscilloscope Series Programming Guide Command message: FRAM 50 WWW.SIGLENT.COM...
Page 91
Query message: FTIM? Response message: FTIM 00: 05: 12. 650814 Format in Each Oscilloscope Series Model Response Format SDS1000CFL Format 2 SDS1000A Format 2 SDS1000CML+/CNL+/DL+/E+/F+ Format 2 SDS2000X Format 2 SDS1000X Format 2 SDS1000X-E/2000X-E/1000X-U Format 1 WWW.SIGLENT.COM...
Page 92
EXAMPLE The following command sets the state of history mode to Command message: HSMD ON Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ no SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 93
When History function is on, the following command sets the state of history list to ON. Command message: HSLST ON RELATED COMMANDS HSMD Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL/CML /CNL/DL SDS1000CML+/CNL+/DL+/E+/F+ no SDS1000A SDS2000X SDS1000X WWW.SIGLENT.COM...
Page 94
Digital Oscilloscope Series Programming Guide SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Operators: Add, Subtract, Multiply, Divide. Operators perform their function on two analog channel sources. Transforms: DIFF, Integrate, FFT, SQRT. INVS MTVD MTVP FFTC FFTF FFTP FFTS FFTT? FFTU FFTW WWW.SIGLENT.COM...
Page 96
<source2>:={C1,C2,C3,C4} QUERY SYNTAX DEFINE? RESPONSE FORMAT DEFINE EQN,’<equation>’ EXAMPLE When the Math function is on, and both Channel 1 and Channel 2 are on, the following command sets the math operation to Multiplication, source1 to C1, source2 to C2. WWW.SIGLENT.COM...
Page 97
Digital Oscilloscope Series Programming Guide Command message: DEFINE EQN,’C1*C2’ When the Math function is on, and Channel 1 is on, the following command sets math operation Differentiator, source to C1. Command message: DEFINE EQN,’DIFFC1’ WWW.SIGLENT.COM...
Page 98
COMMAND SYNTAX <trace>:INVERTSET <state> <trace>:={MATH} <state>:= {ON,OFF} QUERY SYNTAX <trace>:INVERTSET? RESPONSE FORMAT <trace>:INVERTSET <state> EXAMPLE When the Math function is on, and the operation is Add, the following command inverts the math waveform. Command message: MATH:INVS ON WWW.SIGLENT.COM...
Page 99
Legal values for the scale depend on the selected operation. For details, please refer to the math menu of the oscilloscope as shown below. QUERY SYNTAX MATH_VERT_DIV? RESPONSE FORMAT MATH_VERT_DIV <scale> Model Format of <scale> SDS1000X-E/ Numerical value in E-notation with WWW.SIGLENT.COM...
Page 100
Numerical value with measurement unit and physical unit, such as 500mV. EXAMPLE When the Math function is on, and the operator is Add, the following command changes the vertical scale of the math waveform to 1 V. Command message: MTVD 1V WWW.SIGLENT.COM...
Page 101
QUERY SYNTAX MATH_VERT_POS? RESPONSE FORMAT MATH_VERT_POS <point> EXAMPLE When the Math function is on, the following command sets the vertical position of the math waveform to 1 grid above the screen vertical center. Command message: MTVP 50 RELATED COMMANDS FFTP WWW.SIGLENT.COM...
Page 102
QUERY SYNTAX FFT_CENTER? RESPONSE FORMAT FFT_CENTER <center> EXAMPLE When the Math function is on, the operator is FFT, and the horizontal scale is 100 MHz, the following command sets the center frequency of FFT to 58 MHz. WWW.SIGLENT.COM...
Page 103
Digital Oscilloscope Series Programming Guide Command message: FFTC 58MHz RELATED COMMANDS FFTT? Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ no SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 104
EXCLU — Exclusive. QUERY SYNTAX FFT_FULLSCREEN? RESPONSE FORMAT FFT_FULLSCREEN <state> EXAMPLE When the Math function is on, and the operator is FFT, the following command sets the display mode of FFT waveform to Full Screen. Command message: FFTF ON WWW.SIGLENT.COM...
Page 105
When the Math function is on, the operator is FFT, and the scale is 10 mV, the following steps set the offset of FFT waveform to 28 mV. Step 1: Send command to set the scale unit to Vrms. Command message: FFTU VRMS WWW.SIGLENT.COM...
Page 106
Step 2: Send command to set the offset to -13.5 V. Command message: FFTP -13.5V RELATED COMMANDS FFTS FFTU Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ no SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 107
Command message: FFTU DBVRMS Step 2: Send command to set the scale to 5. Command message: FFTS 5 When the Math function is on, and the operator is FFT, the following steps set the vertical scale of FFT to 100 WWW.SIGLENT.COM...
Page 108
Digital Oscilloscope Series Programming Guide mVrms. Step 1: Send command to set the scale unit to Vrms. Command message: FFTU VRMS Step 2: Send command to set the scale to 0.1. Command message: FFTS 0.1 RELATED COMMANDS UNIT FFTU FFTP WWW.SIGLENT.COM...
Page 109
The following query returns the horizontal scale unit of FFT. Query message: FFTT? Response message: FFTT 100.00MHz Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 110
FFT, the following command sets the vertical scale unit of FFT to dBVrms. Command message: FFTU DBVRMS RELATED COMMANDS FFTS FFTP Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 111
FLATTOP — Flattop is the best for making accurate amplitude measurements of frequency peaks. QUERY SYNTAX FFT_WINDOW? RESPONSE FORMAT FFT_WINDOW <window> EXAMPLE When the Math function is on, and the operator is FFT, the following command sets the FFT window to Hamming. Command message: WWW.SIGLENT.COM...
Page 112
Digital Oscilloscope Series Programming Guide FFTW HAMM WWW.SIGLENT.COM...
To make a measurement, the portion of the waveform required for that measurement must be displayed on the oscilloscope screen. CYMT? MEAD PACU PAVA? PASTAT MEACL MEGS MEGA MEGB WWW.SIGLENT.COM...
Page 114
Numerical value in E-notation with SDS2000X-E/ SI unit, such as 1.00E+03Hz. SDS1000X-U Others Numerical value with measurement unit and physical unit, such as 1.00001 kHz. Note: When the signal frequency is less than 10 Hz, it returns “10 Hz” or “<10Hz”. WWW.SIGLENT.COM...
Page 115
Response message: CYMT 10Hz When the frequency of input signal is 25.000137 MHz, the following returns the value of cymometer which displaying on the screen of the instrument. Response message: CYMT 2.50E+07Hz WWW.SIGLENT.COM...
Page 116
(first falling edge - first falling edge) Delay between two channels. (first rising edge - last rising edge) Delay between two channels. (first rising edge - last falling edge) Delay between two channels. (first falling edge - last rising edge) Delay between two channels. WWW.SIGLENT.COM...
Page 117
Step 1: Send the message to set the measurement to Phase between C2 and C4, and then there displays a phase measurement on the screen. Command message: MEAD PHA,C2-C4 Step 2: Send the message to get the measured value of phase. WWW.SIGLENT.COM...
Page 118
Digital Oscilloscope Series Programming Guide Command message: C2-C4:MEAD? PHA Response message: C2-C4:MEAD PHA,-89.46degree WWW.SIGLENT.COM...
Page 119
BASE waveform base value CMEAN average value in the first cycle MEAN average value STDEV standard deviation of the data VSTD standard deviation of the data in the first cycle RMS value CRMS RMS value in the first cycle WWW.SIGLENT.COM...
Page 120
All measurements snapshot, equal to turn on the switch of all measure EXAMPLE The following command sets the type of measure to PKPK of Channel 1. Command message: PACU PKPK,C1 Then, you can see the measurement on the screen. WWW.SIGLENT.COM...
Page 121
Digital Oscilloscope Series Programming Guide The following command sets the type of measure to ALL of Channel 2. Command message: PACU ALL,C2 Then, you can see a snapshot of all measurements on the screen. RELATED COMMANDS PAVA? MEAD MEACL WWW.SIGLENT.COM...
Page 122
N,MEAN,STDEV,VSTD,RMS,CRMS,OVSN,FPRE,OVSP, RPRE,LEVELX,PER,FREQ,PWID,NWID,RISE,FALL,WID, DUTY,NDUTY,DELAY,TIMEL,ALL} See the table Description of Parameter for details. RESPONSE FORMAT <source>:PARAMETER_VALUE <parameter>,<value> <value>:= Numerical value in E-notation with SI unit. QUERY SYNTAX Usage 2 PARAMETER_VALUE? CUST<x> <x>:= 1 to 5, and ALL Custom Description Parameters WWW.SIGLENT.COM...
Page 123
<value>:= Numerical value in E-notation with SI unit. QUERY SYNTAX Usage 3 PARAMETER_VALUE? STAT<x> <x>:= 1 to 5 Custom Description Parameters STAT1 Statistics first measure parameter specified by “PACU” STAT2 Statistics of the second measure parameter specified by “PACU” STAT3 Statistics third measure WWW.SIGLENT.COM...
Page 124
<value>:= Numerical value in E-notation with SI unit. EXAMPLE The following query returns the rise time of Channel 2. Query message: C2:PAVA? RISE Response message: C2:PAVA RISE,3.6E-9S The following query returns all measurement of Channel Query message: C1:PAVA? ALL Response message: WWW.SIGLENT.COM...
Page 125
Command message: PAVA? CUSTALL Response message: PAVA CUST1:C1,PKPK,4.08E+00V;CUST2:OFF;CUST3:OFF;C UST4:OFF;CUST5:OFF The following steps show how to get the statistical values of user defined measurement parameters. Step 1: Send the command to set the measurement parameter as the first customized parameter. WWW.SIGLENT.COM...
Page 126
Step 2: Send the command to turn on the statistics. Command message: PASTAT ON Step 3: Send the query to get the statistical values of the first customized parameter. Query message: PAVA? STAT1 Response message: PAVA STAT1 FREQ:cur,1.00E+06Hz,mean,1.00E+06Hz,min,9.97E+05 Hz,max,1.00E+06Hz,std-dev,1.41E+03Hz,count,171 RELATED COMMANDS PACU MEAD PASTAT WWW.SIGLENT.COM...
Page 127
If you want to clear all of the statistics accumulated for all periodic measurements, the following command shows. Command message: PASTAT RESET Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A WWW.SIGLENT.COM...
Page 128
Digital Oscilloscope Series Programming Guide SDS1000CML+/CNL+/DL+/E+/F+ no SDS2000X SDS1000X SDS1000X-E SDS2000X-E yes, but query not support SDS1000X-U yes, but query not support WWW.SIGLENT.COM...
Page 129
When measurement items are turned on, the following command remove all displayed measurement items. Command message: MEACL RELATED COMMANDS PACU Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ no SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 130
When the measure is turned on, the following command turn on the gate measurement. Command message: MEGS ON Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ no SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 131
When the gate switch is on, the following command set the position of gateA to 20us. Command message: MEGA 20us RELATED COMMANDS MEGS MEGB Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ no SDS2000X SDS1000X SDS1000X-E SDS2000X-E WWW.SIGLENT.COM...
Page 132
Digital Oscilloscope Series Programming Guide SDS1000X-U WWW.SIGLENT.COM...
Page 133
When the gate switch is on, the following command set the position of gateB to 1.68 ms. Command message: MEGB 1.68ms RELATED COMMANDS MEGS MEGA Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ no SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 134
Digital Oscilloscope Series Programming Guide SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide PASS/FAIL Commands The PASS/FAIL subsystem commands and queries control the mask test features. PACL PFBF PFCM PFDD? PFDS PFEN PFFS PFOP PFSC PFST WWW.SIGLENT.COM...
Page 136
Digital Oscilloscope Series Programming Guide PASS/FAIL PARAMETER_CLR | PACL Command DESCRIPTION The PARAMETER_CLR command resets the P/F test statistics. COMMAND SYNTAX PARAMETER_CLR RELATED COMMANDS PFDD? WWW.SIGLENT.COM...
Page 137
EXAMPLE When the PASS/FAIL function is on, the following command sets “output” to “ON”. Command message: PFBF ON Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ no SDS2000X SDS1000X WWW.SIGLENT.COM...
Page 138
Digital Oscilloscope Series Programming Guide SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 139
Step 1: Send command to set the Pass/Fail test enable. Command message: PFEN ON Step 2: Send command to stop the operation. Command message: PFOP OFF Step 3: Send command to create the rule. Command message: PFCM RELATED COMMANDS PFST PFSC PFEN PFOP WWW.SIGLENT.COM...
Page 140
COMMAND SYNTAX PF_ DATADIS? RESPONSE FORMAT PF_DATADIS FAIL,<num>,PASS,<num>,TOTAL,<num> EXAMPLE The following query returns the number of the message display of the pass/fail. Query message: PFDD? Response message: PFDD FAIL,0,PASS,0,TOTAL,0 WWW.SIGLENT.COM...
Page 141
The following steps display the message of Pass/Fail. Step 1: Send command to set the Pass/Fail test enable. Command message: PFEN ON Step 2: Send command to display the message of Pass/Fail. Command message: PFDS ON RELATED COMMANDS PFEN WWW.SIGLENT.COM...
Page 142
RESPONSE FORMAT PF_ENABLE <state> EXAMPL The following command enables mask test features. Command message: PFEN ON Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 143
QUERY SYNTAX PF_FAIL_STOP? RESPONSE FORMAT PF_FAIL_STOP <state> EXAMPLE The following command sets “stop on fail” to “off”. Command message: PFFS OFF Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ WWW.SIGLENT.COM...
Page 144
Digital Oscilloscope Series Programming Guide SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 145
EXAMPLE The following command controls to run Pass/Fail test. Command message: PFOP ON RELATED COMMANDS PFEN Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 146
The following command sets the measurement source to Channel 1 when Channel 1 is on. Command message: PFSC C1 Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 147
<div>:= 0.04 to 4.0. Note: Step value is 0.04. QUERY SYNTAX PF_ SET? RESPONSE FORMAT PF_ SET XMASK,<div>,YMASK,<div> EXAMPLE The following command sets the X mask to 0.4 and the Y mask to 0.52. Command message: PFST XMASK,0.4,YMASK,0.52 RELATED COMMANDS PFSC WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide PRINT Commands SCDP WWW.SIGLENT.COM...
Page 149
Step 1: Send the query to get the bmp data. Query message: SCDP Step 2: Create a new bmp file named “screen.bmp”. Step 3: Write the data to the file. Step 4: Close the file. (See the code in Screen Dump (SCDP) Example) WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide RECALL Commands Recall previously saved oscilloscope setups and reference waveforms. *RCL RCPN WWW.SIGLENT.COM...
Page 151
As shown below, when the progress is finished, there will be a prompt message. EXAMPLE When you have stored the instrument setup in No.3, the following command recalls the setup 3. Command message: *RCL 3 RELATED COMMANDS RCPN *SAV WWW.SIGLENT.COM...
Page 152
“.set”. Note: See models on page 15. For SDS1000X-E series, the ‘/’ character to define the root directory is not supported. As shown below, when the progress is finished, there will be a prompt message. WWW.SIGLENT.COM...
Page 153
For SDS1000X-E series, when you plug in an U-disk to the oscilloscope, the following command recalls the front- panel setup from a file called “TEST.xml” in specified- directory of the USB memory device. Command message: RCPN DISK,UDSK,FILE,’/SAVE/TEST.xml’ RELATED COMMANDS STPN *RCL WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide REFERENCE Commands The REFERENCE system controls the reference waveforms. REFCL REFDS REFLA REFPO REFSA REFSC REFSR WWW.SIGLENT.COM...
Page 155
The REF_CLOSE command closes the Reference function. COMMAND SYNTAX REF_CLOSE EXAMPLE The following command closes the Reference function. Command message: REFCL Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 156
EXAMPLE The following command displays the waveform of the current reference channel. Command message: REFDS ON RELATED COMMANDS REFCL Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X WWW.SIGLENT.COM...
Page 157
Digital Oscilloscope Series Programming Guide SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 158
REF_LOCATION <location> EXAMPLE The following command selects REFA as the current reference channel. Command message: REFLA REFA Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 159
<offset>:= Numerical value in E-notation with SI unit. EXAMPLE When the Reference function is on, REFB has been saved and the scale is 2 V, the following command sets the current reference channel vertical offset to 0.2 V. Command message: REFPO 0.2V RELATED COMMANDS REFSC Note: WWW.SIGLENT.COM...
Page 160
Digital Oscilloscope Series Programming Guide The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 161
Channel 2, and the REF location is REFA, the following command saves Channel 2 as REFA and displays REFA on screen. Command message: REFSA Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 162
When the Reference function is on, and REFA has been saved, the following command sets the vertical scale of REFA to 100 mV. Command message: REFSC 100mV Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X WWW.SIGLENT.COM...
Page 163
Digital Oscilloscope Series Programming Guide SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 164
When Channel 1 is on, the following command selects Channel 1 as the source of current reference channel. Command message: REFSR C1 Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide SAVE Commands Save oscilloscope setups and waveform data. *SAV PNSU STPN WWW.SIGLENT.COM...
Page 166
EXAMPLE When you want to save the current setup in panel as shown below, the following command saves it to setup No.3. Command message: *SAV 3 If you want to recall this setup, send the following command. Command message: WWW.SIGLENT.COM...
Page 167
Digital Oscilloscope Series Programming Guide *RCL 3 RELATED COMMANDS STPN *RCL WWW.SIGLENT.COM...
Page 168
Set the I/O buffer size The data length is related to the current panel setup. It is recommended to set the read buffer size to 500k WWW.SIGLENT.COM...
Page 169
Command message: PNSU <header><setup data> Step 4: You can also save the data in step 2 to a file and make it easier to recall later. Store the file of format according to the returned data. The following program is WWW.SIGLENT.COM...
Page 170
Digital Oscilloscope Series Programming Guide used as a reference for SDS1004X-E(V6.1.33R2). WWW.SIGLENT.COM...
Page 171
For SDS1000X-E series, the ‘/’ character to define the root directory is not supported. As shown below, during the execution of the command, a progress bar will appear on the interface. When the progress is finished, there will be a prompt message. WWW.SIGLENT.COM...
Page 172
“TEST.xml”. Then you can see the file on PC. Command message: STPN DISK,UDSK,FILE,’TEST.xml’ For SDS1000X-E series, the following command saves the current setup to specified-directory of the USB memory device in a file called “TEST.xml”. Then you can WWW.SIGLENT.COM...
Page 173
Digital Oscilloscope Series Programming Guide see the file on PC. Command message: STPN DISK,UDSK,FILE,’/SAVE/TEST.xml’ RELATED COMMANDS *SAV RCPN WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide STATUS Commands IEEE 488.2 defines data structures, commands, and common bit definitions for status reporting. There are also instrument-defined structures and bits. An overview of the oscilloscope's status reporting structure is shown in the following commands. INR? WWW.SIGLENT.COM...
Page 175
INR 1 Step 3: Now, change the trigger mode to Auto. Then, send the query. Response message: INR 8193 Step 4: Now, change the trigger mode to Single. The acquisition mode changes to be Stop. And then, send the query. WWW.SIGLENT.COM...
Page 176
Not use(always 0) A segment of a sequence waveform has been acquired A time-out has occurred in a data block transfer A return to the local state is detected A screen dump has terminated A new signal has been acquired WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide SYSTEM Commands The SYSTEM subsystem commands control basic system functions of the oscilloscope. *CAL? BUZZ CONET SCSV EMOD WWW.SIGLENT.COM...
Page 178
Before starting the user calibration procedure, you must disconnect anything from inputs. QUERY SYNTAX *CAL? RESPONSE FORMAT *CAL 0 0 — Calibration successful. EXAMPLE The following query starts a self-calibration. Query message: *CAL? Response message: *CAL 0 WWW.SIGLENT.COM...
Page 179
The BUZZER command enables or disables the buzzer. The BUZZER? query returns the switch state of the buzzer. COMMAND SYNTAX BUZZER <state> <state>:= {ON,OFF} QUERY SYNTAX BUZZER? RESPONSE FORMAT BUZZER <state> EXAMPLE The following command enables the oscilloscope buzzer. Command message: BUZZ ON WWW.SIGLENT.COM...
Page 180
< ip_add1 >:= 0 to 255. < ip_add2 >:= 0 to 255. < ip_add3 >:= 0 to 255. QUERY SYNTAX COMM_NET? RESPONSE FORMAT COMM_NET <ip_add0>,<ip_add1>,<ip_add2>,<ip_add3> EXAMPLE The following command sets the IP address to 10.11.0.230. Command message: CONET 10,11,0,230 WWW.SIGLENT.COM...
Page 181
Others — When the oscilloscope enters the idle state and holds for the specified time, screensaver will be enabled. QUERY SYNTAX SCREEN_SAVE? RESPONSE FORMAT SCREEN_SAVE <time> EXAMPLE The following command sets the automatic screensaver to 10 minutes. Command message: SCSV 10MIN WWW.SIGLENT.COM...
Page 182
The query without parameters will return the lock status of all functions. RESPONSE FORMAT Query with the parameter “AutoSetup”: EduMode AutoSetup,ON; Query with no parameters: EduMode AutoSetup,<lock>;Measure,<lock>;Cursors,<lock>; EXAMPLE The following command disables the Autosetup function. Command message: EMOD AutoSetup,OFF Query message: EMOD? Response message: AutoSetup,OFF;Measure,ON;Cursors,ON; WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide TIMEBASE Commands The TIMEBASE subsystem commands control the horizontal (X-axis) functions. The time per division, delay, and reference can be controlled for the main and window (zoomed) time bases. TDIV TRDL HMAG HPOS WWW.SIGLENT.COM...
Page 184
The range of value varies from the models. See the data sheet for details. QUERY SYNTAX TIME_DIV? RESPONSE FORMAT TIME_DIV <value> <value>:= Numerical value in E-notation with SI unit. EXAMPLE The command sets the horizontal scale to 500 μs. Command message: TDIV 500US RELATED COMMANDS TRDL HMAG HPOS WWW.SIGLENT.COM...
Page 185
QUERY SYNTAX TRIG_DELAY? RESPONSE FORMAT TRIG_DELAY <value> Model Format of <skew> SDS1000X-E/ Numerical value in E-notation with SDS2000X-E/ SI unit, such as 1.00E-04 s. SDS1000X-U Others Numerical value with measurement WWW.SIGLENT.COM...
Page 186
Digital Oscilloscope Series Programming Guide unit and physical unit, such as 3.58 ns. EXAMPLE When the time base is 1us/div, the following command sets the trigger delay to -4.8 us (pre trigger). Command message: TRDL -4.8US RELATED COMMANDS TDIV WWW.SIGLENT.COM...
Page 187
The range of <factor> is related to the current time base and the range of the time base. Note: The table on next page shows the available format in each oscilloscope series. QUERY SYNTAX HOR_MAGNIFY? RESPONSE FORMAT HOR_MAGNIFY <value> <value>:= Numerical value in E-notation with SI unit. WWW.SIGLENT.COM...
Page 188
Command message: HMAG 1US RELATED COMMANDS TDIV Format in Each Oscilloscope Series Model Command Format SDS1000CFL Format 2 SDS1000A Format 2 SDS1000CML+/CNL+/DL+/E+/F+ Format 2 SDS2000X Format 2 SDS1000X Format 2 SDS1000X-E Format 1 SDS2000X-E Format 1 SDS1000X-U Format 1 WWW.SIGLENT.COM...
Page 189
Format 2: HOR_POSITION <factor_div> < factor_div>:= the factor of zoomed time base. Note: The table on next page shows the available format in each oscilloscope series. WWW.SIGLENT.COM...
Page 190
HPOS 100ns RELATED COMMANDS HMAG TDIV TRDL Format in Each Oscilloscope Series Model Command Format SDS1000CFL Format 2 SDS1000A Format 2 SDS1000CML+/CNL+/DL+/E+/F+ Format 2 SDS2000X Format 2 SDS1000X Format 2 SDS1000X-E Format 1 SDS2000X-E Format 1 SDS1000X-U Format 1 WWW.SIGLENT.COM...
Digital Oscilloscope Series Programming Guide TRIGGER Commands The TRIGGER subsystem controls the trigger modes and parameters for each trigger type. SET50 TRCP TRLV TRLV2 TRMD TRPA TRSE TRSL TRWI WWW.SIGLENT.COM...
Page 192
Runt triggers, for example), this command has no effect. COMMAND SYNTAX SET50 EXAMPLE When the trigger type is edge and the trigger source is Channel 1, the following command sets the trigger level to the center of Channel 1. Command message: SET50 RELATED COMMANDS TRLV WWW.SIGLENT.COM...
Page 193
LFREJ — LFREJ coupling places a high-pass filter in the trigger path. QUERY SYNTAX <trig_source>:TRIG_COUPLING? RESPONSE FORMAT <trig_source>:TRIG_COUPLING <trig_coupling> EXAMPLE The following command sets the coupling mode of the trigger source Channel 2 to AC. Command message: C2:TRCP AC RELATED COMMANDS TRSE TRIGGER TRIG_LEVEL | TRLV WWW.SIGLENT.COM...
Page 194
<trig_level>:=Numerical value in E-notation with SI unit. EXAMPLE When the vertical scale of Channel 3 is 200 mV, and the trigger source is Channel 3, the following command sets the trigger level of Channel 3 to 52.00 mV. Command message: C3:TRLV 52mV WWW.SIGLENT.COM...
Page 195
Digital Oscilloscope Series Programming Guide RELATED COMMANDS TRSE TRLV2 WWW.SIGLENT.COM...
Page 196
Channel 2 to 3.5 V, and the low trigger level of Channel 2 to 800 mV. Step 1: Send the command to set high trigger level. Command message: C2:TRLV 3.5V Step 2: Send the command to set low trigger level. WWW.SIGLENT.COM...
Page 197
Digital Oscilloscope Series Programming Guide Command message: C2:TRLV2 800mV RELATED COMMANDS TRSE TRLV WWW.SIGLENT.COM...
Page 198
SINGLE — When SINGLE sweep mode is selected, the backlight of SINGLE key lights up, the oscilloscope enters the waiting trigger state and begins to search for the trigger signal that meets the conditions. If the trigger signal is satisfied, the running state shows WWW.SIGLENT.COM...
Page 199
STOP — STOP is a part of the option of this command, but not a trigger mode of the oscilloscope. QUERY SYNTAX TRIG_MODE? RESPONSE FORMAT TRIG_MODE <mode> EXAMPLE The following command sets the trigger mode to Normal. Command message: TRMD NORM RELATED COMMANDS STOP WWW.SIGLENT.COM...
Page 200
The status of source can only be set when the source is QUERY SYNTAX TRIG_PATTERN? RESPONSE FORMAT TRIG_PATTERN <source>,<status>,<source>,<status>,<source>,<status>, <source>,<status>,STATE,<condition> EXAMPLE When the trigger type is Pattern, and Channel 2 & Channel 3 are on, the following command sets the WWW.SIGLENT.COM...
Page 201
Digital Oscilloscope Series Programming Guide Channel 2 and Channel 3 to low and the condition to AND. Command message: TRPA C2,L,C3,L,STATE,AND WWW.SIGLENT.COM...
Page 202
Interval in range DROP Dropout Interval out of range Source Pulse larger Time Pulse smaller Hold Pulse in range type/ Limit range Hold Pulse out of range value/ Limit value COMMAND SYNTAX TRIG_SELECT (FOR ALL BUT TV) <trig_type>,SR,<source>,HT,<hold_type>,HV,<hold_value 1>[,HV2,<hold_value2>] WWW.SIGLENT.COM...
Page 203
Channel 1, hold type to TIME, and the time value to 1.43uS, the following comes true. Command message: TRSE EDGE,SR,C1,HT,TI,HV,1.43uS When you want to set trigger type to Pulse, trigger source to Channel 2, limit range to [5nS, 1uS], the following comes true. Command message: WWW.SIGLENT.COM...
Page 204
NTSC 1~263 1 to 262 1 to 313 1 to 312 720P/50 1 to 750 720P/60 1 to 750 1080P/50 1- 1125 1080P/60 1- 1125 1080I/50 1 to 563 1 to 562 1080I/60 1 to 563 1 to 562 WWW.SIGLENT.COM...
Page 205
Field to 2, the following comes true. Command message: TRSE TV,SR,C1,STAN,PAL,SYNC,SELECT,LINE,300,FLD,2 When you want to set trigger type to Video, trigger source to Channel 2, standard to 1080P/50, and Line to 200, the following comes true. Command message: TRSE TV,SR,C2,STAN,1080P/50,SYNC,SELECT,LINE,200 WWW.SIGLENT.COM...
Page 206
Digital Oscilloscope Series Programming Guide WWW.SIGLENT.COM...
Page 207
NEG — falling edg. POS — rising edge. WINDOW — altering edge. QUERY SYNTAX <trig_source>:TRIG_SLOPE? RESPONSE FORMAT <trig_source>:TRIG_SLOPE <trig_slope> EXAMPLE The following command sets the trigger slope of Channel 2 to negative. Command message: C2:TRSL NEG RELATED COMMANDS TRSE WWW.SIGLENT.COM...
Page 208
<value>:= Numerical value in E-notation with SI unit. EXAMPLE When the window type is relative, and the center level is 1 V, the following command sets the relative height of the two trigger line to 2 V. Command message: TRWI 2V RELATED COMMANDS TRLV TRLV2 WWW.SIGLENT.COM...
Page 210
TRCAN:IDL TRCAN:DATA TRCAN:DAT2 TRCAN:BAUD TRLIN:SRC TRLIN:CON TRLIN:ID TRLIN:DATA TRLIN:DAT2 TRLIN:BAUD Availability of Serial Trigger Commands in Each Oscilloscope Series Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E SDS2000X-E SDS1000X-U WWW.SIGLENT.COM...
Page 211
TRIIC:SCL <source>[,<threshold>] <threshold>:= numerical value in E-notation with SI unit. EXAMPLE When the serial protocol is IIC, the following command sets the source of SCL to channel3 and the threshold to 200 mV. Command message: TRIIC:SCL C3,0.2V RELATED COMMANDS TRIIC:SDA WWW.SIGLENT.COM...
Page 212
TRIIC:SDA <source>[,<threshold>] <threshold>:= numerical value in E-notation with SI unit. EXAMPLE When the serial protocol is IIC, the following command sets the source of SDA to channel3 and the threshold to 200 mV. Command message: TRIIC:SDA C3,0.2V RELATED COMMANDS TRIIC:SCL WWW.SIGLENT.COM...
Page 213
DALENTH— specifie a search based on address length and data length. QUERY SYNTAX TRIIC:CON? RESPONSE FORMAT TRIIC:CON <condition> EXAMPLE When the serial protocol is IIC, the following command sets the trigger condition to 7 ADD&Data. Command message: TRIIC:CON 7ADDA WWW.SIGLENT.COM...
Page 214
Digital Oscilloscope Series Programming Guide RELATED COMMANDS TRIIC:ADDR TRIIC:DATA TRIIC:DAT2 WWW.SIGLENT.COM...
Page 215
When the serial protocol is IIC and the trigger condition is 10ADD&Data, the following command sets the address value to 0x122. Command message: TRIIC:ADDR 290 When the serial protocol is IIC and the trigger condition is 10ADD&Data, the following command ignore the address value. Command message: TRIIC:ADDR 1024 WWW.SIGLENT.COM...
Page 216
Digital Oscilloscope Series Programming Guide RELATED COMMANDS TRIIC:CON WWW.SIGLENT.COM...
Page 217
10ADD&Data, the following command sets the data1 value to 0x29. Command message: TRIIC:DATA 41 When the serial protocol is IIC and the trigger condition is 10ADD&Data, the following command ignore the data value. Command message: TRIIC:DATA 256 RELATED COMMANDS TRIIC:CON TRIIC:DAT2 WWW.SIGLENT.COM...
Page 218
Digital Oscilloscope Series Programming Guide TRIIC:ADDR WWW.SIGLENT.COM...
Page 219
10ADD&Data, the following command sets the data2 value to 0x29. Command message: TRIIC:DAT2 41 When the serial protocol is IIC and the trigger condition is 10ADD&Data, the following command ignore the data2 value. Command message: TRIIC:DAT2 256 RELATED COMMANDS TRIIC:CON TRIIC:DATA TRIIC:ADDR WWW.SIGLENT.COM...
Page 220
LESS— sets the IIC data qualifier to less than. QUERY SYNTAX TRIIC:QUAL? RESPONSE FORMAT TRIIC:QUAL <value> EXAMPLE When the serial protocol is IIC and the trigger condition is EEPROM, the following command sets the data qualifier to equal. Command message: TRIIC:QUAL EQUAL RELATED COMMANDS TRIIC:CON TRIIC:DATA TRIIC:ADDR WWW.SIGLENT.COM...
Page 221
DONT_CARE— sets either as the data direction. QUERY SYNTAX TRIIC:RW? RESPONSE FORMAT TRIIC:RW <value> EXAMPLE When the serial protocol is IIC and the trigger condition is 10ADD&Data, the following command sets the data direction to write. Command message: TRIIC:RW WRITE RELATED COMMANDS TRIIC:CON TRIIC:ADDR WWW.SIGLENT.COM...
Page 222
QUERY SYNTAX TRIIC:ALEN? RESPONSE FORMAT TRIIC:ALEN <value> EXAMPLE When the serial protocol is IIC and the trigger condition is Data Length, the following command sets the address type to 7 bit. Command message: TRIIC:ALEN 7BIT RELATED COMMANDS TRIIC:CON TRIIC:ADDR WWW.SIGLENT.COM...
Page 223
TRIIC:DLEN? RESPONSE FORMAT TRIIC:DLEN <value> EXAMPLE When the serial protocol is IIC and the trigger condition is Data Length, the following command sets the length of the data bytes to 8. Command message: TRIIC:DLEN 8 RELATED COMMANDS TRIIC:CON TRIIC:ADDR WWW.SIGLENT.COM...
Page 224
<threshold>:= numerical value in E-notation with SI unit. EXAMPLE When the serial protocol is SPI, the following command sets the source of CLK to channel3 and the threshold to 200 mV. Command message: TRSPI:CLK C3,0.2V RELATED COMMANDS TRSPI:MISO TRSPI:MOSI WWW.SIGLENT.COM...
Page 225
COMMAND SYNTAX TRSPI:CLK:EDGE <edge> <edge>:= {RISING,FALLING} QUERY SYNTAX TRSPI:CLK:EDGE? RESPONSE FORMAT TRSPI:CLK:EDGE <edge> EXAMPLE When the serial protocol is SPI, the following command sets the edge of the clock to rising. Command message: TRSPI:CLK:EDGE RISING RELATED COMMANDS TRSPI:CLK WWW.SIGLENT.COM...
Page 226
<threshold>:= numerical value in E-notation with SI unit. EXAMPLE When the serial protocol is SPI and the CS type is CLK Timeout, the following command sets the timeout value for the clock to 2us. Command message: TRSPI:CLK:TIM 2us RELATED COMMANDS TRSPI:CSTP WWW.SIGLENT.COM...
Page 227
TRSPI:MOSI <source>[,<threshold>] <threshold>:= numerical value in E-notation with SI unit. EXAMPLE When the serial protocol is SPI, the following command sets the source of MOSI to channel3 and the threshold to 200 mV. Command message: TRSPI:MOSI C3,0.2V RELATED COMMANDS TRSPI:MISO WWW.SIGLENT.COM...
Page 228
TRSPI:MISO <source>[,<threshold>] <threshold>:= numerical value in E-notation with SI unit. EXAMPLE When the serial protocol is SPI, the following command sets the source of MISO to channel3 and the threshold to 200 mV. Command message: TRSPI:MISO C3,0.2V RELATED COMMANDS TRSPI:MOSI WWW.SIGLENT.COM...
Page 229
SPI trigger. COMMAND SYNTAX TRSPI:CSTP <type> <type>:= {CS,NCS,TIMEOUT} QUERY SYNTAX TRSPI:CSTP? RESPONSE FORMAT TRSPI:CSTP <type> EXAMPLE When the serial protocol is SPI, the following command sets the CS type to CS. Command message: TRSPI:CSTP CS RELATED COMMANDS TRSPI:CS TRSPI:NCS TRSPI:CLK:TIM WWW.SIGLENT.COM...
Page 230
<threshold>:= numerical value in E-notation with SI unit. EXAMPLE When the serial protocol is SPI and the CS type is CS, the following command sets the source of CS to channel3 and the threshold to 200 mV. Command message: TRSPI:CS C3,0.2V RELATED COMMANDS TRSPI:CSTP WWW.SIGLENT.COM...
Page 231
<threshold>:= numerical value in E-notation with SI unit. EXAMPLE When the serial protocol is SPI and the CS type is ~CS, the following command sets the source of ~CS to channel3 and the threshold to 200 mV. Command message: TRSPI:NCS C3,0.2V RELATED COMMANDS TRSPI:CSTP WWW.SIGLENT.COM...
Page 232
The TRSPI:TRTY? query returns the trigger source for SPI trigger. COMMAND SYNTAX TRSPI:TRTY <source> <source>:= {MOSI,MISO} QUERY SYNTAX TRSPI:TRTY? RESPONSE FORMAT TRSPI:TRTY <source> EXAMPLE When the serial protocol is SPI, the following command sets the trigger source to MOSI. Command message: TRSPI:TRTY MOSI WWW.SIGLENT.COM...
Page 233
When the serial protocol is SPI and the data length is 4, the following command sets data value to 1011. Command message: TRSPI:DATA 1,0,1,1 When the serial protocol is SPI and the data length is 4, the following command ignore the data value. Command message: TRSPI:DATA X,X,X,X RELATED COMMANDS TRSPI:DLEN WWW.SIGLENT.COM...
Page 234
COMMAND SYNTAX TRSPI:DLEN <value> <value>:= 4 to 96 QUERY SYNTAX TRSPI:DLEN? RESPONSE FORMAT TRSPI:DLEN <value> EXAMPLE When the serial protocol is SPI, the following command sets the trigger data length to 8. Command message: TRSPI:DLEN 8 RELATED COMMANDS TRSPI:DATA WWW.SIGLENT.COM...
Page 235
The TRSPI:BIT? query returns the bit order for SPI trigger. COMMAND SYNTAX TRSPI:BIT <order> <order>:= {MSB,LSB} QUERY SYNTAX TRSPI:BIT? RESPONSE FORMAT TRSPI:BIT <order> EXAMPLE When the serial protocol is SPI, the following command sets the bit order to MSB. Command message: TRSPI:BIT MSB WWW.SIGLENT.COM...
Page 236
TRUART:RX <source>[,<threshold>] <threshold>:= numerical value in E-notation with SI unit. EXAMPLE When the serial protocol is UART, the following command sets the source of RX to channel3 and the threshold to 200 mV. Command message: TRUART:RX C3,0.2V RELATED COMMANDS TRUART:TX WWW.SIGLENT.COM...
Page 237
TRUART:TX <source>[,<threshold>] <threshold>:= numerical value in E-notation with SI unit. EXAMPLE When the serial protocol is UART, the following command sets the source of TX to channel3 and the threshold to 200 Command message: TRUART:TX C3,0.2V RELATED COMMANDS TRUART:RX WWW.SIGLENT.COM...
Page 238
UART trigger. COMMAND SYNTAX TRUART:TRTY <source> <source>:= {RX,TX} QUERY SYNTAX TRUART:TRTY? RESPONSE FORMAT TRUART:TRTY <source> EXAMPLE When the serial protocol is UART, the following command sets the trigger source to TX. Command message: TRUART:TRTY TX RELATED COMMANDS TRUART:RX TRUART:TX TRSPI:DLEN WWW.SIGLENT.COM...
Page 239
STOP— Stop condition. DATA— Specify a search based on data. ERROR— Error condition. QUERY SYNTAX TRUART:CON? RESPONSE FORMAT TRUART:CON <condition> EXAMPLE When the serial protocol is UART, the following command sets the trigger condition to START. Command message: TRUART:CON START WWW.SIGLENT.COM...
Page 240
LESS— sets the UART data qualifier to less than. QUERY SYNTAX TRUART:QUAL? RESPONSE FORMAT TRUART:QUAL <condition> EXAMPLE When the serial protocol is UART and the trigger condition is DATA, the following command sets the data qualifier to EQUAL. Command message: TRUART:QUAL EQUAL RELATED COMMANDS TRUART:CON WWW.SIGLENT.COM...
Page 241
DATA, the following command sets the data value to 0x29. Command message: TRUART:DATA 41 When the serial protocol is UART and the trigger condition is DATA the following command ignore the data value. Command message: TRUART:DATA 256 RELATED COMMANDS TRUART:CON WWW.SIGLENT.COM...
Page 242
When the serial protocol is UART the following command sets the baud rate value to 9600 bit/s. Command message: TRUART:BAUD 9600 When the serial protocol is UART the following command sets the baud rate value to 2000 bit/s. Command message: TRUART:BAUD CUSTOM,2000 WWW.SIGLENT.COM...
Page 243
UART trigger. COMMAND SYNTAX TRUART:DLEN <value> <value>:= 5 to 8 QUERY SYNTAX TRUART:DLEN? RESPONSE FORMAT TRUART:DLEN <value> EXAMPLE When the serial protocol is UART, the following command sets data length value to 6. Command message: TRUART:DLEN 6 WWW.SIGLENT.COM...
Page 244
The TRUART:PAR? query returns the parity check used for UART trigger. COMMAND SYNTAX TRUART:PAR <value> <value>:= {NONE,ODD,EVEN} QUERY SYNTAX TRUART:PAR? RESPONSE FORMAT TRUART:PAR <value> EXAMPLE When the serial protocol is UART, the following command sets parity check to odd. Command message: TRUART:PAR ODD WWW.SIGLENT.COM...
Page 245
The TRUART:POL? query returns the idle level used for UART trigger. COMMAND SYNTAX TRUART:POL <value> <value>:= {LOW,HIGH} QUERY SYNTAX TRUART:POL? RESPONSE FORMAT TRUART:POL <value> EXAMPLE When the serial protocol is UART, the following command sets idle level to low. Command message: TRUART:POL LOW WWW.SIGLENT.COM...
Page 246
The TRUART:STOP? query returns the length of stop bit for UART trigger. COMMAND SYNTAX TRUART:STOP <value> <value>:= {1,1.5,2} QUERY SYNTAX TRUART:STOP? RESPONSE FORMAT TRUART:STOP <value> EXAMPLE When the serial protocol is UART, the following command sets the length of stop bit to 1. Command message: TRUART:STOP 1 WWW.SIGLENT.COM...
Page 247
The TRUART:BIT? query returns the bit order for UART trigger. COMMAND SYNTAX TRIG_UART:BIT <value> <value>:= {LSB,MSB} QUERY SYNTAX TRUART:BIT? RESPONSE FORMAT TRUART:BIT <value> EXAMPLE When the serial protocol is UART, the following command sets the bit order to MSB. Command message: TRUART:BIT MSB WWW.SIGLENT.COM...
Page 248
The range of threshold is related to the vertical scale of the source. QUERY SYNTAX TRCAN:CANH? RESPONSE FORMAT TRCAN:CANH <source>[,<threshold>] EXAMPLE When the serial protocol is CAN, the following command sets the source to channel3 and the threshold to 200 mV. Command message: TRCAN:CANH C3,0.2V WWW.SIGLENT.COM...
Page 249
ID_AND_DATA— Specify a search based on ID bits, ID and data. ERROR— Error frame. QUERY SYNTAX TRCAN:CON? RESPONSE FORMAT TRCAN:CON <condition> EXAMPLE When the serial protocol is CAN, the following command sets the trigger condition to START. Command message: TRCAN:CON START RELATED COMMANDS TRCAN:ID TRCAN:DATA TRCAN:DAT2 WWW.SIGLENT.COM...
Page 250
ID, the following command sets the ID value to 0x29. Command message: TRCAN:ID 41 When the serial protocol is CAN, the trigger condition is ID, and the address length is 11, the following command ignore the ID value. Command message: WWW.SIGLENT.COM...
Page 251
Digital Oscilloscope Series Programming Guide TRCAN:ID 2048 RELATED COMMANDS TRCAN:CON TRCAN:IDL WWW.SIGLENT.COM...
Page 252
<value>:= {11BITS,29BITS} QUERY SYNTAX TRCAN:IDL? RESPONSE FORMAT TRCAN:IDL <value> EXAMPLE When the serial protocol is CAN and the trigger condition is ID, the following command sets the ID length value to 11bits. Command message: TRCAN:IDL 11BITS RELATED COMMANDS TRCAN:CON WWW.SIGLENT.COM...
Page 253
ID_AND_DATA, the following command sets the data1 value to 0x29. Command message: TRCAN:DATA 41 When the serial protocol is CAN and the trigger condition is ID_AND_DATA, the following command ignore the data1 value. Command message: TRCAN:DATA 256 RELATED COMMANDS TRCAN:CON TRCAN:DAT2 WWW.SIGLENT.COM...
Page 254
ID_AND_DATA, the following command sets the data1 value to 0x29. Command message: TRCAN:DAT2 41 When the serial protocol is CAN and the trigger condition is ID_AND_DATA, the following command ignore the data2 value. Command message: TRCAN:DAT2 256 RELATED COMMANDS TRCAN:CON TRCAN:DATA WWW.SIGLENT.COM...
Page 255
When the serial protocol is CAN the following command sets the baud rate to 5 kbit/s. Command message: TRCAN:BAUD 5k When the serial protocol is CAN the following command sets the baud rate to 100000 bit/s. Command message: TRCAN:BAUD CUSTOM,100000 WWW.SIGLENT.COM...
Page 256
QUERY SYNTAX TRLIN:SRC? RESPONSE FORMAT TRLIN:SRC <source>[,<threshold>] <threshold>:= numerical value in E-notation with SI unit. EXAMPLE When the serial protocol is LIN, the following command sets the source to channel3 and the threshold to 200 mV. Command message: TRLIN:SRC C3,0.2V WWW.SIGLENT.COM...
Page 257
ID_AND_DATA—Specify a search based on ID and data. DATA_ERROR— Error frame. QUERY SYNTAX TRLIN:CON? RESPONSE FORMAT TRLIN:CON <condition> EXAMPLE When the serial protocol is LIN, the following command sets the trigger condition to break. Command message: TRLIN:CON BREAK RELATED COMMANDS TRLIN:ID TRLIN:DATA TRLIN:DAT2 WWW.SIGLENT.COM...
Page 258
ID, the following command sets the data1 value to 0x29. Command message: TRLIN:ID 41 When the serial protocol is LIN and the trigger condition is ID, the following command ignores the ID value. Command message: TRLIN:ID 64 RELATED COMMANDS TRLIN:CON WWW.SIGLENT.COM...
Page 259
ID_AND_DATA, the following command sets the data1 value to 0x29. Command message: TRLIN:DATA 41 When the serial protocol is LIN and the trigger condition is ID_AND_DATA, the following command ignores the data1 value. Command message: TRLIN:DATA 256 RELATED COMMANDS TRLIN:CON TRLIN:DAT2 WWW.SIGLENT.COM...
Page 260
ID_AND_DATA, the following command sets the data2 value to 0x29. Command message: TRLIN:DAT2 41 When the serial protocol is LIN and the trigger condition is ID_AND_DATA, the following command ignore the data2 value. Command message: TRLIN:DAT2 256 RELATED COMMANDS TRLIN:CON TRLIN:DATA WWW.SIGLENT.COM...
Page 261
When the serial protocol is LIN, the following command sets the baud rate value to 9600 bit/s. Command message: TRLIN:BAUD 9600 When the serial protocol is LIN, the following command sets the baud rate value to 500 bit/s. Command message: TRLIN:BAUD CUSTOM,500 WWW.SIGLENT.COM...
The waveform data is the actual data acquired for each point in the specified source. The preamble contains the information for interpreting the waveform data. WFSU WWW.SIGLENT.COM...
Page 263
MATH — Valid except for the FFT waveform and only valid for SDS1000X-E series. <section>:={DAT2} DAT2 — Return the main data include the head, the wave data and the ending flag. The length of data is current memory depth. RESPONSE FORMAT <trace>:WAVEFORM <data block> WWW.SIGLENT.COM...
Page 264
, the beginning of a binary block in which nine ASCII integers are used to give the length of the block (70 bytes). After the length of block, is beginning of the wave data. “0A 0A” means the end of data. WWW.SIGLENT.COM...
Page 265
The grid numbers in horizontal direction. The picture above as an example: TDIV? Send command TDIV 5.00E-09S Return Get the current timebase: timebase = 5.00E-09S. SARA? Send command SARA 1.00E+09Sa/s Return Get the current sampling rate: sampling rate= 1.00GSa/s. WWW.SIGLENT.COM...
Page 266
1.00E+09 Note: If you want the command return the “numerical” data type only (i.e. return as “ ” when SARA? CHDR OFF send the command “ ”), send the command “ ” at the first. See CHDR for details. WWW.SIGLENT.COM...
Page 267
Digital Oscilloscope Series Programming Guide For digital channel waveform: Step 1: Send the query to get the data of waveform. WWW.SIGLENT.COM...
Page 268
The time interval: time inter = 1/ sampling rate = 1ns. The time value of the first data point: time value = - (5.00E-08*14/2) = -3.50E-07(s) = -350(ns). The time value of the second data point: value = -350ns+1ns = -349ns. WWW.SIGLENT.COM...
Page 269
Digital Oscilloscope Series Programming Guide Use python to reconstruct the waveform: (See the code in Read Waveform Data of Digital Example) For math (except for FFT) waveform: WWW.SIGLENT.COM...
Page 270
According to the wave data, we can know the first point of waveform is the 25th data “17”, convert to decimal is “23” (Hexadecimal converted to decimal). The first point of wave data voltage value = 23*(5/25)-10 = -5.4V. WWW.SIGLENT.COM...
Page 271
The time interval: time inter = 1/sampling rate/interpolation multiplier = 0.2ns. The time value of the first data point: time value = - (2.00E-08*14/2) = -1.40E-07(s) = -140(ns). The time value of the second data point: value = -140ns+0.2ns = -139.8ns. Use python to reconstruct the waveform: WWW.SIGLENT.COM...
Page 272
Digital Oscilloscope Series Programming Guide WWW.SIGLENT.COM...
Page 273
You can set the sparse point or number of points or the first point using key-value pairs alone. See the example for details. After power on, SP is set to 0, NP is set to 0, and FP is WWW.SIGLENT.COM...
Page 274
Digital Oscilloscope Series Programming Guide set to 0. QUERY SYNTAX WAVEFORM_SETUP? RESPONSE FORMAT WAVEFORM_SETUP SP,<sparsing>,NP,<number>,FP,<point> EXAMPLE The following command specifies that every 3th data point (SP=3) starting at the 200 point should be transferred. Command message: WFSU SP,3,FP,200 RELATED COMMANDS WWW.SIGLENT.COM...
DC, noise, exponential rise, exponential fall, cardiac, Gaussian pulse and arbitrary waveforms. The WGEN commands are used to select the waveform function and parameters. ARWV PROD? STL? WGEN WVPR? Note: These commands are only valid for SDS1000X and SDS20000X installed AWG option. WWW.SIGLENT.COM...
Page 276
DESCRIPTION The ARBWAVE command sets the basic waveform type. COMMAND SYNTAX ARBWAVE INDEX,<index> <index>:= {0,1,2,3,4,5,6,7,8,9}. EXAMPLE For SDS2000X series, when the AWG option is installed, the following command set the index of waveform type to Command message: ARWV INDEX,3 WWW.SIGLENT.COM...
Page 277
BAND — return the upper limit of frequency of the output signal. RESPONSE FORMAT PRODUCT <parameter>,<value> EXAMPLE For SDS2000X series, when the AWG option is installed, the following query returns the upper limit of frequency of the output signal. Query message: PROD? BAND Response message: PROD BAND,25MHz WWW.SIGLENT.COM...
Page 278
RELEASE — return four waveforms defined by user. RESPONSE FORMAT STORELIST <list> EXAMPLE For SDS2000X series, when the AWG option is installed, the following query returns the waveform storage list. Query message: STL? DEBUG Response message: M0,SINE,M1,NOISE,M2,CARDIAC,M3,GAUS_PULSE,M4 ,EXP_RISE,M5,EXP_FALL,M6,EMPTY,M7,EMPTY,M8,E MPTY,M9,EMPTY WWW.SIGLENT.COM...
Page 279
Only valid when WVTP is RAMP. WIDTH <width> 0.000000048 to 0.001 s. Only valid when WVTP is PULSE. 0.0003V to 0.45V. STDEV <std> Only valid when WVTP is NOISE. -(0.45-STD)*(20/3)-(0.45-STD)*(20/3) (V). MEAN <mean> Only valid when WVTP is NOISE. LOAD <load> { HZ, 50}. WWW.SIGLENT.COM...
Page 280
0.2 V, mean to 1 V. Command message: WGEN TYPE,NOISE,STDEV,0.2V,MEAN,1V For SDS2000X series, when the AWG option is installed, the following command set the output to off. Command message: WGEN OUTP,OFF WWW.SIGLENT.COM...
Page 281
QUERY SYNTAX WAVE_PARA? <index> RESPONSE FORMAT WAVE_PARA POS,<index>,WVNM,<name>,FREQ,<freq>,AMPL,<ampl >,OFST,<ofst> EXAMPLE For SDS2000X series, when the AWG option is installed, the following query returns the parameters of M0. Query message: WVPR? Response message: WVPR POS,M0,WVNM,SINE,FREQ,1.000000e+03,AMPL,6.0000 00e+00,OFST,0.000000e+00 RELATED COMMANDS STL? WWW.SIGLENT.COM...
Page 282
FG), you can output basic wave, such as sine, square, ramp, pulse, DC, noise. At present, it does not support the instruction of setting built-in waveform and arbitrary waveform. The WGEN commands are the same as that of Siglent SDG series, so the format is not consistent with other groups. Refer to SDG programming guide for details.
Page 284
QUERY SYNTAX <channel>:ARbWaVe? <channel>:= {C1} RESPONSE FORMAT <channel>:ARWV INDEX,<index>,NAME,<name> EXAMPLE Set CH1 current waveform by index 2: C1:ARWV INDEX,2 Read CH1 current waveform: C1:ARWV? Return: C1:ARWV INDEX,2,NAME,StairUp Set CH1 current waveform to wave_1 by name. C1:ARWV NAME,wave_1 RELATED COMMANDS STL? WWW.SIGLENT.COM...
Page 285
WVTP is RAMP. := {0 to 100}. Duty cycle. The unit is "%". Value depends DUTY <duty> on frequency. Only settable when WVTP is SQUARE or PULSE. STDEV <stdev> := standard deviation of NOISE. The unit is volts "V". WWW.SIGLENT.COM...
Page 286
Change the waveform type of C1 to Ramp: C1:BSWV WVTP,RAMP Change the frequency of C1 to 2000 Hz: C1:BSWV FRQ,2000 Set the amplitude of C1 to 3 Vpp: C1:BSWV AMP,3 Return parameters of C1 from the device: C1:BSWV? Return: C1:BSWV WVTP,SINE,FRQ,100HZ,PERI,0.01S,AMP,2V,OFST,0V ,HLEV,1V,LLEV,-1V,PHSE,0 WWW.SIGLENT.COM...
Page 287
<polarity>:= {NOR, INVT}, in which NOR refers to normal, and INVT refers to invert. SAG and the built-in waveform generator only support to set to NOR. EXAMPLE Turn on CH1: C1:OUTP ON Read CH1 output state: C1:OUTP? Return: C1:OUTP ON,LOAD,HZ,PLRT,NOR WWW.SIGLENT.COM...
Page 288
Digital Oscilloscope Series Programming Guide Set the load of CH1 to 50 ohm: C1:OUTP LOAD,50 Set the load of CH1 to HiZ: C1:OUTP LOAD,HZ WWW.SIGLENT.COM...
Page 289
<channel>:= {C1} RESPONSE FORMAT <channel>:SYNC <state>,TYPE,<TYPE> <channel>:= {C1} <state>:= {ON, OFF} <TYPE>:={CH1}, SAG1021I only support one output channel, so it can only be CH1. EXAMPLE Turn on sync output: C1:SYNC ON Read state of CH1 sync. C1:SYNC? Return: C1:SYNC ON,TYPE,CH1 WWW.SIGLENT.COM...
Page 290
Digital Oscilloscope Series Programming Guide WGEN VOLTPRT Command/Query DESCRIPTION This commend sets or gets the state of over-voltage protection. COMMAND SYNTAX VOLTPRT <state> <state>:= {ON, OFF} QUERY SYNTAX VOLTPRT? RESPONSE FORMAT VOLTPRT <state> WWW.SIGLENT.COM...
The instructions are merged into one. PERS PESU The instructions are merged into one. PFCT PFSC|PFBF|PFOP| Split one command into multiple commands. PFFS none REFS REFSR|REFLA|RE Split one command into multiple commands. FDS|REFSA VPOS FFTP Modify the instruction name and usage WWW.SIGLENT.COM...
Page 292
RESPONSE FORMAT AUTO_CALIBRATE <state> EXAMPLE The following command disables a quick calibration. Command message: ACAL OFF RELATED COMMANDS *CAL? Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 293
The following command sets the type of automatic adjustment to multiple periods. Command message: AUTTS MP RELATED COMMANDS ASET Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 294
QUERY SYNTAX COUNTER? RESPONSE FORMAT COUNTER <state> EXAMPLE The following command enables the cymometer display. Command message: COUN ON Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 295
The CURSOR_AUTO command sets the cursor mode to Auto. COMMAND SYNTAX CRAU EXAMPLE The following command changes the cursor mode to Auto. Command message: CRAU Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 296
ON — The file contains the oscilloscope model, serial number, software version number, and the current parameter configuration of the oscilloscope as shown below. OFF — The file only contains the waveform data as shown below. State is ON: State is OFF: WWW.SIGLENT.COM...
Page 297
DIS — save as the date depth which is displayed on the screen. <state>:={OFF,ON} Note: The table below shows the available format in each oscilloscope series. QUERY SYNTAX CSV_SAVE? RESPONSE FORMAT CSV_SAVE <state> EXAMPLE For SDS1000X-E series, the following command sets “Param save” to off. Command message: CSVS OFF WWW.SIGLENT.COM...
Page 298
Digital Oscilloscope Series Programming Guide Format in Each Oscilloscope Series Model Command Format SDS1000CFL Format 3 SDS1000A Format 3 SDS1000CML+/CNL+/DL+/E+/F+ Format 3 SDS2000X Format 2 SDS1000X Format 2 SDS1000X-E Format 1 WWW.SIGLENT.COM...
Page 299
This following command sets the date to NOV. 1, 2017 and the time to 14:38:16. Command message: DATE 1,NOV,2017,14,38,16 Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 300
The following command sets the zoom factor of FFT to 1X. Command message: FFTZ 1 RELATED COMMANDS FFTT? Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 301
<channel>:FILTER <state> EXAMPLE The following command enables the filter of Channel 1. Command message. C1:FILT ON RELATED COMMANDS FILTS Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 302
The following command changes the type of filter to band- pass, and sets the up-limit to 200 kHz and the low-limit to 100 kHz. Command message: C1:FILTS TYPE,BP,UPPLIMIT,200KHz,LOWLIMIT,100KHz RELATED COMMANDS FILT Note: The table below shows the availability of command in each oscilloscope series. WWW.SIGLENT.COM...
Page 303
Digital Oscilloscope Series Programming Guide Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 304
PEAK_DETECT <state> EXAMPLE The following command set Peak Detect acquisition on. Command message: PDET ON RELATED COMMANDS ACQW Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ yes SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 305
<state>:={ON,OFF} QUERY SYNTAX PF_ CONTROL? RESPONSE FORMAT PF_CONTROL TRACE,<trace>,CONTROL,<control>,OUTPUT,<output>, OUTPUTSTOP,<state> EXAMPLE The following command sets source to Channel 1, “operate” to “start”, “output” to “pass” and “stop on output” to “off”. Command message: PFCT TRACE,C1,CONTROL,START,OUTPUT,PASS,OUTPUT STOP,OFF RELATED COMMANDS PFSC WWW.SIGLENT.COM...
Page 306
Digital Oscilloscope Series Programming Guide PFBF PFOP PFFS Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 307
PERSIST <mode> EXAMPLE The following command turns the persistence to ON. Command message: PERS ON RELATED COMMANDS PESU Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 308
The following command recalls a waveform file called “C1WF.DAV” from u-disk into Memory M1. Command message: M1:REC DISK,UDSK,FILE,‘C1WF.DAV’ RELATED COMMANDS *RCL Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 309
QUERY SYNTAX REF_SET? REF,<ref> RESPONSE FORMAT REF_SET REF,<ref>,STATE,<state> EXAMPLE The following command saves the Channel 1 waveform to REFA, and display REFA on screen. Command message: REFS TRACE,C1,REF,RA,STATE,ON,SAVE,DO RELATED COMMANDS REFSR REFLA REFDS REFSA WWW.SIGLENT.COM...
Page 310
Digital Oscilloscope Series Programming Guide Note: The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
Page 311
QUERY SYNTAX <trace>:VERT_POSITION? RESPONSE FORMAT <trace>:VERT_POSITION <offset> EXAMPLE The following command shifts FFT Trace A (TA) upwards by +3 divisions relative to the position. When the scale of FFT is 1 V. Command message: TA:VPOS 3V RELATED COMMANDS FFTP Note: WWW.SIGLENT.COM...
Page 312
Digital Oscilloscope Series Programming Guide The table below shows the availability of command in each oscilloscope series. Model Valid? SDS1000CFL SDS1000A SDS1000CML+/CNL+/DL+/E+/F+ SDS2000X SDS1000X SDS1000X-E WWW.SIGLENT.COM...
VC++ Example VB Example MATLAB Example LabVIEW Example C# Example Examples of Using Sockets Python Example C Example Common Command Examples Read Waveform Data (WF) Example Screen Dump (SCDP) Example WWW.SIGLENT.COM...
Set the .h file include directory, the NI-VISA install path, in our computer we set the path is: C:\Program Files\IVI Foundation \VISA\WinNT\include. Set this path to: project->properties- >C/C++ ->General->Additional Include Directories. See the picture below: Set lib path and set lib file: WWW.SIGLENT.COM...
Page 315
Set lib path: the NI-VISA install path, in our computer we set the path is: C:\Program Files\IVI Foundation\VISA\WinNT\lib\msc. this path project->properties->Linker->General- >Additional Library Directories: as shown in the pictures below. Set lib file:project->properties->Linker->Command Line->Additional Options: visa32.lib Include visa.h file in the projectname.cpp file: #include <visa.h> WWW.SIGLENT.COM...
Page 316
ViStatus status; Char instrResourceString[VI_FIND_BUFLEN]; Unsignedcharbuffer[100]; Charstringinput[512]; /** First we must call viOpenDefaultRM to get the manager * handle. We will store this handle in defaultRM.*/ status=viOpenDefaultRM (&defaultRM); (status<VI_SUCCESS) printf ("Could not open a session to the VISA Resource Manager!\n"); returnstatus; WWW.SIGLENT.COM...
Page 317
("Cannot open a session to the device %d.\n", i+1); continue; /* * At this point we now have a session open to the USB TMC instrument. * We will now use the viPrintf function to send the device the string "*IDN?\n", WWW.SIGLENT.COM...
Page 318
("\nDevice %d: %*s\n", i+1,retCount, buffer); status = viClose (instr); /** Now we will close the session to the instrument using * viClose. This operation frees all system resources. status = viClose (defaultRM); printf("Press 'Enter' to exit."); fflush(stdin); getchar(); return TCP/IP: intTCP_IP_Test(char *pIP) WWW.SIGLENT.COM...
Page 319
("An error occurred opening the session\n"); viClose(defaultRM); status = viPrintf(instr, "*idn?\n"); status = viScanf(instr, "%t", outputBuffer); (status<VI_SUCCESS) printf("viRead failed with error code: %x \n",status); viClose(defaultRM); else printf ("\ndata read from device: %*s\n", 0,outputBuffer); status = viClose (instr); status = viClose (defaultRM); WWW.SIGLENT.COM...
Page 320
Digital Oscilloscope Series Programming Guide printf("Press 'Enter' to exit."); fflush(stdin); getchar(); return WWW.SIGLENT.COM...
' The example writes the "*IDN?\n" string to all the USBTMC ' devices connected to the system and attempts to read back ' results using the write and read functions. ' The general flow of the code is Open Resource Manager WWW.SIGLENT.COM...
Page 322
' number of resources in the system in numInstrs. status=viFindRsrc(defaultRM,"USB?*INSTR",findList,numlnstrs,instrResourceString) (status < VI_SUCCESS) Then Debug.Print "An error occurred while finding resources." viClose (defaultRM) Usbtmc_test = status Exit Function End If ' Now we will open VISA sessions to all USB TMC instruments. WWW.SIGLENT.COM...
Page 323
' the identification query that was sent. We will use the viRead ' function to acquire the data. ' After the data has been read the response is displayed. status = viRead(instrsesn, buffer, MAX_CNT, retCount) (status < VI_SUCCESS) Then Debug.Print "Error reading a response from the device.", i + 1 WWW.SIGLENT.COM...
Page 324
' Now we will open a session via TCP/IP device status = viOpen(defaultRM, "TCPIP0::" + ip + "::INSTR", VI_LOAD_CONFIG, VI_NULL, instrsesn) (status < VI_SUCCESS) Then Debug.Print "An error occurred opening the session" viClose (defaultRM) TCP_IP_Test = status Exit Function WWW.SIGLENT.COM...
Page 325
= viRead(instrsesn, outputBuffer, VI_FIND_BUFLEN, count) (status < VI_SUCCESS) Then Debug.Print "Error reading a response from the device.", i + 1 Else Debug.Print "read from device:", outputBuffer End If status = viClose(instrsesn) status = viClose(defaultRM) TCP_IP_Test = 0 End Function WWW.SIGLENT.COM...
%Create a VISA-USB object connected to a USB instrument vu = visa('ni','USB0::0xF4EC::0xEE38::0123456789::INSTR'); %Open the VISA object created fopen(vu); %Send the string "*IDN?",asking for the device's identification. fprintf(vu,'*IDN?'); %Request the data outputbuffer = fscanf(vu); disp(outputbuffer); %Close the VISA object fclose(vu); delete(vu); clear vu; WWW.SIGLENT.COM...
Page 327
%Create a VISA-TCPIP object connected to an instrument %configured with IP address. vt = visa('ni',['TCPIP0::',IPstr,'::INSTR']); %Open the VISA object created fopen(vt); %Send the string "*IDN?",asking for the device's identification. fprintf(vt,'*IDN?'); %Request the data outputbuffer = fscanf(vt); disp(outputbuffer); %Close the VISA object fclose(vt); delete(vt); clear vt; WWW.SIGLENT.COM...
VISA Palette from the pop-up menu: VISA Write, VISA Read, VISA Open and VISA Close. The connection is as shown in the figure below: Select the device resource from the VISA Resource Name list box and run the program. WWW.SIGLENT.COM...
Page 329
Write and VISA Read Function to Synchronous I/O. The LabVIEW default is asynchronous I/O. Right-click the node and select Synchronous I/O Mod>>Synchronous from the shortcut menu to write or read data synchronously. The connection is as shown in the figure below: Input the IP address and run the program. WWW.SIGLENT.COM...
Page 330
Digital Oscilloscope Series Programming Guide WWW.SIGLENT.COM...
Add References. Add NationalInstruments.Common.dll and NationalInstruments.VisaNS.dll to the project. (Notice: you must install the .NET Framework 3.5/4.0/4.5 Languages support when you install the NI-VISA.) Coding: using System; using System.Collections.Generic; using System.Linq; using System.Text; using NationalInstruments.VisaNS; namespace TestVisa class Program WWW.SIGLENT.COM...
Page 332
Console.WriteLine("Can not find USBTMC Device!"); return; //Choose the first resource string to connect the device. //You can input the address manually //USBTMC: //MessageBasedSession mbSession=(MessageBasedSession)ResourceManager.GetLocalManager().Open(" USB0::0xF4EC::0xEE38::0123456789::INSTR"); /TCP IP: //MessageBasedSession mbSession=(MessageBasedSession)ResourceManager.GetLocalManager().Open(" TCPIP0::192.168.1.100::INSTR"); MessageBasedSession mbSession=(MessageBasedSession)ResourceManager.GetLocalManager().Open(u sbRsrcStrings[0]); mbSession.Write("*IDN?"); string result = mbSession.ReadString(); mbSession.Dispose(); Console.WriteLine(result); WWW.SIGLENT.COM...
# for sockets import sys # for exit import time # for sleep #----------------------------------------------------------------------------- remote_ip = "10.11.13.32" # should match the instrument’s IP address port = 5025 # the port number of the instrument service count = 0 def SocketConnect(): WWW.SIGLENT.COM...
Page 334
SocketQuery(Sock, cmd): try : #Send cmd string Sock.sendall(cmd) time.sleep(1) except socket.error: #Send failed print ('Send failed') sys.exit() reply = Sock.recv(4096) return reply def SocketClose(Sock): #close the socket Sock.close() time.sleep(.300) def main(): global remote_ip global port global count WWW.SIGLENT.COM...
Page 335
# Body: send the SCPI commands *IDN? 10 times and print the return message s = SocketConnect() for i in range(10): qStr = SocketQuery(s, b'*IDN?') print (str(count) + ":: " + str(qStr)) count = count + 1 SocketClose(s) input('Press "Enter" to exit') if __name__ == '__main__': proc = main() WWW.SIGLENT.COM...
// Initialize the whole structure to zero memset(&MyAddress,0,sizeof(struct sockaddr_in)); // Then set the individual fields MyAddress.sin_family=PF_INET; // IPv4 MyAddress.sin_port=htons(5025); // Port number used by most instruments MyAddress.sin_addr.s_addr=inet_addr(“169.254.9.80”); // IP Address // Establish TCP connection if(connect(MySocket,(struct sockaddr*)&MyAddress,sizeof(struct sockaddr_in))==-1) exit(1); // Send SCPI command if(send(MySocket,”*IDN?\n”,6,0)==-1) WWW.SIGLENT.COM...
Page 337
Digital Oscilloscope Series Programming Guide exit(1); // Read response char buffer[200]; actual; if((actual=recv(MySocket,&buffer[0],200,0))==-1) exit(1); buffer[actual]=0; // Add zero character (C string) printf(“Instrument ID: %s\n”,buffer); // Close socket if(close(MySocket)==-1) exit(1); WWW.SIGLENT.COM...
The initial value is generally 2s. Read Waveform Data (WF) Example import visa import pylab main(): _rm = visa.ResourceManager() sds = _rm.open_resource("USB0::0xF4EC::0xEE38::0123456789::INSTR") sds.write("chdr off") vdiv = sds.query("c1:vdiv?") ofst = sds.query("c1:ofst?") tdiv = sds.query("tdiv?") sara = sds.query("sara?") sara_unit = {'G':1E9,'M':1E6,'k':1E3} unit sara_unit.keys(): WWW.SIGLENT.COM...
= 20*1024*1024 #default value is 20*1024(20k bytes) sds.timeout = 30000 #default value is 2000(2s) file_name = "F:\\SCDP.bmp" sds.write("SCDP") result_str = sds.read_raw() f = open(file_name,'wb') f.write(result_str) f.flush() f.close() __name__=='__main__': main() Then you can open the file as shown below: WWW.SIGLENT.COM...
Page 342
Digital Oscilloscope Series Programming Guide WWW.SIGLENT.COM...
Need help?
Do you have a question about the SDS1202X-E and is the answer not in the manual?
Questions and answers