Digital Oscilloscopes
IVI-C Programming Guide
E01A

SDS IVI-C Programming Guide

Revision History
This chapter declares the modifications of IVI driver in the most recent release of the
programming guide version.

Version E01A at Introduction
This version, as the first version, will be compared with later versions. When the next
version is released, the differences between the two versions will be marked.

1

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

Models Supported
The series of SIGLENT digital oscilloscopes supporting this IVI-C driver is shown below.
SeriesRelease Version Supporting IVI-C Driver

SDS2000X Plus

1.3.5R3

Software Requirement
This chapter describes how to configure the IVI driver to control the instrument. If you
want to use the IVI Driver, you must install NI-VISA, the IVI Compliance Package, and a
C language development system that supports the IVI driver library.

Install NI-MAX
Currently, NI-VISA is packaged in two versions: Full version and Run-Time Engine

version. The full version includes the NI device drivers and a tool named NI-MAX which

is a user interface to control and test remotely connected devices. You need to install
the full version of NI-VISA.

You can get the NI-VISA 5.4 full version from http://www.ni.com/download/ni-visa-

5.4/4230/en/.

2

WWW.SIGLENT.COM

SDS IVI-C Programming Guidea.

Double click the NIVISA 5.4 full.exe, a dialog will be shown as below:b.

Click Unzip, the installation process will automatically launch after unzippingc.

The NI-VISA installing dialog is shown above. Click Next to start the installation

files. If your computer needs to install .NET Framework 4, it may auto start.

process.

3

WWW.SIGLENT.COM

SDS IVI-C Programming Guided.

Set the install path. The default path is “C:\Program Files\National Instruments\”.

e.

Click Next twice, in the License Agreement dialog, select “I accept the above 2

You can change it. Click Next.

License Agreement(s).”,and click Next.

4

WWW.SIGLENT.COM

SDS IVI-C Programming Guidef.

Click Next to begin the installation.

g.

Wait until the installation is completed, and then reboot your PC.

5

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

Install the IVI Compliance Package
The IVI Compliance Package contains the IVI class drivers and supported libraries fordeveloping and leveraging IVI-based applications.

You can get the IVI Compliance Package from https://www.ni.com/zh-

cn/support/downloads/drivers/download.ivi-compliance-package.html#329444

a.

If the IVI Compliance Package is not installed, there is no IVI Drivers option in "Myb.

Install the IVI Compliance Package (ICP).

c.

System".

Restart your computer after the installation. After the reboot, the IVI Drivers option
appears.

6

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

7

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

SDS IVI-C Driver Package List
The SDS IVI-C driver package provides three files: sds.dll file, sds.h file and sds.lib file.

File

Description

sds.dll

A dynamic link library file, including variables, functions,sds.lib

A static data connection library file, including variables,sds.h

A header file, including declarations of variables, functions,and data interfaces for various attributes.

functions, and data interfaces for various attributes.
and data interfaces.

Depending on your requirements, you can include the sds.h when programming the

Siglent oscilloscope with the IVI driver, and load the sds.dll and sds.lib library files into

your own project.

You will find multiple examples that show you how to use these files at the end of thisdocument. You can implicitly call sds.lib, or explicitly call sds.dll as well.

8

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

Introduction to IVI
IVI (Interchangeable Virtual Instruments) is a new generation of instrument drivertechnology specifications introduced by the IVI Foundation. IVI can realize theinterchangeability with the instrument, the instrument simulation, and the instrument
state tracking and buffer function. All references to IVI drivers in this document refer to
IVI-C drivers that are created using NI tools and that rely on the IVI Engine.

IVI Data Type
There are six data types for the attributes of the IVI Engine: ViInt32, ViReal64, ViString,
ViBoolean, ViSession and ViAddr.
Table 1 Data Type
Data Type

Description

ViReal64

64-bit floating-point number

ViInt32

ViString

ViBoolean
Visession
ViAddr32-bit signed integer
String type

Boolean value

A VISA session handle
Logical address type

Access IVI Attribute
User-callable functions are typically implemented by manipulating attributes. You cancall sds_SetAttribute or sds_GetAttribute functions.
9WWW.SIGLENT.COM

SDS IVI-C Programming Guide

SetAttribute Function Group

sds_SetAttributeViInt32 (ViSession vi, ViConstString channelName, ViAttr
attributeId, ViInt32 value)

Example: When you want to set the channel coupling, you can call the SetAttributefunction to change the channel coupling.

sds_SetAttributeViInt32(session,"CHAN1",SDS_ATTR_VERTICAL_COUPLING,SDS_VAL_AC);where,

session: The instrument handle.

“CHAN1”: A constant string that represents the analog channel 1 and shows that
this SDS_ATTR_VERTICAL_COUPLING attribute is corresponding to thatspecific channel.

SDS_VAL_AC: This sets the coupling mode to AC.



sds_SetAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr
attributeId, ViReal64 value)

Example: When you want to set the probe attenuation, you can call SetAttribute or
GetAttribute function to change or obtain the probe attenuation value.

sds_SetAttributeViReal64(session,"CHAN1",SDS_ATTR_PROBE_ATTENUATION,100);
10

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
where,

session: Instrument Handle.

“CHAN1”: A constant string that represents the analog channel 1 and shows that
this SDS_ATTR_PROBE_ATTENUATION attribute is corresponding tothis specific channel.

100: Set the probe attenuation to x100.



sds_SetAttributeViString (ViSession vi, ViConstString channelName, ViAttr
attributeId, ViConstString value)

Example: When you want to set the channel label text, you can call SetAttribute or

GetAttribute function to change or obtain the channel label text.

sds_SetAttributeViString(session,"CHAN1",SDS_ATTR_CHANNEL_LABLE_TEXT,"
Channel1");
where,

session: The instrument handle.

“CHAN1”: A constant string that represents the analog channel 1 and shows that
this SDS_ATTR_CHANNEL_LABLE_TEXT attribute is corresponding tothis specific channel.

“Channel1”: Set the label text of Channel 1 to “Channel1”.



sds_SetAttributeViBoolean (ViSession vi, ViConstString channelName, ViAttr
attributeId, ViBoolean value)

Example: When you want to set a channel on or off, you can call SetAttribute or

GetAttribute function to change or obtain the state of the channel.
11

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

sds_SetAttributeViBoolean(session,"CHAN1",SDS_ATTR_CHANNEL_ENABLED,VI_FALSE);

where,

session: The instrument handle.

“CHAN1”: A constant string that represents the analog channel 1 and shows that
this SDS_ATTR_CHANNEL_ENABLED attribute is corresponding to thischannel.

VI_FALSE: This means turning channel 1 off.

GetAttribute Function Group

sds_GetAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr
attributeId, ViReal64 *value)

Example: When you want to set the probe attenuation, you can call SetAttribute or
GetAttribute function to change or obtain the probe attenuation value.

sds_GetAttributeViReal64(session,"CHAN1",SDS_ATTR_PROBE_ATTENUATION,&value64);
where,

session: The instrument handle.

“CHAN1”: A constant string that represents the analog channel 1 and shows that
this SDS_ATTR_PROBE_ATTENUATION attribute is corresponding tothis channel.

value64: A ViReal64 type variable which is used to store the returned value of theprobe attenuation query.

12

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

sds_GetAttributeViInt32 (ViSession vi, ViConstString channelName, ViAttr
attributeId, ViInt32 *value)

Example: When you want to set the channel coupling, you can call SetAttribute or
GetAttribute function to change or obtain the channel coupling.

