Useful links

Editing the Options File "Calibration Check" feature overview.

Software Downloads

Latest version of UNC_TSA.exe (15 October 2010)

Partial Index

Marstock Mode.
Parameter Table Instructions.
Remote Mode (for TSA control from other programs through text files).
Subject Response Mode.


Medoc, the manufacturer of the TSA II, offers a Visual Basic package that can be used as a model and interface to control the TSA II. The UNC version of this package is an intertwined melange of Medoc and UNC programing.

The Medoc portion controls the serial interface as well as the setup and initialization of the thermode. It has two associated files without which it cannot run: "Options.ini" and "SHOVAL.exe".

The UNC portion involves a table of parameters (Parameter Help) and its associated loading and saving functions. It also handles saving graph data files, and the actual timing of the actions called for by the parameter table when a test is performed. This portion also has an associated file named "ThermalStimulatorDFT.txt". It is not essential to the proper operation of the software, but is included for convenience.


Software Files

Medoc needed files:
Options.ini, MapTSA, SHOVAL32.EXE
Correct.bak, BLACKBOX.DAT,
For downloads check md-info0.htm.
UNC files:
UNC_TSA.exe and ThermalStimulatorDFT.txt

Starting UNC_TSA.exe

--------Options.ini File---------
Maximal Temperature=53
Control Lo .............etc.....

It is very important that the "Thermode" option should correspond to the thermode actually connected to the TSA II:
LARGE 30x30 => Thermode = 0
SMALL 16x16 => Thermode = 1
SMALL 5x5 => Thermode = 2
SMALL 2x2 => Thermode = 3
INTRA_ORAL => Thermode = 4
GSA => Thermode = 5




Parameter Table


Save Graph

Calibration Check Mode & Thermometer COM Port: See below.
This arrangement is similar to the Pathway UNC calibration check Thermometer COM Port. Click here for troubleshooting help.

Marstock Mode
The "Marstock Mode" is turned on automatically when a parameter table, with the word "marstock" as part of its name, is loaded (See: "Notes on Auto Mode Setting..." below). The mode can also be turned on and off through this "Marstock Mode" menu option. When the "Marstock Mode" is on, a text box appears at the bottom of the window ( 77KB JPEG file). For more information about the Marstock feature see the "D - “Duration” parameter special feature: negative / unspecified duration." -10 and -11 cases, in the "Description of the Parameters", and also this Marstock example.

Subject Response Mode
The subject response time is calculated from the time the ramp starts (positive or negative) to the time the subject presses on one of the TSA input buttons.
The "Subject Response Mode" is turned on automatically when a parameter table, with the word "response" as part of its name, is loaded (See: "Notes on Auto Mode Setting..." below). The mode can also be turn on and off through this "Subject Response Mode" menu option. When the "Subject Response Mode" is on, a text box appears at the bottom of the window ( 84KB JPEG file).
If the "On Upward" mode is selected the TSAII rise time is calculated from the start of the ramp command to the time the thermode reaches a temperature of 1°C less than the "destination" temperature.
The subject must respond during the time from the beginning of one rise time to the beginning of the next rise time.
If the "On Downward" mode is selected then the TSAII fall time is calculated.
In this case the subject must respond during the time from the beginning of one fall time to the beginning of the next fall time.
The subject response time is calculated from the same start time as the TSAII rise/fall time to the time the subject presses one of the switches on the TSAII input device (modified computer mouse).
In order to save the Subject Response Data go to the "File" menu item: "Save Subject Response Data (in CSV format) As". The data will be saved to a CSV file in tabular form where the columns are delimited by commas making it MS Excel ready (Sample CSV and Rich Text Files).

Options See below.

Notes on Auto Mode Setting for Calibration Check, Marstock and Subject Response:

Starting with the August 2010 version, some options are saved along with the parameter table data: any parameter file saved with older versions will not set any of these three modes correctly when using the new version. To correct this problem these parameter files should be resaved after the correct options have been set.

Description of the Parameters:

Thermal Stimulator Instructions in HTML format
Thermal Stimulator Instructions in Rich Text File format (incomplete)


The Option window shown on the right is accessible through the menu: "Tools / Options". The left half of the window, except for the "Temperature Offset", is part of the original Medoc Visual Basic software "ESP SW package". The right half and the "Temperature Offset" were added for the UNC version.
NEW August 2010
The "Trigger Source", Destination Delta" and "Program Settings" options are saved along with the parameter table data and caution should be taken that they be set correctly whenever the tables are being saved to disk.

Medoc Options:

Most options are self explanatory. The COM port refers to the port to which the TSA II is connected (not to be confused with the YSI4600 thermometer COM port).
The "Minis 10" option should probably read "Minus 10", and may refer to an option to reach temperatures below 0°C.

Temperature Offset:

The Medoc WinTSA and Covas programs have a special offset feature accessible through a special code. The range of this offset is ±1.0°C. It permits correcting for differences between thermodes. If your thermode calibration is off and Medoc changed that offset for you, then you should type the same value in the "Temperature Offset" text box of the "UNC-TSA Options" form.

