Your cart is currently empty!
Category: Knowledge Base SDG1000X Series

Quick remote computer control using LXI Tools
Introduction:
There are many options for people considering remote communication and control of test and measurement instrumentation. In most cases, a computer is used to communicate to test instrumentation using USB or LAN connections. The computer can configure the instruments, collect and organize data, and present it in a useful and flexible way.
Remote control provides:
- Increased repeatability: The instrumentation is set up the same way, every time.
- Efficient data collection: Data can be automatically filtered and stored.
- Easily configure the test system parameters: Each command is executed in the same order and in the same timeframe.
- Quickly visualize system performance: Graphical or tabular data formatting is easy.
There are numerous platforms (Windows, Linux, etc..) and software programs (LabVIEW, .NET, Python) available to build automated test systems. The right choice for your application is highly dependent on your needs and the available skills you have.
In this note, we are going to discuss how to use LXI Tools to communicate with SIGLENT instrumentation. LXI Tools is an open source software application that uses the local area network (LAN) connection to quickly control remote instrumentation. It is easy to install, has a small operating footprint, and is really powerful while being quite easy to use. Let’s start by looking at the basics.
You can also see the video version of this note here: https://siglentna.com/video/lxi-tools/
Why Open Source?
Open source coding is a community-based development style in which a group of contributors work together to build and maintain programs using shared code and components. In this way, a platform can be built and tested quickly and may cost significantly less than commercial programming environments. LXI Tools is free open source software and the project welcomes new contributors that would like to help improve the tools.
Here is a link to the LXI Tools website: https://lxi-tools.github.io
Why LXI Tools?
LXI-Tools is a collection of open source software tools that provide direct control of LXI compatible instruments such as modern oscilloscopes, power supplies, spectrum analyzers, and more.Simply install LXI Tools, connect your instrument, and start communicating.
It really is that easy.
LXI-Tools Provides:
- Quickly discover the available instruments on the LAN
- Retrieve copies of the displayed images (quickly see signals, data, and instrumentation setups) and convert image file types
- Benchmark LAN performance
- Send individual commands to an instrument to perform simple test actions. For example, you could return the measured data from a DMM.
To learn more about LXI-Tools, please see https://github.com/lxi-tools/lxi-tools
Instructions:
- Install the appropriate version of LXI-Tools for your operating system
2. Open a terminal. In this example, I am using Ubuntu (17.10) running on a virtual machine hosted by a Win 10/64 bit OS.
To learn more about the virtual machine used in this example:https://www.virtualbox.org/
The OS is Ubuntu: https://www.ubuntu.com/
3. Once loaded, startup Linux:
With Ubuntu, you can use Snap to install:
$ snap install lxi-tools
LXI Discover:
Quickly searches the LAN for instruments and lists their identification string and IP address.
Plug in and power on your instrumentation and make sure that they are connected to a working LAN connection. You can manually check the instrument IP address and save this info to compare to later steps.
Open up a terminal window. At the “$” prompt, simply type lxi discover… LXI tools will search the LAN for connected instruments.


Here, we have three devices connected: an SDM3065X, SSA3032X, and an SDS1102X-E (which has been superseded by the SDS1202X-E series here in North America). It also includes the instrument serial number, firmware revision, and IP address.
NOTE: This has been tested with a large number of instruments, but may not be supported by some. There is a list of compatible instruments at the end of this note or you can check LXI-Tools support for the latest list of supported products.
Screenshot:
This function retrieves a copy of the instrument display and saves it to the local drive. This is ideal for adding information to reports and sharing events with colleagues.
Type “lxi screenshot – – address <device address>”
NOTE: There should be two “-” with no spaces before “address” for every command.

Image Edits using ImageMagicks
Use ImageMagick® to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
For more information, visit… https://www.imagemagick.org/script/index.php
$ lxi screenshot –address <ip> – | convert – screenshot.jpg
$ lxi screenshot –address <ip> – | convert – screenshot.tiff
$ lxi screenshot –address <ip> – | convert – screenshot.bmpBenchmark:
The benchmark command sends 100 requests via LAN and measures the average response time of the instrument. It can be used as a gauge for the health of the connection. Higher response rates = faster links.
$ lxi benchmark –address <ip>