sds_GetAttributeViInt32(session,"CHAN1",SDS_ATTR_VERTICAL_COUPLING,&value32);
where,

session: The instrument handle.

“CHAN1”: A constant string that represents the analog channel 1 and shows that
this

SDS_ATTR_VERTICAL_COUPLING attribute is corresponding tothis specific channel.

value32: A ViInt32 type variable which is used to store the returned value of thecoupling query.



sds_GetAttributeViBoolean (ViSession vi, ViConstString channelName, ViAttr

attributeId, ViBoolean *value)

Example: When you want to set a channel on or off, you can call SetAttribute or

GetAttribute function to change or obtain the state of channel.

sds_GetAttributeViBoolean(session,"CHAN1",SDS_ATTR_CHANNEL_ENABLED,&bool
ean);where,

session: The instrument handle.
13

WWW.SIGLENT.COM

SDS IVI-C Programming Guide“CHAN1”: A constant string that represents the analog channel 1 and shows that
this SDS_ATTR_CHANNEL_ENABLED attribute is corresponding to thisspecific channel.

boolean: A ViBoolean type variable which is used to store the returned value.



sds_GetAttributeViString (ViSession vi, ViConstString channelName, ViAttr

attributeId, ViInt32 bufSize, ViChar value[])

Example: When you want to set the channel label text, you can call SetAttribute or
GetAttribute function to change or obtain the channel label text.

sds_GetAttributeViString(session,"CHAN1",SDS_ATTR_CHANNEL_LABLE_TEXT,buffersize,str);
where,

session: The instrument handle.

“CHAN1”: A constant string that represents the analog channel 1 and shows that

this SDS_ATTR_CHANNEL_LABLE_TEXT attribute is corresponding tothis specific channel.

buffersize: A ViInt32 type variable.

str： A ViString type variable which is used to store the returned value.

14

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

Attribute
This chapter describes the attributes of the SIGLENT IVI driver. The following table lists
the supported IVI base class attributes and SIGLENT custom attributes.
SystemChannelSubsystem

Acquisition
Subsystem

Trigger
Subsystem

Attribute
SDS_ATTR_MAX_INPUT_FREQUENCY
SDS_ATTR_INPUT_IMPEDANCESDS_ATTR_VERTICAL_COUPLINGSDS_ATTR_PROBE_ATTENUATIONSDS_ATTR_VERTICAL_OFFSETSDS_ATTR_VERTICAL_RANGESDS_ATTR_CHANNEL_ENABLED
SDS_ATTR_PROBE_SENSE_VALUE
SDS_ATTR_CHANNEL_LABLE_TEXTSDS_ATTR_ACQUISITION_TYPE
SDS_ATTR_HORZ_RECORD_LENGTSDS_ATTR_HORZ_SAMPLE_RATESDS_ATTR_HORZ_TIME_PER_RECORD
SDS_ATTR_ACQUISITION_START_TIMESDS_ATTR_INTERPOLATIONSDS_ATTR_NUM_AVERAGES (Not Supported)
SDS_ATTR_NUM_ENVELOPES (Not Supported)
SDS_ATTR_SAMPLE_MODE (Not Supported)
SDS_ATTR_TRIGGER_TYPE
SDS_ATTR_TRIGGER_HOLDOFFSDS_ATTR_TRIGGER_COUPLINGSDS_ATTR_TRIGGER_SLOPE
SDS_ATTR_TRIGGER_SOURCESDS_ATTR_TRIGGER_LEVELSDS_ATTR_TV_TRIGGER_EVENT (Not Supported)
SDS_ATTR_TV_TRIGGER_LINE_NUMBER
SDS_ATTR_TV_TRIGGER_SIGNAL_FORMATSDS_ATTR_RUNT_HIGH_THRESHOLDSDS_ATTR_RUNT_LOW_THRESHOLDSDS_ATTR_RUNT_POLARITYSDS_ATTR_GLITCH_CONDITIONSDS_ATTR_GLITCH_POLARITYSDS_ATTR_GLITCH_WIDTH (Not Supported)
SDS_ATTR_WIDTH_CONDITIONSDS_ATTR_WIDTH_HIGH_THRESHOLDSDS_ATTR_WIDTH_LOW_THRESHOLDSDS_ATTR_WIDTH_POLARITY
15

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

Measurement
Subsystem

SDS_ATTR_TRIGGER_MODIFIERSDS_ATTR_MEASURE_ENABLED
SDS_ATTR_MEASURE_MODE
SDS_ATTR_MEASURE_GATESDS_ATTR_MEASURE_GATE_GA
SDS_ATTR_MEASURE_GATE_GB
SDS_ATTR_MEASURE_ADVANCED_STYLESDS_ATTR_MEASURE_ADVANCED_LINENUMBER
SDS_ATTR_MEASURE_ADVANCED_STATISTICSSDS_ATTR_MEASURE_ADVANCED_STATISTICS_HISTOGRAM
SDS_ATTR_MEASURE_ADVANCED_STATISTICA_MAXCOUNTSDS_ATTR_MEASURE_SIMPLE_SOURCESDS_ATTR_MEASURE_ADVANCED_STATISTICS_RESET

16

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

Channel Subsystem
The channel group properties are used to set or read channel-related parameters. The
channel group has the following attributes:











SDS_ATTR_MAX_INPUT_FREQUENCY
SDS_ATTR_INPUT_IMPEDANCESDS_ATTR_VERTICAL_COUPLINGSDS_ATTR_PROBE_ATTENUATIONSDS_ATTR_VERTICAL_OFFSETSDS_ATTR_VERTICAL_RANGESDS_ATTR_CHANNEL_ENABLED

SDS_ATTR_PROBE_SENSE_VALUE

SDS_ATTR_CHANNEL_LABLE_TEXT

17

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MAX_INPUT_FREQUENCY
Description

This attribute specifies the channel bandwidth limit.

Data type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is one of the following analog inputs:
CHAN1, CHAN2, CHAN3 or CHAN4.
attributeId is SDS_ATTR_MAX_INPUT_FREQUENCY
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

Related AttributeHigh Level Functions(0,2e+7) means the bandwidth is limited to 20M(2e+7,2e+8) means bandwidth is limited to 200M
(2e+8,1e+38) means bandwidth is FULLSDS_ATTR_INPUT_IMPEDANCE

sds_ConfigureChanCharacteristics

18

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_INPUT_IMPEDANCE
Description

This attribute specifies the channel impedance.

Data type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is one of the following analog inputs:
CHAN1, CHAN2, CHAN3 or CHAN4.
attributeId is SDS_ATTR_INPUT_IMPEDANCE macro.
value is used to store or set the value of function
represented by attributeId.

Value Range(49.5,50.5) means the impedance is 50Ω
(999999.5,1000000.5) means the impedance is 1MΩ

Related Attribute

SDS_ATTR_MAX_INPUT_FREQUENCYHigh Level Functions

sds_ConfigureChanCharacteristics

19

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_VERTICAL_COUPLING
Description

This attribute specifies channel coupling.

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is one of the following analog inputs:
CHAN1, CHAN2, CHAN3 or CHAN4.
attributeId is SDS_ATTR_VERTICAL_COUPLING
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_AC
SDS_VAL_DC
SDS_VAL_GND

Related Attribute

SDS_ATTR_VERTICAL_OFFSETSDS_ATTR_VERTICAL_RANGESDS_ATTR_CHANNEL_ENABLED
SDS_ATTR_PROBE_ATTENUATIONHigh Level Functions

sds_ConfigureChannel

20

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_PROBE_ATTENUATION
Description

