SIGLENT SSG5080A Series Operating instructions

SSG5080A Series Signal Generator
Programming Guide
PG0805A-E01A

SIGLENT
2 SSG5000A Programming Guide
Contents
1. Programming Overview ...............................................................5
1.1 Build Communication ...............................................................................5
1.1.1 Build Communication Using VISA.......................................................................5
1.1.2 Build Communication Using Sockets .................................................................8
1.1.3 Connecting the signal generator via the USB Host port.............................8
1.2 Remote Control Capabilities ................................................................9
1.2.1 User-defined Programming..................................................................................9
1.2.2 Send SCPI Commands via NI-MAX.........................................................................9
2. SCPI Overview..........................................................................14
2.1 Command Format......................................................................................14
2.2 Symbol Instruction.............................................................................14
2.3 Parameter Type......................................................................................15
2.4 Command Abbreviation ...........................................................................16
3. SCPI Commands..........................................................................17
3.1 IEEE Common Commands ...........................................................................17
3.1.1 Identification Query (*IDN) ..........................................................................17
3.1.2 Reset (*RST)......................................................................................................17
3.1.3 Clear Status (*CLS).........................................................................................17
3.1.4 Standard Event Status Enable (*ESE)............................................................18
3.1.5 Standard Event Status Register Query (*ESR) .............................................18
3.1.6 Operation Complete Query (*OPC)...................................................................18
3.1.7 Service Request Enable (*SRE).......................................................................18
3.1.8 Status Byte Query (*STB)................................................................................19
3.1.9 Wait-to-Continue (*WAI)..................................................................................19
3.1.10 Self Test Query (*TST) ...................................................................................19
3.2 System Subsystem ..................................................................................19
3.2.1 System Time (:SYSTem:TIME) ............................................................................19
3.2.2 System Date (:SYSTem:DATE) ............................................................................20
3.2.3 IP Address (:SYSTem:COMMunicate:LAN:IPADdress)........................................20
3.2.4 Gateway (:SYSTem:COMMunicate:LAN:GATeway).................................................20
3.2.5 Subnet Mask (:SYSTem:COMMunicate:LAN:SMASk) .............................................21
3.2.6 IP Config (:SYSTem:COMMunicate:LAN:TYPE)...................................................21
3.2.7 Language (SYSTem:LANGuage) ............................................................................21
3.2.8 Screen Saver (SYSTem:SCReen:SAVer) .............................................................22
3.2.9 Beeper (SYSTem:ALARm) .....................................................................................22
3.2.10 Setup Type (:SYSTem:PON:TYPE).......................................................................22
3.2.11 Power On Line (SYSTem:POWeron:TYPE)............................................................23
3.2.12 10M Adjustment State (:SYSTem:REF:DAC:STAT) .............................................23
3.2.13 Ref Osc Code (:SYSTem:REF:DAC).....................................................................23
3.2.14 Ref Osc Code Store (:SYSTem:REF:DAC:SAVE).................................................24
3.2.15 Ref Osc Code Load (:SYSTem:REF:DAC:LOAD)...................................................24
3.2.16 Reset Ref Osc Code to Default (:SYSTem:REF:DAC:DEFault) .......................24
3.2.17 GPIB Address (SYSTem:GPIB)............................................................................25