Manual vs. Auto-load:
The commands can also be manually or auto-loaded:
Auto-load/detect:
$ lxi screenshot –address 10.0.0.42
Vs. manually specifying which screenshot plugin to use:
$ lxi screenshot –address 10.0.0.42 –plugin siglent-ssa3000x
The only advantage of manually specifying which plugin to use it that it is a bit faster because it does not go through the instrument auto detection steps (retrieve ID, parse regex rules to match correct plugin etc.).
Sending instrument specific commands:
You can also use the SCPI command to send any command to the instrument.
Note that if you have an SCPI command with spaces you must remember to send the specific command in quotes like so:
$ lxi scpi –address 192.168.55.113 “MEAS:VOLT? CH1”
This way the tool knows how to parse the full SCPI string.
In this example, we send the “READ?” command to an SDM and return a reading:

GUI
Another really great feature is the GUI for LXI Tools. This allows you easy access to discovery of instruments on the network as well as some powerful tools for data capture and instrument control.
$ lxi-tools.lxi-gui
This adds a very simple yet powerful graphical interface for the LXI tools program:

NOTE: Ignore the “Qt” error shown.
This opens a clean control window:

- Search: Discover the instruments connected to the LAN. Here, we have three instruments connected:

- SCPI command line: Send instrument specific commands. Click on the instrument you wish to communicate with and then enter the command. For queries (commands that require an instrument response, or read function), the returned string will be shown in the text box:

NOTE: The specific commands that can be used are available in the instrument programming guide. Check out the specific instrument documentation for more details.
This tool can be helpful when trying out specific sequences of commands. You can send them one-at-a-time and then observe the instrument functionality.
- Screenshot: Capture and save an image from the instrument. This also features a “live” button that will continuously poll the instrument.

After saving, you can recall the image:
- Benchmark: Checks the performance of the LAN connection by sending a series of commands and measuring the response time. Larger “requests/second” = greater possible bus performance.

- Data Recorder: Sends the user-defined command a number of times/second and attempts to graph the data. Be aware that data can be returned in different formats and at different rates depending on device configuration. Going faster can make the system unstable and could cause a crash or hang-up.

And the data:

- Settings: Configure the timeouts and other controls.

- About: Version info.

*Here is a list of the latest compatible instruments tested with Lxi-Tools (03/13/2018)
SSA3000X Series:
SSA3000X (Latest 1.2.8.5a)
SDS1000X-E Series:
SDS1202X-E (Older 5.1.3.8R2)
SDS1202X-E (Latest 5.1.3.13)
SDS1204X-E (Latest/first production release 7.6.1.12)
SDS1000X/X+ Series:
SDS1202X+ (Latest 1.1.2.15E3)*
*LIMITED COMMAND SET AVAILABILITY
SDS2000X Series:
SDS2304X (Older 1.2.2.2)*
SDS2304X (Latest 1.2.2.2R10)*
*LIMITED COMMAND SET AVAILABILITY
SDS2000 Series (replaced by the SDS2000X):
SDS2204 (Latest 1.2.2.2)*
*LIMITED COMMAND SET AVAILABILITY
SDM3000 Series:
SDM3045X (Older rev 5.01.01.01)
SDM3045X (Latest rev 5.01.01.03)
SDM3055 (Latest rev 1.01.01.01.19)
SDM3065X (Older rev 3.01.01.02)
SDM3065X (Latest rev 3.01.01.03)
SDG1/2/6X Series:
SDG1032X (Latest 1.01.01.22R5)
SDG20122X (2.01.01.23R7)
SDG6052X (Latest 6.01.01.28R1): 405.3