This attribute specifies channel probe attenuation.

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is one of the following analog inputs:
CHAN1, CHAN2, CHAN3 or CHAN4.
attributeId is SDS_ATTR_PROBE_ATTENUATION
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_PROBE_SENSE_ON
SDS_VAL_PROBE_SENSE_1
SDS_VAL_PROBE_SENSE_10
SDS_VAL_PROBE_SENSE_100

Related Attribute

SDS_ATTR_VERTICAL_OFFSETSDS_ATTR_VERTICAL_RANGESDS_ATTR_CHANNEL_ENABLED
SDS_ATTR_VERTICAL_COUPLINGHigh Level Functions

sds_ConfigureChannel

21

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_VERTICAL_OFFSET
Description

This attribute specifies channel vertical offset.

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is one of the following analog inputs:
CHAN1, CHAN2, CHAN3 or CHAN4.
attributeId is SDS_ATTR_VERTICAL_OFFSET macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

When the channel scale is between [5e-4*probe, 1e1*probe], the range of value is [-2*probe, 2*probe].
When the channel scale is between (1e-1*probe,
1*probe], the range of value is [-20*probe, 20*probe].
When the channel scale is between (1*probe,
10*probe], the range of value is [-200*probe,
200*probe].
Note:
Probe is the value of channel attenuation.

Related Attribute

SDS_ATTR_VERTICAL_OFFSETSDS_ATTR_CHANNEL_ENABLED
SDS_ATTR_VERTICAL_COUPLINGSDS_ATTR_PROBE_ATTENUATIONHigh Level Functions

sds_ConfigureChannel

22

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_VERTICAL_RANGE
Description

This attribute specifies channel vertical range.

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is one of the following analog inputs:
CHAN1, CHAN2, CHAN3 or CHAN4.
attributeId is SDS_ATTR_VERTICAL_RANGE macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

When the channel impedance is set to 50Ω, the value
range is [5e-4*probe,1e+0*probe]
When the channel impedance is set to 1MΩ, the value
range is [5e-4*probe,1e+1*probe]
Note:
Probe is the value of channel attenuation.

Related Attribute

SDS_ATTR_CHANNEL_ENABLED
SDS_ATTR_VERTICAL_OFFSETSDS_ATTR_VERTICAL_COUPLINGSDS_ATTR_PROBE_ATTENUATIONHigh Level Functions

sds_ConfigureChannel

23

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_CHANNEL_ENABLED
Description

This attribute specifies the status of channel.

Data Type

ViBoolean

AccessR/W

Common Control
Functions

sds_SetAttributeViBoolean (ViSession vi,
ViConstString channelName, ViAttr attributeId,
ViBoolean value)
sds_GetAttributeViBoolean (ViSession vi,
ViConstString channelName, ViAttr attributeId,
ViBoolean *value)Note:vi is the instrument handle.
ChannelName is one of the following analog inputs:
CHAN1, CHAN2, CHAN3 or CHAN4.
attributeId is SDS_ATTR_CHANNEL_ENABLED macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

VI_TRUE means to turn on the channel
VI_FALSE means to turn off the channel

Related Attribute

SDS_ATTR_VERTICAL_OFFSETSDS_ATTR_VERTICAL_RANGESDS_ATTR_VERTICAL_COUPLINGSDS_ATTR_PROBE_ATTENUATIONHigh Level Functions

sds_ConfigureChannel

24

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_PROBE_SENSE_VALUE
Description

This attribute specifies channel probe attenuation to
1X.

Data Type

ViReal64

AccessR/O

Common Control
Functions

sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is one of the following analog inputs:
CHAN1, CHAN2, CHAN3 or CHAN4.
attributeId is SDS_ATTR_PROBE_SENSE_VALUE
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

None

Related Attribute

NoneHigh Level Functions

None

25

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_CHANNEL_LABLE_TEXT
Description

This attribute specifies the label text of the source

Data TypeViString

AccessR/W

Common Control
Functions

sds_SetAttributeViString (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViConstString value)
sds_GetAttributeViString (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32
bufSize,ViChar value[])Note:vi is the instrument handle.
channelName is one of the following analog inputs:
CHAN1, CHAN2, CHAN3 or CHAN4.
attributeId is SDS_ATTR_CHANNEL_LABLE_TEXT
macro.
bufSize is the number of bytes you specified for the
Attribute Value parameter in the ViChar array.
value is used to store or set the value of function
represented by attributeId.

Value Range

The limit of the label text is 20 bytes

Related Attribute

NoneHigh Level Functions

None

26

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

Acquisition Subsystem
The acquisition group properties are used to set or read acquisition related parameters.
The acquisition group has the following attributes:












SDS_ATTR_ACQUISITION_TYPE

SDS_ATTR_HORZ_RECORD_LENGTSDS_ATTR_HORZ_SAMPLE_RATESDS_ATTR_HORZ_TIME_PER_RECORD

SDS_ATTR_ACQUISITION_START_TIMESDS_ATTR_INTERPOLATIONSDS_ATTR_NUM_AVERAGES (Not Supported)

SDS_ATTR_NUM_ENVELOPES (Not Supported)
SDS_ATTR_SAMPLE_MODE (Not Supported)

27

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_ACQUISITION_TYPE
Description

This attribute specifies the acquisition mode.

Data Type

ViInt32

AccessR/W

Common Control
Functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_ACQUISITION_TYPE macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_NORMAL
SDS_VAL_PEAK_DETECT

Related Attribute

NoneHigh Level Functions

sds_ConfigureAcquisitionType

28

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_HORZ_RECORD_LENGT
Description

This attribute gets the length of the waveform record.

Data Type

ViInt32

AccessR/O

Common Control
Functions

sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_HORZ_RECORD_LENGT
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

None

Related Attribute

NoneHigh Level Functions

None

29

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_HORZ_SAMPLE_RATE
Description

This attribute gets the sampling rate.

Data Type

ViReal64

AccessR/O

Common Control
Functions

sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_HORZ_SAMPLE_RATE
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

None

Related Attribute

NoneHigh Level Functions

None

30

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_HORZ_TIME_PER_RECORD
Description

This attribute specifies the horizontal scale of themain window.

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_HORZ_TIME_PER_RECORD
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

In the IVI-4.1 specification，values are default
coerced up. And the following range make effect on
the time base of the main window. So that,(2e-10,5e-10) means 500ps/div(5e-10,1e-9) means 1ns/div(1e-9,2e-9) means 2ns/div(2e-9,5e-9) means 5ns/div(5e-9,1e-8) means 10ns/div(1e-8,2e-8) means 20ns/div(2e-8,5e-8) means 50ns/div(5e-8,1e-7) means 100ns/div(1e-7,2e-7) means 200ns/div(2e-7,5e-7) means 500ns/div(5e-7,1e-6) means 1us/div(1e-6,2e-6) means 2us/div(2e-6,5e-6) means 5us/div(5e-6,1e-5) means 10us/div(1e-5,2e-5) means 20us/div(2e-5,5e-5) means 50us/div(5e-5,1e-4) means 100us/div(1e-4,2e-4) means 200us/div(2e-4,5e-4) means 500us/div
31

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

