Mini-Circuits ISC-2425-25+ User manual

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 2 of 26
1. Introduction................................................................................................................................. 1
2. Graphical User Interface.............................................................................................................. 2
2.1 GUI Layout ..........................................................................................................................................................2
2.2 Using the GUI ...................................................................................................................................................... 3
3. Source Code................................................................................................................................. 5
The source code of the GUI consists of the following files: .......................................................................................5
3.1 Core Concepts.....................................................................................................................................................5
3.1.1 Slots and signals .............................................................................................................................................. 5
3.1.2 MainWindow class...........................................................................................................................................5
3.1.3 QDebug............................................................................................................................................................ 6
3.2 Constructor ......................................................................................................................................................... 6
3.2.1 Preparing the serial port ................................................................................................................................. 6
3.2.1.1 Error handling ..............................................................................................................................................7
3.2.1.2 Setting the port name .................................................................................................................................. 7
3.2.2 Setting up port polling ..................................................................................................................................... 8
3.2.2.1 Updating the port list...................................................................................................................................9
3.2.3 UI start-up state.............................................................................................................................................10
3.3 Button management – Serial Connections .......................................................................................................11
3.3.1 Ports comboBox ............................................................................................................................................ 11
3.3.2 Connect .........................................................................................................................................................11
3.3.3 Disconnect ..................................................................................................................................................... 12
3.3.4 Auto-Detect & Connect .................................................................................................................................12
3.4 Button management – Command Buttons .......................................................................................................13
3.4.1 WriteRead...................................................................................................................................................... 14
3.4.2 WriteRead_OK ...............................................................................................................................................16
3.4.3 Printing communications to the log ..............................................................................................................16
3.5 Sweeping...........................................................................................................................................................17
3.5.1 Executing a sweep and parsing the data.......................................................................................................18
3.5.2 Drawing a plot from the sweep data.............................................................................................................20
3.5.3 Plot notation buttons ....................................................................................................................................21
3.6 About button .................................................................................................................................................... 22
Table of Contents

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 3 of 26
1. Introduction
The Quick Start Companion application is a simple graphical user interface (GUI) application that can be used side-by-
side with the Quick Start Guide. More specifically, it’s best used alongside the latter half of the guide, which focuses on the
command line interface.
This document serves to provide additional information about the codebase of the Quick Start Companion application
offered as an example for software integration of the ISC-2425-25+ small signal generator.
The Quick Start Companion application has been created using the Qt framework for C++. It is
recommended to interact with the source code using the Qt Creator application.
Qt is available for download here: https://www.qt.io/download

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 4 of 26
2.1 GUI Layout
The GUI can be divided up into 4 sections
①Top bar
Contains information for establishing a connection with the ISC board. It also contains the ‘about’ button.
②Command buttons section
Contains buttons and lineEdits for sending commands to the ISC board.
③ Sweep section
Contains buttons and lineEdits for executing a sweep with the ISC board. Also contains a plot area to displaythe results of
the sweep, and two additional buttons to switch between two ways to plot the data.
④Communications log
Displays all the inbound and outbound communication between the GUI and the ISC board.
2. The Graphical User Interface
Explanation of the GUI

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 5 of 26
2.2 Using the GUI
At startup of the GUI, only the top bar is enabled, everything else disabled and greyed out. The user isrequired to establish
communication with an ISC board before continuing.
There are two ways to go about this:
Manual
1. Find the serial port of your ISC board (for example via the device manager) and manually select thename of its
port from the Ports comboBox.
2. Press the ‘Connect’ button to try opening the connection.
Automatic
Simply press the ‘Auto-Detect & Connect’ button in the top left corner. The GUI will connect to the firstISC board it
detects. If no ISC board is detected the GUI will display a pop-up message and exit.
After connecting successfully to an ISC, the rest of the GUI becomes available.
The command buttons are laid out in an order meant to intuitively align with the instructions of the QuickStart Guide.
The following buttons are present:

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 6 of 26
Button
Command String
Comment
Get Identity $IDN,0
Get Version $VER,0
Get Status $ST,0
Get Status (verbose) $ST,0,1 The extra argument tells the ISC board to return a verboselist of
the errors instead of an error code.
Clear Errors
$ERRC,0
Get Frequency $FCG,0
Set Frequency $FCS,0,? Fills ? with value(s) from the adjacent lineEdit(s).
Get PA Power
(measurement) $PPG,0
Get Power (setpoint) $PWRG,0 Fills ? with value(s) from the adjacent lineEdit(s).
Set Power $PWRS,0,? Fills ? with value(s) from the adjacent lineEdit(s).
Configure DLL $DLES,0,?,?,?,?,?,?
DLL Enable $DLES,0,1
DLL Disable $DLES,0,0
RF Enable $ECS,0,1
RF Disable $ECS,0,0
Sweep (dBm) $SWPD,0,?,?,?,?,0 Fills ? with value(s) from the adjacent lineEdit(s).
When a button is pressed, the associated command string is sent to the ISC board, after which it returns areply.
Every command that is sent and received is displayed in the communications log on the left side of the GUI.
Outbound communication (to the ISC) is marked with a ‘>’ symbol
Inbound communication (from the ISC) is marked with a ‘<’ symbol
It’s the user’s responsibility to interpret the messages that go back and forth, according to availableinformation
from the Quick Start Guide and Command Language Manual.
Notably the Sweep command has some additional handing. The results of the ISC’s reply are parsed andvisualized in a
graph/plot at the bottom of the GUI.
The two buttons right of the plotting area which read‘Reflection graph (Linear)’ and‘S11 graph (Logarithmic)’will redraw the
data of the plot in linear (%) or logarithmic (dB) notation respectively.

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 7 of 26
File Description
QSComp.pro Project file which is opened with Qt creator.
main.cpp Main file which starts the GUI.
mainwindow.h Header of the GUI code.
mainwindow.cpp Implementation of the GUI code.
mainwindow.ui File generated with the UI designer that describes the layout of the UI.
qcustomplot.h Header of plotting library used for sweep.
qcustomplot.cpp Implementation of plotting library used for sweep.
about.qrc A Qt resource file.
about.txt Text file with contents for the 'about' button.
Among these files, the only ones of real interest are mainwindow.cpp and its header file mainwindow.h, as they contain
all the interactions between the GUI and the ISC board.
3.1 Core Concepts
The following are a few core concepts the reader should keep in mind while looking at the code.
3.1.1 Slots and signals
The Qt framework has a mechanism called signals and slots, which allows different objects to communicate with one
another. One object ‘emits’ a signal, and another object reacts to it via a slot function. This is relationship is typically set
up through the ‘connect’ function.
Qt Signals & Slots documentation: https://doc.qt.io/qt-5/signalsandslots.html
3.1.2 MainWindow class
The GUI is contained within mainwindow.cpp and mainwindow.h and mainwindow.ui.
mainwindow.ui is simply a file that describes layout of the GUI form and contains things like the names of UI elements.
All the interactions, both UI and background stuff, are handled by the MainWindow class of mainwindow.h and -cpp.
Notably UI elements (e.g., buttons) also emit signals which are connected to the respective slot functions, though for
these UI elements Qt auto-generates files at compilation which describe those particularconnections.
3. Source Code
The source code of the GUI consists of the following files:

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 8 of 26
3.1.3 QDebug
Several lines can be found throughout the code that reference the QDebug class of Qt
These lines simply output text and/or values to the console/terminal during runtime. They are only there forthe
convenience of the developer, and can otherwise be ignored entirely.
3.2 Constructor
The constructor is executed upon the instantiation of the MainWindow class at startup. It sets everythingup for use in
the rest of the program.
3.2.1 Preparing the serial port
To establish communication between the software and ISC board, the QSerialPort class is used from theQt framework.
Qt QSerialPort documentation: https://doc.qt.io/qt-5/qserialport.html
The object pointer of the QSerialPort ‘SG_port’ for the signal generator is declared in mainwindow.h:
This involves:
Setting up error handling (line 24)
Setting up the serial parameters (baudrate, databits, etc.) (line 27-31)
Setting up the port name. (line 34-35)

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 9 of 26
3.2.1.1 Error handling
The Qt framework has a mechanism called signals and slots, which allows different objects to communicatewith one
another. In this case it is used for the error-handling of the serial port.
Here the ‘errorOccurred’ signal of the QSerialPort ‘SG_port’ is connected to the slot function ‘serialport_
error_handler’ of ‘this’ instance of the MainWindow class.
The error handler function looks like this:
If the error type of the serial port is ‘NoError’ or ‘TimeoutError’, it is ignored and the error handler function exits early.
NoError means everything is all good, and the TimeoutError can occasionally be a false alarm raised by function like
Sweep, which simply requires a bit of time to respond.
All other errors spawn a pop-up message with the error and close the serial port. This is done by re-using the
‘on_pushButton_disconnect_clicked’ slot function which would normally be called when pressing the disconnect button
in the GUI.
3.2.1.2 Setting the port name
Setting the default port name is a two-part action.
First a list of ports is generated by the ‘update_port_list’ function. This fills the ports comboBox in the GUI with viable
port names. This is covered in detail in chapter 3.2.2.1 – Updating the port list .
Then, as a default value, the first item in the comboBox is set as the (placeholder) port name parameter for the serial
port, so that it has something to work with from the get-go. This part re-uses the on_comboBox_ ports_activated slot
function, which is called whenever the user chooses an item in the comboBox. This is covered in a bit more detail in
chapter 3.3.1 - Ports comboBox.

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 10 of 26
3.2.2 Setting up port polling
The next part of the constructor sets up the port polling of the GUI.
The name of a serial port is something that is flexible. For example, if two signal generators are plugged into the same
computer, each will have a different name/number, and the user should be able to connect to the particular one they
need.
To account for devices appearing and disappearing, the list of available ports is kept up to date continuously using a timer
(QTimer object).
Qt QTimer documentation: https://doc.qt.io/qt-5/qtimer.html
The timer ‘port_poll_timer’ has its timeout signal connected to the update_port_list slot function.
Afterwards, the timer is started with the value POLL_TIMER provided as the argument.
‘POLL_TIMER’ is defined near the top of mainwindow.cpp as 1000. So, the timer operates at intervals of 1000ms, or 1
second. Every time it expires, the timeout() signal is emitted, which triggers the update_port_list slot function.

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 11 of 26
3.2.2.1 Updating the port list
This is the update_port_list slot function:
This function collects a list of available port information ‘port_info’ and compares it against the previous set of port
information stored in ‘port_info_old’. If a difference is detected in the number of ports or the names of the ports, the
boolean ‘ports_changed’ is set to true.
If ‘ports_changed’ is true, the contents of the ports comboBox in the UI is updated (cleared and repopulated) with the new
list of names from port_info.
This approach lets the list stay up to date as needed, but avoids interrupting the user experience by constantly resetting
the contents of the comboBox while the user is interacting with it.

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 12 of 26
3.2.3 UI start-up state
The last part of the constructor configures the (visible) state of the GUI at startup.
The tab length of the communications log is set to 20 pixels width, purely for aesthetic reasons.More
importantly, various parts of the GUI are enabled or disabled.
At start-up, the connection to the signal generator is not yet opened, so the connection buttons are enabled(and the
disconnect button is disabled) using the show_connection_buttons function:

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 13 of 26
And all the buttons for sending commands (and pretty much every other part of the UI) are disabled using the
show_main_buttons function, which disables all the UI elements residing within a container in the UI called ‘frame’:
This results in a start-up state of the GUI that looks like this:

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 14 of 26
3.3 Button management – Serial Connections
The top of the GUI contains 4 UI elements related to serial connections:
Ports comboBox
Connect button
Disconnect button
Auto-Detect & Connect button
3.3.1 Ports comboBox
Whenever the user chooses an item in the comboBox, this function reconfigures the port name parame-ter of
QSerialPort ‘SG_port’.
3.3.2 Connect
When the connect button is pressed, the GUI attempts to open the configured serial port.
If the port is opened successfully, the state of the GUI is updated. The connection buttons are disabled(disconnect is
enabled), and all the other elements of the UI are enabled for the user to interact with.

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 15 of 26
The resulting state of the GUI looks like this:
3.3.3 Disconnect
When the disconnect button is pressed, the serial port connection is closed, and the UI is reverted to thesame state as
at start-up.

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 16 of 26
3.3.4 Auto-Detect & Connect
The auto-detect button automatically recognizes and connects to a signal generator board.
First the selection of the ports comboBox is updated with a value returned from the function ‘autodetect_SG_port’.
Then the ‘on_pushButton_connect_clicked’ function is reused to connect to the port.
The selection of the ports occurs using the ‘autodetect_SG_port’ function:

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 17 of 26
Similarly, to the update_port_list function, this function also collects a list of ports. However, the differenceis that this
one filters the contents.
An ISC signal generator board can be detected by looking at its ‘vendor identifier’ and ‘product identifier’.For this board
model, the values of these identifiers are 8137 and 131 respectively.
These ID’s can be retrieved from the properties menu of the device, in the device manager:
If no board is detected and the ‘infolist’ comes up empty after going through all the available ports, the GUIpops an error
message that no board was detected and promptly exits.
Remark: This is done to keep things simple. Were an empty list to be returned instead, it would result inout-of-scope
list references in other parts of the code and the software would crash.
Assuming a viable signal generator port was found, infolist is returned, and the first entry in the list is usedto update the
comboBox selection and port name of the SG_port.
3.4 Button management – Command Buttons
Each button in the GUI has a slot function which is triggered by the respective ‘clicked’ signal. When thebutton is
clicked a command string is sent to the ISC board through the serial port interface.
For example when the ‘Get Frequency’ button is pressed, the string “$FCG,0” is sent.
Some commands require additional input from the user. For example, the ‘Set Frequency’ command takesa numeric
input for the desired frequency value.

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 18 of 26
When the ‘Set Frequency’ button is pressed, the string “$FCS,0,” is concatenated with the contents of thelineEdit
‘lineEdit_frequency” and is sent to the ISC board. E.g., $FCS,0,2450.
Most commands reply with only one line. For example:
> $IDN,0
< $IDN,1,Mini-Circuits,ISC-2425-25+,MN0003402112
> $PWRG,0
< $PWRG,1,10.000000
> $ECS,0,1
< $ECS,1,OK
However, a small handful of commands return more than a single line. For example, the verbose version ofthe ‘Status
Get’ command:
> $ST,0,1
< $ST,1,RESET_DETECTED
< $ST,1,EXTERNAL_SHUTDOWN_DETECTED
< $ST,1,OK
To handle these two different types of responses, there are two separate functions for sending commandsand receiving
responses:
writeRead
writeRead_OK
3.4.1 writeRead
The ‘writeRead’ function is used for commands with single-line responses.Here’s a
breakdown down of the function:
1. It takes the command string for the signal generator as an argument, checks whether the SG_port is stillopen at all
before continuing, and then prepares a QString ‘rx’ in which to store a response to the command.

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 19 of 26
2. It attempts to write the command string to the ISC through the serial port interface, and waits up to 250ms for an
indication that the transmission has begun. If the transmission has begun, the outbound message is also printed in the
communications log.
Notably a ‘carriage return’ (\r) and ‘line feed’ (\n) are appended to the command string when writing it out. These are
treated as an end of message indicator by the ISC board. Without them the board would wait indefinitely for additional
inputs and not respond.
3. In a while loop, the function awaits a response by the ISC that contains “\r\n”, indicating the end of the response. The
function waits for up to 500ms at a time until SG_port indicates with a ‘readyRead’ signal that there is something to be
read from the read buffer of SG_port. When the SG_port is ready to be read (or if the timer expires), the contents of the
read buffer are appended to the QString ‘rx’. ‘rx’ is then parsed for a possible error, indicated by an “ERR” string. The
open state of SG_port is also checked to make sure the serial port is still working while it is stuck in the while loop. If it
turns out there’s an error response from the SG or the serial port has closed for some reason, the while loop is broken
prematurely, otherwise it keeps looping till a “\r\n” is detected in the contents of rx.
4. After breaking out of the while loop, the response string is printed in the communications log, and ‘rx’ is returned to
the function which called writeRead, allowing further interaction with the response string if necessary.

