Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 1 of 15
User’s Guide
Calibration Tuning Widget
Copyright © 2017 - 2019 Cummins Inc.
Date: 12September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 2 of 15
Preface
This document is a User's Manual for Calibration Tuning Widget. The purpose of the User's Manual is to
provide context information, recommended usage and code examples. The User's Manual also contains an
overview of CTW wrapper that calibration tuner can use with matlab to make the tuning process easier.
CHANGE HISTORY
Revision Date Changed by Description of Changes
Number
000 12-09-2018 Shrikant Mahapatra Created
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 3 of 15
Table of Contents
LIST OF FIGURES ...................................................................................................................................... 4
LIST OF TABLES ........................................................................................................................................ 5
1. INTRODUCTION ..................................................................................................................................... 6
1.1 PURPOSE ................................................................................................................................................. 6
1.2 DOCUMENT CONVENTIONS........................................................................................................................ 6
1.3 INTENDED AUDIENCE AND READING SUGGESTIONS .................................................................................... 6
1.4 INSTALLATION CALIBRATION TUNING W IDGET TOOLBOX ............................................................................. 8
1.5 CREAT A SIMPLE W IDGET ....................................................................................................................... 11
1.6 CONNECTING TO CALTERM ..................................................................................................................... 14
1.7 CREATING STANDALONE W IDGET APPLICATION FOR DISTRIBUTION ........................................................... 15
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 4 of 15
List of Figures
Figure 1 Toolbox Installation Window.................................................................................................... 8
Figure 2 Add-On Manager ..................................................................................................................... 8
Figure 3 Opening Calibration Tuning Widget Help ............................................................................... 9
Figure 4 Opening Calibration Tuning Widget Help ............................................................................. 10
Figure 5 Basic process of Using Calibration Tuning Widget Toolbox ................................................ 11
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 5 of 15
List of Tables
No table of figures entries found.
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 6 of 15
1. Introduction
1.1 Purpose
The document describes process of installation of the Calibration Tuning Widget Toolbox and provides basic
information that will be required to use this toolbox.
1.2 Document Conventions
Text that is meant to represent actual source code (C#, XML,m etc.) will be formatted in 8pt. Courier New font, as
follows:
<?xml version=”1.0” encoding=”UTF-8”?>
References are marked with a number in square brackets as follows and are references into Table 1 References:
CTW HTML Help [2]
1.3 Intended Audience and Reading Suggestions
This document is intended to be used by a developer who wishes to use the Calibration Tuning Widget Toolbox to
develop test scripts, GUI Widgets and distribute it to the end user.
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 7 of 15
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 8 of 15
1.4 Installation Calibration Tuning Widget Toolbox
Run the “WidgetWrapper.mltbx” file. Click on Install
Figure 1 Toolbox Installation Window
Check for the successful installation of Calibration Tuning Widget Toolbox from the ‘Add-Ons -> Manage
Add-Ons’ menu, as shown in the image below.
Figure 2 Add-On Manager
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 9 of 15
Click on ‘Open Folder’ to check the contents of the Toolbox:
• WidgetWrapper and NotifyWidgetEventData
are MATLAB classes encoded as p-code.
WidgetWrapper wraps the client interface.
• CTWClient and CTWClient.dll.config are the
client interface.
• info.xml and html files forms the CTW
Documetnation
Calibration Tuning Widget Documentation
The Calibration Tuning Widget Toolbox comes with custom documentation which is added to
the MATLAB documentation under Supplemental Software.
It can be opened from the Add-On Manager or from the Help menu button.
Figure 3 Opening Calibration Tuning Widget Help
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 10 of 15
Figure 4 Opening Calibration Tuning Widget Help
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 11 of 15
1.5 Creat a Simple Widget
Instance
• Create an Instance of WidgetWrapper Class
Creation
• Connect to CTWService using ConnectToService function
(Load CTWServicePlugin from Calterm or use CTWServiceCLI to start the
Connect to
Calterm CTWService)
• Buisiness logic for the test script or widget.
Logic • Use WidgetWrapper class functions.
• On closing of the widget or end of script call the
Disconnect WidgetWrapper's Disconnect function.
from Service
Figure 5 Basic process of Using Calibration Tuning Widget Toolbox
The Calibration Tuning Widget Toolbox contains various examples which demonstrates the
usage of most of the functions available in WidgetWrapper class. These can be helpful in
understanding the Calibration Tuning Widget Toolbox.
The examples can be found at:
userpath\MATLAB\Add-Ons\Toolboxes\Calibration Tuning Widget\code\Examples\
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 12 of 15
GUI Widgets can be created either using App Designer or GUIDE.
Open Export.mlapp in App Designer (Preferably MATLAB 2017a or higher) from
userpath\MATLAB\Add-Ons\Toolboxes\Calibration Tuning Widget\code\Examples\Export
Example
This widget can load a text file containing names of parameter and export it into MATLAB .m or
XML format
Drag and Drop
Figure 6 App Designer
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 13 of 15
Add Callbacks, function and
properties from Code Browser
block.
WidgetWrapper Object creation
and connecting to CTWService
Figure 7 Export Example in App designer
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 14 of 15
1.6 Connecting to Calterm
MATLAB Script/App
CALTERM CTWService Obj.ConnectToService()
The toolbox connects with Calterm over a client-service channel. So, the first step is to launch the
CTWService from Calterm:
1. Click on the ‘Start Tuning Service’ Toolbar button to start the service.
Date: 12 September 2018 Cummins Confidential
Title: User’s Guide Document Number:
Calibration Tuning Widget
Project: Calterm Location/File: Calibration Tuning Widget
Toolbox Guide.docx
Revision: Refer to Revision History Page 15 of 15
1.7 Creating Standalone Widget Application for Distribution
MATLAB provides Application Compiler to create standalone application (exe) which can be run on target
machine using just MATLAB Compiler Runtime (MCR). Detailed documentation can be found at:
https://in.mathworks.com/help/compiler/create-and-install-a-standalone-application-from-matlab-code.html
1. Open Application Compiler project.
2. Select the Export.mlapp. The MATLAB Compiler runtine can be either include as a web installer or an
executable depending on the option selected.
Figure 8 Creating standalone executable
3. Under the section ‘Files required for you application to run’ include WidgetWrapper.p and
NotifyWidgetEventData.p from the Calibration Tuning Widget Toolbox.
4. Click on the Package button.
Provide the user of the standalone application with CTWClient.dll and CTWClient.dll.config.
Date: 12 September 2018 Cummins Confidential