Related AttributeHigh Level Functions(5e-4,1e-3) means 1ms/div(1e-3,2e-3) means 2ms/div(2e-3,5e-3) means 5ms/div(5e-3,1e-2) means 10ms/div(1e-2,2e-2) means 20ms/div(2e-2,5e-2) means 50ms/div(5e-2,1e-1) means 100ms/div(1e-1,2e-1) means 200ms/div(2e-1,5e-1) means 500ms/div(5e-1,1e+0) means 1s/div(1e+0,2e+0) means 2s/div(2e+0,5e+0) means 5s/div(5e+0,1e+1) means 10s/div(1e+1,2e+1) means 20s/div(2e+1,5e+1) means 50s/div(5e+1,1e+2) means 100s/div(1e+2,2e+2) means 200s/div(2e+2,5e+2) means 500s/div(5e+2,1e+3) means 1ks/div
SDS_ATTR_ACQUISITION_START_TIME
sds_ConfigureAcquisitionRecord

32

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_ACQUISITION_START_TIME
Description

This attribute specifies the horizontal delay (trigger
delay).

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_GetAttributeViReal64(ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value);
sds_SetAttributeViReal64(ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value);Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_ACQUISITION_START_TIME
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

The value range is [-5000div*timebase, 5*timebase].

Related Attribute

SDS_ATTR_HORZ_TIME_PER_RECORDHigh Level Functions

sds_ConfigureAcquisitionRecord

33

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_INTERPOLATION
Description

This attribute specifies the way of interpolation.

Data Type

ViInt32

AccessR/W

Common Control
Functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_INTERPOLATION macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_SINE_X
SDS_VAL_LINEAR

Related Attribute

NoneHigh Level Functions

sds_ConfigureInterpolation

34

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

Trigger Subsystem
The triggering group properties are used to set or read trigger related parameters. The
triggering group has the following attributes:























SDS_ATTR_TRIGGER_TYPE

SDS_ATTR_TRIGGER_HOLDOFFSDS_ATTR_TRIGGER_COUPLINGSDS_ATTR_TRIGGER_SLOPE

SDS_ATTR_TRIGGER_SOURCESDS_ATTR_TRIGGER_LEVELSDS_ATTR_TV_TRIGGER_EVENT (Not Supported)
SDS_ATTR_TV_TRIGGER_LINE_NUMBER

SDS_ATTR_TV_TRIGGER_SIGNAL_FORMATSDS_ATTR_RUNT_HIGH_THRESHOLDSDS_ATTR_RUNT_LOW_THRESHOLDSDS_ATTR_RUNT_POLARITYSDS_ATTR_GLITCH_CONDITIONSDS_ATTR_GLITCH_POLARITYSDS_ATTR_GLITCH_WIDTH (Not Supported)
SDS_ATTR_WIDTH_CONDITIONSDS_ATTR_WIDTH_HIGH_THRESHOLDSDS_ATTR_WIDTH_LOW_THRESHOLDSDS_ATTR_WIDTH_POLARITYSDS_ATTR_TRIGGER_MODIFIER

35

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_TRIGGER_TYPE
Description

This attribute specifies the trigger type.

Data Type

ViInt32

AccessR/W

Common Control
Functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_TRIGGER_TYPE macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

Related AttributeHigh Level Functions

SDS_VAL_EDGE_TRIGGER
SDS_VAL_WIDTH_TRIGGER
SDS_VAL_RUNT_TRIGGER
SDS_VAL_GLITCH_TRIGGER
SDS_VAL_TV_TRIGGER
SDS_VAL_PATTERN_TRIGGER
SDS_VAL_WINDOW_TRIGGER
SDS_VAL_INTERVAL_TRIGGER
SDS_VAL_DROPOUT_TRIGGER
SDS_VAL_SLOPE_TRIGGER
SDS_ATTR_TRIGGER_HOLDOFFSDS_ATTR_TRIGGER_LEVELSDS_ATTR_TRIGGER_SLOPE
SDS_ATTR_GLITCH_CONDITIONSDS_ATTR_GLITCH_POLARITYSDS_ATTR_GLITCH_WIDTH (Not Supported)
SDS_ATTR_WIDTH_CONDITIONSDS_ATTR_WIDTH_HIGH_THRESHOLDSDS_ATTR_WIDTH_LOW_THRESHOLDSDS_ATTR_WIDTH_POLARITY
sds_ConfigureTrigger
36

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

sds_ConfigureWidthTriggerSource
sds_ConfigureGlitchTriggerSource
sds_ConfigureEdgeTriggerSource

37

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_TRIGGER_HOLDOFF
Description

This attribute specifies the trigger holdoff time.

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_TRIGGER_HOLDOFF macro.
value is used to store or set the value of function
represented by attributeId.

Value Range[8.00e-09, 3.00e+01]

Related Attribute

Note:
Only when the SDS_ATTR_TRIGGER_TYPE is EDGE,
SDS_ATTR_TRIGGER_HOLDOFF can be set.
SDS_ATTR_TRIGGER_TYPE

High Level Functions

sds_ConfigureTrigger

38

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_TRIGGER_COUPLING
Description

This attribute specifies the coupling mode of theedge trigger.

Data Type

ViInt32

AccessR/W

Common Control
Functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_TRIGGER_COUPLING
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_AC_TRIGGER
SDS_VAL_DC_TRIGGER
SDS_VAL_HF_REJECTSDS_VAL_LF_REJECT
Note:
Only when the SDS_ATTR_TRIGGER_TYPE is EDGE,
the SDS_ATTR_TRIGGER_COUPLING can be set.

Related Attribute

NoneHigh Level Functions

sds_ConfigureTriggerCoupling

39

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_TRIGGER_SLOPE
Description

This attribute specifies the slope of the edge
trigger.

Data Type

ViInt32

AccessR/W

Common Control
Functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_TRIGGER_SLOPE macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_POSITIVESDS_VAL_NEGATIVESDS_VAL_ALTERNATE
Note:
Only when the SDS_ATTR_TRIGGER_TYPE is EDGE,
the SDS_ATTR_TRIGGER_SLOPE can be set.

Related Attribute

SDS_ATTR_TRIGGER_SOURCESDS_ATTR_TRIGGER_LEVELHigh Level Functions

sds_ConfigureEdgeTriggerSource

40

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_TRIGGER_SOURCE
Description

This attribute specifies the trigger source.

Data TypeViString

AccessR/W

Common Control
Functions

sds_SetAttributeViString (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViConstString value)
sds_GetAttributeViString (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32
bufSize,ViChar value[])Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_TRIGGER_SOURCE macro.
bufSize is the number of bytes you specified for the
Attribute Value parameter in the ViChar array.
value is used to store or set the value of function
represented by attributeId.

Value Range

The source can be set to:{Cn|Dm|EX|EX5|LINE}n can be set from 1 to 4
m can be set from 0 to 15
Example:If you want to set the source to C1, enter "C1".
If you want to set the source to D0, enter "D0".

Related Attribute

Note:
Only when the SDS_ATTR_TRIGGER_TYPE is EDGE,
RUNT, GLITCH, WIDTH or TV trigger, the
SDS_ATTR_TRIGGER_SOURCE can be set as{Cn|Dm|EX|EX5|LINE}.
SDS_ATTR_TRIGGER_LEVELSDS_ATTR_TRIGGER_TYPE
SDS_ATTR_TRIGGER_SLOPE
SDS_ATTR_GLITCH_CONDITIONSDS_ATTR_GLITCH_POLARITYSDS_ATTR_GLITCH_WIDTH (Not Supported)
SDS_ATTR_TV_TRIGGER_LINE_NUMBER
SDS_ATTR_TV_TRIGGER_SIGNAL_FORMAT
41

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_TV_TRIGGER_EVENT (Not Supported)

SDS_ATTR_RUNT_LOW_THRESHOLDSDS_ATTR_RUNT_POLARITYSDS_ATTR_RUNT_HIGH_THRESHOLDSDS_ATTR_WIDTH_CONDITIONSDS_ATTR_WIDTH_HIGH_THRESHOLDSDS_ATTR_WIDTH_LOW_THRESHOLDSDS_ATTR_WIDTH_POLARITY
High Level Functions