SIGLENT
SSG5000A Programming Guide 3
3.3 Preset Subsystem ..................................................................................25
3.3.1 Preset (:SOURce:PRESet)..................................................................................25
3.3.2 System Preset (:SYSTem:PRESet).....................................................................25
3.3.3 Preset Save (:SYSTem:PRESet:SAVE) ...............................................................26
3.3.4 Preset Path (:SYSTem:PRESet:PATH) ...............................................................26
3.3.5 Preset Type (:SYSTem:PRESet:TYPE) ...............................................................26
3.3.6 Factory Reset (:SYSTem:FDEFault) .................................................................27
3.3.7 Reset & Clear (SYSTem:RESet:CLEar) .............................................................27
3.4 Output Subsystem ..................................................................................27
3.4.1 RF Output (:OUTPut[:STATe]) ..........................................................................27
3.4.2 RF Output ([:SOURce]:OUTPut) ........................................................................28
3.5 Source Subsystem ..................................................................................28
3.5.1 [:SOURce]:FREQuency Subsystem.......................................................................28
3.5.2 [:SOURce]:POWer Subsystem..............................................................................30
3.5.3 [:SOURce]:SWEep Subsystem..............................................................................40
3.5.4 [:SOURce]:MODulation Subsystem.....................................................................49
3.5.5 [:SOURce]:AM Subsystem ...................................................................................50
3.5.6 [:SOURce]:FM Subsystem ...................................................................................52
3.5.7 [:SOURce]:PM Subsystem ...................................................................................57
3.5.8 [:SOURce]:PULM Subsystem................................................................................59
3.5.9 [:SOURce]:LFOutput Subsystem ........................................................................68
3.5.10 [:SOURce]:LFOutput:SWEep Subsystem .............................................................71
3.6 Sense Subsystem ....................................................................................74
3.6.1 Sensor Info (:SENSe[:POWer]:TYPE?) .............................................................74
3.6.2 Sensor State (:SENSe[:POWer]:STATus)..........................................................75
3.6.3 Measurement (:SENSe[:POWer]:VALue?)............................................................75
3.6.4 Statistics State (:SENSe[:POWer]:STATIStics:STATe) ................................75
3.6.5 Statistics Value (:READ[:POWer]?) ...............................................................76
3.6.6 Statistics Max Value (:SENSe[:POWer]:STATIStics:MAX?)...........................76
3.6.7 Statistics Min Value (:SENSe[:POWer]:STATIStics:MIN?)...........................76
3.6.8 Statistics Mean Value (:SENSe[:POWer]:STATIStics:AVG?) .........................77
3.6.9 Statistics Count (:SENSe[:POWer]:STATIStics:COUNt?) ..............................77
3.6.10 Statistics Clear (:SENSe[:POWer]:STATIStics:CLEAr) ................................77
3.6.11 Auto Zero (:CALibration:ZERO:TYPE) .............................................................78
3.6.12 Zeroing (:SENSe[:POWer]:ZERO).......................................................................78
3.6.13 Frequency Type (:SENSe[:POWer]:SOURce) ......................................................78
3.6.14 Frequency (:SENSe[:POWer]:FREQuency)..........................................................79
3.6.15 Level Offset State (:SENSe[:POWer]:OFFSet:STATe)....................................79
3.6.16 Level Offset (:SENSe[:POWer]:OFFSet)..........................................................79
3.6.17 Average Type (:SENSe[:POWer]:FILTer:TYPE).................................................80
3.6.18 Average Times (:SENSe[:POWer]:FILTer:LENGth) ...........................................80
3.6.19 Internal Noise (:SENSe[:POWer]:FILTer:NSRatio)........................................80
3.6.20 Logging (:SENSe[:POWer]:LOGGing:STATe) ......................................................81
4. Programming Examples .............................................................81
4.1 VISA Examples........................................................................................81
4.1.1 VC++ Example......................................................................................................81
4.1.2 VB Example .........................................................................................................86
4.1.3 MATLAB Example..................................................................................................90

SIGLENT
4 SSG5000A Programming Guide
4.1.4 LabVIEW Example ................................................................................................92
4.2 Socket Examples ....................................................................................94
4.2.1 Python Example..................................................................................................94
4.2.2 Telnet Example..................................................................................................96

SIGLENT
SSG5000A Programming Guide 5
1. Programming Overview
The SSG5080A supports both USB and LAN interfaces. By using these interfaces, in
combination with NI-VISA and programming languages, users can remotely control the
signal generator. The instrument comes with an embedded web interface; VXI-11,
Sockets and Telnet protocols can be used to communicate with the signal generator.
This chapter introduces how to build communication between the signal generator
and the PC. It also introduces the remote control capabilities.
1.1 Build Communication
1.1.1 Build Communication Using VISA
1. Install NI-VISA
Before programming, you will need to install NI-VISA, which you can download from
the National Instruments VISA web site. There are full and Run-Time Engine
versions of NI-VISA. The full version includes the NI device driver and a tool
named NI MAX which is a user interface to control the device. The Run-Time Engine
version is a smaller file than the full version only includes the NI device driver.
For example, you can get NI-VISA 18.0 full version from:
http://www.ni.com/download/ni-visa-18.0/7597/en/.
You can also download NI-VISA Run-Time Engine 18.0 to your PC and install it as
default selection. Its installation process is similar with the full version.
After you downloaded the file you can follow the steps below to install it:
a.Double click the NIVISA1800full.exe, dialog shown as below:
b.Click Unzip, the installation process will automatically launch after
unzipping files. If your computer needs to install .NET Framework 4.6.2, its
setup process will auto start.

