Free Shipping logo FREE SHIPPING £75+
50 years of Telonic Instruments Ltd logo CELEBRATING 50+ YEARS
Price Match logo PRICE MATCH GUARANTEE

Verification of a LAN connection using Telnet

Posted on: December 15th, 2020 by Doug Lovell

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

Posted on: December 15th, 2020 by Doug Lovell

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:

PythonSocket_052018

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://www.python.org/

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

Posted on: December 15th, 2020 by Doug Lovell

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 JC

import 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

Where is the MAC address information for SSA3000X, SSA3000X Plus, SSA3000X-R, and SVA1000X?

Posted on: December 15th, 2020 by Doug Lovell

The MAC address can be found on the LAN config interface.

Path: System–interface–LAN.

How do I pick the right spectrum analyser for my application?

Posted on: December 15th, 2020 by Doug Lovell

The SIGLENT SSA3000X, SSA3000X Plus and SVA1000X products are based on a similar swept superheterodyne spectrum analyser platform and have very similar starting prices. There are quite a few similarities, but also a few differences that could affect the end results for particular applications. The table below compares the major specifications and the comparable options as they pertain to specific applications like VSWR.

SSA3000X Series SSA3000X Plus Series SVA1000X Series
SSA3021X SSA3032X SSA3021X Plus  SSA3032X Plus SVA1015X SVA1032X
TG Standard Standard Standard
SA Bandwidth 9 kHz – 2.1 GHz 9 kHz – 3.2 GHz 9 kHz – 2.1 GHz 9 kHz – 3.2 GHz 9 kHz – 1.5 GHz 9 kHz – 3.2 GHz
VNA Bandwidth 10MHz – 1.5 GHz 100 kHz – 3.2 GHz
VNA Calibration Kit F503ME
DANL -151 dBm (RBW 10Hz) -161 dBm/Hz -156 dBm/Hz -161 dBm/Hz
-161 dBm, Normalized to 1 Hz
RBW 10 Hz – 1 MHz (1Hz settable) 1 Hz – 1 MHz 1 Hz – 1 MHz
Phase Noise < -98 dBc/Hz@1 GHz, 10 kHz offset < -98 dBc/Hz@1 GHz, 10 kHz offset < -98 dBc/Hz@1 GHz, 10 kHz offset
Options AMK/EMI/Refl* AMK/EMI/AMA/DMA AMK/EMI/AMA/DMA/DTF
AMK details CHP/ACPR/TOI/OBW/Monitor CHP/ACPR/TOI/OBW/Monitor/Harmonic/CNR CHP/ACPR/TOI/OBW/Monitor/Harmonic/CNR
AMA details AM/FM AM/FM
DMA details ASK/FSK/PSK/QAM ASK/FSK/PSK/QAM
EMI filter details 200 Hz, 9 kHz, 120 kHz 200 Hz, 9 kHz, 120 kHz, 1MHz 200 Hz, 9 kHz, 120 kHz, 1MHz
Touch Screen Touch Screen, Mouse & Keyboard, Webserver Touch Screen, Mouse & Keyboard, Webserver

*Compatible with many commercially available return loss bridges/directional couplers

Additional SVA Features and Options

Still having trouble choosing? Here are some additional features and options that are exclusive to the SSA PLUS and SVA platforms that may help: Free Features:

  • Touch screen control with shortcut widget
  • Mouse/Keyboard support
  • Easy web browser web control
  • Power-On-Line – Instrument will automatically restart when power is restored to the mains power connection (power cord) when this feature is enabled.

Additional Options:

  • AM/FM modulation analysis (SVA1000X-AMA. SSA3000XP-AMA) enables visualization of data encoded using AM/FM
  • Digital modulation analysis (SVA1000X-DMA. SSA3000XP-DMA) enables visualization of data encoded using FSK/ASK
  • Advanced measurement kit (SVA1000X-AMK, SSA3000XP-AMK) feature Harmonic and CNR measurements in addition to CHP/ACPR/TOI/OBW/Monitor.
  • Mechanical calibration kit for VNA (F503ME)

Verification of a working remote communications connection using NI – MAX