sds_ConfigureEdgeTriggerSource
sds_ConfigureRuntTriggerSource
sds_ConfigureGlitchTriggerSource
sds_ConfigureWidthTriggerSource
sds_ConfigureTVTriggerSource

42

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_TRIGGER_LEVEL
Description

This attribute specifies the trigger level.

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_TRIGGER_LEVEL macro.
value is used to store or set the value of function
represented by attributeId.

Value Range[-4.1*vertical_scale-vertical_offset,
4.1*vertical_scale-vertical_offset]
Note:
Only when the SDS_ATTR_TRIGGER_TYPE is EDGE,
RUNT, GLITCH, WIDTH or TV trigger type, the
SDS_ATTR_TRIGGER_LEVEL can be set.

Related Attribute

SDS_ATTR_TRIGGER_SOURCESDS_ATTR_TRIGGER_SLOPE
SDS_ATTR_TRIGGER_TYPE
SDS_ATTR_GLITCH_CONDITIONSDS_ATTR_GLITCH_POLARITYSDS_ATTR_GLITCH_WIDTH (Not Supported)
SDS_ATTR_WIDTH_CONDITIONSDS_ATTR_WIDTH_HIGH_THRESHOLDSDS_ATTR_WIDTH_LOW_THRESHOLDSDS_ATTR_WIDTH_POLARITY

High Level Functions

sds_ConfigureTrigger
sds_ConfigureWidthTriggerSource
sds_ConfigureGlitchTriggerSource
sds_ConfigureEdgeTriggerSource
43

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_TV_TRIGGER_LINE_NUMBER
Description

This attribute specifies the line number of the video
trigger.

Data type

ViInt32

AccessR/W

Common control
functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is
SDS_ATTR_TV_TRIGGER_LINE_NUMBER macro.
value is used to store or set the value of function
represented by attributeId.

Value Range[1,625]

Related Attribute

SDS_ATTR_TV_TRIGGER_EVENT (Not Supported)
SDS_ATTR_TV_TRIGGER_SIGNAL_FORMATSDS_ATTR_TRIGGER_SOURCEHigh Level Functions

sds_ConfigureTVTriggerLineNumber
sds_ConfigureTVTriggerLineNumber

44

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_TV_TRIGGER_SIGNAL_FORMAT
Description

This attribute specifies the video standard of thevideo trigger.

Data type

ViInt32

AccessR/W

Common control
functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is
SDS_ATTR_TV_TRIGGER_SIGNAL_FORMAT macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_NTSC
SDS_VAL_PAL
SDS_VAL_720P50
SDS_VAL_720P60
SDS_VAL_1080P50
SDS_VAL_1080P60
SDS_VAL_1080I50
SDS_VAL_1080I60
SDS_VAL_CUSTOM

Related Attribute

SDS_ATTR_TV_TRIGGER_EVENT (Not Supported)
SDS_ATTR_TV_TRIGGER_LINE_NUMBER
SDS_ATTR_TRIGGER_SOURCEHigh Level Functions

sds_ConfigureTVTriggerSource

45

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_RUNT_HIGH_THRESHOLD
Description

This attribute specifies the upper trigger level of therunt trigger.

Data type

ViReal64

AccessR/W

Common control
functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_RUNT_HIGH_THRESHOLD
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range[-10,10]

Related Attribute

SDS_ATTR_RUNT_LOW_THRESHOLDSDS_ATTR_RUNT_POLARITYSDS_ATTR_TRIGGER_SOURCEHigh Level Functions

sds_ConfigureRuntTriggerSource

46

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_RUNT_LOW_THRESHOLD
Description

This attribute specifies the lower trigger level of therunt trigger.

Data type

ViReal64

AccessR/W

Common control
functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_RUNT_LOW_THRESHOLD
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range[-10,10]

Related Attribute

SDS_ATTR_RUNT_HIGH_THRESHOLDSDS_ATTR_RUNT_POLARITYSDS_ATTR_TRIGGER_SOURCEHigh Level Functions

sds_ConfigureRuntTriggerSource

47

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_RUNT_POLARITY
Description

This attribute specifies the polarity of the runt trigger.

Data type

ViInt32

AccessR/W

Common control
functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_RUNT_POLARITY macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_RUNT_POSITIVESDS_VAL_RUNT_NEGATIVESDS_VAL_RUNT_EITHER

Related Attribute

SDS_ATTR_RUNT_HIGH_THRESHOLDSDS_ATTR_RUNT_LOW_THRESHOLDSDS_ATTR_TRIGGER_SOURCEHigh Level Functions

sds_ConfigureRuntTriggerSource

48

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_GLITCH_CONDITION
Description

This attribute specifies the limit range type of thepulse trigger.

Data type

ViInt32

AccessR/W

Common control
functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_GLITCH_CONDITION macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_GLITCH_LESS_THAN
SDS_VAL_GLITCH_GREATER_THAN

Related to Channel

SDS_ATTR_GLITCH_CONDITIONSDS_ATTR_GLITCH_POLARITYSDS_ATTR_GLITCH_WIDTH (Not Supported)
SDS_ATTR_TRIGGER_TYPE
SDS_ATTR_TRIGGER_SOURCESDS_ATTR_TRIGGER_LEVELHigh Level Functions

sds_ConfigureGlitchTriggerSource

49

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_GLITCH_POLARITY
Description

This attribute specifies the polarity of the pulse
trigger.

Data type

ViInt32

AccessR/W

Common control
functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_GLITCH_POLARITY macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_GLITCH_POSITIVESDS_VAL_GLITCH_NEGATIVE

Related to Channel

SDS_ATTR_GLITCH_CONDITIONSDS_ATTR_GLITCH_POLARITYSDS_ATTR_GLITCH_WIDTH (Not Supported)
SDS_ATTR_TRIGGER_TYPE
SDS_ATTR_TRIGGER_SOURCESDS_ATTR_TRIGGER_LEVELHigh Level Functions

sds_ConfigureGlitchTriggerSource

50

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_WIDTH_CONDITION
Description

This attribute specifies the limit range type of thepulse trigger.

Data type

ViInt32

AccessR/W

Common control
functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_WIDTH_CONDITION macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_WIDTH_WITHINSDS_VAL_WIDTH_OUTSIDE

Related to Channel

SDS_ATTR_TRIGGER_TYPE
SDS_ATTR_TRIGGER_SOURCESDS_ATTR_TRIGGER_LEVELSDS_ATTR_WIDTH_CONDITIONSDS_ATTR_WIDTH_HIGH_THRESHOLDSDS_ATTR_WIDTH_LOW_THRESHOLDSDS_ATTR_WIDTH_POLARITY

High Level Functions

sds_ConfigureWidthTriggerSource

51

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_WIDTH_HIGH_THRESHOLD
Description

This attribute specifies the upper limit of the pulse
width.

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_WIDTH_HIGH_THRESHOLD
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range[3.0e-9,20]

Related to Channel

SDS_ATTR_TRIGGER_TYPE
SDS_ATTR_TRIGGER_SOURCESDS_ATTR_TRIGGER_LEVELSDS_ATTR_WIDTH_CONDITIONSDS_ATTR_WIDTH_HIGH_THRESHOLDSDS_ATTR_WIDTH_LOW_THRESHOLDSDS_ATTR_WIDTH_POLARITY

High Level Functions

sds_ConfigureWidthTriggerSource