Programming Example: Using Python to configure a basic waveform with an SDG X series generator via o
#!/usr/bin/env python 2.7.13
#-*- coding:utf-8 –*-
#—————————————————————————–
# The short script is a example that open a socket, sends basic commands
# to set the waveform type, amplitude, and frequency and closes the socket.
#
#No warranties expressed or implied
#
#SIGLENT/JAC 11.2018
#
#—————————————————————————–
import socket # for sockets
import sys # for exit
import time # for sleep
#—————————————————————————–remote_ip = “192.168.55.110” # should match the instrument’s IP address
port = 5024 # the port number of the instrument service#Port 5024 is valid for the following:
#SIGLENT SDS1202X-E, SDG2X Series, SDG6X Series
#SDM3055, SDM3045X, and SDM3065X
#
#Port 5025 is valid for the following:
#SIGLENT SVA1000X series, SSA3000X Series, and SPD3303X/XEcount = 0
def SocketConnect():
try:
#create an AF_INET, STREAM socket (TCP)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error:
print (‘Failed to create socket.’)
sys.exit();
try:
#Connect to remote server
s.connect((remote_ip , port))
except socket.error:
print (‘failed to connect to ip ‘ + remote_ip)
return sdef SocketSend(Sock, cmd):
try :
#Send cmd string
Sock.sendall(cmd)
Sock.sendall(b’\n’)
time.sleep(1)
except socket.error:
#Send failed
print (‘Send failed’)
sys.exit()
#reply = Sock.recv(4096)
#return replydef SocketClose(Sock):
#close the socket
Sock.close()
time.sleep(1)def main():
global remote_ip
global port
global count# Body: send the SCPI commands and print the return message
s = SocketConnect()
qStr = SocketSend(s, b’*RST’) #Reset to factory defaults
time.sleep(1)qStr = SocketSend(s, b’C1:BSWV WVTP,SQUARE’) #Set CH1 Wavetype to Square
qStr = SocketSend(s, b’C1:BSWV FRQ,1000′) #Set CH1 Frequency
qStr = SocketSend(s, b’C1:BSWV AMP,1′) #Set CH1 amplitudeSocketClose(s) #Close socket
print(‘Query complete. Exiting program’)
sys.exitif __name__ == ‘__main__’:
proc = main()
Python Example: Building an Arb with 16-bit steps (SDG2000X/SDG6000X)
The SIGLENT SDG2000X and SDG6000X feature 16-bit voltage step resolution. This provides 65,535 discrete voltage steps that can cover the entire output range (20 Vpp into a High Z load) which can effectively be used to test A/D converters and other measurement systems by sourcing waveforms with very small changes.
In this example, we use Python 2.7 and PyVISA 1.8 to create a ramp waveform that is comprised of steps of the Least Significant Bit (LSB) from point 0 to 65535 on Channel 1.
We also implement the TrueArb function that allows you to specify the sample rate and also ensures that each sample is sourced.
NOTE: You will need to change the instrument ID to match your specific instrument. We also recommend setting the amplitude and other instrument parameters prior to enabling the output of the instrument.
Here is pic of the instrument after loading the waveform:

Here is a scope shot of the output:

Here is a link to a Zipped version of the .PY file: SiglentSDG16BBitSteps
Here is the text of the program:
##
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import visa #Uses PyVISA 1.8 and NI-VISA runtime Engine 15.5
import time
import binascii#USB resource of Device
rm = visa.ResourceManager()
device = rm.open_resource(‘USB0::0xF4EC::0x1101::SDG6XBAQ1R0071::INSTR’) #CHANGE TO MATCH YOUR INSTRUMENT ID#Little endian, 16-bit 2’s complement
# create a waveformwave_points = []
for pt in range(0x8000, 0xffff, 1):
wave_points.append(pt)
wave_points.append(0xffff)
for pt in range(0x0000, 0x7fff, 1):
wave_points.append(pt)def create_wave_file():
#create a file
f = open(“wave1.bin”, “wb”)
for a in wave_points:
b = hex(a)
#print ‘wave_points: ‘,a,b
b = b[2:]
len_b = len(b)
if (0 == len_b):
b = ‘0000’
elif (1 == len_b):
b = ‘000’ + b
elif (2 == len_b):
b = ’00’ + b
elif (3 == len_b):
b = ‘0’ + b
b = b[2:4] + b[:2] #change big-endian to little-endian
c = binascii.a2b_hex(b) #Hexadecimal integer to ASCii encoded string
f.write(c)
f.close()def send_wave_data(dev):
#send wave1.bin to the device
f = open(“wave1.bin”, “rb”) #wave1.bin is the waveform to be sent
data = f.read()
print (“write bytes:”,len(data))
dev.write_raw(“C1:WVDT WVNM,wave1,FREQ,2000.0,TYPE,8,AMPL,4.0,OFST,0.0,PHASE,0.0,WAVEDATA,%s” % (data))
#”X” series (SDG1000X/SDG2000X/SDG6000X/X-E)
dev.write(“C1:ARWV NAME,wave1”)
f.close()if __name__ == ‘__main__’:
create_wave_file()
send_wave_data(device)
device.write(“C1:SRATE MODE,TARB,VALUE,333333,INTER,LINE”) #Use TrueArb and fixed sample rate to play every point###