SIGLENT
6 SSG5000A Programming Guide
c.The NI-VISA installing dialog is shown above. Click Next to start the
installation process.
Set the install path, default path is “C:\Program Files\National Instruments\”,
you can change it. Click Next, dialog shown as above.

SIGLENT
SSG5000A Programming Guide 7
d.Click Next twice, in the License Agreement dialog, select the “I accept the
above 2 License Agreement(s).”, and click Next, “Start Installation”dialog
shown.
e.Click Next to run installation.
f.
Now the installation is complete, reboot your PC.
2. Connect the Instrument
Depending on your specific model, your signal generator may be able to communicate
with a PC through the USB or LAN interface. This manual uses the USB connection in
the examples. (For instructions to communicate with a PC through the LAN interface
see the User Manual.)
a.Connect the USB Device interface at the rear panel of the signal generator and
the USB Host interface of the PC using a USB cable. Assuming your PC is already
turned on, turn on your signal generator and your PC will display the “Device
Setup” screen as it automatically installs the device driver as shown below.

SIGLENT
8 SSG5000A Programming Guide
b.Wait for the installation to complete and then proceed to the next step.
1.1.2 Build Communication Using Sockets
LAN communication using Sockets uses the Transmission Control Protocol/Internet
Protocol (TCP/IP) layer that is included with many operating systems. A socket is
a fundamental technology used for computer networking and allows applications to
communicate using standard mechanisms built into network hardware and operating
systems. The method accesses a port on the signal generator from which
bidirectional communication with a network computer can be established. Unlike
VISA, this technique uses currently available resources and doesn’t require
additional software/hardware to run.
Before you can use sockets, you must select the signal generator socket port
number to use:
⚫Standard mode. Available on port 5025. Use this port for simple programming.
⚫Telnet mode. The telnet SCPI service is available on port 5024.
1.1.3 Connecting the signal generator via the USB
Host port
Refer to the following steps to finish the connection via USB:
1. Install NI-VISA on your PC for GPIB driver.
2. Connect the signal generator USB Host port to a PC’s GPIB card port,
with SIGLENT USB-GPIB adaptor.
3. Switch on the signal generator.
4. Press button on the front panel System →Interface →GPIB to enter the

SIGLENT
SSG5000A Programming Guide 9
GPIB number.
The signal generator will be detected automatically as a new GPIB point.
1.2 Remote Control Capabilities
1.2.1 User-defined Programming
Users can use SCPI commands to program and control the signal generator. For
details, refer to the introductions in “Programming Examples”.
1.2.2 Send SCPI Commands via NI-MAX
Users can control the signal generator remotely by sending SCPI commands via NI-
MAX software.
1.2.2.1 Using USB
Run NI MAX software.
1. Click “Device and interface” at the upper left corner of the software.
2. Find the “USBTMC” device symbol.
3. Click “Open VISA Test Panel” option button, then the following interface
will appear.
4. Click the “Input/Output” option button and click the “Query” option
button in order to view the operation information.

SIGLENT
10 SSG5000A Programming Guide
NOTE: The “*IDN?” command (known as the Identification Query) returns the
instrument manufacturer, instrument model, serial number, and other
identification information.
1.2.2.2 Using LAN
Add a Network Device, and select a VISA TCP/IP Resource as shown:
Run NI MAX software.
1. Click “Device and interface” at the upper left corner of the software
2. Find the “Network Devices” symbol, click “Add Network Devices”
3. Select Manual Entry of LAN instrument, select Next, and enter the IP address
as shown.
Click Finish to establish the connection:

SIGLENT
SSG5000A Programming Guide 11
NOTE: Leave the LAN Device Name BLANK or the connection will fail.
4. After a brief scan, the connection should be shown under Network Devices:

SIGLENT
12 SSG5000A Programming Guide
5. Right-click on the product and select Open NI-VISA Test Panel:
6. Click “Input/Output” option button and click “Query” option button. If
everything is OK, you will see the Read operation information returned as shown
below.

SIGLENT
SSG5000A Programming Guide 13