Posted on: December 14th, 2020 by Doug Lovell

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 NI-MAX to test the communications connection between an instrument and a remote computer using both a USB and a LAN connection to ensure that they are working properly. Once the connection is verified, you can begin to work on the control software.

National Instruments Measurement and Automation Explorer (NI-MAX) is a free communications tool provided with NI’s VISA library.

You can learn more here: https://digital.ni.com/public.nsf/allkb/71544521BDE34FFB86256FCF005F4FB6

USB Connections

1. Power on and connect the instrument via USB cable to the computer. On a computer running Windows, the first time you connect the USB from an instrument should open a dialog box or show a notification of a new device being connected.

You can check the status of the USB connections by opening Device Manager located in the Control Panel menu of most Windows Operating systems and expanding the driver information as shown below in this Windows 10 example:

This indicates that the operating system recognizes the connected instrument as a test instrument.

If the device manager reports the USB connection as some other type of device (printer, camera, unknown, etc.), there is likely a problem linking the proper driver (ausbtmc.sys) to the instrument. One possible solution to this is to disable the driver, disconnect the USB cable, verify that ausbtmc.sys exists, and then reconnect the USB cable.

2. Run NI-MAX by left-clicking on the icon on the desktop or finding it via the start menu

3. This will open the main window, as shown below:

4. Expand the “Devices and Interfaces” menu. You should see the instruments attached via USB with a brief description as shown for an SDS2000X oscilloscope below:

This indicates that a software application (NI-MAX) has correctly identified a test and measurement device (the oscilloscope) over the USB connection.

5. By left-clicking on the instrument, you can see additional information about it:

6. To further test the connection, right-click on the instrument and select Open VISA Test Panel or select it from the side bar:

The VISA Test Panel window shows some helpful information, including the instrument manufacturer, model, serial number, and the USB identifier (VISA Address) along the top.

7. Another useful item in the VISA Test Panel is the Input/Output function. This mode allows you to send specific instrument commands and receive instrument responses.

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.

Select Input/Output > Basic I/O > and Enter the command in the text window:

– *IDN? is a common identification string query (question or information request) that returns the information from the connected instrument
– /n is a termination character that represents a new line. This is the standard termination character for SIGLENT instrumentation.
– Write will send the command to the instrument
– Read will pull data from the instrument
– Query will perform a read and then a write command to request and return data from the instrument

USB Checklist

– Is the USB port configured properly on the instrument? Some instruments feature USB ports that can be configured as TMC (Test and Measurement) or Printer communication ports. The USB port should be set to USBTMC or similar for remote control.
– Try a direct connection to the controlling computer. USB hubs or long connections may cause issues.
– Try a different USB cable. Connectors can go bad or prove to be faulty.
– Try a different USB port on the computer.
– On machines running Windows, check the Device Manager. Test instrumentation should appear as USB Test and Measurement Device (IVI) and use the AUSBTMC.SYS driver

Lan Connections

1. Power on and connect the instrument via LAN cable to a LAN network connected to the computer you wish to use.

You can check the status of the LAN connection by using a software tool like NMAP: https://nmap.org/

NMAP allows you to scan networks and identify IP addresses.

First, identify the LAN connection for the instrument. This is typically located in the System menu under IO or LAN settings.

Here is the IO information for an SDS2000X oscilloscope:

DHCP Enabled will automatically configure the instrument connection settings and apply a valid IP address. With DHCP enabled, the IP address may change over time. It is recommended to check the instrument IP address and then confirm that it is visible on the network using NMAP:

Here, we are performing a Ping (short scan to identify what IP addresses are being used) over the range of IP addresses that may match the instrument.

This can be performed by setting the target using the “/24” extension. This scans 24 bits For example, 192.168.10.0/24 would scan the 256 hosts between
192.168.10.0 and 192.168.10.255

Here is more information from NMAP:
https://nmap.org/book/man-target-specification.html

For example, to ping all IP addresses that start with 192.168.0., set the target as follows:

Note the IP address and MAC address that identify your instrument.

2. Run NI-MAX by left-clicking on the icon on the desktop or finding it via the start menu

This will open the main window, as shown below:

3. Unlike USB, there is not an easy way to identify all of the instruments connected via LAN.

In many cases, you will have to manually add the LAN instrumentation. Recall from Step 2, our instrument IP address is 192.168.0.87

Right-click on Network Devices, and select Create New VISA TCP/IP Resource:

4. Select Manual Entry of LAN:

5. Enter the IP address and press Validate

6. After successfully creating a TCP/IP connection, select finish

7. After the system updates it’s configuration, the instrument will appear in the Network Devices menu:

8. To further test the connection, right-click on the instrument and select Open VISA Test Panel or select it from the side bar:

The VISA Test Panel window shows some helpful information, including the TCP/IP identifier (VISA Address) along the top.

9. Another useful item in the VISA Test Panel is the Input/Output function. This mode allows you to send specific instrument commands and receive instrument responses.

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.

Select Input/Output > Basic I/O > and Enter the command in the text window:

– *IDN? is a common identification string query (question or information request) that returns the information from the connected instrument
– /n is a termination character that represents a new line. This is the standard termination character for SIGLENT instrumentation.
– Write will send the command to the instrument
– Read will pull data from the instrument
– Query will perform a read and then a write command to request and return data from the instrument

For more information, check SiglentAmerica.com, or contact your local Siglent office.

SDS FFT performance on low frequency signals

Posted on: December 14th, 2020 by Doug Lovell

Like many modern oscilloscopes, the SIGLENT SDS series feature FFT math functions that calculate frequency information from the acquired voltage vs. time data. FFT stands for Fast Fourier Transform, and is a common method for determining the frequency content of a time-varying signal. Converting time domain data to the frequency domain makes measuring characteristics like phase noise and harmonics much easier. Oscilloscopes don’t have the dynamic range or sensitivity of a true spectrum analyzer, but these new designs can provide a fine level of detail that may be just enough for your application.

FFTs are commonly used on high frequencies, but they can also be used on signals with fairly low frequencies.

In this note, I am going to show the FFT performance of two series of our scopes by sourcing a 10 mHz (100 s period), 10 Vpp sine wave using a SIGLENT SDG805 Function Generator into Channel 1.

For those interested, here are the specs for the SDG805

SDS1000X/SDS2000X Series:

The SDS1000X and 2000X series feature an FFT function that uses up to 16 kpts of timebase data to calculate the frequency data and a timebase maximum of 50 s/div.

Here are the FFT results with the available window settings for a 10 mHz sinewave –

The scope can show a split timebase and FFT view:

 

For the rest, I will use the exclusive FFT view.

Rectangle

 

Blackman

 

Hanning

 

Hamming

 

Flat Top

 

SDS1000X-E Series:

The SDS1000X-E series feature a new math co-processor that increases the maximum data depth of the FFT function to 1 Mpts. They also feature a timebase maximum of 100 s/div. These increases allow the X-E to have much finer timebase detail and to acquire useful data for even lower frequencies than many scopes on the market.

Here are the FFT results with the available window settings for a 10 mHz sinewave –

The scope can show a split timebase and FFT view:

 

For the rest, I will use the exclusive FFT view.

Rectangle

 

Blackman

 

Hanning

 

Hamming

 

Flat Top

Bode Plot of a filter using an oscilloscope and function generator

Posted on: December 14th, 2020 by Doug Lovell

A Bode plot is a method of graphically displaying the frequency response of a system or device-under-test (DUT). Commonly, the magnitude and phase response of the device are plotted with respect to frequency using a shared horizontal frequency axis as shown in the example below:

 

By showing both the magnitude and phase information on the same graph, you can evaluate some of the basic qualities of the device being tested. A function generator and oscilloscope can be used to manually collect and compare the phase and amplitude data for a given device, but this can be tedious and time-consuming.

In this application note, we are going to characterize the frequency response of a low pass filter using the free automated Bode Plot function SIGLENT SDS10004X-E oscilloscope (SDS1204X-E, to be precise) and a SIGLENT SDG6000X Series (SDG6052X) arbitrary waveform generator. This automated control provides a clean and easy route to characterizing devices.

There is also a video covering this topic:

Bode Plot Video

 

Let’s take a look at the required hardware.

Hardware:

  • Qty 1 SIGLENT SDS1004X-E series four-channel oscilloscope. In this note, we will use a 200 MHz version (SDS1204X-E). The important thing to keep in mind is that the maximum bandwidth of the scope exceeds the maximum frequency we wish to measure. Remember that the maximum frequency shown on an on oscilloscope datasheet is usually the 3 dB point!

 

  • Qty 1 SIGLENT SDG series function generator. In this note, we are using a 500MHz SDG6052X, but any SDG series (800/1000 series, 1X, 2X, 6X) can communicate via USB cable to an SDS1004X-E series of four- channel scopes. Just be sure that the maximum sine wave output frequency meets or exceeds your DUT requirements. Note, we could also use the X-E external function generator (part number SAG1021). It can provide up-to 25 MHz sine waves and can be used for Bode Plotting as well.

NOTE: The SAG1021 has only 1 output and requires a BNC “T” to create the direct and through connections to the scope.

 

  • Qty 1 USB cable: For communication between the generator and scope

 

  • Qty 2 50 Ohm BNC terminations: Matches the DUT impedance (50 Ohms) to the high impedance inputs of the scope (the X-E models do not have 50 Ohm inputs):

  • Qty 3 BNC coaxial cables: Connect SDG out to DUT and the oscilloscope

 

  •  Qty 1 DUT (Device-under-test): We are going to test a 50 Ohm 30 MHz low pass filter:

 

Connections:

In this measurement, we want to see how the DUT effects the amplitude and phase of a known signal. One method to accomplish this involves sourcing two pure sine waves with identical amplitude and starting phase values. One of the signals is wired directly to an oscilloscope input (the “control” or “direct” signal). The second output (identical to the first) goes through the DUT and then to the scope. The DUT may affect the signal amplitude and phase. We can easily compare the two signals using the measurements performed with the scope and graph the amplitude and phase changes with respect to the input signal frequency.

Here is a simplified diagram of the test methodology:

Physical Connections:

 

  • Connect the SDG X series Generator CH1 Output > BNC cable > BNC 50 Ohm termination > SDS1204X-E Oscilloscope CH1 input
  • Connect the SDG X series Generator CH2 Output > Appropriate cable > DUT input
  • DUT output > appropriate cable > BNC 50 Ohm termination > SDS1204X-E Oscilloscope CH2 input

Here is a close up of the 50 Ohm terminators on the scope:

 

  • SDG X series Generator > USB Cable > SDS1204X-E Oscilloscope USB control (either front or rear USB location will work. Rear as shown below)

Here is a picture after the connections are complete (NOTE the USB cable between instruments is hidden):

 

Configure and Run:

First, let’s configure the generator so that CH1 and CH2 are identical signals and they start at the same time. The SIGLENT SDG X series of generators feature a handy tracking feature that forces the settings and actions on CH1 to be mirrored on CH2.

To enable Tracking:

  1. Press Utility > CH Copy Coupling (Page 1/3)

2. Set Tracking > ON

 

 

Now, we can go back to the oscilloscope and configure the sweep parameters and run the test.

  1. On the front panel of the scope, press Utility > and arrow down until you get to page 2 > Select Bode Plot

 

This opens up the Bode Plot menu:

 

2. Press Configure to open up the generator Configure (AWG) controls and sweep parameters:

 

3. Press AWG to set the signal amplitude and set expected device load impedance. Press the back arrow to return to the Configure screen.

 

4. Press Sweep to open the Sweep menu. Here, you can set the mode, sweep start/stop frequencies and resolution:

To set the Start and Stop frequencies, press the appropriate soft key (Start or Stop).

You can change the input value by rotating the intensity knob.

Alternately, you can press the intensity knob to display the units keyboard.

Now, rotate the knob to highlight a character or unit and press the knob to enter:

 

6. Press the back arrow to return to the Configure screen.

 

7. Now, confirm the channel connections by pressing Channel:

Here, you can see we have DUT input (the direct signal from the generator) connected to Oscilloscope channel 1. The scope CH2 is connected to the DUT output (the through connection).

 