52

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_WIDTH_LOW_THRESHOLD
Description

This attribute specifies the lower limit of the pulse
width.

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_WIDTH_LOW_THRESHOLD
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range[2.0e-9,20]

Related to Channel

SDS_ATTR_TRIGGER_TYPE
SDS_ATTR_TRIGGER_SOURCESDS_ATTR_TRIGGER_LEVELSDS_ATTR_WIDTH_CONDITIONSDS_ATTR_WIDTH_HIGH_THRESHOLDSDS_ATTR_WIDTH_LOW_THRESHOLDSDS_ATTR_WIDTH_POLARITY

High Level Functions

sds_ConfigureWidthTriggerSource

53

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_WIDTH_POLARITY
Description

This attribute specifies the polarity of the pulse
trigger.

Data Type

ViInt32

AccessR/W

Common Control
Functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_WIDTH_POLARITY macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_WIDTH_POSITIVESDS_VAL_WIDTH_NEGATIVE

Related to Channel

SDS_ATTR_TRIGGER_TYPE
SDS_ATTR_TRIGGER_SOURCESDS_ATTR_TRIGGER_LEVELSDS_ATTR_WIDTH_CONDITIONSDS_ATTR_WIDTH_HIGH_THRESHOLDSDS_ATTR_WIDTH_LOW_THRESHOLDSDS_ATTR_WIDTH_POLARITY

High Level Functions

sds_ConfigureWidthTriggerSource

54

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_INITIATE_CONTINUOUS
Description

This attribute specifies the acquisition state.

Data Type

ViBoolean

AccessR/W

Common Control
Functions