SIGLENT
14 SSG5000A Programming Guide
2. SCPI Overview
2.1 Command Format
SCPI commands present a hierarchical tree structure containing multiple subsystems;
each of the subsystems is made up of a root keyword and several sub keywords. The
command string usually starts with a colon “:”, the keywords are separated by a
colon “:” and the parameter settings are separated by spaces. Query commands add
a question mark “?” to the end of the string.
For example:
:SOURce:FREQuency <freq>
:SOURce:FREQuency?
SOURce is the root key of the command, FREQuency is second.
The command begins with “:”, and separates the keywords at the same time, <freq>
separated by space and represents the parameter available for setting; “?”
represents a query. A query sent to the instrument indicates that the instrument
will have a response string. Therefore, queriies ask a question and expect a
response.
2.2 Symbol Instruction
The following four symbols are not the content of SCPI commands and cannot be sent
with the commands, but are used to describe certain aspects of the commands.
1. Triangle Brackets < >
The parameter in the triangle brackets must be replaced by an effective value. For
example:
Send the “POWer:SPC:TARGet <power>”command in “POWer:SPC:TARGet 0”.
2. Square Brackets [ ]
The content in the square brackets can be ignored. When the parameter is ignored,
the instrument will set the parameter to its default.
For example,
In the “[:SOURce]:POWer?”command, sending either of the commands below can
generate the same effect:
:SOURce:POWer?
:POWer?
3. Vertical Bar |

SIGLENT
SSG5000A Programming Guide 15
The vertical bar is used to separate multiple parameters and when sending the
command, you can choose one of the parameters.
For example,
In the “[:SOURce]:AM:STATe OFF|ON|0|1”command, the parameters available are
“OFF”, “ON”, “0”or “1”.
4. Braces { }
The parameters in the braces are optional which can be ignored or set for one or
more times.
2.3 Parameter Type
The parameters in the commands introduced in this manual include 6 types: Boolean,
enumeration, integer, float and string.
1. Boolean
The parameter in the command could be “OFF”, “ON”, “0”or “1”.
For example:
[:SOURce]:FM:STATe OFF|ON|0|1
2. Enumeration
The parameter could be any of the values listed.
For example:
[:SOURce]:SWEep:STATe OFF|FREQuency|LEVel|LEV_FREQ
Valid parameters are “OFF”, “FREQuency”, “LEVel”or LEV_FREQ.
3. Integer
Except other notes, the parameter can be any integer within the effective value
range.
For example:
[:SOURce]:SWEep:STEP:POINts <value>
The parameter <value> can be set to any integer between 2 and 65535.
4. Float
The parameter can be any value within the effective value range according to the
accuracy requirement (the default accuracy contains up to 9 digits after the
decimal points).
For example:
[:SOURce]:POWer:OFFSet <value>

SIGLENT
16 SSG5000A Programming Guide
The parameter <value> can be set to any real number between -100 and 100.
5. String
The parameter should be the combinations of ASCII characters.
For example:
:SYSTem:COMMunicate:LAN:IPADdress <“xxx.xxx.xxx.xxx”>
The IP address can be set as the string “192.168.1.12”.
2.4 Command Abbreviation
All of the commands are not case sensitive, so you can use any of them. But if an
abbreviation is used, all the capital letters in the command must be written
completely.
For example:
:CORRection:FLATness:COUNt?
Can be abbreviated to:
:CORR:FLAT:COUN?

SIGLENT
SSG5000A Programming Guide 17
3. SCPI Commands
This chapter introduces the Siglent Technologies SSG5000A SCPI commands, including:
IEEE Common Commands 3.1
System Subsystem 3.2
Preset Subsystem 3.3
Output Subsystem 3.4
Source Subsystem 3.5
Sense Subsystem 3.6
3.1IEEE Common Commands
3.1.1 Identification Query (*IDN)
Command
Format
*IDN?
Instructi
on
Returns an instrument identification information string. The string
contains the manufacturer, model number, serial number, software
number, FPGA number and CPLD number.
Menu
None
Example
*IDN?
Return: Siglent Technologies,SSG5083A,SSG5ABAC6R0008,V1.0.0.2.6
3.1.2 Reset (*RST)
Command
Format
*RST
Instruction
This command presets the instrument to a factory defined condition
that is appropriate for remote programming operation. *RST is
equivalent to performing the two commands :SOURce:PRESet and *CLS.
This command always performs a factory preset.
Menu
None
Example
*RST
3.1.3 Clear Status (*CLS)
Command
Format
*CLS
Instruction
Clears the status byte register. It does this by emptying the error
queue and clearing all bits in all of the event registers. The status
byte register summarizes the states of the other registers. It is also