8. Back arrow twice to get to the Bode Plot screen. Now, you can set Operation = ON to run the test:

 

  • The generator outputs should be enabled and the frequency values will start to change as the generator sweeps the output
  • The oscilloscope will begin to plot the amplitude and phase vs. frequency as shown (Since we selected scope input CH2, the Phase is dark pink. Amplitude is light pink. Data from CH1 has shades of yellow. CH3 data has shades of blue. CH4 data has shades of green):

 

 

As the data is collected, there may be some range changing..

 

Finally, the sweep is complete.. we can see data from the start to the stop frequency:

 

Now, you can print a picture of the display or you can open up the list table to see each data point by pressing Data:

 

From the Data menu, you can enable the list view:

 

And scroll through each data point:

 

From here, you can use the scroll and cursors to find individual data points, quick print display images to USB, and save CSV data to USB using the Save function.

The Time Domain:

At the beginning of this note, we explained briefly that you can manually collect the amplitude and phase information.

Here are a few oscilloscope frames captured manually sweeping and measuring the direct (CH1/Yellow) and through signals (CH2/Pink):

 

1MHz:

 

20 MHz (Note amplitude and phase changes):

 

30 MHz:

 

40 MHz:

 

Finally, we see 50 MHz.. and the through signal (through the filter) is severely attenuated.

Programming Example: Retrieve data from an XE series Oscilloscope using Kotlin

Posted on: December 14th, 2020 by Doug Lovell

The SDS series of oscilloscopes all feature remote programming and data collection capabilities. They can be integrated easily into many automated test environments to ease the setup and data acquisition during testing.

One of our helpful customers developed a nice programming example designed to set up and retrieve data from a SIGLENT SDS1202X-E Oscilloscope using Kotlin, a free open source coding environment (more on Kotlin here).

The code utilizes a LAN connection and open sockets.

Thanks to Chris Welty for the code!

Here is a text file of the example:

SDSDataRetrievalKotlinExample


/**
* License: 3-Clause BSD
*
* Copyright 2018 Chris Welty
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

package scope

import java.io.BufferedWriter
import java.io.OutputStreamWriter
import java.io.Serializable
import java.net.Socket

/**
* Contains a single waveform downloaded from a Siglent 1202X-E
*/
class Waveform(val vDiv: Double, val vOffset: Double, val tDiv: Double, val tOffset: Double, val data: ByteArray) : Serializable {

val xs: DoubleArray
get() = DoubleArray(data.size, { i -> i * tDiv * 14 / data.size + tOffset – tDiv * 7 })

val ys: DoubleArray
get() = DoubleArray(data.size, { i -> data[i] * vDiv / 25 – vOffset })

companion object {
/**
* Download the waveform displayed on the scope’s screen
*/
fun download(): Waveform {
Socket(“192.168.1.222”, 5025).use { socket ->

println(“connected to ” + socket.inetAddress)
val output = BufferedWriter(OutputStreamWriter(socket.getOutputStream(), Charsets.US_ASCII))

// since the socket can return binary data, we can’t use an InputStreamReader to
// translate the bytes to characters. We’ll have to do it ourselves.
// SCPI generally uses US ASCII, shouldn’t be too hard.
val input = socket.getInputStream()

/**
* Read from the scope until \n is encountered.
* The bytes are translated to characters numerically (so US_ASCII).
*/
fun readLine(): String {
val sb = StringBuilder()
while (true) {
val c = input.read()
when (c) {
-1, ‘\n’.toInt() -> return sb.toString()
else -> sb.append(c.toChar())
}
}
}

/**
* Read a number of bytes from the scope.
*
* The bytes are not translated into characters.
*/
fun readBytes(n: Int): ByteArray {
val result = ByteArray(n)
var i = 0
while (i < n) {
i += input.read(result, i, n – i)
}
return result
}

fun writeLine(string: String) {
output.write(string)
output.write(“\n”)
output.flush()
}

/**
* Read a numerical response from the scope.
*
* The scope returns responses like “C1:VDIV 1.00E+00V”.
* This function extracts the “1.00E+00″, converts it to a double, and returns it.
*/
fun readNumber() = readLine().split(” “)[1].dropLast(1).toDouble()

writeLine(“*IDN?”)
println(readLine())

// reset the scope response format to its default so readNumber() works
writeLine(“CHDR SHORT”)

writeLine(“C1:VDIV?”)
val vDiv = readNumber()

writeLine(“C1:OFST?”)
val vOffset = readNumber()

writeLine(“TDIV?”)
val tDiv = readNumber()

writeLine(“TRDL?”)
val tOffset = readNumber()

// request all points for the waveform
writeLine(“WFSU SP,0,NP,0,F,0”)
writeLine(“C1:WF? DAT2”)

// parse waveform response
val header = String(readBytes(21))
println(“header is $header”)
val length = header.substring(13, 21).toInt()
println(“length is $length”)
val data = readBytes(length)
readBytes(2) // 2 garbage bytes at end

println(“V/div = $vDiv; offset = $vOffset; t/div = $tDiv; tOffset = $tOffset”)

return Waveform(vDiv, vOffset, tDiv, tOffset, data)
}
}
}
}

