To generate random stimuli of different types (auditory, electrical, mechanical, thermal and/or visual) using the Richard Gracely Multiple Random Staircase (MRS) method.
Detailed Block Diagram.
EEG Room Photos
with identifiers and links
with identifiers only
2010 EEG Room Reorganization
Proposed Mobile Rack
Command Communication (Plain Text File) Code.
- The name of the file is : RGMultiStimuli.txt
- The whole file is read in its entirety and all the commands within the file are executed as they are read by the software without waiting for their completion.
- Each line can contain multiple commands, but they must be separated by semicolons (e.g. "T MAX 50 ; T MIN 20").
- Commands are not case sensitive.
Each command must start with the identification of the stimulus type to be generated:
- A - for Auditory
- E - for Electrical
- M - for Mechanical
- T - for Thermal
- V - for Visual
Followed by at least one space.
Followed by the command code:
- ON - to turn on the associated stimulator.
- OFF - to turn off the associated stimulator.
- MAX - to specify the maximum stimulus amplitude.
- MIN - to specify the minimum stimulus amplitude.
- BAS - to specify the baseline: the stimulus amplitude to which the stimulus will return after its specified duration (not use for Auditory, Electricl nor Visual stimuli; for the Auditory see: Auditory Stimulus Special Considerations).
- AMP - to set the amplitude of the stimulus or the name of the sound (wav) file for the Auditory stimulus (See: Auditory Stimulus Special Considerations).
- DUR - to set the duration of the stimulus in seconds.
- For Mechanical & Thermal stimuli, if the duration is set to zero or not specified, the stimulus stays at the same value until the next command to change it.
- For Auditory, Electrical & Visual stimuli, the actual duration may be shorter than the duration if the duration ends during the stimulus "Time Off" period,
or may be longer if the duration ends during the stimulus : "Time On", in which case it will stay on until the end of the "Time On" period.
- Ton - to set the stimulus time on in seconds; for Auditory, Electrical and Visual stimuli only.
- Toff - to set the stimulus time off in seconds; for Auditory, Electrical and Visual stimuli only.
- DEL(ay) - to specify the time between the external trigger and the stimulus onset; for Auditory, Electrical and Visual stimuli only.
- Positive values mean the delay is in seconds.
- Negative values mean the delay is in per cent of the ITI (Inter Trigger Interval).
- LOC(kout) - to specify a period following the stimulus during which the external trigger will not activate stimulation; for Auditory, Electrical and Visual stimuli only.
- TRI - to specify the source of the trigger for Auditory, Electrical and Visual stimuli only.
- STI(mulate) - to actually initiate stimulation after all necessary timings have been specified.
Followed by at least one space.
Followed by a quantity or identification, if required:
Auditory Stimulus Special Considerations
- "ON", "OFF" and "STImulate" commands: no quantity required.
- "MAX", "MIN", "BAS" and "AMP" commands: the quantity is given in the associated units.
- "DUR", "Ton", "Toff", "Delay" and "Lockout" command: the quantity must be in seconds
- "TRI" command: identifying the source of the trigger:
The trigger source returns to "Internal" after each stimulus in order to prevent multiple stimuli in case of multiple trigger signals.
- "0" - the stimulus will de delivered immediately (internal trigger).
- "1" - the stimulus will be triggered by a TTL pulse on the back panel top BNC.
- "2" - the stimulus will be triggered by a TTL pulse on the back panel center BNC.
- "3" - the stimulus will be triggered by a TTL pulse on the back panel bottom BNC.
The Auditory stimuli are delivered through pre-generated sound (wav) files (link to UNC sound generating software
page ). Their amplitude and duration are not changed by this VB interface and will be played "as is" no matter the duration command setting.
However, a scheme was developed to display the actual amplitude of the sound (the duration being controled by the "CNSD Stimulus Timing Unit"):
- The beginning of the sound file name is used as amplitude. For instance, the file name: "50-00-400-250-3000.wav" will result in a displayed amplitude equal to 50.00 % of full volume.
- The end of the sound file name can be used as duration. For instance, the file name: "50-00-400-250-3000.wav" will result in a displayed duration equal to 3.000 sec. This feature can be used for stimuli that are not
timed by means of an external trigger and are not gated through the "CNSD Stimulus Timing Unit".
The idea is to follow this scheme to name the sound files:
Basic initialization of all the categories-
Sets the maximum, minimum, baseline and the current amplitude commands.
turns on the auditory, mechanical and thermal interfaces; turns off the electrical interface:
A MAX 101 ; E MAX 20 ; M MAX 45 ; T MAX 50 ;V MAX 100
A MIN 0 ; E MIN 0 ; M MIN 0 ; T MIN 20 ; V MIN 0
A BAS 0 ; E BAS 0 ; M BAS 0 ; T BAS 32 ; V BAS 0
A AMP 0 ; E AMP 0 ; M AMP 0 ; T AMP 32 ; V AMP 0
A on ; E off ; M on; T on ; V on
Sets the electrical stimulus amplitude to 5.7 for a duration of 4 seconds,
Sets the mechanical stimulus amplitude to 32.5 for a duration of 5 seconds,
Sets the thermal stimulus amplitude to 42 for a duration of 6 seconds,
Sets the auditory stimulus to play the "wav" file: "50-00-400-250-3000.wav"
The first two numbers will be displayed as the amplitude, and the last number will be used as a duration in milliseconds, whether or not they represent the actual amplitude and duration of the sound wave.
e amp 5.7 ; e dur 4
m amp 32.5 ; m dur 5
t amp 42 ; t dur 6
a amp 50-00-400-250-3000
Multiple Stimuli Interface application program:
Text File samples (Extensions to be changed to ".txt" to affect the MultiStimuli program when running):
Sound Generator application program:
Sound File Samples:
All the files, except for the sound generator, must be in the same folder.
Stimulus Timing Unit
The Auditory, the Electrial and the Visual stimuli timings are controlled by the Stimulus Timing Unit.
The Mechanical and Thermal stimuli Timings are controlled by software: VB "millisecond" timers that depend on the system tick(see WINDOWS Timing Investigation
The "Auditory" stimuli are delivered by means of the available computer sound system.
- First, sound "wav" files must be generated ahead of time by means of a "Sound Generator" application program such as:
the UNC pakage that can be downloaded from the "Sound Experiment Help" web page.
- For convenience, the sound wave files should be named as indicated above, under the title : "Auditory Stimulus Special Considerations"
- The computer sound volume should be set (probably to its maximum) and left in the same position for the duration of the experiment.
- The sound files used during the test should be played at the same volume level, on the same computer, and analyzed by means of a sound level meter,
for calibration purpose.
TSA II Hardware particularities.
The TSA II Hardware driver is a Visual Basic 2008 (VB.NET) program based on a Medoc Visual Basic(vb6) package. This package requires a few files to be present in the same folder in order to run.
A list of these files can be found at the "Medoc TSA II & Pathway Thermal Stimulators"
The TSA II power should be on at least 20 seconds before a "Thermal" stimulator "On" command is sent to the "Multiple Stimuli Software", which causes "SHOVAL.EXE" to initialize the hardware.
This initialization normally takes approximately 10 seconds if every thing goes well, and sometime closer to 30 seconds.
Recommended steps to perform the first time the TSA is used:
Remarks about every day use of the TSA:
- Ascertain that all the Medoc files required to run the TSA are present in the main "Multiple Stimuli" package folder:
"SHOVAL32.EXE", "AAA.DRV", "Options.ini", "VATOD.DRV", "VSAATOD0.DRV", "VSAATOD1.DRV", "VSATABLE.DRV", "BLACKBOX.DAT" and "LogVAS.drv".
- Test run a Medoc package such as "WINTSA.EXE" or "Covas.exe" to make sure the TSA II is running properly.
Open the "Utility" ==> "Setup" (See picture) and check:
- That the Thermode type/size (16x16 or 30x30) is correct.
- The RS232 communication port (COM) number associated with the thermode.
- Open the TSAII initialization file "Options.ini" and check the entries for the thermode type and the COM port:
Edit the file if incorrect (make sure not to add any spaces).
If the thermode has a size of 16x16, the line should read: "Thermode=1"
If the thermode has a size of 30x30, the line should read: "Thermode=0"
Edit the "port=COM5" if the thermode is connected to a different port.
You can also change the maximum temperature to a different value if you desire.
Shortly after sending a "Thermal" "On" command to the "Multiple Stimuli" software, the Medoc "TSA initialization"
It is best to patiently wait for its completion.
When all is well, the TSA II starts its water pump with its distinctive chatter, and the initialization window automatically hides behind the main window.
When things do not go so well the software may send an alarming series of error messages which means things just did not go as expected, and a review of the steps mentioned above for the first time the TSAII is used may be necessary.
TSA II Calibration.
Sorry, but the Medoc company does not provide a hardware calibration for its TSAII.
The following software can be used to check the Mechanical and Thermal stimulation hardware, but it was designed for the Quad Stimuli system used by the "Mechanisms of Sensory Processing in Fibromyalgia" project, and will most probably not work properly for the auditory system used by the Psycho Physiology project.
Tcl package to check out the system
2008 September 24
Last updated 2009 November 6