UNC Options:

Trigger Source. (See Description of the Duration Parameters special feature)
The keyboard space bar is the only source normally available. The TTL input can only be used on TSA II equipped with the special Medoc TTL option.
Destination Delta. (See Description of the Delta Parameters)
The keyboard up and down arrows are the only Destination Delta activation options currently available.
Graph Data Sampling Rate.
Self explanatory.
Ramp Generation.
In an attempt to maximize the TSA ramping speed (for the Windup protocol), many software variations were experimented upon. The "Time controlled" ramps, although more stable in duration, can vary tremendously in peak values, depending on heat sinking characteristics of the subject skin, small computer timing variations and probably other variables.
Overshoot Correction.
At fast ramping speeds the TSA II was found to exhibit irregular overshoots dependent of the ramp rate. Two simple formulas were found to satisfactorily correct for this overshoot:
Type #1 "Rate / X "
Type #2 "Rate / (X + (Destination - 37°C)/10 )"
The users can select which of the two formulas most satisfies their need. The divisor "X" is normally set to "3" but can be edited to any desired value.
e.g. If the ramp rate is 6°C per second the X value is kept at 3, and the formula Type#1 is selected, then the software stops the ramp 2°C before it gets to destination thus minimizing the overshoot.
Calibration Settings.
The "Precision" and the "Offset" are only used in calibration check mode, to decide whether the thermode "Passes" or "Fails" the test.
Program Settings. (Added in August 2010)
These options are saved along with the parameter table at the end of the file (See sample parameter table file).

Calibration Check:


The system consists of calibration hardware supplied by Medoc: a YSI 4600 precision thermometer (with an RS232 serial port), a YSI 427 probe, and a thermode holder similar to the Pathway calibration jig shown in this picture: Calibration holder.
A standard RS232 serial cable to connect the YSI 4600 to the computer (straight 9 pin D male to female).

Setting the Options:

The calibration check failed / passed decision depends on the values set in the "Precision" and "Offset" text boxes of the "Calibration Settings" frame in the"Options" window accessible through the menu "Tools / Options". The "Offset" was added for more flexibility but will probably be normally set to zero.

Entering Calibration Check Mode:

The calibration mode can be set in either of two ways:
  1. Automatically if the word "calibration" is part of the parameter table name.
  2. Through the menu, by check marking "Tools / Calibration Check Mode / On".
TSA COM port selection When entering calibration mode, the software first checks whether the communication (RS232) port is operational. If it is not it opens a window to allow the user to select the appropriate port (window at right). Then the software attempts to communicate with the thermometer, by sending a "T" command to which the thermometer should respond by sending the temperature value approximately twice a second. If communication cannot be establish, the user will be warn with the following message:"The Calibration Checker is enabled. Make sure the thermometer is connected to the computer and powered on."
When in "Calibration Check" mode, the top right frame on the main window changes to display the calibration check results as the checking process progresses.

Parameter Table:

There is no special flag in the table to indicate which destination temperature is checked for accuracy: every destination is checked at the end of its duration. The durations must be long enough to allow the thermometer sensor to reach temperature. UNC uses 120 seconds for the first destination and 60 seconds for all subsequent temperatures.

Remote Control Mode:

Software Downloads:

Last VB6 version of UNC_TSA_Remote.exe (15 October 2010).
VB.NET version see: UNC TSAII - VB.NET Software Help (13 January 2012).


This feature was added for the Multiple Stimuli Project . It allows any software external to this application to control a TSA II using text files.
It has since been superseded by a VB.NET driver for the TSAII and the VB6 version is no longer supported.


VB6 version
The software can be placed into "Remote" mode either through the Menu "File/Mode (Local/Remote)/Remote File" or by sending a "Remote" command/parameter in the command line when starting the application.
Once in "Remote" mode, the Parameter Table and button panels are not visible. When the application is started from the command line with the "Remote" parameter, the window is minimized so that it does not get in the way of the calling program.
VB.NET version
No description available.

Command File:

VB6 & VB.NET versions
The command file is generated by the controlling software and must be located in the same folder as the TSAII application.
Its name must be: “TSAII_Remote_Cmd.txt”.
It must contain one of the following:
  1. - A temperature command in °C.
  2. - The word: "Off" to close the TSAII application.

Status File:

The VB6 version generates the Status file 10 times a second.
The VB.NET version generates the Status file as fast as the computer permits.
The Status file resides in the same folder as the command file.
Its name is: “TSAII_Remote_Stat.txt”.
It contains the TSA thermode tip temperature as reported by the TSA.
The absence of this file is an indication that the TSA is not online.

Remote feature test software:

Downloadable remote feature test software to be placed in the same folder as the UNC_TSA_Remote.exe application:
VB6 version: TSA_Remote_Control.exe (VB6)
VB.NET version: TSAII_Remote_Control_Test.exe(VB 2008)

Medoc TSA II and Pathway Thermal Stimulators

2005 August 23
updated 2013 October 17