Testing Open Socket Communications Using PuTTY

Posted on: December 14th, 2020 by Doug Lovell

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 analyzer.

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.

Measuring the Modulation Index of an AM Signal using an FFT

Posted on: December 14th, 2020 by Doug Lovell

In AM schemes, the modulation index refers to the amplitude ratio of the modulating signal to the carrier signal. With the help of Fast-Fourier-Transforms (FFT), the modulation index can be obtained by measuring the sideband amplitude and the carrier amplitude. In this application note, we are going to show a convenient method of using the new Peaks/Markers function (Available on the 4 channel SIGLENT X-E scopes with firmware revisions > 6.1.31).

 

1. Basic Principle

Amplitude modulation uses a signal (typically a sine wave in the audio frequency range from 10 Hz to 20 kHz) to control the amplitude of a higher frequency signal called the carrier.

 

A carrier with amplitude modulation can be represented as

Where:

V(t)              The Amplitude Modulated Signal

Uc                Amplitude of the Carrier Signal

m                 Modulation Index

a(t)               Normalized Modulation Signal

fc                 Carrier Frequency

 

Sinusoidal (commonly referred to as a “sine” wave) modulation is the most commonly used modulation waveform type. If we are using a sine wave, the modulating signal can be expressed as

According to the formulas (1) and (2), we can get

Mathematically represents the carrier waveform.

 and represent the positive, or upper, and negative, or lower, sidebands of the modulated signal.

The amplitude of both sidebands are 

If we set the amplitude of sideband is Us,

In logarithmic case, if the difference between the sideband amplitude and the carrier amplitude is X,

Then the amplitude modulation index can be represented as

Figure  1

Here, we can see that it is easy to measure the difference between the sideband amplitude and the carrier amplitude, or X. We can then calculate the modulation index very easily.

 

2. Measurement Setup and Result

2.1 Equipment

Oscilloscope: Siglent SDS1204X-E with firmware version higher than 6.1.31.

Signal Source: Siglent SDG2122X

Cable: 50 ohm BNC

2.2 Instrument Configuration

In this section, we will show how to configure the instruments in order to make the measurement. For complete instructions on the FFT mode, please refer to the oscilloscope user manual and the quick start guide.

 

The oscilloscope is connected to the output of the signal source as shown in Figure 2.

Figure 2 Set Up for the Measurement

 

The signal source settings are as follows:

  • Mod On
  • Mod Type: AM modulation
  • Carrier frequency: 1 MHz
  • Carrier amplitude: 500 mVpp
  • Modulation frequency: 10 kHz, and the modulation index is 80%.

 

According to the output of the signal source, set the center frequency of the FFT plot to 1 MHz and set the horizontal scale to 5 kHz to provide a clear view of the output.

To reduce random errors, the FFT is set to average mode and the average number of times is 100. On the choice of window function, we choose flat-roofed window to obtain the optimized amplitude accuracy.