sds_SetAttributeViBoolean (ViSession vi,
ViConstString channelName, ViAttr attributeId,
ViBoolean value)
sds_GetAttributeViBoolean (ViSession vi,
ViConstString channelName, ViAttr attributeId,
ViBoolean *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_INITIATE_CONTINUOUS
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

VI_TRUE means to set the oscilloscope to Stop
VI_FALSE means to set the oscilloscope to Run

Related Attribute

NoneHigh Level Functions

sds_ConfigureInitiateContinuous

55

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_TRIGGER_MODIFIER
Description

This attribute specifies the trigger mode.

Data Type

ViInt32

AccessR/W

Common Control
Functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_TRIGGER_MODIFIER macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_NO_TRIGGER_MOD
SDS_VAL_AUTO
SDS_VAL_SINGLE

Related Attribute

NoneHigh Level Functions

sds_ConfigureTriggerModifier

56

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

Measurement Subsystem
The waveform measurement group properties are used to set or read Measurement

related parameters. The waveform measurement group has the following attributes:














SDS_ATTR_MEASURE_ENABLED
SDS_ATTR_MEASURE_MODE
SDS_ATTR_MEASURE_GATESDS_ATTR_MEASURE_GATE_GA

SDS_ATTR_MEASURE_GATE_GB

SDS_ATTR_MEASURE_ADVANCED_STYLESDS_ATTR_MEASURE_ADVANCED_LINENUMBER
SDS_ATTR_MEASURE_ADVANCED_STATISTICSSDS_ATTR_MEASURE_ADVANCED_STATISTICS_HISTOGRAM
SDS_ATTR_MEASURE_ADVANCED_STATISTICA_MAXCOUNTSDS_ATTR_MEASURE_SIMPLE_SOURCESDS_ATTR_MEASURE_ADVANCED_STATISTICS_RESET

57

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_ENABLED
Description

This attribute turns on or off measurements.

Data Type

ViBoolean

AccessR/W

Common Control
Functions

sds_SetAttributeViBoolean (ViSession vi,
ViConstString channelName, ViAttr attributeId,
ViBoolean value)
sds_GetAttributeViBoolean (ViSession vi,
ViConstString channelName, ViAttr attributeId,
ViBoolean *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_MEASURE_ENABLED
macro.
value is used to store or set the value of function
represented by attributeId.

Value range

VI_TRUE means measurement is on
VI_FALSE means measurement is off

Related Attribute

NoneHigh Level Functions

None

58

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_MODE
Description

This attribute specifies the mode of measurement.

Data Type

ViInt32

AccessR/W

Common Control
Functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_MEASURE_MODE macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_MEAS_MODE_SIMPLE
SDS_VAL_MEAS_MODE_ADVANCED

Related Attribute

NoneHigh Level Functions

None

59

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_GATE
Description

This attribute turns on or off the measurement gate.

Data Type

ViBoolean

AccessR/W

Common Control
Functions

sds_SetAttributeViBoolean (ViSession vi,
ViConstString channelName, ViAttr attributeId,
ViBoolean value)
sds_GetAttributeViBoolean (ViSession vi,
ViConstString channelName, ViAttr attributeId,
ViBoolean *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_MEASURE_GATE macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

VI_TRUE means enable the measurement gate
VI_FALSE means to disable the measurement gate

Related Attribute

NoneHigh Level Functions

None

60

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_GATE_GA
Description

This attribute specifies the position of gate A.

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_MEASURE_GATE_GA
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range[-5*timebase, 5*timebase].
The value cannot exceed
SDS_ATTR_MEASURE_GATE_GB.

Related Attribute

NoneHigh Level Functions

None

61

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_GATE_GB
Description

This attribute specifies the position of gate B

Data Type

ViReal64

AccessR/W

Common Control
Functions

sds_SetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 value)
sds_GetAttributeViReal64 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViReal64 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_MEASURE_GATE_GB
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range[-5*timebase, 5*timebase].

Related Attribute

NoneHigh Level Functions

None

62

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_ADVANCED_STYLE
Description

This attribute specifies the display mode of theadvanced measurement.

Data Type

ViInt32

AccessR/WHigh Level Functions

None

Common Control
Functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is
SDS_ATTR_MEASURE_ADVANCED_STYLE macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

SDS_VAL_MEAS_ADV_STYLE_M1
SDS_VAL_MEAS_ADV_STYLE_M2

Related Attribute

NoneHigh Level Functions

None

63

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_ADVANCED_LINENUMBER
Description

This attribute specifies the total number of advanced
measurement items displayed.

Data Type

ViInt32

AccessR/W

Common Control
Functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is
SDS_ATTR_MEASURE_ADVANCED_LINENUMBER
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range[1,12]

Related Attribute

NoneHigh Level Functions

None

64

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_ADVANCED_STATISTICS
Description

This attribute turns on or off the measurement
statistics.

Data Type

ViBoolean

AccessR/W

Common Control
Functions

sds_SetAttributeViBoolean (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViBoolean value)
sds_GetAttributeViBoolean (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViBoolean *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is
SDS_ATTR_MEASURE_ADVANCED_STATISTICS macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

VI_TRUE means to enable measurement statistics
VI_FALSE means to disable measurement statistics

Related Attribute

NoneHigh Level Functions

None

65

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_ADVANCED_STATISTICS_HISTOGRAM
Description

This attribute turns on or off the measurement
histogram.

Data Type

ViBoolean

AccessR/W

Common Control
Functions

sds_SetAttributeViBoolean (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViBoolean value)
sds_GetAttributeViBoolean (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViBoolean *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is
SDS_ATTR_MEASURE_ADVANCED_STATISTICS_HISTOGR
AM macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

VI_TRUE means to enable measurement histogram
VI_FALSE means to disable measurement histogram

Related Attribute

NoneHigh Level Functions

None

66

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_ADVANCED_STATISTICA_MAXCOUNT
Description

This attribute specifies the maximum value of thestatistics count.

Data Type

ViInt32

AccessR/W

Common Control
Functions

sds_SetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 value)
sds_GetAttributeViInt32 (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32 *value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is
SDS_ATTR_MEASURE_ADVANCED_STATISTICA_MAXCOU
NT macro.
value is used to store or set the value of function
represented by attributeId.

Value Range[0,1024]

Related Attribute

NoneHigh Level Functions

None

67

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_SIMPLE_SOURCE
Description

This attribute specifies the source of the simple
measurement.

Data TypeViString

AccessR/W

Common Control
Functions

sds_SetAttributeViString (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViConstString value)
sds_GetAttributeViString (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViInt32
bufSize,ViChar value[])Note:vi is the instrument handle.
channelName is NULL.
attributeId is SDS_ATTR_MEASURE_SIMPLE_SOURCE
macro.
bufSize A is passed the number of bytes you specified
for the Attribute Value parameter in the ViChar array.
value is used to store or set the value of function
represented by attributeId.

Value Range

The source can be set to:{Cx|Dn|Zx|ZDn|F1|F2|REFA|REFB|REFC|REFD }.
x can be set from 1 to 4
n can be set from 0 to 15
Example:If you want to set the source to C1, enter "C1".
If you want to set the source to D0, enter "D0".
If you want to set the source to C1 in the Zoom
window, enter "Z1".
If you want to set the source to D0 in the Zoom
window, enter "ZD0".

Related Attribute

NoneHigh Level Functions

None

68

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
SDS_ATTR_MEASURE_ADVANCED_STATISTICS_RESET
Description

This attribute resets the measurement statistics.

Data Type

ViBoolean

AccessW/O

Common Control
Functions

sds_SetAttributeViBoolean (ViSession vi, ViConstString
channelName, ViAttr attributeId, ViBoolean value)Note:vi is the instrument handle.
channelName is NULL.
attributeId is
SDS_ATTR_MEASURE_ADVANCED_STATISTICS_RESET
macro.
value is used to store or set the value of function
represented by attributeId.

Value Range

VI_TRUE means to restart measurement statistics

Related Attribute

NoneHigh Level Functions

None

69

WWW.SIGLENT.COM

SDS IVI-C Programming GuideHigh Level Functions
Some high level functions are available to set multiple attributes.



sds_InitWithOptions(ViRsrc resourceName, ViBoolean IDQuery, ViBoolean
resetDevice, ViConstString optionString, ViSession *newVi)
This function creates a new IVI session.
Parameter

resourceName
IDQuery

resetDevice

optionString

Description

This parameter specifies the resource name of the
instrument

To perform ID query or not
To reset the device or not

This parameter is the option string sets to the

InitWithOptions function of the instrument driver. It

includes settings for Simulate, RangeCheck,*newViExample :QueryInstrStatus and Cache
Instrument handle

sds_InitWithOptions ("USB0::0xF4EC::0xEE38::0123456789::INSTR", VI_TRUE,
VI_FALSE, "Simulate=0,RangeCheck=0,QueryInstrStatus=0,Cache=0",&session);

Notes: Siglent’s driver 1.0 does not support simulation, cache, range check andquerying instrument status. Therefore, it is only useful when connecting to an
actual instrument. You should initiate the instrument by calling

70

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
sds_InitWithOptions() before using it, and input the parameters we suggested
except argument resourceName.

sds_FetchWaveform(ViSession vi, ViConstString channel, ViInt32



waveformSize, ViReal64 waveform[], ViInt32 *actualPoints, ViReal64*initialX, ViReal64 *xIncrement)This function fetches a waveform from a specified channel from a previously
initiated acquisition.
Parameter

Descriptionvi

Instrument handle

channelThe name of the channel from which you want to obtainwaveformSize

The size of the data you want to get

waveform[]*actualPoints*initialX*xIncrement:
Example :waveform data

Channel waveform data storage location

The actual number of channel waveform data points
Current time delay
Current time basesds_FetchWaveform(session,"CHAN1",256,waveform,&actualPoints,&initialX,&xIn
crement);

sds_ConfigureAcquisitionType (ViSession vi,ViInt32 acquisitionType)This function sets the acquisition mode.
Parameter

Description

acquisitionType

The acquisition modevi

Instrument handle
71

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
Example :sds_ConfigureAcquisitionType (session,SDS_VAL_NORMAL);
sds_ConfigureAcquisitionRecord (ViSession vi, ViReal64 timePerRecord,

ViInt32 minimumRecordLength, ViReal64 acqStartTime)

This function configures the most common attributes of the horizontal
subsystem
Parameter

Description

timePerRecord

Current time baseviminimumRecordLen
gth

acqStartTime
Example :Instrument handle
Not Supported. Can be set to any value.
Current time delay

sds_ConfigureAcquisitionRecord (session,1e-6, 0,0) ;sds_ConfigureInterpolation (ViSession vi, ViInt32 interpolation)

This function sets the interpolation method.
Parameter

Description

interpolation

The way of interpolationvi

Example :Instrument handle

sds_ConfigureInterpolation (session, SDS_VAL_SINE_X);



sds_ConfigureInitiateContinuous (ViSession vi, ViBoolean continuous)This function configures the continuous acquisition.
72

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
Parameter

Description

continuous

The state of acquisitionvi

Example :Instrument handle

sds_ConfigureInitiateContinuous (session, VI_TRUE);
sds_ConfigureChannel (ViSession vi, ViConstString channel, ViReal64 range,

ViReal64 offset, ViInt32 coupling, ViReal64 probeAttenuation, ViBoolean
enabled)This function configures the vertical subsystem.
Parameter

Description

channelChannel name

vi

range

offsetcouplingprobeAttenuation
enabledExample :Instrument handle
Vertical scale

Vertical offset

Coupling mode

Probe attenuation

The state of the selected channel

sds_ConfigureChannel(session,"CHAN1",1.0,0.0,SDS_VAL_AC,SDS_VAL_PROBE_S
ENSE_1,VI_TRUE);

sds_ConfigureChanCharacteristics (ViSession vi, ViConstString channel,
ViReal64 inputImpedance, ViReal64 maxInputFrequency)

This function configures the less common attributes of the vertical subsystem.
Parameter

Description
73

WWW.SIGLENT.COM

SDS IVI-C Programming Guidevi

Instrument handle

inputImpedance

Impendence

channelmaxInputFrequency
Example :Channel nameBandwidth-limit

sds_ConfigureChanCharacteristics (session,"CHAN1", 5e+1, 2e+7);
sds_ConfigureTrigger (ViSession vi, ViInt32 triggerType, ViReal64 holdoff)This function configures the common triggering attributes.
Description

Description

triggerType

The Trigger typevi

holdoff

Example :Instrument handle
Holdoff time

sds_ConfigureTrigger (session,SDS_VAL_EDGE_TRIGGER, 8e-6);
sds_ConfigureTriggerCoupling (ViSession vi, ViInt32 coupling)This function configures the trigger coupling.
Description

Description

coupling

The coupling modevi

Example:Instrument handle

sds_ConfigureTriggerCoupling (session, SDS_VAL_AC_TRIGGER);

sds_ConfigureTriggerModifier (ViSession vi, ViInt32 modifier)This function configures the trigger modifier.
74

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
Description

Description

modifier

The trigger modevi

Example :Instrument handle

sds_ConfigureTriggerModifier (session, SDS_VAL_NO_TRIGGER_MOD);
sds_ConfigureEdgeTriggerSource (ViSession vi, ViInt32 source, ViReal64

level,

ViInt32 slope)This function configures the edge triggering.
Description

Description

sourceThe source of the trigger

vi

level

slope

Example :Instrument handle
The trigger level
The slope

sds_ConfigureEdgeTriggerSource (session, SDS_VAL_CHAN1, 1e+0,
SDS_VAL_POSITIVE);

sds_ConfigureTVTriggerSource (ViSession vi, ViConstString source,ViInt32

TVSignalFormat,

ViInt32 TVEvent, ViInt32 TVPolarity)

This function configures the TV triggering.
Description

Description

sourceThe source of the trigger

vi

TVSignalFormat
TVEvent

Instrument handle

The video standard

Not supported. Can be set to any value
75

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
TVPolarity
Example :Not supported. Can be set to any value

sds_ConfigureTVTriggerSource (session, SDS_VAL_CHAN1, SDS_VAL_NTSC,SDS_VAL_TV_EVENT_FIELD1, SDS_VAL_TV_POSITIVE);

sds_ConfigureTVTriggerLineNumber (ViSession vi, ViInt32 lineNumber)This function configures the line number ofTV triggering.
Description

Description

lineNumber

The line number

vi

Example :Instrument handle

sds_ConfigureTVTriggerLineNumber (session, 200);
sds_ConfigureRuntTriggerSource (ViSession vi, ViConstString source,

ViReal64 runtLowThreshold, ViReal64 runtHighThreshold, ViInt32
runtPolarity)

This function configures the runt triggering.
Description

Description

sourceThe source of the triggervi

runtLowThreshold

runtHighThreshold
runtPolarity
Example :Instrument handle

The lower trigger level

The upper trigger level
The polarity

sds_ConfigureRuntTriggerSource (session, SDS_VAL_CHAN1, -1e+0, 1e+0,
SDS_VAL_RUNT_POSITIVE);

76

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
sds_ConfigureGlitchTriggerSource (ViSession vi, ViConstStringsource,ViReal64 level, ViReal64 glitchWidth, ViInt32 glitchPolarity, ViInt32
glitchCondition)

This function configures the glitch triggering.
Description

Description

sourceThe source of the trigger

vi

level

glitchWidth

glitchPolarity

glitchCondition
Example :Instrument handle
The trigger levelNot supported. Can be set to any value
The polarity

The limit range typesds_ConfigureGlitchTriggerSource(session,

SDS_VAL_CHAN1,1e+0,1.5e+0,SDS_VAL_GLITCH_POSITIVE,
SDS_VAL_GLITCH_LESS_THAN);

sds_ConfigureWidthTriggerSource (ViSession vi, ViConstStringsource,ViReal64 level, ViReal64 widthLowThreshold, ViReal64

widthHighThreshold, ViInt32 widthPolarity, ViInt32 widthCondition)

This function configures the Pulse width triggering.
Description

Description

sourceThe source of the trigger

vi

level

widthLowThreshold

Instrument handle
The trigger level

The lower value of the pulse trigger limit
77

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
widthHighThreshold

The upper value of the pulse trigger limit

widthCondition

The limit range type of the pulse trigger

widthPolarity
Example :The polarity

sds_ConfigureWidthTriggerSource(session, SDS_VAL_CHAN1,1e+0, 3.8e-1,
1.2e+0, SDS_VAL_WIDTH_NEGATIVE,SDS_VAL_WIDTH_OUTSIDE);

78

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

IVI-C Driver Programming Example
There are two ways to use the IVI driver at present. One is to use the explicit link library,
and the other is to use the implicit link library.

The example is running in an environment where NI VISA 5.4, LabWindow/CVI9.0, and
IVI Compliance Package 15.0 are installed.

Implicit call sds.lib#include <stdio.h>#include <stdlib.h>#include <string.h>#include <Windows.h>#include "sds.h" //Call header#define BUFFER_SIZE 512L
#pragma comment(lib,"sds.lib") // Call the sds.lib link librarystatic ViSession session;
static ViStatus status;
void main(){
ViCharstr[BUFFER_SIZE];//Connect the instrument
status = sds_InitWithOptions("USB0::0xF4EC::0xEE38::0123456789::INSTR",
VI_TRUE, VI_FALSE, "Simulate=0,RangeCheck=0,QueryInstrStatus=0,Cache=0",&session);//Configure settings for channel 1
sds_ConfigureChannel(session,"CHAN1",1.0,0.0,0,1.0,VI_TRUE);//Open measurement
sds_SetAttributeViBoolean(session,VI_NULL,SDS_ATTR_MEASURE_ENABLED,VI_
TRUE);//Query simple measurement source
sds_GetAttributeViString(session,VI_NULL,SDS_ATTR_MEASURE_SIMPLE_SOURC
E,BUFFER_SIZE,str);
printf("SDS_ATTR_MEASURE_SIMPLE_SOURCE = %s\n",str);
system("cmd /C pause");}79

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

Explicit call sds.dll#include <stdio.h>#include <stdlib.h>#include <string.h>#include <Windows.h>#include "sds.h"//Call header#define BUFFER_SIZE 512L
static ViSession session;
static ViStatus status;

typedef ViStatus _VI_FUNC (*sdsInit)(ViRsrc resourceName,ViBoolean
IDQuery,ViBoolean resetDevice,ViConstString optionString,ViSession *newVi);
typedef ViStatus _VI_FUNC (*setAttrBool)(ViSession vi, ViConstString channelName,
ViAttr attribute, ViBoolean value);
typedef ViStatus _VI_FUNC (*getAttrString)(ViSession vi, ViConstString channelName,
ViAttr attribute, ViInt32 bufSize, ViChar value[]);typedef ViStatus _VI_FUNC (*sdsConfig) (ViSession vi,ViConstString channel,ViReal64
range,ViReal64 offset, ViInt32 coupling,ViReal64 probeAttenuation,ViBoolean enabled);
void main(){

HINSTANCE hDLL = LoadLibrary("sds.dll"); // Call the sds.dll link libraryif (hDLL != NULL){
sdsInit sds_InitWithOptions =(sdsInit)GetProcAddress(hDLL,"sds_InitWithOptions");
setAttrBool
sds_SetAttributeViBoolean=(setAttrBool)GetProcAddress(hDLL,"sds_SetAttributeViBoolean");
getAttrString
sds_GetAttributeViString=(getAttrString)GetProcAddress(hDLL,"sds_GetAttributeViString");
sdsConfig
sds_ConfigureChannel=(sdsConfig)GetProcAddress(hDLL,"sds_ConfigureChannel");ViCharstr[BUFFER_SIZE];//Connect the instrument
80

WWW.SIGLENT.COM

SDS IVI-C Programming Guide
status =sds_InitWithOptions("USB0::0xF4EC::0xEE38::0123456789::INSTR",VI_TRUE,
VI_FALSE, "Simulate=0,RangeCheck=0,QueryInstrStatus=0,Cache=0",&session);//Configure settings for channel 1
sds_ConfigureChannel(session,"CHAN1",1.0,0.0,0,1.0,VI_TRUE);// Open measurement
sds_SetAttributeViBoolean(session,VI_NULL,SDS_ATTR_MEASURE_ENABLE
D,VI_TRUE);//Query simple measurement source
sds_GetAttributeViString(session,VI_NULL,SDS_ATTR_MEASURE_SIMPLE_S
OURCE,BUFFER_SIZE,str);
printf("SDS_ATTR_MEASURE_SIMPLE_SOURCE = %s\n",str);}
system("cmd /C pause");}81

WWW.SIGLENT.COM

SDS IVI-C Programming Guide

SDS Series

Digital Oscilloscope

82

WWW.SIGLENT.COM