Resolver Simulation using an Arbitrary Waveform Generator
A resolver is an electromagnetic sensor that is used to determine the mechanical angle and velocity of a shaft or axle. They are often used in automotive applications (cam/crankshaft position), aeronautics (flap position), as well as servos and industrial applications.
When designing, testing, or troubleshooting systems that use resolvers, it can be worthwhile to build a system that can easy simulate the output of a resolver. This is especially helpful when testing the operational limits of the resolver measurement circuitry and any code that may accompany these measurements. Simulation allows you to control and test the limits of operation of a system by adding known errors to the signal or by changing the frequency/amplitude/waveform shapes to see where the system begins to fail.
In this application note, we are going to describe a method of simulating a simple resolver using a SIGLENT SDG2000X Series arbitrary waveform generator.
RESOLVER BASICS
Many resolvers share a similar design as shown in Figure 1: A primary winding or coil that is attached to a shaft or rotor, and two stationary windings, or stators that are positioned at 90 degrees to one another.

Figure 1: Basic resolver design.The primary winding is energized with an AC Voltage, Vr. This primary excitation signal is typically a sinewave that is then coupled into both secondary coils. In many resolvers, the secondary coils are built such that coils are physically mounted 90 degrees from one another. Since each coil is physically located in a different location with respect to the primary coil, they will each have different coupling efficiency and, because they are mounted 90 degrees apart, their outputs will be orthogonal (90 degrees out-of-phase of each other). As the shaft angle changes, the output signal for the secondary coils will change as shown in Figure 2.

Figure 2: Coil voltage vs Rotor Angle for a sine primary voltage.Therefore, there are discrete voltage values for each shaft angle. By measuring the instantaneous voltages of the secondary coils, you can determine the rotor angle.
EQUIPMENT
In this simulation, we are going to use a waveform generator to source the primary coil signal. This signal will be used to simultaneously modulate the outputs of a dual channel generator. These outputs will represent the secondary sine and cosine coil output signals, as discussed previously.
- SDG805: Modulation source for secondary coil outputs.This instrument should be able to match the primary coil minimum and maximum frequency specifications of the resolver you are simulating. Many resolvers have primary coil signals that vary from 5 k to 20 kHz and a few hundred mV to 100’s of volts. These higher voltages are used to excite the secondary coils.
- SDG1032X: Secondary coil simulation.This model has a single external modulation input, independent phase control, and Dual Side Band AM (DSB-AM) modulation which we will need to successfully simulate the sine and cosine signals of a resolver.
- Dual Channel Oscilloscope: Signal verification.It is important to select a scope with the proper bandwidth (at least 2 to 3x the max frequency of primary frequency, even higher if the primary has higher harmonics/square wave). In this example, we are going to use a SIGLENT SDS2102X. This platform has deep memory (140M points), zoom, and a large display that will make verification easier.
SETUP
Use a BNC terminated cable to connect CH1 output of the primary generator to the Aux/Mod In of the secondary coil generator, as shown below in Figure 3.

Figure 3: Physical connections between the two generators.1. Connect the secondary coil outputs of the second generator (CH1 and CH2) to the inputs of the oscilloscope.
2. Configure the primary coil generator to output a sine wave at the lowest frequency of Vr for your system. Typically, the Vr frequency ranges from 5 k to 20 kHz.
The primary coil generator is going to be used to modulate the output signals of the secondary coil generator. The voltage for the primary signal should be low to start (5Vpp). We will optimize it later.
3. Set the secondary coil generator CH1 to output a sine wave with a frequency of 1Hz, voltage of 10Vpp (or equivalent to the maximum voltage of your resolver circuit).
4. Set the secondary coil generator CH1 to perform a Dual-Side-Band AM (DSB AM) modulation by pressing Mod and select the DSB-AM type.
5. Configure CH2 on the secondary coil generator to output the same modulated sine signal as channel 1, only set the phase offset to 90 degrees. This will provide the orthogonal output phase for the secondary cosine channel.
The secondary coil frequency represents the rotational frequency of the rotating primary coil in a physical resolver. Be sure to set both CH1 and CH2 to the same frequency.
NOTE: The SIGLENT SDG1000X and SDS2000X series feature a Channel Copy
And a channel coupling function which makes the process easier.To couple the frequency selection between two channels, press Utility > CH Copy Coupling > FreqCoupl = ON. Now, any changes in frequency on either channel will be applied to the other channel. This allows you to simultaneously change both frequencies.
To copy settings from one channel to another, press Utility > CH Copy Coupling > CH Copy > CH1 => CH2
6. Enable the primary coil generator CH1 and both outputs of the secondary coil generator.
7. Verify the performance, adjust the secondary coil frequency (rate of change of the rotor), verify, and so on until you have fully tested the limits of the resolver system.
The figures below show images of secondary coil simulations at various primary coil frequencies and secondary coil frequencies:

Figure 4: Primary coil 5 kHz, secondary coils at 100 Hz.
Figure 5: Primary coil 5 kHz, secondary coils at 200 Hz.
Figure 6: Primary coil 10 kHz, secondary coils at 100 Hz.
Figure 7: Primary coil 10 kHz, secondary coils at 200 Hz.TIPS
Do not overdrive the modulation input of the secondary coil generator with too much voltage. Around 10Vpp is enough to get full modulation without overdriving. Figure 8 below shows when too much voltage is applied to the modulation input (12Vpp). Figure 9 shows correct modulation depth (10Vpp).

Figure 8: Primary modulation voltage is too high. Note square edges of the waveforms.
Figure 9: Primary modulation voltage is correct. Note the smooth edges of the waveforms.Compare the modulation frequency of the primary coil and the modulation specifications of the secondary coil generator. If the modulation input of the secondary generator is low frequency, you may get “steps” in the output, as shown below:

Figure 10: Secondary coil signals with a primary coil frequency set too high.
Figure 11: Zoom of high frequency primary voltage. Note “steps” due to quantization.If this is the case, you can smooth the “steps” by placing low pass output filters on each of the secondary coil generator outputs.
This is very similar to filtering the images from a digital-to-analog (DAC) converter.The SDG1000X and SDG2000X have modulation sample clocks that are operating at 600 kHz. By adding a low pass filter with a pass band below the Nyquist limit for 600 kHz,
Design the filter such that the passband is below the 1st image frequency.

CONCLUSION
Simulating resolver outputs using arbitrary waveform generators provides an easy way to verify and troubleshoot the operation of resolver circuitry and software. The SIGLENT SDG1000X and 2000X series provide flexible and fast test instruments for this application.
REFERENCES
Infineon; (2016, December). DSD: Delta Sigma Demodulator [Web Article]. Retrieved from https://infineon.com
Szymczak, J.; et. Al (2014, March). Precision Resolver-to-Digital Converter Measures Angular Position and Velocity [Web Article]. Retrieved from https://analog.com
For more information, check Arbitrary Waveform Generators, or contact your local Siglent office.
The basic output waveform and related parameters of the arbitrary waveform generator
Traditional function generators can output standard waveforms such as sine waves, square waves, and triangle waves. However, in actual test scenarios, in order to simulate the complex conditions of the product in actual use, it is often necessary to artificially create some “irregular” waveforms or add some specific distortion to a waveform. Traditional function generators can no longer meet the requirements and an arbitrary waveform generator may be a good option.
Arbitrary waveform generators can easily replace the function generators. They can source sine waves, square waves, and triangle waves like a standard function generator. In addition, they can also output pulse, noise, DC signal types, modulated signals, sweeps and bursts. Many arbitrary waveform generators currently on the market are equipped with arbitrary waveform drawing software. Through this software, theoretically, the arbitrary waveform generator can be remotely controlled to output all the signals required in the test process.
So, what types of waveforms can an arbitrary waveform generator output?
What parameters are available for an arbitrary waveform?
How to measure the quality of the output waveform?- Sine Wave / Cosine Wave
Figure 1 Sine wave / Cosine waveSinusoidal (sine) and cosine waves are the two most familiar waveforms in electronics.
Sine/cosine waves are defined as follows.
(Formula 1)OR
(Formula 2)Where A represents the amplitude of the sine wave,
represents the angular frequency, and
represents the initial phase, which can be omitted in the general calculation. The sine and the cosine waves are essentially the same, but the initial phase differs by 90 °.
Figure 2 Sine wave setting interface in SDG1000X
Two-tone testing: Building an arbitrary waveform using the Equation Draw function
In this note, we are going to use Equation Draw within EasyWave to create a waveform that is built using the addition of sine waves with two different frequencies (700 and 1900 Hz). We will then show how to use this signal to modulate a carrier up-to 500 MHz using the other SDG output channel.
EasyWave is free software designed to help create and edit arbitrary waveforms and download them to applicable SIGLENT SDG series of arbitrary waveform generators, including the SDG800, 1000, and X series. You can download it here: EasyWave
EasyWave has an interesting feature called Equation Draw that enables you to create complex waveforms using some common basic math and trigonometric functions, like +, -, *, /, sine, cosine, and more.
NOTE: Two-tone testing is commonly used to test the performance of audio data that is embedded in modulated signals like AM or FM radio broadcasts. You can use two-tone signals to check the performance of RF receivers. The ARRL and other radio-centric organizations have lots of data on testing receivers, for those so inclined.
Many of the SDG products have a wave combine feature that mathematically adds the waveforms for both channel 1 and channel 2. This is technically easier than the process we highlight in this note, but it requires the use of both channels of the SDG. The using a single output arbitrary waveform allows us to use the other free channel for other tasks, including sourcing a carrier modulated by our two-tone signal (see the end of this note for more info).
To learn about Wave Combine, click here: Wave Combine
Setup
- SIGLENT SDG arbitrary waveform generator (We are using an SDG6052X capable of 500 MHz for this note)
- EasyWave software
- USB or LAN connection
Before beginning, please install EasyWave (The instructions are available with the download available here: SDG Software Downloads) and connect the instrument to the computer.
- Open EasyWave by double-clicking on the EasyWave Icon:

2. Open a new waveform:

3. Name the waveform (optional) and set the frequency of the main repeated waveform. In this case, we will set the Frequency to 100 Hz. Press OK:

NOTE: The arbitrary waveform “frequency” is the repetition frequency of the entire waveform loaded into memory. If that waveform has a single period, then the set frequency here will be the frequency of the output waveform. If the waveform has 2 periods, then this frequency will be half of the actual waveform frequency (because there are 2 periods per memory “frame”). In this process, the frequency set in this step is equal to the “X” variable used in future steps.
4. This opens the wave1 waveform window. Now, click on the Equation Draw icon to open the equation editor. This includes a listing of available math elements as well as a saved equations area.
For this example, we want two tones… one at 700 Hz and the other at 1900 Hz. Since we set the output frequency to 100 Hz (remember we named that “X” above), we can simply enter our equation in the New Equation field using standard trigonometric functions as shown:
y(x) = sin(7*x) += sin(19*x)

Press OK to enter.
NOTE: This will create a waveform that is the addition of two sine waves. One with a frequency 7 times X (7*100 Hz = 700 Hz) and the other with a frequency 19 times X (19*100 Hz = 1900 Hz).
Now, the wave window shows a green waveform that represents the waveform we entered via the Equation Draw method. Confirm that it matches your expectations for your application.
5. Press Communication to open the dialog to begin downloading the waveform to the instrument:


6. Select the connection type (USB = USBTMC) and press OK

7. Select the correct USB device, Waveform Name, and Channel.. press OK:

8. Now, you can observe the waveform and parameters on the display of the generator. Here, you can change the base frequency, amplitude, and other waveform characteristics.

Here is a screen capture of an oscilloscope using the FFT function to capture the spectral content of the output using the waveform created:

Note that the frequency markers show peaks at 700 and 1900 Hz, as expected.
Next Step: Source a two-tone modulated carrier
Now that we have verified the two-tone output, we can use this waveform as a modulation source for a higher frequency carrier. This modulated signal can be used to test the performance of a receiver.
Here are two options for creating a modulated carrier:
SDG External Modulation for carriers < 500 MHz
Many SDG generators include an external modulation input which can be used to modulate the output of a specified channel. In this example, we can simply route the two-tone channel to the external modulation input. Then, configure the other channel to output a modulated carrier.
Here, we will use the SDG6052X, which can output sine waves up to 500MHz. As mentioned previously, this technique works with any dual channel SDG. When selecting a generator, remember that the maximum carrier output frequency includes the modulation bandwidth. If your generator has a maximum frequency of 100 MHz and the modulation bandwidth is 10 kHz, then the maximum carrier frequency when modulation is active will be 100 MHz – 10 kHz/2.
- Route a cable from the two-tone channel to the Aux In located on the rear panel. In this case, channel 1 is the two-tone source:
Front Panel:

Rear Panel:

- Configure the other channel as the modulated carrier (channel 2, in this example) for external modulation by pressing Mod and configuring the channel as shown.
Here, we set the channel to use the external input to modulate an AM carrier with a frequency of 144 MHz, in the amateur radio broadcast 2m band :

Now, we can confirm the output using a spectrum analyser.
Here, we connect the modulated carrier output (channel 2) into a SIGLENT SVA spectrum analyser:


Here, you can see the carrier at 144 MHz, and the two tones at +700, +1900, -700, and +1900 Hz from the carrier.. as expected.
NOTE: Make sure that the output power of your SDG is low enough to prevent damage to the spectrum analyser or add enough external attenuation to make sure you don’t damage the input.