AN-50-008 Rev: OR DCO-000822 (03/07/22) File: AN-50-008.docx
This document and its contents are the property of Mini-Circuits. Page 20 of 26
3.4.2 writeRead_OK
The writeReady_OK function is used for commands with multi-line responses. Commands with multi-line responses
return several lines in one go, each ending with “\r\n” and finally finish up with an “OK\r\n”.
The function ‘writeRead_OK’ behaves largely identical to ‘writeRead’. The only noteworthy difference is in the loop that
waits for a complete response from the ISC board. In this case the function waits until the response string rx contains the
string “OK\r\n”, indicating the multi-line response has been completed.
3.4.3 Printing communications to the log
The GUI logs all the communication to and from the ISC board.
This occurs in the writeRead commands on the lines that call the print_message function.
print_message(direction::outbound, tx);
print_message(direction::inbound, rx);
The print_message function simply appends to the tx and rx lines to the contents of the text editor on theleft side of
the GUI.
It takes a direction argument (dir), and a string argument (text).
If the direction of the message is inbound from the ISC board, “<\t” is inserted before the string, as well asafter the
“\r\n” of each line of the response (if there are multiple), except the last.
Other manuals for ISC-2425-25+
1
Table of contents
Other Mini-Circuits Portable Generator manuals
Popular Portable Generator manuals by other brands

Briggs & Stratton
Briggs & Stratton PowerBoss 30220 Operator's manual

Briggs & Stratton
Briggs & Stratton Elite 030210-2 Operator's manual

Tesla
Tesla TI3500 GPU-24 user manual

SIGLENT
SIGLENT SDG1000X Series Service manual

NURZVIY
NURZVIY DISCOVER 2000 user manual

Probuilder
Probuilder 62761 instruction manual

Global Test Supply
Global Test Supply SFG-205 user manual

Z.I.P.P.ER MASCHINEN
Z.I.P.P.ER MASCHINEN ZI-STE2800IV user manual

Westinghouse
Westinghouse iGen2800c quick start guide

CARLO GAVAZZI
CARLO GAVAZZI SD2DUG24 Software manual

Mase
Mase IS 9.6 B Use, maintenance and installation manual

Pulsar
Pulsar PG10000BRCO Operator's manual