Software Manual
The device provides a shell interface over a virtual serial port over USB that can be accessed by any terminal emulator on all major operating systems. Refer to the user manual and the getting started guide to learn how to connect to the device. This manual covers how to use the shell interface of the stimulator once a connection has been established.
Interacting with the interface
Any user that has used a command prompt interface on some platform in the past will be able to quickly understand the interface provided by this device. The device prompts the user to type in a command with stim>. Once a command has been type in, the enter key can be pressed, at which point the command is processed by the stimulator. The stimulator will respond with a confirmation of the change made. It will then prompt the user for the next command with stim>, and again the user can enter another command. See below for an example interaction to set a current output.
stim> current p1 1000
Current on Phase 1 of all channels set to 1000
stim>
Like most command line interfaces, the user can use Backspace to delete characters in a command to re-enter characters.
Additionally the Up and Down keyboard keys can be used to navigate the history of commands run on the device.
After the user has type the first few letters of a command name the Tab key can be presses to autocomplete the rest of the command in the same manner as other command line interfaces on other platforms.
If no command has been entered and the Enter key is pressed the stimulator will simply re-prompt the user for another command without any adverse affect.
Help and Usage Information
Help is the only command one needs to remember, from this one command all other usage information can be derived. Simply type help followed by the Enter key. This provides a list of commands that can be used on the device.
Additionally, each command is has some usage information attached to it, that is displayed when the user makes a mistake using it. Intentionally making a mistake is a quick way to quickly refresh ones memory on how to use a command as it will bring up the usage message. For example the command current can be entered leaving out any parameters to trigger the message to appear.
stim> help
Commands: help info echo systime mem threads test run stop status boardinfo tests window current time flag adcstart adcstop adcread eeprom calibrate setdac seeadc
stim> current
Usage: current [ch1|ch2|ch3|ch4] {p1|p2} <microampere>
How to read the usage information
The usage instructions are guided by the notation outlined in the Microsoft Command-Line Syntax Key. A summary of the notation:
<some text>must be replaced by a number[some text]indicates an optional parameter{some text}set of required items. You must choose one.|separates items that can be repeated and used multiple times.
For example the usage instruction for current Usage: current [ch1|ch2|ch3|ch4] {p1|p2} <microampere> shows that the user must type in current. Next if they can choose either to type in a channel like ch1 or skip it. Next they must provide which phase they want to set either by typing p1 or p2. Finally they must give a number to indicate the amount of current that should flow.
Commands
Current
The current command is used to set the current that flows in the phases during stimulation. Each phase on each channel can be set independently.
stim> current
Usage: current [ch1|ch2|ch3|ch4] {p1|p2} <microampere>
If the user would like -1000 microampere to flow during phase 1 on channel 1 of the stimulator, they would enter the following command:
stim> current ch1 p1 -1000
If the user would like to change the current across all four channels to 1000 microampere in phase 2, they can simply omit the optional channel parameter, making the change global.
stim> current p2 1000
Time
Unlike current, time can not be changed independently for each channel. All the channels run on the same time base. The stimulation timing is defined by 4 parameters p1 (phase 1), ip (inter-phase gap), p2 (phase 2) and is (inter-stimulation delay).
stim> time
Usage: time {p1|ip|p2|is} <microseconds>
Usage: time rate <p1 time (us)> <ip time (us)> <p2 time (us)> <rate (Hz)>
The time on any of the 4 time parameters can be set to a value in microseconds. The user type in time followed by the part of the waveform they want to set a time for, followed by an integer indicating the number of microseconds. For example:
stim> time p1 500
Alternatively the user can also specify the timing parameters in terms of a rate. In this case the user sets the phase 1, inter-phase gap and phase 2 times and also provides a rate in Hz. The stimulator will then set the inter-stimulation delay to the correct value to achieve that rate. An example where 500 microsecond phase times, 20 microsecond inter-phase gap and a rate of 100Hz is set:
stim> time rate 500 20 500 100
Window
The window command is used to define the three window parameters.
stim> window
Usage: window {number|pulses|space} <number/microseconds>
number defines the number of time the window should be repeated. pulses defines the number of biphasic waveforms in a single window. space defines the amount of time in microseconds between the last biphasic in a window and the end of the window.
number and pulses can be set to infinite by providing the value -1. It is important to note that when pulses is set to infinite, the other window parameters become redundant since they will never be reached.
Example usage:
stim> window pulses 1200
Flag
The flag command can be used to turn on or off a range of features on the device.
stim> flag
Usage: flag [ch1|ch2|ch3|ch4] {short|cap|dummy|iso|power} {on|off}
Usage: flag trig {on|off}
A range of channel specific features can be set on the device: short toggles electrode shorting during the inter-stim delay, cap toggles the existence of a series cap on the output, dummy toggles the existence of a dummy load on the output, iso toggles whether the electrode is electrically disconnected during inter-phase gap and inter-stim delay, power toggles the output of the channel. Usage example:
stim> flag ch1 short on
Optionally, the channel parameter can be left out to apply the change all four channels of the stimulator.
stim> flag short on
Triggering is a global flag that cannot be set independently for each channel as all the channels run on the same time base. Example usage:
stim> flag trig on
Run
The run command puts the stimulator into a "running" state. If triggering is disabled, the stimulator will begin to stimulate immediately. Otherwise it will wait for a trigger signal on the trigger input to start the stimulation waveform.
stim> run
The run command does not work twice in a row, the stop command must be used between the uses of run to reset the stimulator.
Stop
The stop command takes the stimulator out of a "running" state, resetting its progress, waiting for another run command. It will immediately stop producing current at the channels. This also applies if the stimulator was waiting for a trigger and had never started or had finished the waveform.
stim> stop
The stop command must always be used to end a stimulation, even when the stimulation has completed, this is because the stimulator hardware would still be in a "running" state. This allows for re-triggering of the waveform by external hardware (a common use case).
Status
The status command prints out the current state of the parameters entered by the user.
stim> status
Global:
Algorithm: 0
Flags: NO_TRIGEN
Window Pulse No.: 4294967295
Window Space: 0 us
Window No.: 600000
Time P1: 500 us
Time P2: 500 us
Time IP: 20 us
Time IS: 8980 us
Channel 1:
Current P1: -1000 uA
Current P2: 1000 uA
Current DC: 0
Flags: SHORT NO_CAP NO_DUMMY ISO POWER
Channel 2:
Current P1: -1000 uA
Current P2: 1000 uA
Current DC: 0
Flags: SHORT NO_CAP NO_DUMMY ISO POWER
Channel 3:
Current P1: -1000 uA
Current P2: 1000 uA
Current DC: 0
Flags: SHORT NO_CAP NO_DUMMY ISO POWER
Channel 4:
Current P1: -1000 uA
Current P2: 1000 uA
Current DC: 0
Flags: SHORT NO_CAP NO_DUMMY ISO POWER