Testing Open Socket Communications Using PuTTY
Many instruments include the ability to be controlled via a remote connection to a computer using an Ethernet connection. In many cases, these instruments require a special software library that can help establish and maintain the communications link between the instrument and controlling computer. This can be annoying for a few reasons… the software library is likely to occupy a large amount of space on the controlling computer and is also required on any computer that is being used to control the instrument. In a remote networking application where multiple user’s may want access to a test instrument, this can cause support and installation headaches.
Luckily, there are a few solutions that can help. In this application note, we are going to discuss using open socket communication techniques using an open source communication tool called PuTTY with a SIGLENT SSA3032X spectrum analyser.
What are open sockets and why use them?
Within the context of Ethernet/LAN connections, sockets are like mailboxes. If you want to deliver information to a specific place, you need to be sure that your information is delivered to the correct address.
In the context of test instrumentation, an open socket is a fixed address (or port number) on the Ethernet/LAN bus that is dedicated to process remote commands.
Open sockets allow remote computers to simply use existing raw Ethernet connections for communications without having to add additional libraries (VISA or similar) that require additional storage space and processing overhead.
Programs that utilize sockets for LAN communication tend to take up less memory and operate more quickly.
PuTTY
PuTTY is an open source software tool that provides a number of simple communication links (RAW, Telnet, SSSH, Serial, and others). It is available for free and there are a number of versions available for popular operating systems.
You can download as well as learn more here: https://www.putty.org/
In this example, we are using PuTTY to verify the raw LAN connection is working properly. It is quite a simple program that does not allow for very complex operation (sequences, converting data sets/strings, etc..). If you require more complex functionality, software platforms like Python, .NET, C#, LabVIEW, etc.. can be used to control the instrument using a similar open socket connection.
Configuration
In this test, we are using the most current revision of the SIGLENT SSA3032X Spectrum Analyzer firmware (Revision 01.02.08.02) which enables open socket communication.
This example also uses PuTTY version 0.67:

Steps
1. Install PuTTY for the OS you intend to use
2. Make sure your instrument and firmware revision can use open sockets
The SSA3032X revision 01.02.08.02 enables open socket communication.
To find the revision, press the System button > Sys Info.
Figure 1 below shows a sample system information screen from a SIGLENT SSA3000X analyzer:

Figure 1: Sample system information page from an SSA3000X.Check the product page and firmware release notes for more information.
3. Connect the instrument to the local area using an Ethernet cable
4. Find the IP address for the instrument. This is typically located in the System Information menu. On the SIGLENT SSA3032X, press the System button on the front panel > Interface > LAN.
Figure 2 below shows a sample LAN setup page from a SIGLENT SSA3000X:

Figure 2: Sample LAN information page from an SSA3000X.5. Open PuTTY
6. Select Raw as connection type
7. Enter the IP address in the Host Name field
8. Enter the port number. This should be provided in the users or programming guide for the instrument.
The SIGLENT SSA3000X uses port 5025.
Figure 3 below shows the PuTTY configuration for this example:

Figure 3: Example PuTTY configuration.9. Press Open. This will open a terminal window as shown in below:

10. Using the computer keypad, enter *IDN? and press the Enter key on the keyboard to send the command.

This is the standard command string that is used to request the identification string from the instrument. As shown below, the instrument responds with the manufacture, product ID, Serial Number, and firmware revision.
Conclusion
PuTTY is an easy way to verify an operational LAN connection to instrumentation that can use open sockets.

Verification of a LAN connection using Telnet
Automating a test can dramatically increase the productivity, throughput, and accuracy of a process. Automating a setup involves connecting a computer to the test instrumentation using a standard communications bus like USB or LAN and then utilizing code entered via a software layer (like LabVIEW, .NET, Python, etc..) to sequence the specific instrument commands and process data.
This process normally goes quite smoothly, but if there are problems, there are some basic troubleshooting steps that can help get your test up-and-running quickly.
In this note, we are going to show how to use Telnet to test the communications connection between an instrument and a remote computer using a LAN connection to ensure that it is working properly. Once the connection is verified, you can begin to work on the control software.
Telnet provides a means of communicating over a LAN connection. The Telnet client, run on a LAN connected computer, will create a login session on the instrument.
NOTE: The Telnet connection requires open sockets on the instrumentation. At this time, not all SIGLENT products feature open sockets. Check the product page FAQs or with your local SIGLENT support office for more information.
A connection, established between the computer and instrument, generates a user interface display screen with SCPI> prompts on the command line.
Using the Telnet protocol to send commands to the instrument is similar to communicating with USB. You establish a connection with the instrument and then send or receive information using SCPI commands. Communication is interactive: one command at a time.
The Windows operating systems use a command prompt style interface for the Telnet client.
STEPS
1. Power on and connect the instrument to the network via LAN
2. Verify that the Gateway, Subnet Mask, and IP address of the instrument are valid for the network you wish to use. This information is typically located in the System Information or IO menu. See the specific instrument user’s guide for more information on LAN settings.
3. On the computer, click Start > All Programs > Accessories > Command Prompt.
4. At the command prompt, type in telnet.