SIGLENT
18 SSG5000A Programming Guide
responsible for generating service requests.
Menu
None
Example
*CLS
3.1.4 Standard Event Status Enable (*ESE)
Command
Format
*ESE <number>
*ESE?
Instructi
on
Set the bits in the standard event status enable register. This
register monitors I/O errors and synchronization conditions such as
operation complete, request control, query error, device dependent
error, execution error, command error and power on. A summary bit is
generated on execution of the command.
The query returns the state of the standard event status enable
register.
Menu
None
Example
*ESE 16
3.1.5 Standard Event Status Register Query (*ESR)
Command
Format
*ESR?
Instruction
Queries and clears the standard event status event register. (This is
a destructive read.) The value returned reflects the current state
(0/1) of all the bits in the register.
Menu
None
Example
*ESR?
3.1.6 Operation Complete Query (*OPC)
Command
Format
*OPC
*OPC?
Instruction
Set bit 0 in the standard event status register to “1” when all
pending operations have finished.
The query stops any new commands from being processed until the
current processing is complete. Then it returns a “1”, and the
program continues. This query can be used to synchronize events of
other instruments on the external bus.
Returns a “1” if the last processing is complete. Use this query
when there’s a need to monitor the command execution status, such as
a sweep execution.
Menu
None
Example
*OPC?
3.1.7 Service Request Enable (*SRE)
Command
Format
*SRE <integer>
*SRE?
Instruction
This command enables the desired bits of the service request enable

SIGLENT
SSG5000A Programming Guide 19
register.
The query returns the value of the register, indicating which bits are
currently enabled.
Menu
None
Example
*SRE 1
3.1.8 Status Byte Query (*STB)
Command
Format
*STB
Instruction
This query is used by some instruments for a self test.
Menu
None
Example
*STB
3.1.9 Wait-to-Continue (*WAI)
Command
Format
*WAI
Instruction
This command causes the instrument to wait until all pending commands
are completed before executing any additional commands.
There is no query form to the command.
Menu
None
Example
*WAI
3.1.10 Self Test Query (*TST)
Command
Format
*TST?
Instruction
This query is used by some instruments for a self test.
Menu
None
Example
*TST?
3.2 System Subsystem
3.2.1 System Time (:SYSTem:TIME)
Command
Format
:SYSTem:TIME <hhmmss>
:SYSTem:TIME?
Instruction
Set the System time
Get the System time
Parameter
Type
String
Parameter
Range
Hours(0 ~ 23), minutes(0 ~ 59), seconds(0 ~ 59)
Return
String
Default
None
Menu
Utility > Setting > Time Setting
Example
Set System time:

SIGLENT
20 SSG5000A Programming Guide
:SYSTem:TIME 182559
Get System time:
:SYSTem:TIME?
3.2.2 System Date (:SYSTem:DATE)
Command
Format
:SYSTem:DATE <yyyymmdd>
:SYSTem:DATE?
Instruction
Set system date
Get system date
Parameter
Type
String
Parameter
Range
Years(four digits), month(1 ~ 12), date(1 ~ 31)
Return
String
Default
None
Menu
Utility > Setting > Time Setting
Example
Set System date:
:SYSTem:DATE 20050101
Get System date:
:SYSTem:DATE?
3.2.3 IP Address
(:SYSTem:COMMunicate:LAN:IPADdress)
Command
Format
:SYSTem:COMMunicate:LAN:IPADdress <“xxx.xxx.xxx.xxx”>
:SYSTem:COMMunicate:LAN:IPADdress?
Instruction
Set the IP address. The IP address will be fetched automatically if
the IP assignment is set to DHCP.
Get the IP address
Parameter
Type
String
Parameter
Range
Conforms to the IP address standard(0-255:0-255:0-255:0-255)
Return
IP address string
Default
None
Menu
Utility > Interface > LAN Setting > IP Address
Example
:SYSTem:COMMunicate:LAN:IPADdress “192.168.1.12”
:SYSTem:COMMunicate:LAN:IPADdress?
3.2.4 Gateway (:SYSTem:COMMunicate:LAN:GATeway)
Command
Format
:SYSTem:COMMunicate:LAN:GATeway <“xxx.xxx.xxx.xxx”>
:SYSTem:COMMunicate:LAN:GATeway?
Instruction
Set the gateway for the signal generator in the network. The
gateway will be fetched automatically if the IP assignment is
set to DHCP.
Get the gateway.
Parameter
String
Other manuals for SSG5080A Series
1
Table of contents