Starting with firmware revision 6.1.31, the FFT function of Siglent X-E oscilloscopes include a Peaks/Markers function and users can set the number of FFT points separately. The more points the FFT has, the better the frequency resolution of the plot will have. Note that increasing the number of points will increase the time of computation of the FFT, which will reduce the refresh speed accordingly. FFTs up to 1 Mpts at most are available on the X-E series, so we can set the storage depth to 1.4 Mpts. In this application, there is no need for a high sampling rate, since that will lead to a large delta frequency. Set the timebase to 2ms.

According to the input signal, we can deduce that a frame waveform has 28 k-cycles and we will use the first 20 k-cycles to do the FFT operations. For decent resolution, there should be at least five sample points in a cycle, so the minimum number of FFT points should be at least 100 kpts. 128 kpts is suitable, since under the premise of satisfying the measurement conditions, we can get the results faster.

The new version also supports Peaks/Marker, it can quickly identify and label peaks. We choose Peaks to make the measurement.

 

Figure 3 Configuration Screens

The configuration process is as follows:

First, set timebase to 2ms and enter the ACQUIRE menu, set Mem Depth to 1.4M. Second enter the MATH menu, set Operator to FFT, enter the CONFIG menu, setMaximum points to 128k, set Window to Flattop, set Display to Exclusive then go to the next page, set Mode to Average, set Times to 100. Third enter the VERTICALmenu, set Unit to dBVrms, then enter HORIZONTAL menu, set Center to 1MHz, set Hz/div to 5 kHz. Last, enter the FFT TOOLS menu and set Type to Peaks, turn on theShow Table switch to show the peaks list and turn on the Show Frequency switch to show the frequency of peaks, set Sort By to Frequency.

 

2.3 Result

After configuration is done, enter SEARCH menu, adjust Threshold to show several peaks for easy reading from the table then press Reset. After the average number increasing to 100, the FFT result as shown in Figure 4.

Figure 4 FFT Peaks Result

The carrier amplitude is -14.9dBV, the sideband amplitude is -22.8dBV. So the difference between the sideband amplitude and the carrier amplitude is -7.9dB.

According to the previous introduction, the results of the modulation index are shown in the table 1.

Table 1 Measurement Result

3. Summary

The Siglent oscilloscope with newly released Peaks/Markers software, supports peak and harmonic searching which provides a convenient method of spectrum analysis.

Power Supply Design: Load Step Response with a SIGLENT DC Electronic Load

Posted on: December 14th, 2020 by Doug Lovell

Building a power supply that can handle various loads without oscillating can be a challenge. Computational models and computer simulations can help get your design headed in the right direction, but physical testing is essential to proving the performance of your design.

One method of quickly determining stability is to use a load step response.

In this test, a DC electronic load is used to provide a current load that steps from a low current draw to a higher value in a short period of time. By directly measuring the voltage and current output of the supply with the stepped load, we can visually observe the recovery of the power supply feedback loop and make changes to the design to optimize the response.

For this note, we are going to perform identical tests on two supplies and compare the output voltage and current waveforms: One has been tuned so that the output quickly recovers with minimal overshoot and ringing. The other supply is not tuned and subsequently oscillates. We will also discuss some measurement techniques to help get the right data as quickly as possible.

We also have a video to accompany this note:

Power Supply Design: Load Step Response with a SIGLENT DC Electronic Load

The Equipment:

  • A DC Electronic Load: The SIGLENT SDL1020X-E is a 200 W load with dynamic testing capabilities to perform the load step. It also features remote sense capabilities to compensate for the voltage drop across the load leads. High currents can provide a substantial voltage drop across the leads and will add unwanted error.
  • An oscilloscope: The SIGLENT SDS2354X Plus scope has a large display, easy-to-use interface, and features that make capturing these waveforms very easy.
  • A power supply: The SIGLENT SPD1168X single output supply delivers power to our power supply board
  • A current probe: The SIGLENT CP4070 features a 150 kHz bandwidth that will minimize most switching noise from the measurement
  • Power supplies to test: The Analog Devices LTM4646 series of uModule Regulators. This module features two 10A DC-DC converters. One has been “detuned” to show some common problems associated with power supply design. The other supply has been left in it’s tuned state as a comparison to the detuned supply.

More details click here.