5. Press the Enter key. The Telnet display screen will be displayed.

6. At the Telnet command line, type: open XXX.XXX.XXX.XXX 5024 where XXX.XXX.XXX.XXX is the instrument’s IP address and 5024 is the port. You should see a response similar to the following:

7. Now, you can enter any valid command for the specific instrument that you are controlling. See the specific programming guide for the instrument for more information.
This is especially helpful when you are planning a specific test sequence, the effect of delays/timing, or troubleshooting a command. You can send each command one-at-a-time and check the performance of the instrument.
*IDN? is a common identification string query (question or information request) that returns the information from the connected instrument


Programming Example: Open Socket LAN connection using Python
Automating a test can dramatically increase the productivity, throughput, and accuracy of a process. Automating a setup involves connecting a computer to the test instrumentation using a standard communications bus like USB or LAN and then utilising code entered via a software layer (like LabVIEW, .NET, Python, etc..) to sequence the specific instrument commands and process data.
In this note, we are going to show how to use Python to create a communications link between an instrument and a remote computer using a LAN connection. Once the connection is verified, you can begin to work on the control software.
NOTE: This example requires open sockets on the instrumentation. At this time, not all SIGLENT products feature open sockets. Check the product page FAQs or with your local SIGLENT support office for more information.
Python is an interpreted programming language that lets you work quickly and is very portable. Python has a low-level networking module that provides access to the socket interface. Python scripts can be written for sockets to do a variety of test and measurements tasks.
Here is a Python 2.7 script that opens a socket, sends a query and closes the socket. It performs this operation in a loop 10 times:
You can follow the instructions below to build your own example:
1. Power on and connect the instrument to the network via LAN
2. Verify that the Gateway, Subnet Mask, and IP address of the instrument are valid for the network you wish to use. This information is typically located in the System Information or IO menu. See the specific instrument user’s guide for more information on LAN settings.
3. Download python and your favourite python editor (I use IDLE):
https://docs.python.org/2/library/idle.html
Start your python editor:

5. Open a new file by pressing File > New File.. and name the file

6. Copy and paste the code at the end of this note into the file editing window:

7. Change the IP address and port number so that they match the IP address and port for the instrument you wish to connect to:

Save the file:

8. To Run, select Run and Run Module:



Programming Example: List connected VISA compatible resources using PyVISA
PyVISA is a software library that enables Python applications to communicate with resources (typically instruments) connected to a controlling computer using different buses, including: GPIB, RS-232, LAN, and USB.
This example scans and lists the available resources.
It requires PyVISA to be installed (see the PyVISA documentation for more information)
***
#Example that scans a computer for connected instruments that
#are compatible with the VISA communication protocol.
#
#The instrument VISA resource ID for each compatible instrument
#is then listed.
#
#
#Dependencies:
#Python 3.4 32 bit
#PyVisa 1.7
#
#Rev 1: 08302018 JCimport visa
def main():
rm = visa.ResourceManager()
print (rm.list_resources())if __name__==’__main__’:
main()
*****
Here is the code:

And here is the result of a scan:

Each connected instrument returns a specific formatted string of characters called the VISA Resource ID.
The resource ID format is as follows:
‘Communication/Board Type (USB, GPIB, etc.)::Resource Information (Vendor ID, Product ID, Serial Number, IP address, etc..)::Resource Type’
In the response, each resource is separated by a comma. So, we have three resources listed in this example:
‘USB0::0x0483::0x7540::SPD3XGB4150080::INSTR’ – This is a power supply (SPD3X) connected via USB (USB0)
‘USB0::0xF4EC::0x1301::SVA1XEAX2R0073::INSTR’ – This is a vector network analyzer (SVA1X) connected via USB (USB0)
‘TCPIP0::192.168.55.122::inst0::INSTR’ – This is an instrument connected via LAN using a TCPIP connection at IP address 192.168.55.122
