<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.bci2000.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Abelsten</id>
	<title>BCI2000 Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.bci2000.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Abelsten"/>
	<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php/Special:Contributions/Abelsten"/>
	<updated>2026-06-10T03:30:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9060</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9060"/>
		<updated>2021-07-23T20:46:43Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationConfigurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96.]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21 - R6337 - Initial private release for internal testing.&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6340&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage, which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps, and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=400px heights=400px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, suppose you wish to stimulate between two different electrodes within the brain. In that case, you can make two configurations that have the same pulse shape parameters but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, but if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase duration of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter defines when electrodes are stimulated, with what configuration they are stimulated with, and what electrodes are stimulated. The &#039;&#039;Expression&#039;&#039; row defines when electrodes are stimulated by specifying a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true, the electrodes will be stimulated with the pulse shape defined in the &#039;&#039;Configuration ID&#039;&#039; row. Note that two columns can have the same &#039;&#039;Expression&#039;&#039;, which allows for concurrent stimulation between different electrode locations. The &#039;&#039;Configuration ID&#039;&#039; defines the applied pulse shape and corresponds to the column number in the &#039;&#039;StimulationConfiguration&#039;&#039; parameter. Lastly, the &#039;&#039;Electrode(s)&#039;&#039; row specifies which electrodes will be stimulation. Elements in this row can be single values that specify a single electrode, or an embedded list in which you can specify multiple electrodes (from 1-96). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only stimulate up to &#039;&#039;&#039;15&#039;&#039;&#039; electrodes concurrently. Concurrent stimulation groups, as defined by their equivalent &#039;&#039;Expression&#039;&#039; expression, must also have disjoint electrode lists.&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto-populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:cerestim_stimulation_latency.png|400px|thumb|right|upright=2.5|Figure 4: Latency of stimulation is about 17.3ms on average.]]&lt;br /&gt;
Figure 4 shows the latency of stimulation over 220 trials. Stimulation pulses were acquired using a gUSBamp at 38.4kHz and a block size of 50ms. &lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9059</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9059"/>
		<updated>2021-07-23T20:37:34Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* Versioning */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96.]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21 - R6337 - Initial private release for internal testing.&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6340&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage, which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps, and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, suppose you wish to stimulate between two different electrodes within the brain. In that case, you can make two configurations that have the same pulse shape parameters but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, but if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase duration of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter defines when electrodes are stimulated, with what configuration they are stimulated with, and what electrodes are stimulated. The &#039;&#039;Expression&#039;&#039; row defines when electrodes are stimulated by specifying a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true, the electrodes will be stimulated with the pulse shape defined in the &#039;&#039;Configuration ID&#039;&#039; row. Note that two columns can have the same &#039;&#039;Expression&#039;&#039;, which allows for concurrent stimulation between different electrode locations. The &#039;&#039;Configuration ID&#039;&#039; defines the applied pulse shape and corresponds to the column number in the &#039;&#039;StimulationConfiguration&#039;&#039; parameter. Lastly, the &#039;&#039;Electrode(s)&#039;&#039; row specifies which electrodes will be stimulation. Elements in this row can be single values that specify a single electrode, or an embedded list in which you can specify multiple electrodes (from 1-96). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only stimulate up to &#039;&#039;&#039;15&#039;&#039;&#039; electrodes concurrently. Concurrent stimulation groups, as defined by their equivalent &#039;&#039;Expression&#039;&#039; expression, must also have disjoint electrode lists.&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto-populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:cerestim_stimulation_latency.png|400px|thumb|right|upright=2.5|Figure 4: Latency of stimulation is about 17.3ms on average.]]&lt;br /&gt;
Figure 4 shows the latency of stimulation over 220 trials. Stimulation pulses were acquired using a gUSBamp at 38.4kHz and a block size of 50ms. &lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9058</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9058"/>
		<updated>2021-07-23T20:37:09Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21 - R6337 - Initial private release for internal testing.&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6340&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage, which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps, and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, suppose you wish to stimulate between two different electrodes within the brain. In that case, you can make two configurations that have the same pulse shape parameters but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, but if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase duration of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter defines when electrodes are stimulated, with what configuration they are stimulated with, and what electrodes are stimulated. The &#039;&#039;Expression&#039;&#039; row defines when electrodes are stimulated by specifying a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true, the electrodes will be stimulated with the pulse shape defined in the &#039;&#039;Configuration ID&#039;&#039; row. Note that two columns can have the same &#039;&#039;Expression&#039;&#039;, which allows for concurrent stimulation between different electrode locations. The &#039;&#039;Configuration ID&#039;&#039; defines the applied pulse shape and corresponds to the column number in the &#039;&#039;StimulationConfiguration&#039;&#039; parameter. Lastly, the &#039;&#039;Electrode(s)&#039;&#039; row specifies which electrodes will be stimulation. Elements in this row can be single values that specify a single electrode, or an embedded list in which you can specify multiple electrodes (from 1-96). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only stimulate up to &#039;&#039;&#039;15&#039;&#039;&#039; electrodes concurrently. Concurrent stimulation groups, as defined by their equivalent &#039;&#039;Expression&#039;&#039; expression, must also have disjoint electrode lists.&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto-populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:cerestim_stimulation_latency.png|400px|thumb|right|upright=2.5|Figure 4: Latency of stimulation is about 17.3ms on average.]]&lt;br /&gt;
Figure 4 shows the latency of stimulation over 220 trials. Stimulation pulses were acquired using a gUSBamp at 38.4kHz and a block size of 50ms. &lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim_stimulation_latency.png&amp;diff=9057</id>
		<title>File:Cerestim stimulation latency.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim_stimulation_latency.png&amp;diff=9057"/>
		<updated>2021-07-23T20:33:26Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9055</id>
		<title>Contributions:CortecADC</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9055"/>
		<updated>2021-07-22T16:58:40Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* Known Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[[File:CorTec_BrainInterchange.png|400px|thumb|right|CorTec Brain Interchange Implant]]&lt;br /&gt;
CortecADC is a source module that allows for inter-cranial recording and stimulating over 32 channels via a fully implantable device. It is intended for long-term measurement of neural activity and electrical stimulation of brain tissue. See the [https://www.cortec-neuro.com/solutions/complete-system/ CorTec site] for more information.&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
* Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
* Markus Adamek (adamek@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 11/29/2018 - R5829 - Initial untested version (Adamek)&lt;br /&gt;
* 04/19/2021 - R6271 - First working version (Belsten)&lt;br /&gt;
* 07/22/2021 - R6339 - Changed &#039;&#039;ImplantLostSample&#039;&#039; from a BCI2000 state to a stream, so it can record individual sample loss (instead of over the whole block). This change is untested. (Belsten)&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6266&lt;br /&gt;
*Tested under: 6271&lt;br /&gt;
*Known to compile under: 6271&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Lost samples - The &amp;lt;code&amp;gt;ImplantLostSamples&amp;lt;/code&amp;gt; state records what samples are lost, and their locations. Lost samples are replaced with the previous valid sample for all channels. In offline analysis, be sure to remove these samples and replace them with interpolates. &lt;br /&gt;
* After streaming from the device for a longer period of time, reconnection can be difficult. This issue has been replicated with the CorTec GUI, and seems to be a device hardware/firmware issue.&lt;br /&gt;
* Stimulation functionality with both the CorTec GUI and BCI2000 has not been reliable. It is presumed that this is a hardware/connection issue since both software returns the same errors.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The total number of digitized and stored channels. In the current implementation, this parameter cannot be edited, and will default to how many channels are available from the implant. &lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Samples per channel per digitized block. &lt;br /&gt;
Together with the sampling rate, this parameter determines how often per second data are collected, processed, and feedback is updated. For example, at 1000 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) will be updated 50 times per second.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The sample rate of the system. This parameter cannot be edited, and will default to the sampling rate available from the implant. &lt;br /&gt;
In case you are experiencing problems by higher sampling rates (e.g., data loss, jerky display, etc.), increase the SampleBlockSize so that you are updating the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications), and increase Visualize-&amp;gt;VisualizeSourceDecimation. This parameter will decrease the number of samples per second that are actually drawn in the Source display.&lt;br /&gt;
&lt;br /&gt;
===SourceChOffset===&lt;br /&gt;
Offset for each channel.&lt;br /&gt;
&lt;br /&gt;
===SourceChGain===&lt;br /&gt;
Gain for each channel. &lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
Names of each channel.&lt;br /&gt;
&lt;br /&gt;
===ReferenceCh===&lt;br /&gt;
This list defines what channels will be used as reference. This list is uploaded to the device and set in hardware, effecting the raw bio-signal data that is recorded by BCI2000. If you do not want to effect the raw bio-signal data that is recorded, you can use the [https://www.bci2000.org/mediawiki/index.php/User_Reference:SpatialFilter spatial filter]. If this parameter is set to auto, no reference channels are used.&lt;br /&gt;
&lt;br /&gt;
==Stimulation Parameters==&lt;br /&gt;
These parameters can be found in the &amp;quot;Stimulation&amp;quot; tab of the BCI2000 config window. &lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:CortecADC_stimulation_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationpulses_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationtriggers_parm.PNG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EnableStimulation===&lt;br /&gt;
This parameter enables/disables stimulation. &lt;br /&gt;
&lt;br /&gt;
===StimulationPulses===&lt;br /&gt;
This parameter defines the shape of the charge balanced stimulation pulses, as described in Fig 1. The pulses are defined in one column of this parameter matrix, and it is possible to define an arbitrary number of pulses, each of which are associated with a user defined integer called a &#039;&#039;PulseID&#039;&#039;.  The rows are labeled and there are some limitations to the magnitudes and durations which are elaborated on in the subsequent section. &lt;br /&gt;
[[File:CortecADC_pulse_def.png|600px|thumb|center|upright=2.5|Figure 1. Pulse definition]]&lt;br /&gt;
====PulseID====&lt;br /&gt;
This must be an integer greater than or equal to zero. This ID will be used in the &#039;&#039;StimulationTriggers&#039;&#039; parameter. &lt;br /&gt;
&lt;br /&gt;
====Pulse Amplitude====&lt;br /&gt;
The pulse amplitude defines the amplitude of the main pulse in units of µA. The counter pulse will have a negative amplitude that is one-quarter of the magnitude of the main pulse. &lt;br /&gt;
&lt;br /&gt;
The valid values of this parameter are in the range 0 to 6120 µA. The granularity changes for smaller amplitudes as follows:&lt;br /&gt;
* amplitude &amp;lt;=  3060 µA: step size of 12&lt;br /&gt;
* amplitude &amp;gt;  3060 µA: step size of 24&lt;br /&gt;
This leads to a set of acceptable values that looks like: [0, 12, ..., 3048, 3060, 3084, ... 6096, 6120]&lt;br /&gt;
You can define this parameter not to be one of the acceptable values in this range, but it will be rounded to the nearest valid value, and other parameters will be varied to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Pulse Duration====&lt;br /&gt;
The pulse duration defines the duration of the main pulse in µs. The counter pulse will have a duration that is four times longer than the main pulse duration. Pulse duration values are set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. Again, if the provided value is not a multiple of 10, it will be rounded to the nearest valid value, and other parameters will be modified to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Dead Zone 0====&lt;br /&gt;
Holds the duration of the pause between main and counter pulse in µs. Values can be set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. The same duration dead zone will also occur after the counter pulse.&lt;br /&gt;
&lt;br /&gt;
====Dead Zone 1====&lt;br /&gt;
Holds the duration of the pause after the pulse was delivered. Values can be set in steps of 80 µs. The acceptable range goes from 10 to 20400 µs. Note that the steps are starting from 0 while the minimum value is 10 µs. This leads to a set of acceptable values that looks like: [10, 80, 160, 240, ... , 20400] µs.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
This parameter defines when stimulation is applied, what pulse is used, how many pulses are applied, and the source and destination locations of the stimulation. These parameters are defined in the rows of this matrix with labels&lt;br /&gt;
====Trigger====&lt;br /&gt;
This must be a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true during the run, the stimulation is applied. &lt;br /&gt;
====PulseID====&lt;br /&gt;
The second row should contain a valid PulseID that is to be used. &lt;br /&gt;
====Source Ch====&lt;br /&gt;
The third row is an embedded list that defines the source electrodes. &lt;br /&gt;
====Destination Ch====&lt;br /&gt;
The fourth row is also an embedded list that defines the destination electrodes. &lt;br /&gt;
====Repetitions====&lt;br /&gt;
The fifth row defines how many times that pulse is repeated. The max is 255.&lt;br /&gt;
&lt;br /&gt;
==Device Parameters==&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information returned from the device, such as device type, device ID, and the firmware version. &lt;br /&gt;
&lt;br /&gt;
===StateInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information regarding state units and their multiplier. The device provides information such as humidity, temperature, control value, etc., which are recorded in BCI2000 states (see state information on this page for a complete enumeration of states). The device provides these values with floats, but BCI2000 states can only be integers. The multipliers defined in this parameter are used to increase the amount of precision in the state values. To approximately recover the original float values with the units defined in this parameter, divide each state by its corresponding multiplier.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
The states encode auxiliary information returned from the Cortec implant. The device provides this data in floating point numbers, however BCI2000 can only record integers to it&#039;s states. To maintain some precision, these floats are multiplied by constants, then recorded to the states as integers. To approximately recover the original data, divide the state by its corresponding constant. Constants are shown in the following table. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:right;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;font-weight:bold;&amp;quot;&lt;br /&gt;
! State&lt;br /&gt;
! style=&amp;quot;text-align:center;&amp;quot; | Constant&lt;br /&gt;
|-&lt;br /&gt;
| ImplantVoltage&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantHumidity&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantControlValue&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantPrimaryCoilCurrent&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantTemperature&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|}&lt;br /&gt;
===ImplantLostSample===&lt;br /&gt;
The communication protocol the device uses does not re-send lost data. This state annotates what samples were lost in the bio-signal data. Currently, lost samples are made up by duplicating the previous sample. &lt;br /&gt;
&lt;br /&gt;
===ImplantVoltage===&lt;br /&gt;
16 bit state that changes when new supply voltage value is received from the implant. After dividing the integer state value by the the voltage multiplier defined in the StateInfo parameter, the units are in volts.&lt;br /&gt;
&lt;br /&gt;
===ImplantHumidity===&lt;br /&gt;
16 bit state that changes when new humidity value is received from the implant. Units in %rh. &lt;br /&gt;
&lt;br /&gt;
===ImplantControlValue===&lt;br /&gt;
16 bit state that changes when new current control value is received from the external unit. The power of the implant is controlled by the external unit. The control value provides a measure of how good the coupling between the two coils is and how much more power can be provided if necessary.&lt;br /&gt;
The value is between 0.0 and 100.0 percent, where 0.0 translates to no power and 100.0 translates to maximum power applied.&lt;br /&gt;
&lt;br /&gt;
===ImplantPrimaryCoilCurrent===&lt;br /&gt;
16 bit state that change when new primary coil current value is received from the external unit. The primary coil refers to the coil inside the head piece of the external unit. Units are mA. &lt;br /&gt;
&lt;br /&gt;
===ImplantTemperature===&lt;br /&gt;
16 bit state that changes when new temperature value is received from the implant. Units are degrees Celsius. &lt;br /&gt;
&lt;br /&gt;
===ImplantStimulation===&lt;br /&gt;
Binary state that changes when the device reports that it is stimulating. &lt;br /&gt;
&lt;br /&gt;
===RequestedStimulation===&lt;br /&gt;
Binary state that records when a stimulation trigger expression evaluates true. State remains true for the duration triggered stimulation. This is useful for determining the latency between when stimulation is requested and when it is actually applied. This is done by computing the difference in time between the rising edges of &#039;&#039;ImplantStimulation&#039;&#039; and &#039;&#039;RequestedStimulation&#039;&#039; states.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9054</id>
		<title>Contributions:CortecADC</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9054"/>
		<updated>2021-07-22T16:55:49Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[[File:CorTec_BrainInterchange.png|400px|thumb|right|CorTec Brain Interchange Implant]]&lt;br /&gt;
CortecADC is a source module that allows for inter-cranial recording and stimulating over 32 channels via a fully implantable device. It is intended for long-term measurement of neural activity and electrical stimulation of brain tissue. See the [https://www.cortec-neuro.com/solutions/complete-system/ CorTec site] for more information.&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
* Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
* Markus Adamek (adamek@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 11/29/2018 - R5829 - Initial untested version (Adamek)&lt;br /&gt;
* 04/19/2021 - R6271 - First working version (Belsten)&lt;br /&gt;
* 07/22/2021 - R6339 - Changed &#039;&#039;ImplantLostSample&#039;&#039; from a BCI2000 state to a stream, so it can record individual sample loss (instead of over the whole block). This change is untested. (Belsten)&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6266&lt;br /&gt;
*Tested under: 6271&lt;br /&gt;
*Known to compile under: 6271&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Lost samples - The &amp;lt;code&amp;gt;ImplantLostSamples&amp;lt;/code&amp;gt; state records what samples are lost, and their locations. Lost samples are replaced with the previous valid sample for all channels. In offline analysis, be sure to remove these samples and replace them with interpolates. &lt;br /&gt;
* After streaming from the device for a longer period of time, reconnection can be difficult. This issue has been replicated with the CorTec GUI, and seems to be a device hardware/firmware issue.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The total number of digitized and stored channels. In the current implementation, this parameter cannot be edited, and will default to how many channels are available from the implant. &lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Samples per channel per digitized block. &lt;br /&gt;
Together with the sampling rate, this parameter determines how often per second data are collected, processed, and feedback is updated. For example, at 1000 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) will be updated 50 times per second.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The sample rate of the system. This parameter cannot be edited, and will default to the sampling rate available from the implant. &lt;br /&gt;
In case you are experiencing problems by higher sampling rates (e.g., data loss, jerky display, etc.), increase the SampleBlockSize so that you are updating the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications), and increase Visualize-&amp;gt;VisualizeSourceDecimation. This parameter will decrease the number of samples per second that are actually drawn in the Source display.&lt;br /&gt;
&lt;br /&gt;
===SourceChOffset===&lt;br /&gt;
Offset for each channel.&lt;br /&gt;
&lt;br /&gt;
===SourceChGain===&lt;br /&gt;
Gain for each channel. &lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
Names of each channel.&lt;br /&gt;
&lt;br /&gt;
===ReferenceCh===&lt;br /&gt;
This list defines what channels will be used as reference. This list is uploaded to the device and set in hardware, effecting the raw bio-signal data that is recorded by BCI2000. If you do not want to effect the raw bio-signal data that is recorded, you can use the [https://www.bci2000.org/mediawiki/index.php/User_Reference:SpatialFilter spatial filter]. If this parameter is set to auto, no reference channels are used.&lt;br /&gt;
&lt;br /&gt;
==Stimulation Parameters==&lt;br /&gt;
These parameters can be found in the &amp;quot;Stimulation&amp;quot; tab of the BCI2000 config window. &lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:CortecADC_stimulation_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationpulses_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationtriggers_parm.PNG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EnableStimulation===&lt;br /&gt;
This parameter enables/disables stimulation. &lt;br /&gt;
&lt;br /&gt;
===StimulationPulses===&lt;br /&gt;
This parameter defines the shape of the charge balanced stimulation pulses, as described in Fig 1. The pulses are defined in one column of this parameter matrix, and it is possible to define an arbitrary number of pulses, each of which are associated with a user defined integer called a &#039;&#039;PulseID&#039;&#039;.  The rows are labeled and there are some limitations to the magnitudes and durations which are elaborated on in the subsequent section. &lt;br /&gt;
[[File:CortecADC_pulse_def.png|600px|thumb|center|upright=2.5|Figure 1. Pulse definition]]&lt;br /&gt;
====PulseID====&lt;br /&gt;
This must be an integer greater than or equal to zero. This ID will be used in the &#039;&#039;StimulationTriggers&#039;&#039; parameter. &lt;br /&gt;
&lt;br /&gt;
====Pulse Amplitude====&lt;br /&gt;
The pulse amplitude defines the amplitude of the main pulse in units of µA. The counter pulse will have a negative amplitude that is one-quarter of the magnitude of the main pulse. &lt;br /&gt;
&lt;br /&gt;
The valid values of this parameter are in the range 0 to 6120 µA. The granularity changes for smaller amplitudes as follows:&lt;br /&gt;
* amplitude &amp;lt;=  3060 µA: step size of 12&lt;br /&gt;
* amplitude &amp;gt;  3060 µA: step size of 24&lt;br /&gt;
This leads to a set of acceptable values that looks like: [0, 12, ..., 3048, 3060, 3084, ... 6096, 6120]&lt;br /&gt;
You can define this parameter not to be one of the acceptable values in this range, but it will be rounded to the nearest valid value, and other parameters will be varied to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Pulse Duration====&lt;br /&gt;
The pulse duration defines the duration of the main pulse in µs. The counter pulse will have a duration that is four times longer than the main pulse duration. Pulse duration values are set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. Again, if the provided value is not a multiple of 10, it will be rounded to the nearest valid value, and other parameters will be modified to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Dead Zone 0====&lt;br /&gt;
Holds the duration of the pause between main and counter pulse in µs. Values can be set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. The same duration dead zone will also occur after the counter pulse.&lt;br /&gt;
&lt;br /&gt;
====Dead Zone 1====&lt;br /&gt;
Holds the duration of the pause after the pulse was delivered. Values can be set in steps of 80 µs. The acceptable range goes from 10 to 20400 µs. Note that the steps are starting from 0 while the minimum value is 10 µs. This leads to a set of acceptable values that looks like: [10, 80, 160, 240, ... , 20400] µs.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
This parameter defines when stimulation is applied, what pulse is used, how many pulses are applied, and the source and destination locations of the stimulation. These parameters are defined in the rows of this matrix with labels&lt;br /&gt;
====Trigger====&lt;br /&gt;
This must be a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true during the run, the stimulation is applied. &lt;br /&gt;
====PulseID====&lt;br /&gt;
The second row should contain a valid PulseID that is to be used. &lt;br /&gt;
====Source Ch====&lt;br /&gt;
The third row is an embedded list that defines the source electrodes. &lt;br /&gt;
====Destination Ch====&lt;br /&gt;
The fourth row is also an embedded list that defines the destination electrodes. &lt;br /&gt;
====Repetitions====&lt;br /&gt;
The fifth row defines how many times that pulse is repeated. The max is 255.&lt;br /&gt;
&lt;br /&gt;
==Device Parameters==&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information returned from the device, such as device type, device ID, and the firmware version. &lt;br /&gt;
&lt;br /&gt;
===StateInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information regarding state units and their multiplier. The device provides information such as humidity, temperature, control value, etc., which are recorded in BCI2000 states (see state information on this page for a complete enumeration of states). The device provides these values with floats, but BCI2000 states can only be integers. The multipliers defined in this parameter are used to increase the amount of precision in the state values. To approximately recover the original float values with the units defined in this parameter, divide each state by its corresponding multiplier.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
The states encode auxiliary information returned from the Cortec implant. The device provides this data in floating point numbers, however BCI2000 can only record integers to it&#039;s states. To maintain some precision, these floats are multiplied by constants, then recorded to the states as integers. To approximately recover the original data, divide the state by its corresponding constant. Constants are shown in the following table. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:right;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;font-weight:bold;&amp;quot;&lt;br /&gt;
! State&lt;br /&gt;
! style=&amp;quot;text-align:center;&amp;quot; | Constant&lt;br /&gt;
|-&lt;br /&gt;
| ImplantVoltage&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantHumidity&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantControlValue&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantPrimaryCoilCurrent&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantTemperature&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|}&lt;br /&gt;
===ImplantLostSample===&lt;br /&gt;
The communication protocol the device uses does not re-send lost data. This state annotates what samples were lost in the bio-signal data. Currently, lost samples are made up by duplicating the previous sample. &lt;br /&gt;
&lt;br /&gt;
===ImplantVoltage===&lt;br /&gt;
16 bit state that changes when new supply voltage value is received from the implant. After dividing the integer state value by the the voltage multiplier defined in the StateInfo parameter, the units are in volts.&lt;br /&gt;
&lt;br /&gt;
===ImplantHumidity===&lt;br /&gt;
16 bit state that changes when new humidity value is received from the implant. Units in %rh. &lt;br /&gt;
&lt;br /&gt;
===ImplantControlValue===&lt;br /&gt;
16 bit state that changes when new current control value is received from the external unit. The power of the implant is controlled by the external unit. The control value provides a measure of how good the coupling between the two coils is and how much more power can be provided if necessary.&lt;br /&gt;
The value is between 0.0 and 100.0 percent, where 0.0 translates to no power and 100.0 translates to maximum power applied.&lt;br /&gt;
&lt;br /&gt;
===ImplantPrimaryCoilCurrent===&lt;br /&gt;
16 bit state that change when new primary coil current value is received from the external unit. The primary coil refers to the coil inside the head piece of the external unit. Units are mA. &lt;br /&gt;
&lt;br /&gt;
===ImplantTemperature===&lt;br /&gt;
16 bit state that changes when new temperature value is received from the implant. Units are degrees Celsius. &lt;br /&gt;
&lt;br /&gt;
===ImplantStimulation===&lt;br /&gt;
Binary state that changes when the device reports that it is stimulating. &lt;br /&gt;
&lt;br /&gt;
===RequestedStimulation===&lt;br /&gt;
Binary state that records when a stimulation trigger expression evaluates true. State remains true for the duration triggered stimulation. This is useful for determining the latency between when stimulation is requested and when it is actually applied. This is done by computing the difference in time between the rising edges of &#039;&#039;ImplantStimulation&#039;&#039; and &#039;&#039;RequestedStimulation&#039;&#039; states.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9053</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9053"/>
		<updated>2021-07-22T16:54:21Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationTriggers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21 - R6337 - Initial private release for internal testing.&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6340&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage, which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps, and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, suppose you wish to stimulate between two different electrodes within the brain. In that case, you can make two configurations that have the same pulse shape parameters but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, but if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase duration of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter defines when electrodes are stimulated, with what configuration they are stimulated with, and what electrodes are stimulated. The &#039;&#039;Expression&#039;&#039; row defines when electrodes are stimulated by specifying a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true, the electrodes will be stimulated with the pulse shape defined in the &#039;&#039;Configuration ID&#039;&#039; row. Note that two columns can have the same &#039;&#039;Expression&#039;&#039;, which allows for concurrent stimulation between different electrode locations. The &#039;&#039;Configuration ID&#039;&#039; defines the applied pulse shape and corresponds to the column number in the &#039;&#039;StimulationConfiguration&#039;&#039; parameter. Lastly, the &#039;&#039;Electrode(s)&#039;&#039; row specifies which electrodes will be stimulation. Elements in this row can be single values that specify a single electrode, or an embedded list in which you can specify multiple electrodes (from 1-96). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only stimulate up to &#039;&#039;&#039;15&#039;&#039;&#039; electrodes concurrently. Concurrent stimulation groups, as defined by their equivalent &#039;&#039;Expression&#039;&#039; expression, must also have disjoint electrode lists.&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto-populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9052</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9052"/>
		<updated>2021-07-22T16:53:01Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* Version History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21 - R6337 - Initial private release for internal testing.&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6340&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage, which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps, and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, suppose you wish to stimulate between two different electrodes within the brain. In that case, you can make two configurations that have the same pulse shape parameters but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, but if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase duration of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter defines when electrodes are stimulated, with what configuration they are stimulated with, and what electrodes are stimulated. The &#039;&#039;Expression&#039;&#039; row defines when electrodes are stimulated by specifying a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true, the electrodes will be stimulated with the pulse shape defined in the &#039;&#039;Configuration ID&#039;&#039; row. Note that two columns can have the same &#039;&#039;Expression&#039;&#039;, which allows for concurrent stimulation between different electrode locations. The &#039;&#039;Configuration ID&#039;&#039; defines the applied pulse shape and corresponds to the column number in the &#039;&#039;StimulationConfiguration&#039;&#039; parameter. Lastly, the &#039;&#039;Electrode(s)&#039;&#039; row specifies which electrodes will be stimulation. It is an embedded list in which you can specify multiple channels (from 1-96). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only stimulate up to &#039;&#039;&#039;15&#039;&#039;&#039; electrodes concurrently. Concurrent stimulation groups, as defined by their equivalent &#039;&#039;Expression&#039;&#039; expression, must also have disjoint electrode lists.&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto-populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9051</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9051"/>
		<updated>2021-07-22T16:52:19Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* Source Code Revisions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial private release for internal testing.&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6340&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage, which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps, and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, suppose you wish to stimulate between two different electrodes within the brain. In that case, you can make two configurations that have the same pulse shape parameters but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, but if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase duration of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter defines when electrodes are stimulated, with what configuration they are stimulated with, and what electrodes are stimulated. The &#039;&#039;Expression&#039;&#039; row defines when electrodes are stimulated by specifying a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true, the electrodes will be stimulated with the pulse shape defined in the &#039;&#039;Configuration ID&#039;&#039; row. Note that two columns can have the same &#039;&#039;Expression&#039;&#039;, which allows for concurrent stimulation between different electrode locations. The &#039;&#039;Configuration ID&#039;&#039; defines the applied pulse shape and corresponds to the column number in the &#039;&#039;StimulationConfiguration&#039;&#039; parameter. Lastly, the &#039;&#039;Electrode(s)&#039;&#039; row specifies which electrodes will be stimulation. It is an embedded list in which you can specify multiple channels (from 1-96). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only stimulate up to &#039;&#039;&#039;15&#039;&#039;&#039; electrodes concurrently. Concurrent stimulation groups, as defined by their equivalent &#039;&#039;Expression&#039;&#039; expression, must also have disjoint electrode lists.&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto-populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9050</id>
		<title>Contributions:CortecADC</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9050"/>
		<updated>2021-07-22T16:51:32Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* Version History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[[File:CorTec_BrainInterchange.png|400px|thumb|right|CorTec Brain Interchange]]&lt;br /&gt;
CortecADC is a source module that allows for inter-cranial recording and stimulating over 32 channels via a fully implantable device. It is intended for long-term measurement of neural activity and electrical stimulation of brain tissue. See the [https://www.cortec-neuro.com/solutions/complete-system/ CorTec site] for more information.&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
* Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
* Markus Adamek (adamek@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 11/29/2018 - R5829 - Initial untested version (Adamek)&lt;br /&gt;
* 04/19/2021 - R6271 - First working version (Belsten)&lt;br /&gt;
* 07/22/2021 - R6339 - Changed &#039;&#039;ImplantLostSample&#039;&#039; from a BCI2000 state to a stream, so it can record individual sample loss (instead of over the whole block). This change is untested. (Belsten)&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6266&lt;br /&gt;
*Tested under: 6271&lt;br /&gt;
*Known to compile under: 6271&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Lost samples - The &amp;lt;code&amp;gt;ImplantLostSamples&amp;lt;/code&amp;gt; state records what samples are lost, and their locations. Lost samples are replaced with the previous valid sample for all channels. In offline analysis, be sure to remove these samples and replace them with interpolates. &lt;br /&gt;
* After streaming from the device for a longer period of time, reconnection can be difficult. This issue has been replicated with the CorTec GUI, and seems to be a device hardware/firmware issue.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The total number of digitized and stored channels. In the current implementation, this parameter cannot be edited, and will default to how many channels are available from the implant. &lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Samples per channel per digitized block. &lt;br /&gt;
Together with the sampling rate, this parameter determines how often per second data are collected, processed, and feedback is updated. For example, at 1000 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) will be updated 50 times per second.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The sample rate of the system. This parameter cannot be edited, and will default to the sampling rate available from the implant. &lt;br /&gt;
In case you are experiencing problems by higher sampling rates (e.g., data loss, jerky display, etc.), increase the SampleBlockSize so that you are updating the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications), and increase Visualize-&amp;gt;VisualizeSourceDecimation. This parameter will decrease the number of samples per second that are actually drawn in the Source display.&lt;br /&gt;
&lt;br /&gt;
===SourceChOffset===&lt;br /&gt;
Offset for each channel.&lt;br /&gt;
&lt;br /&gt;
===SourceChGain===&lt;br /&gt;
Gain for each channel. &lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
Names of each channel.&lt;br /&gt;
&lt;br /&gt;
===ReferenceCh===&lt;br /&gt;
This list defines what channels will be used as reference. This list is uploaded to the device and set in hardware, effecting the raw bio-signal data that is recorded by BCI2000. If you do not want to effect the raw bio-signal data that is recorded, you can use the [https://www.bci2000.org/mediawiki/index.php/User_Reference:SpatialFilter spatial filter]. If this parameter is set to auto, no reference channels are used.&lt;br /&gt;
&lt;br /&gt;
==Stimulation Parameters==&lt;br /&gt;
These parameters can be found in the &amp;quot;Stimulation&amp;quot; tab of the BCI2000 config window. &lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:CortecADC_stimulation_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationpulses_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationtriggers_parm.PNG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EnableStimulation===&lt;br /&gt;
This parameter enables/disables stimulation. &lt;br /&gt;
&lt;br /&gt;
===StimulationPulses===&lt;br /&gt;
This parameter defines the shape of the charge balanced stimulation pulses, as described in Fig 1. The pulses are defined in one column of this parameter matrix, and it is possible to define an arbitrary number of pulses, each of which are associated with a user defined integer called a &#039;&#039;PulseID&#039;&#039;.  The rows are labeled and there are some limitations to the magnitudes and durations which are elaborated on in the subsequent section. &lt;br /&gt;
[[File:CortecADC_pulse_def.png|600px|thumb|center|upright=2.5|Figure 1. Pulse definition]]&lt;br /&gt;
====PulseID====&lt;br /&gt;
This must be an integer greater than or equal to zero. This ID will be used in the &#039;&#039;StimulationTriggers&#039;&#039; parameter. &lt;br /&gt;
&lt;br /&gt;
====Pulse Amplitude====&lt;br /&gt;
The pulse amplitude defines the amplitude of the main pulse in units of µA. The counter pulse will have a negative amplitude that is one-quarter of the magnitude of the main pulse. &lt;br /&gt;
&lt;br /&gt;
The valid values of this parameter are in the range 0 to 6120 µA. The granularity changes for smaller amplitudes as follows:&lt;br /&gt;
* amplitude &amp;lt;=  3060 µA: step size of 12&lt;br /&gt;
* amplitude &amp;gt;  3060 µA: step size of 24&lt;br /&gt;
This leads to a set of acceptable values that looks like: [0, 12, ..., 3048, 3060, 3084, ... 6096, 6120]&lt;br /&gt;
You can define this parameter not to be one of the acceptable values in this range, but it will be rounded to the nearest valid value, and other parameters will be varied to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Pulse Duration====&lt;br /&gt;
The pulse duration defines the duration of the main pulse in µs. The counter pulse will have a duration that is four times longer than the main pulse duration. Pulse duration values are set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. Again, if the provided value is not a multiple of 10, it will be rounded to the nearest valid value, and other parameters will be modified to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Dead Zone 0====&lt;br /&gt;
Holds the duration of the pause between main and counter pulse in µs. Values can be set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. The same duration dead zone will also occur after the counter pulse.&lt;br /&gt;
&lt;br /&gt;
====Dead Zone 1====&lt;br /&gt;
Holds the duration of the pause after the pulse was delivered. Values can be set in steps of 80 µs. The acceptable range goes from 10 to 20400 µs. Note that the steps are starting from 0 while the minimum value is 10 µs. This leads to a set of acceptable values that looks like: [10, 80, 160, 240, ... , 20400] µs.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
This parameter defines when stimulation is applied, what pulse is used, how many pulses are applied, and the source and destination locations of the stimulation. These parameters are defined in the rows of this matrix with labels&lt;br /&gt;
====Trigger====&lt;br /&gt;
This must be a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true during the run, the stimulation is applied. &lt;br /&gt;
====PulseID====&lt;br /&gt;
The second row should contain a valid PulseID that is to be used. &lt;br /&gt;
====Source Ch====&lt;br /&gt;
The third row is an embedded list that defines the source electrodes. &lt;br /&gt;
====Destination Ch====&lt;br /&gt;
The fourth row is also an embedded list that defines the destination electrodes. &lt;br /&gt;
====Repetitions====&lt;br /&gt;
The fifth row defines how many times that pulse is repeated. The max is 255.&lt;br /&gt;
&lt;br /&gt;
==Device Parameters==&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information returned from the device, such as device type, device ID, and the firmware version. &lt;br /&gt;
&lt;br /&gt;
===StateInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information regarding state units and their multiplier. The device provides information such as humidity, temperature, control value, etc., which are recorded in BCI2000 states (see state information on this page for a complete enumeration of states). The device provides these values with floats, but BCI2000 states can only be integers. The multipliers defined in this parameter are used to increase the amount of precision in the state values. To approximately recover the original float values with the units defined in this parameter, divide each state by its corresponding multiplier.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
The states encode auxiliary information returned from the Cortec implant. The device provides this data in floating point numbers, however BCI2000 can only record integers to it&#039;s states. To maintain some precision, these floats are multiplied by constants, then recorded to the states as integers. To approximately recover the original data, divide the state by its corresponding constant. Constants are shown in the following table. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:right;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;font-weight:bold;&amp;quot;&lt;br /&gt;
! State&lt;br /&gt;
! style=&amp;quot;text-align:center;&amp;quot; | Constant&lt;br /&gt;
|-&lt;br /&gt;
| ImplantVoltage&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantHumidity&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantControlValue&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantPrimaryCoilCurrent&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantTemperature&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|}&lt;br /&gt;
===ImplantLostSample===&lt;br /&gt;
The communication protocol the device uses does not re-send lost data. This state annotates what samples were lost in the bio-signal data. Currently, lost samples are made up by duplicating the previous sample. &lt;br /&gt;
&lt;br /&gt;
===ImplantVoltage===&lt;br /&gt;
16 bit state that changes when new supply voltage value is received from the implant. After dividing the integer state value by the the voltage multiplier defined in the StateInfo parameter, the units are in volts.&lt;br /&gt;
&lt;br /&gt;
===ImplantHumidity===&lt;br /&gt;
16 bit state that changes when new humidity value is received from the implant. Units in %rh. &lt;br /&gt;
&lt;br /&gt;
===ImplantControlValue===&lt;br /&gt;
16 bit state that changes when new current control value is received from the external unit. The power of the implant is controlled by the external unit. The control value provides a measure of how good the coupling between the two coils is and how much more power can be provided if necessary.&lt;br /&gt;
The value is between 0.0 and 100.0 percent, where 0.0 translates to no power and 100.0 translates to maximum power applied.&lt;br /&gt;
&lt;br /&gt;
===ImplantPrimaryCoilCurrent===&lt;br /&gt;
16 bit state that change when new primary coil current value is received from the external unit. The primary coil refers to the coil inside the head piece of the external unit. Units are mA. &lt;br /&gt;
&lt;br /&gt;
===ImplantTemperature===&lt;br /&gt;
16 bit state that changes when new temperature value is received from the implant. Units are degrees Celsius. &lt;br /&gt;
&lt;br /&gt;
===ImplantStimulation===&lt;br /&gt;
Binary state that changes when the device reports that it is stimulating. &lt;br /&gt;
&lt;br /&gt;
===RequestedStimulation===&lt;br /&gt;
Binary state that records when a stimulation trigger expression evaluates true. State remains true for the duration triggered stimulation. This is useful for determining the latency between when stimulation is requested and when it is actually applied. This is done by computing the difference in time between the rising edges of &#039;&#039;ImplantStimulation&#039;&#039; and &#039;&#039;RequestedStimulation&#039;&#039; states.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9049</id>
		<title>Contributions:CortecADC</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9049"/>
		<updated>2021-07-22T16:51:17Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* Version History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[[File:CorTec_BrainInterchange.png|400px|thumb|right|CorTec Brain Interchange]]&lt;br /&gt;
CortecADC is a source module that allows for inter-cranial recording and stimulating over 32 channels via a fully implantable device. It is intended for long-term measurement of neural activity and electrical stimulation of brain tissue. See the [https://www.cortec-neuro.com/solutions/complete-system/ CorTec site] for more information.&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
* Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
* Markus Adamek (adamek@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 11/29/2021 - R5829 - Initial untested version (Adamek)&lt;br /&gt;
* 04/19/2021 - R6271 - First working version (Belsten)&lt;br /&gt;
* 07/22/2021 - R6339 - Changed &#039;&#039;ImplantLostSample&#039;&#039; from a BCI2000 state to a stream, so it can record individual sample loss (instead of over the whole block). This change is untested. (Belsten)&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6266&lt;br /&gt;
*Tested under: 6271&lt;br /&gt;
*Known to compile under: 6271&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Lost samples - The &amp;lt;code&amp;gt;ImplantLostSamples&amp;lt;/code&amp;gt; state records what samples are lost, and their locations. Lost samples are replaced with the previous valid sample for all channels. In offline analysis, be sure to remove these samples and replace them with interpolates. &lt;br /&gt;
* After streaming from the device for a longer period of time, reconnection can be difficult. This issue has been replicated with the CorTec GUI, and seems to be a device hardware/firmware issue.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The total number of digitized and stored channels. In the current implementation, this parameter cannot be edited, and will default to how many channels are available from the implant. &lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Samples per channel per digitized block. &lt;br /&gt;
Together with the sampling rate, this parameter determines how often per second data are collected, processed, and feedback is updated. For example, at 1000 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) will be updated 50 times per second.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The sample rate of the system. This parameter cannot be edited, and will default to the sampling rate available from the implant. &lt;br /&gt;
In case you are experiencing problems by higher sampling rates (e.g., data loss, jerky display, etc.), increase the SampleBlockSize so that you are updating the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications), and increase Visualize-&amp;gt;VisualizeSourceDecimation. This parameter will decrease the number of samples per second that are actually drawn in the Source display.&lt;br /&gt;
&lt;br /&gt;
===SourceChOffset===&lt;br /&gt;
Offset for each channel.&lt;br /&gt;
&lt;br /&gt;
===SourceChGain===&lt;br /&gt;
Gain for each channel. &lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
Names of each channel.&lt;br /&gt;
&lt;br /&gt;
===ReferenceCh===&lt;br /&gt;
This list defines what channels will be used as reference. This list is uploaded to the device and set in hardware, effecting the raw bio-signal data that is recorded by BCI2000. If you do not want to effect the raw bio-signal data that is recorded, you can use the [https://www.bci2000.org/mediawiki/index.php/User_Reference:SpatialFilter spatial filter]. If this parameter is set to auto, no reference channels are used.&lt;br /&gt;
&lt;br /&gt;
==Stimulation Parameters==&lt;br /&gt;
These parameters can be found in the &amp;quot;Stimulation&amp;quot; tab of the BCI2000 config window. &lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:CortecADC_stimulation_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationpulses_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationtriggers_parm.PNG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EnableStimulation===&lt;br /&gt;
This parameter enables/disables stimulation. &lt;br /&gt;
&lt;br /&gt;
===StimulationPulses===&lt;br /&gt;
This parameter defines the shape of the charge balanced stimulation pulses, as described in Fig 1. The pulses are defined in one column of this parameter matrix, and it is possible to define an arbitrary number of pulses, each of which are associated with a user defined integer called a &#039;&#039;PulseID&#039;&#039;.  The rows are labeled and there are some limitations to the magnitudes and durations which are elaborated on in the subsequent section. &lt;br /&gt;
[[File:CortecADC_pulse_def.png|600px|thumb|center|upright=2.5|Figure 1. Pulse definition]]&lt;br /&gt;
====PulseID====&lt;br /&gt;
This must be an integer greater than or equal to zero. This ID will be used in the &#039;&#039;StimulationTriggers&#039;&#039; parameter. &lt;br /&gt;
&lt;br /&gt;
====Pulse Amplitude====&lt;br /&gt;
The pulse amplitude defines the amplitude of the main pulse in units of µA. The counter pulse will have a negative amplitude that is one-quarter of the magnitude of the main pulse. &lt;br /&gt;
&lt;br /&gt;
The valid values of this parameter are in the range 0 to 6120 µA. The granularity changes for smaller amplitudes as follows:&lt;br /&gt;
* amplitude &amp;lt;=  3060 µA: step size of 12&lt;br /&gt;
* amplitude &amp;gt;  3060 µA: step size of 24&lt;br /&gt;
This leads to a set of acceptable values that looks like: [0, 12, ..., 3048, 3060, 3084, ... 6096, 6120]&lt;br /&gt;
You can define this parameter not to be one of the acceptable values in this range, but it will be rounded to the nearest valid value, and other parameters will be varied to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Pulse Duration====&lt;br /&gt;
The pulse duration defines the duration of the main pulse in µs. The counter pulse will have a duration that is four times longer than the main pulse duration. Pulse duration values are set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. Again, if the provided value is not a multiple of 10, it will be rounded to the nearest valid value, and other parameters will be modified to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Dead Zone 0====&lt;br /&gt;
Holds the duration of the pause between main and counter pulse in µs. Values can be set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. The same duration dead zone will also occur after the counter pulse.&lt;br /&gt;
&lt;br /&gt;
====Dead Zone 1====&lt;br /&gt;
Holds the duration of the pause after the pulse was delivered. Values can be set in steps of 80 µs. The acceptable range goes from 10 to 20400 µs. Note that the steps are starting from 0 while the minimum value is 10 µs. This leads to a set of acceptable values that looks like: [10, 80, 160, 240, ... , 20400] µs.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
This parameter defines when stimulation is applied, what pulse is used, how many pulses are applied, and the source and destination locations of the stimulation. These parameters are defined in the rows of this matrix with labels&lt;br /&gt;
====Trigger====&lt;br /&gt;
This must be a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true during the run, the stimulation is applied. &lt;br /&gt;
====PulseID====&lt;br /&gt;
The second row should contain a valid PulseID that is to be used. &lt;br /&gt;
====Source Ch====&lt;br /&gt;
The third row is an embedded list that defines the source electrodes. &lt;br /&gt;
====Destination Ch====&lt;br /&gt;
The fourth row is also an embedded list that defines the destination electrodes. &lt;br /&gt;
====Repetitions====&lt;br /&gt;
The fifth row defines how many times that pulse is repeated. The max is 255.&lt;br /&gt;
&lt;br /&gt;
==Device Parameters==&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information returned from the device, such as device type, device ID, and the firmware version. &lt;br /&gt;
&lt;br /&gt;
===StateInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information regarding state units and their multiplier. The device provides information such as humidity, temperature, control value, etc., which are recorded in BCI2000 states (see state information on this page for a complete enumeration of states). The device provides these values with floats, but BCI2000 states can only be integers. The multipliers defined in this parameter are used to increase the amount of precision in the state values. To approximately recover the original float values with the units defined in this parameter, divide each state by its corresponding multiplier.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
The states encode auxiliary information returned from the Cortec implant. The device provides this data in floating point numbers, however BCI2000 can only record integers to it&#039;s states. To maintain some precision, these floats are multiplied by constants, then recorded to the states as integers. To approximately recover the original data, divide the state by its corresponding constant. Constants are shown in the following table. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:right;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;font-weight:bold;&amp;quot;&lt;br /&gt;
! State&lt;br /&gt;
! style=&amp;quot;text-align:center;&amp;quot; | Constant&lt;br /&gt;
|-&lt;br /&gt;
| ImplantVoltage&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantHumidity&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantControlValue&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantPrimaryCoilCurrent&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantTemperature&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|}&lt;br /&gt;
===ImplantLostSample===&lt;br /&gt;
The communication protocol the device uses does not re-send lost data. This state annotates what samples were lost in the bio-signal data. Currently, lost samples are made up by duplicating the previous sample. &lt;br /&gt;
&lt;br /&gt;
===ImplantVoltage===&lt;br /&gt;
16 bit state that changes when new supply voltage value is received from the implant. After dividing the integer state value by the the voltage multiplier defined in the StateInfo parameter, the units are in volts.&lt;br /&gt;
&lt;br /&gt;
===ImplantHumidity===&lt;br /&gt;
16 bit state that changes when new humidity value is received from the implant. Units in %rh. &lt;br /&gt;
&lt;br /&gt;
===ImplantControlValue===&lt;br /&gt;
16 bit state that changes when new current control value is received from the external unit. The power of the implant is controlled by the external unit. The control value provides a measure of how good the coupling between the two coils is and how much more power can be provided if necessary.&lt;br /&gt;
The value is between 0.0 and 100.0 percent, where 0.0 translates to no power and 100.0 translates to maximum power applied.&lt;br /&gt;
&lt;br /&gt;
===ImplantPrimaryCoilCurrent===&lt;br /&gt;
16 bit state that change when new primary coil current value is received from the external unit. The primary coil refers to the coil inside the head piece of the external unit. Units are mA. &lt;br /&gt;
&lt;br /&gt;
===ImplantTemperature===&lt;br /&gt;
16 bit state that changes when new temperature value is received from the implant. Units are degrees Celsius. &lt;br /&gt;
&lt;br /&gt;
===ImplantStimulation===&lt;br /&gt;
Binary state that changes when the device reports that it is stimulating. &lt;br /&gt;
&lt;br /&gt;
===RequestedStimulation===&lt;br /&gt;
Binary state that records when a stimulation trigger expression evaluates true. State remains true for the duration triggered stimulation. This is useful for determining the latency between when stimulation is requested and when it is actually applied. This is done by computing the difference in time between the rising edges of &#039;&#039;ImplantStimulation&#039;&#039; and &#039;&#039;RequestedStimulation&#039;&#039; states.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9048</id>
		<title>Contributions:CortecADC</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9048"/>
		<updated>2021-07-22T16:49:50Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* Version History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[[File:CorTec_BrainInterchange.png|400px|thumb|right|CorTec Brain Interchange]]&lt;br /&gt;
CortecADC is a source module that allows for inter-cranial recording and stimulating over 32 channels via a fully implantable device. It is intended for long-term measurement of neural activity and electrical stimulation of brain tissue. See the [https://www.cortec-neuro.com/solutions/complete-system/ CorTec site] for more information.&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
* Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
* Markus Adamek (adamek@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 04/19/2021 - R6271 - First working version (Alexander Belsten)&lt;br /&gt;
* 07/22/2021 - R6339 - Changed &#039;&#039;ImplantLostSample&#039;&#039; from a BCI2000 state to a stream, so it can record individual sample loss (instead of over the whole block). This change is untested. (Alexander Belsten)&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6266&lt;br /&gt;
*Tested under: 6271&lt;br /&gt;
*Known to compile under: 6271&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Lost samples - The &amp;lt;code&amp;gt;ImplantLostSamples&amp;lt;/code&amp;gt; state records what samples are lost, and their locations. Lost samples are replaced with the previous valid sample for all channels. In offline analysis, be sure to remove these samples and replace them with interpolates. &lt;br /&gt;
* After streaming from the device for a longer period of time, reconnection can be difficult. This issue has been replicated with the CorTec GUI, and seems to be a device hardware/firmware issue.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The total number of digitized and stored channels. In the current implementation, this parameter cannot be edited, and will default to how many channels are available from the implant. &lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Samples per channel per digitized block. &lt;br /&gt;
Together with the sampling rate, this parameter determines how often per second data are collected, processed, and feedback is updated. For example, at 1000 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) will be updated 50 times per second.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The sample rate of the system. This parameter cannot be edited, and will default to the sampling rate available from the implant. &lt;br /&gt;
In case you are experiencing problems by higher sampling rates (e.g., data loss, jerky display, etc.), increase the SampleBlockSize so that you are updating the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications), and increase Visualize-&amp;gt;VisualizeSourceDecimation. This parameter will decrease the number of samples per second that are actually drawn in the Source display.&lt;br /&gt;
&lt;br /&gt;
===SourceChOffset===&lt;br /&gt;
Offset for each channel.&lt;br /&gt;
&lt;br /&gt;
===SourceChGain===&lt;br /&gt;
Gain for each channel. &lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
Names of each channel.&lt;br /&gt;
&lt;br /&gt;
===ReferenceCh===&lt;br /&gt;
This list defines what channels will be used as reference. This list is uploaded to the device and set in hardware, effecting the raw bio-signal data that is recorded by BCI2000. If you do not want to effect the raw bio-signal data that is recorded, you can use the [https://www.bci2000.org/mediawiki/index.php/User_Reference:SpatialFilter spatial filter]. If this parameter is set to auto, no reference channels are used.&lt;br /&gt;
&lt;br /&gt;
==Stimulation Parameters==&lt;br /&gt;
These parameters can be found in the &amp;quot;Stimulation&amp;quot; tab of the BCI2000 config window. &lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:CortecADC_stimulation_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationpulses_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationtriggers_parm.PNG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EnableStimulation===&lt;br /&gt;
This parameter enables/disables stimulation. &lt;br /&gt;
&lt;br /&gt;
===StimulationPulses===&lt;br /&gt;
This parameter defines the shape of the charge balanced stimulation pulses, as described in Fig 1. The pulses are defined in one column of this parameter matrix, and it is possible to define an arbitrary number of pulses, each of which are associated with a user defined integer called a &#039;&#039;PulseID&#039;&#039;.  The rows are labeled and there are some limitations to the magnitudes and durations which are elaborated on in the subsequent section. &lt;br /&gt;
[[File:CortecADC_pulse_def.png|600px|thumb|center|upright=2.5|Figure 1. Pulse definition]]&lt;br /&gt;
====PulseID====&lt;br /&gt;
This must be an integer greater than or equal to zero. This ID will be used in the &#039;&#039;StimulationTriggers&#039;&#039; parameter. &lt;br /&gt;
&lt;br /&gt;
====Pulse Amplitude====&lt;br /&gt;
The pulse amplitude defines the amplitude of the main pulse in units of µA. The counter pulse will have a negative amplitude that is one-quarter of the magnitude of the main pulse. &lt;br /&gt;
&lt;br /&gt;
The valid values of this parameter are in the range 0 to 6120 µA. The granularity changes for smaller amplitudes as follows:&lt;br /&gt;
* amplitude &amp;lt;=  3060 µA: step size of 12&lt;br /&gt;
* amplitude &amp;gt;  3060 µA: step size of 24&lt;br /&gt;
This leads to a set of acceptable values that looks like: [0, 12, ..., 3048, 3060, 3084, ... 6096, 6120]&lt;br /&gt;
You can define this parameter not to be one of the acceptable values in this range, but it will be rounded to the nearest valid value, and other parameters will be varied to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Pulse Duration====&lt;br /&gt;
The pulse duration defines the duration of the main pulse in µs. The counter pulse will have a duration that is four times longer than the main pulse duration. Pulse duration values are set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. Again, if the provided value is not a multiple of 10, it will be rounded to the nearest valid value, and other parameters will be modified to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Dead Zone 0====&lt;br /&gt;
Holds the duration of the pause between main and counter pulse in µs. Values can be set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. The same duration dead zone will also occur after the counter pulse.&lt;br /&gt;
&lt;br /&gt;
====Dead Zone 1====&lt;br /&gt;
Holds the duration of the pause after the pulse was delivered. Values can be set in steps of 80 µs. The acceptable range goes from 10 to 20400 µs. Note that the steps are starting from 0 while the minimum value is 10 µs. This leads to a set of acceptable values that looks like: [10, 80, 160, 240, ... , 20400] µs.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
This parameter defines when stimulation is applied, what pulse is used, how many pulses are applied, and the source and destination locations of the stimulation. These parameters are defined in the rows of this matrix with labels&lt;br /&gt;
====Trigger====&lt;br /&gt;
This must be a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true during the run, the stimulation is applied. &lt;br /&gt;
====PulseID====&lt;br /&gt;
The second row should contain a valid PulseID that is to be used. &lt;br /&gt;
====Source Ch====&lt;br /&gt;
The third row is an embedded list that defines the source electrodes. &lt;br /&gt;
====Destination Ch====&lt;br /&gt;
The fourth row is also an embedded list that defines the destination electrodes. &lt;br /&gt;
====Repetitions====&lt;br /&gt;
The fifth row defines how many times that pulse is repeated. The max is 255.&lt;br /&gt;
&lt;br /&gt;
==Device Parameters==&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information returned from the device, such as device type, device ID, and the firmware version. &lt;br /&gt;
&lt;br /&gt;
===StateInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information regarding state units and their multiplier. The device provides information such as humidity, temperature, control value, etc., which are recorded in BCI2000 states (see state information on this page for a complete enumeration of states). The device provides these values with floats, but BCI2000 states can only be integers. The multipliers defined in this parameter are used to increase the amount of precision in the state values. To approximately recover the original float values with the units defined in this parameter, divide each state by its corresponding multiplier.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
The states encode auxiliary information returned from the Cortec implant. The device provides this data in floating point numbers, however BCI2000 can only record integers to it&#039;s states. To maintain some precision, these floats are multiplied by constants, then recorded to the states as integers. To approximately recover the original data, divide the state by its corresponding constant. Constants are shown in the following table. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:right;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;font-weight:bold;&amp;quot;&lt;br /&gt;
! State&lt;br /&gt;
! style=&amp;quot;text-align:center;&amp;quot; | Constant&lt;br /&gt;
|-&lt;br /&gt;
| ImplantVoltage&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantHumidity&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantControlValue&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantPrimaryCoilCurrent&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantTemperature&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|}&lt;br /&gt;
===ImplantLostSample===&lt;br /&gt;
The communication protocol the device uses does not re-send lost data. This state annotates what samples were lost in the bio-signal data. Currently, lost samples are made up by duplicating the previous sample. &lt;br /&gt;
&lt;br /&gt;
===ImplantVoltage===&lt;br /&gt;
16 bit state that changes when new supply voltage value is received from the implant. After dividing the integer state value by the the voltage multiplier defined in the StateInfo parameter, the units are in volts.&lt;br /&gt;
&lt;br /&gt;
===ImplantHumidity===&lt;br /&gt;
16 bit state that changes when new humidity value is received from the implant. Units in %rh. &lt;br /&gt;
&lt;br /&gt;
===ImplantControlValue===&lt;br /&gt;
16 bit state that changes when new current control value is received from the external unit. The power of the implant is controlled by the external unit. The control value provides a measure of how good the coupling between the two coils is and how much more power can be provided if necessary.&lt;br /&gt;
The value is between 0.0 and 100.0 percent, where 0.0 translates to no power and 100.0 translates to maximum power applied.&lt;br /&gt;
&lt;br /&gt;
===ImplantPrimaryCoilCurrent===&lt;br /&gt;
16 bit state that change when new primary coil current value is received from the external unit. The primary coil refers to the coil inside the head piece of the external unit. Units are mA. &lt;br /&gt;
&lt;br /&gt;
===ImplantTemperature===&lt;br /&gt;
16 bit state that changes when new temperature value is received from the implant. Units are degrees Celsius. &lt;br /&gt;
&lt;br /&gt;
===ImplantStimulation===&lt;br /&gt;
Binary state that changes when the device reports that it is stimulating. &lt;br /&gt;
&lt;br /&gt;
===RequestedStimulation===&lt;br /&gt;
Binary state that records when a stimulation trigger expression evaluates true. State remains true for the duration triggered stimulation. This is useful for determining the latency between when stimulation is requested and when it is actually applied. This is done by computing the difference in time between the rising edges of &#039;&#039;ImplantStimulation&#039;&#039; and &#039;&#039;RequestedStimulation&#039;&#039; states.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9047</id>
		<title>Contributions:CortecADC</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9047"/>
		<updated>2021-07-22T16:23:20Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* States */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[[File:CorTec_BrainInterchange.png|400px|thumb|right|CorTec Brain Interchange]]&lt;br /&gt;
CortecADC is a source module that allows for inter-cranial recording and stimulating over 32 channels via a fully implantable device. It is intended for long-term measurement of neural activity and electrical stimulation of brain tissue. See the [https://www.cortec-neuro.com/solutions/complete-system/ CorTec site] for more information.&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
* Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
* Markus Adamek (adamek@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 04/19/2021 - First working version&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6266&lt;br /&gt;
*Tested under: 6271&lt;br /&gt;
*Known to compile under: 6271&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Lost samples - The &amp;lt;code&amp;gt;ImplantLostSamples&amp;lt;/code&amp;gt; state records what samples are lost, and their locations. Lost samples are replaced with the previous valid sample for all channels. In offline analysis, be sure to remove these samples and replace them with interpolates. &lt;br /&gt;
* After streaming from the device for a longer period of time, reconnection can be difficult. This issue has been replicated with the CorTec GUI, and seems to be a device hardware/firmware issue.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The total number of digitized and stored channels. In the current implementation, this parameter cannot be edited, and will default to how many channels are available from the implant. &lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Samples per channel per digitized block. &lt;br /&gt;
Together with the sampling rate, this parameter determines how often per second data are collected, processed, and feedback is updated. For example, at 1000 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) will be updated 50 times per second.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The sample rate of the system. This parameter cannot be edited, and will default to the sampling rate available from the implant. &lt;br /&gt;
In case you are experiencing problems by higher sampling rates (e.g., data loss, jerky display, etc.), increase the SampleBlockSize so that you are updating the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications), and increase Visualize-&amp;gt;VisualizeSourceDecimation. This parameter will decrease the number of samples per second that are actually drawn in the Source display.&lt;br /&gt;
&lt;br /&gt;
===SourceChOffset===&lt;br /&gt;
Offset for each channel.&lt;br /&gt;
&lt;br /&gt;
===SourceChGain===&lt;br /&gt;
Gain for each channel. &lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
Names of each channel.&lt;br /&gt;
&lt;br /&gt;
===ReferenceCh===&lt;br /&gt;
This list defines what channels will be used as reference. This list is uploaded to the device and set in hardware, effecting the raw bio-signal data that is recorded by BCI2000. If you do not want to effect the raw bio-signal data that is recorded, you can use the [https://www.bci2000.org/mediawiki/index.php/User_Reference:SpatialFilter spatial filter]. If this parameter is set to auto, no reference channels are used.&lt;br /&gt;
&lt;br /&gt;
==Stimulation Parameters==&lt;br /&gt;
These parameters can be found in the &amp;quot;Stimulation&amp;quot; tab of the BCI2000 config window. &lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:CortecADC_stimulation_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationpulses_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationtriggers_parm.PNG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EnableStimulation===&lt;br /&gt;
This parameter enables/disables stimulation. &lt;br /&gt;
&lt;br /&gt;
===StimulationPulses===&lt;br /&gt;
This parameter defines the shape of the charge balanced stimulation pulses, as described in Fig 1. The pulses are defined in one column of this parameter matrix, and it is possible to define an arbitrary number of pulses, each of which are associated with a user defined integer called a &#039;&#039;PulseID&#039;&#039;.  The rows are labeled and there are some limitations to the magnitudes and durations which are elaborated on in the subsequent section. &lt;br /&gt;
[[File:CortecADC_pulse_def.png|600px|thumb|center|upright=2.5|Figure 1. Pulse definition]]&lt;br /&gt;
====PulseID====&lt;br /&gt;
This must be an integer greater than or equal to zero. This ID will be used in the &#039;&#039;StimulationTriggers&#039;&#039; parameter. &lt;br /&gt;
&lt;br /&gt;
====Pulse Amplitude====&lt;br /&gt;
The pulse amplitude defines the amplitude of the main pulse in units of µA. The counter pulse will have a negative amplitude that is one-quarter of the magnitude of the main pulse. &lt;br /&gt;
&lt;br /&gt;
The valid values of this parameter are in the range 0 to 6120 µA. The granularity changes for smaller amplitudes as follows:&lt;br /&gt;
* amplitude &amp;lt;=  3060 µA: step size of 12&lt;br /&gt;
* amplitude &amp;gt;  3060 µA: step size of 24&lt;br /&gt;
This leads to a set of acceptable values that looks like: [0, 12, ..., 3048, 3060, 3084, ... 6096, 6120]&lt;br /&gt;
You can define this parameter not to be one of the acceptable values in this range, but it will be rounded to the nearest valid value, and other parameters will be varied to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Pulse Duration====&lt;br /&gt;
The pulse duration defines the duration of the main pulse in µs. The counter pulse will have a duration that is four times longer than the main pulse duration. Pulse duration values are set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. Again, if the provided value is not a multiple of 10, it will be rounded to the nearest valid value, and other parameters will be modified to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Dead Zone 0====&lt;br /&gt;
Holds the duration of the pause between main and counter pulse in µs. Values can be set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. The same duration dead zone will also occur after the counter pulse.&lt;br /&gt;
&lt;br /&gt;
====Dead Zone 1====&lt;br /&gt;
Holds the duration of the pause after the pulse was delivered. Values can be set in steps of 80 µs. The acceptable range goes from 10 to 20400 µs. Note that the steps are starting from 0 while the minimum value is 10 µs. This leads to a set of acceptable values that looks like: [10, 80, 160, 240, ... , 20400] µs.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
This parameter defines when stimulation is applied, what pulse is used, how many pulses are applied, and the source and destination locations of the stimulation. These parameters are defined in the rows of this matrix with labels&lt;br /&gt;
====Trigger====&lt;br /&gt;
This must be a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true during the run, the stimulation is applied. &lt;br /&gt;
====PulseID====&lt;br /&gt;
The second row should contain a valid PulseID that is to be used. &lt;br /&gt;
====Source Ch====&lt;br /&gt;
The third row is an embedded list that defines the source electrodes. &lt;br /&gt;
====Destination Ch====&lt;br /&gt;
The fourth row is also an embedded list that defines the destination electrodes. &lt;br /&gt;
====Repetitions====&lt;br /&gt;
The fifth row defines how many times that pulse is repeated. The max is 255.&lt;br /&gt;
&lt;br /&gt;
==Device Parameters==&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information returned from the device, such as device type, device ID, and the firmware version. &lt;br /&gt;
&lt;br /&gt;
===StateInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information regarding state units and their multiplier. The device provides information such as humidity, temperature, control value, etc., which are recorded in BCI2000 states (see state information on this page for a complete enumeration of states). The device provides these values with floats, but BCI2000 states can only be integers. The multipliers defined in this parameter are used to increase the amount of precision in the state values. To approximately recover the original float values with the units defined in this parameter, divide each state by its corresponding multiplier.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
The states encode auxiliary information returned from the Cortec implant. The device provides this data in floating point numbers, however BCI2000 can only record integers to it&#039;s states. To maintain some precision, these floats are multiplied by constants, then recorded to the states as integers. To approximately recover the original data, divide the state by its corresponding constant. Constants are shown in the following table. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:right;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;font-weight:bold;&amp;quot;&lt;br /&gt;
! State&lt;br /&gt;
! style=&amp;quot;text-align:center;&amp;quot; | Constant&lt;br /&gt;
|-&lt;br /&gt;
| ImplantVoltage&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantHumidity&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantControlValue&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|-&lt;br /&gt;
| ImplantPrimaryCoilCurrent&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1000&lt;br /&gt;
|-&lt;br /&gt;
| ImplantTemperature&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 100&lt;br /&gt;
|}&lt;br /&gt;
===ImplantLostSample===&lt;br /&gt;
The communication protocol the device uses does not re-send lost data. This state annotates what samples were lost in the bio-signal data. Currently, lost samples are made up by duplicating the previous sample. &lt;br /&gt;
&lt;br /&gt;
===ImplantVoltage===&lt;br /&gt;
16 bit state that changes when new supply voltage value is received from the implant. After dividing the integer state value by the the voltage multiplier defined in the StateInfo parameter, the units are in volts.&lt;br /&gt;
&lt;br /&gt;
===ImplantHumidity===&lt;br /&gt;
16 bit state that changes when new humidity value is received from the implant. Units in %rh. &lt;br /&gt;
&lt;br /&gt;
===ImplantControlValue===&lt;br /&gt;
16 bit state that changes when new current control value is received from the external unit. The power of the implant is controlled by the external unit. The control value provides a measure of how good the coupling between the two coils is and how much more power can be provided if necessary.&lt;br /&gt;
The value is between 0.0 and 100.0 percent, where 0.0 translates to no power and 100.0 translates to maximum power applied.&lt;br /&gt;
&lt;br /&gt;
===ImplantPrimaryCoilCurrent===&lt;br /&gt;
16 bit state that change when new primary coil current value is received from the external unit. The primary coil refers to the coil inside the head piece of the external unit. Units are mA. &lt;br /&gt;
&lt;br /&gt;
===ImplantTemperature===&lt;br /&gt;
16 bit state that changes when new temperature value is received from the implant. Units are degrees Celsius. &lt;br /&gt;
&lt;br /&gt;
===ImplantStimulation===&lt;br /&gt;
Binary state that changes when the device reports that it is stimulating. &lt;br /&gt;
&lt;br /&gt;
===RequestedStimulation===&lt;br /&gt;
Binary state that records when a stimulation trigger expression evaluates true. State remains true for the duration triggered stimulation. This is useful for determining the latency between when stimulation is requested and when it is actually applied. This is done by computing the difference in time between the rising edges of &#039;&#039;ImplantStimulation&#039;&#039; and &#039;&#039;RequestedStimulation&#039;&#039; states.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9046</id>
		<title>Contributions:CortecADC</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CortecADC&amp;diff=9046"/>
		<updated>2021-07-22T16:20:36Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* States */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[[File:CorTec_BrainInterchange.png|400px|thumb|right|CorTec Brain Interchange]]&lt;br /&gt;
CortecADC is a source module that allows for inter-cranial recording and stimulating over 32 channels via a fully implantable device. It is intended for long-term measurement of neural activity and electrical stimulation of brain tissue. See the [https://www.cortec-neuro.com/solutions/complete-system/ CorTec site] for more information.&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
* Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
* Markus Adamek (adamek@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 04/19/2021 - First working version&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6266&lt;br /&gt;
*Tested under: 6271&lt;br /&gt;
*Known to compile under: 6271&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Lost samples - The &amp;lt;code&amp;gt;ImplantLostSamples&amp;lt;/code&amp;gt; state records what samples are lost, and their locations. Lost samples are replaced with the previous valid sample for all channels. In offline analysis, be sure to remove these samples and replace them with interpolates. &lt;br /&gt;
* After streaming from the device for a longer period of time, reconnection can be difficult. This issue has been replicated with the CorTec GUI, and seems to be a device hardware/firmware issue.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The total number of digitized and stored channels. In the current implementation, this parameter cannot be edited, and will default to how many channels are available from the implant. &lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Samples per channel per digitized block. &lt;br /&gt;
Together with the sampling rate, this parameter determines how often per second data are collected, processed, and feedback is updated. For example, at 1000 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) will be updated 50 times per second.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The sample rate of the system. This parameter cannot be edited, and will default to the sampling rate available from the implant. &lt;br /&gt;
In case you are experiencing problems by higher sampling rates (e.g., data loss, jerky display, etc.), increase the SampleBlockSize so that you are updating the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications), and increase Visualize-&amp;gt;VisualizeSourceDecimation. This parameter will decrease the number of samples per second that are actually drawn in the Source display.&lt;br /&gt;
&lt;br /&gt;
===SourceChOffset===&lt;br /&gt;
Offset for each channel.&lt;br /&gt;
&lt;br /&gt;
===SourceChGain===&lt;br /&gt;
Gain for each channel. &lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
Names of each channel.&lt;br /&gt;
&lt;br /&gt;
===ReferenceCh===&lt;br /&gt;
This list defines what channels will be used as reference. This list is uploaded to the device and set in hardware, effecting the raw bio-signal data that is recorded by BCI2000. If you do not want to effect the raw bio-signal data that is recorded, you can use the [https://www.bci2000.org/mediawiki/index.php/User_Reference:SpatialFilter spatial filter]. If this parameter is set to auto, no reference channels are used.&lt;br /&gt;
&lt;br /&gt;
==Stimulation Parameters==&lt;br /&gt;
These parameters can be found in the &amp;quot;Stimulation&amp;quot; tab of the BCI2000 config window. &lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:CortecADC_stimulation_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationpulses_parm.PNG&lt;br /&gt;
File:CortecADC_stimulationtriggers_parm.PNG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EnableStimulation===&lt;br /&gt;
This parameter enables/disables stimulation. &lt;br /&gt;
&lt;br /&gt;
===StimulationPulses===&lt;br /&gt;
This parameter defines the shape of the charge balanced stimulation pulses, as described in Fig 1. The pulses are defined in one column of this parameter matrix, and it is possible to define an arbitrary number of pulses, each of which are associated with a user defined integer called a &#039;&#039;PulseID&#039;&#039;.  The rows are labeled and there are some limitations to the magnitudes and durations which are elaborated on in the subsequent section. &lt;br /&gt;
[[File:CortecADC_pulse_def.png|600px|thumb|center|upright=2.5|Figure 1. Pulse definition]]&lt;br /&gt;
====PulseID====&lt;br /&gt;
This must be an integer greater than or equal to zero. This ID will be used in the &#039;&#039;StimulationTriggers&#039;&#039; parameter. &lt;br /&gt;
&lt;br /&gt;
====Pulse Amplitude====&lt;br /&gt;
The pulse amplitude defines the amplitude of the main pulse in units of µA. The counter pulse will have a negative amplitude that is one-quarter of the magnitude of the main pulse. &lt;br /&gt;
&lt;br /&gt;
The valid values of this parameter are in the range 0 to 6120 µA. The granularity changes for smaller amplitudes as follows:&lt;br /&gt;
* amplitude &amp;lt;=  3060 µA: step size of 12&lt;br /&gt;
* amplitude &amp;gt;  3060 µA: step size of 24&lt;br /&gt;
This leads to a set of acceptable values that looks like: [0, 12, ..., 3048, 3060, 3084, ... 6096, 6120]&lt;br /&gt;
You can define this parameter not to be one of the acceptable values in this range, but it will be rounded to the nearest valid value, and other parameters will be varied to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Pulse Duration====&lt;br /&gt;
The pulse duration defines the duration of the main pulse in µs. The counter pulse will have a duration that is four times longer than the main pulse duration. Pulse duration values are set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. Again, if the provided value is not a multiple of 10, it will be rounded to the nearest valid value, and other parameters will be modified to maintain charge balance. &lt;br /&gt;
&lt;br /&gt;
====Dead Zone 0====&lt;br /&gt;
Holds the duration of the pause between main and counter pulse in µs. Values can be set in steps of 10 µs. The acceptable range is between 10 and 2550 µs. The same duration dead zone will also occur after the counter pulse.&lt;br /&gt;
&lt;br /&gt;
====Dead Zone 1====&lt;br /&gt;
Holds the duration of the pause after the pulse was delivered. Values can be set in steps of 80 µs. The acceptable range goes from 10 to 20400 µs. Note that the steps are starting from 0 while the minimum value is 10 µs. This leads to a set of acceptable values that looks like: [10, 80, 160, 240, ... , 20400] µs.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
This parameter defines when stimulation is applied, what pulse is used, how many pulses are applied, and the source and destination locations of the stimulation. These parameters are defined in the rows of this matrix with labels&lt;br /&gt;
====Trigger====&lt;br /&gt;
This must be a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true during the run, the stimulation is applied. &lt;br /&gt;
====PulseID====&lt;br /&gt;
The second row should contain a valid PulseID that is to be used. &lt;br /&gt;
====Source Ch====&lt;br /&gt;
The third row is an embedded list that defines the source electrodes. &lt;br /&gt;
====Destination Ch====&lt;br /&gt;
The fourth row is also an embedded list that defines the destination electrodes. &lt;br /&gt;
====Repetitions====&lt;br /&gt;
The fifth row defines how many times that pulse is repeated. The max is 255.&lt;br /&gt;
&lt;br /&gt;
==Device Parameters==&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information returned from the device, such as device type, device ID, and the firmware version. &lt;br /&gt;
&lt;br /&gt;
===StateInfo===&lt;br /&gt;
This parameter cannot be edited and is automatically populated with information regarding state units and their multiplier. The device provides information such as humidity, temperature, control value, etc., which are recorded in BCI2000 states (see state information on this page for a complete enumeration of states). The device provides these values with floats, but BCI2000 states can only be integers. The multipliers defined in this parameter are used to increase the amount of precision in the state values. To approximately recover the original float values with the units defined in this parameter, divide each state by its corresponding multiplier.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
The states encode auxiliary information returned from the Cortec implant. The device provides this data in floating point numbers, however BCI2000 can only record integers to it&#039;s states. To maintain some precision, these floats are multiplied by constants, then recorded to the states as integers. To approximately recover the original data, divide the state by its corresponding constant. Constants are shown in the following table. &lt;br /&gt;
&lt;br /&gt;
===ImplantLostSample===&lt;br /&gt;
The communication protocol the device uses does not re-send lost data. This state annotates what samples were lost in the bio-signal data. Currently, lost samples are made up by duplicating the previous sample. &lt;br /&gt;
&lt;br /&gt;
===ImplantVoltage===&lt;br /&gt;
16 bit state that changes when new supply voltage value is received from the implant. After dividing the integer state value by the the voltage multiplier defined in the StateInfo parameter, the units are in volts.&lt;br /&gt;
&lt;br /&gt;
===ImplantHumidity===&lt;br /&gt;
16 bit state that changes when new humidity value is received from the implant. Units in %rh. &lt;br /&gt;
&lt;br /&gt;
===ImplantControlValue===&lt;br /&gt;
16 bit state that changes when new current control value is received from the external unit. The power of the implant is controlled by the external unit. The control value provides a measure of how good the coupling between the two coils is and how much more power can be provided if necessary.&lt;br /&gt;
The value is between 0.0 and 100.0 percent, where 0.0 translates to no power and 100.0 translates to maximum power applied.&lt;br /&gt;
&lt;br /&gt;
===ImplantPrimaryCoilCurrent===&lt;br /&gt;
16 bit state that change when new primary coil current value is received from the external unit. The primary coil refers to the coil inside the head piece of the external unit. Units are mA. &lt;br /&gt;
&lt;br /&gt;
===ImplantTemperature===&lt;br /&gt;
16 bit state that changes when new temperature value is received from the implant. Units are degrees Celsius. &lt;br /&gt;
&lt;br /&gt;
===ImplantStimulation===&lt;br /&gt;
Binary state that changes when the device reports that it is stimulating. &lt;br /&gt;
&lt;br /&gt;
===RequestedStimulation===&lt;br /&gt;
Binary state that records when a stimulation trigger expression evaluates true. State remains true for the duration triggered stimulation. This is useful for determining the latency between when stimulation is requested and when it is actually applied. This is done by computing the difference in time between the rising edges of &#039;&#039;ImplantStimulation&#039;&#039; and &#039;&#039;RequestedStimulation&#039;&#039; states.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9045</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9045"/>
		<updated>2021-07-21T19:43:42Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial private release for internal testing.&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage, which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps, and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, suppose you wish to stimulate between two different electrodes within the brain. In that case, you can make two configurations that have the same pulse shape parameters but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, but if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase duration of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter defines when electrodes are stimulated, with what configuration they are stimulated with, and what electrodes are stimulated. The &#039;&#039;Expression&#039;&#039; row defines when electrodes are stimulated by specifying a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true, the electrodes will be stimulated with the pulse shape defined in the &#039;&#039;Configuration ID&#039;&#039; row. Note that two columns can have the same &#039;&#039;Expression&#039;&#039;, which allows for concurrent stimulation between different electrode locations. The &#039;&#039;Configuration ID&#039;&#039; defines the applied pulse shape and corresponds to the column number in the &#039;&#039;StimulationConfiguration&#039;&#039; parameter. Lastly, the &#039;&#039;Electrode(s)&#039;&#039; row specifies which electrodes will be stimulation. It is an embedded list in which you can specify multiple channels (from 1-96). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only stimulate up to &#039;&#039;&#039;15&#039;&#039;&#039; electrodes concurrently. Concurrent stimulation groups, as defined by their equivalent &#039;&#039;Expression&#039;&#039; expression, must also have disjoint electrode lists.&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto-populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9044</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9044"/>
		<updated>2021-07-21T18:14:50Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* Version History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial private release for internal testing.&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, if you wish to stimulate between two different electrodes within the brain, you can make two configurations that have the same pulse shape parameters, but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, however if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase durations of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where you define when electrodes are stimulated, with what configuration they are stimulated with, and what electrodes are stimulated. The &#039;&#039;Expression&#039;&#039; row defines when electrodes are stimulated by specifying a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true, the electrodes will be stimulated with the pulse shape defined in the &#039;&#039;Configuration ID&#039;&#039; row. Note that two columns can have the same &#039;&#039;Expression&#039;&#039;, which allows for concurrent stimulation between different electrode locations. The &#039;&#039;Configuration ID&#039;&#039; defines the applied pulse shape and corresponds to the column number in the &#039;&#039;StimulationConfiguration&#039;&#039; parameter. Lastly, the &#039;&#039;Electrode(s)&#039;&#039; row specifies which electrodes will be stimulation. It is an embedded list in which you can specify multiple channels (from 1-96). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only stimulate up to &#039;&#039;&#039;15&#039;&#039;&#039; electrodes concurrently. Concurrent stimulation groups, as defined by their equivalent &#039;&#039;Expression&#039;&#039; expression, must also have disjoint electrode lists.&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9043</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9043"/>
		<updated>2021-07-21T17:57:30Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationTriggers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, if you wish to stimulate between two different electrodes within the brain, you can make two configurations that have the same pulse shape parameters, but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, however if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase durations of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where you define when electrodes are stimulated, with what configuration they are stimulated with, and what electrodes are stimulated. The &#039;&#039;Expression&#039;&#039; row defines when electrodes are stimulated by specifying a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true, the electrodes will be stimulated with the pulse shape defined in the &#039;&#039;Configuration ID&#039;&#039; row. Note that two columns can have the same &#039;&#039;Expression&#039;&#039;, which allows for concurrent stimulation between different electrode locations. The &#039;&#039;Configuration ID&#039;&#039; defines the applied pulse shape and corresponds to the column number in the &#039;&#039;StimulationConfiguration&#039;&#039; parameter. Lastly, the &#039;&#039;Electrode(s)&#039;&#039; row specifies which electrodes will be stimulation. It is an embedded list in which you can specify multiple channels (from 1-96). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only stimulate up to &#039;&#039;&#039;15&#039;&#039;&#039; electrodes concurrently. Concurrent stimulation groups, as defined by their equivalent &#039;&#039;Expression&#039;&#039; expression, must also have disjoint electrode lists.&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9042</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9042"/>
		<updated>2021-07-21T17:56:55Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationTriggers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, if you wish to stimulate between two different electrodes within the brain, you can make two configurations that have the same pulse shape parameters, but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, however if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase durations of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where you define when electrodes are stimulated, with what configuration they are stimulated with, and what electrodes are stimulated. The &#039;&#039;Expression&#039;&#039; row defines when electrodes are stimulated by specifying a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true, the electrodes will be stimulated with the pulse shape defined in the &#039;&#039;Configuration ID&#039;&#039; row. Note that two columns can have the same &#039;&#039;Expression&#039;&#039;, which allows for concurrent stimulation between different electrode locations. The &#039;&#039;Configuration ID&#039;&#039; defines the applied pulse shape and corresponds to the column number in the &#039;&#039;StimulationConfiguration&#039;&#039; parameter. Lastly, the &#039;&#039;Electrode(s)&#039;&#039; row specifies which electrodes will be stimulation. It is an embedded list in which you can specify channel 1-96. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only stimulate up to &#039;&#039;&#039;15&#039;&#039;&#039; electrodes concurrently. Concurrent stimulation groups, as defined by their equivalent &#039;&#039;Expression&#039;&#039; expression, must also have disjoint electrode lists.&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9041</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9041"/>
		<updated>2021-07-21T17:54:56Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationTriggers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, if you wish to stimulate between two different electrodes within the brain, you can make two configurations that have the same pulse shape parameters, but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, however if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase durations of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where you define when electrodes are stimulated, with what configuration they are stimulated with, and what electrodes are stimulated. The &#039;&#039;Trigger&#039;&#039; row defines when electrodes are stimulated by specifying a [https://www.bci2000.org/mediawiki/index.php/User_Reference:Expression_Syntax BCI2000 expression]. When this expression evaluates true, the electrodes will be stimulated with the pulse shape defined in the &#039;&#039;Configuration ID&#039;&#039; row. Note that two columns can have the same &#039;&#039;trigger&#039;&#039;, which allows for concurrent stimulation between different electrode locations. The &#039;&#039;Configuration ID&#039;&#039; defines the applied pulse shape and corresponds to the column number in the &#039;&#039;StimulationConfiguration&#039;&#039; parameter. Lastly, the &#039;&#039;Electrode(s)&#039;&#039; row specifies which electrodes will be stimulation. It is an embedded list in which you can specify channel 1-96. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only stimulate up to &#039;&#039;&#039;15&#039;&#039;&#039; electrodes concurrently. Concurrent stimulation groups, as defined by their equivalent &#039;&#039;Trigger&#039;&#039; expression, must also have disjoint electrode lists.&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9040</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9040"/>
		<updated>2021-07-21T17:44:12Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, if you wish to stimulate between two different electrodes within the brain, you can make two configurations that have the same pulse shape parameters, but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, however if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase durations of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
*[[CortecADC]]&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9039</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9039"/>
		<updated>2021-07-21T17:42:25Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationConfigurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, if you wish to stimulate between two different electrodes within the brain, you can make two configurations that have the same pulse shape parameters, but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, however if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in [https://www.bci2000.org/mediawiki/index.php/Contributions:CereStim#StimulationTriggers StimulationTriggers] parameter. Note that valid frequencies depend on the phase and interphase durations of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9038</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9038"/>
		<updated>2021-07-21T17:41:22Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationConfigurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1.For each configuration, if the  &#039;&#039;Cathode first&#039;&#039; row is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, then the positive magnitude pulse comes first. If this row is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the negative pulse comes first. The current sink for each pulse is the patient ground, which is the green safety connector on the back of the CereStim. However, if you wish to stimulate between two different electrodes within the brain, you can make two configurations that have the same pulse shape parameters, but have reversed &#039;&#039;Cathode first&#039;&#039; parameters. Current can still potentially flow to the patient ground, however if the impedance between the two electrodes is significantly less than the impedance between the electrodes and patient ground, then the majority of the current will flow between the two electrodes. Information on how to define these two electrodes can be found in Note that valid frequencies depend on the phase and interphase durations of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9037</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9037"/>
		<updated>2021-07-21T17:34:48Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationConfigurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
This parameter is where stimulation pulses are defined. You can define up to 15 different stimulations pulses. The pulse shapes are defined according to Fig. 1. Note that valid frequencies depend on the phase and interphase durations of the pulse.&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim_stimulation_configurations.png&amp;diff=9036</id>
		<title>File:Cerestim stimulation configurations.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim_stimulation_configurations.png&amp;diff=9036"/>
		<updated>2021-07-21T17:31:17Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: Abelsten uploaded a new version of File:Cerestim stimulation configurations.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9035</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9035"/>
		<updated>2021-07-21T17:03:42Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Latency==&lt;br /&gt;
[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9034</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9034"/>
		<updated>2021-07-21T17:03:04Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* CereStimStimulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
This binary state is equal to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; when stimulation is being applied.&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9033</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9033"/>
		<updated>2021-07-21T17:02:02Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationTriggers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=350px heights=350px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9032</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9032"/>
		<updated>2021-07-21T17:01:43Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationTriggers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=400px heights=400px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9031</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9031"/>
		<updated>2021-07-21T17:00:52Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationTriggers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_triggers.png|Figure 3: Stimulation triggers have an expression, configuration ID, and list of electrodes.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9030</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9030"/>
		<updated>2021-07-21T16:59:03Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* StimulationConfigurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&amp;lt;!--[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]--&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; widths=300px heights=300px&amp;gt;&lt;br /&gt;
File:cerestim_stimulation_definition.png|Figure 1: Stimulation pulse shape definition.&lt;br /&gt;
File:cerestim_stimulation_configurations.png|Figure 2: Stimulation pulse shape definition in BCI2000.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim_stimulation_configurations.png&amp;diff=9029</id>
		<title>File:Cerestim stimulation configurations.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim_stimulation_configurations.png&amp;diff=9029"/>
		<updated>2021-07-21T16:56:38Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim_stimulation_triggers.png&amp;diff=9028</id>
		<title>File:Cerestim stimulation triggers.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim_stimulation_triggers.png&amp;diff=9028"/>
		<updated>2021-07-21T16:56:19Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9027</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9027"/>
		<updated>2021-07-21T16:48:27Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
[[File:cerestim_stimulation_definition.png|400px|thumb|right|upright=2.5|Stimulation pulse shape definition]]&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|400px|thumb|right|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim_stimulation_definition.png&amp;diff=9026</id>
		<title>File:Cerestim stimulation definition.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim_stimulation_definition.png&amp;diff=9026"/>
		<updated>2021-07-21T16:43:20Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9025</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9025"/>
		<updated>2021-07-21T15:51:48Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Contributions:Extensions]]&lt;br /&gt;
*[[Contributions:g.EstimSwitchingUnit]]&lt;br /&gt;
*[[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9024</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9024"/>
		<updated>2021-07-21T15:51:19Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Contributions:Extensions]][[Contributions:g.EstimSwitchingUnit]][[Contributions:gEstimFilter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9023</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9023"/>
		<updated>2021-07-21T15:49:19Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* DeviceInfo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
This parameter is auto populated with information about the hardware and firmware versions of the CereStim stimulator that is connected. This information will be viewable during offline analysis by opening the resulting &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9022</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9022"/>
		<updated>2021-07-21T15:46:24Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* AppliedFrequency */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have in Hz. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9021</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9021"/>
		<updated>2021-07-21T15:42:33Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* AppliedFrequency */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
This parameter sets the maximum frequency that stimulation pulses can have. If set to auto, this value defaults to the maximum.&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9020</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9020"/>
		<updated>2021-07-21T15:41:23Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* AppliedPhaseCharge */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
This parameter sets the maximum applied phase charge, where &amp;lt;code&amp;gt;charge=amplitude*width&amp;lt;/code&amp;gt;. Amplitude is the current amplitude in microamps and width is phase duration in microseconds. If set to auto, this parameter will default to the maximum value.&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9019</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9019"/>
		<updated>2021-07-21T15:39:09Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* AppliedCurrent */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
This parameter sets the maximum applied current in microamps. Unlike the applied voltage which fluctuates and therefore may or may not hit the maximum, this parameter serves the purpose of being a safety check for your uploaded stimulation configurations. Thus, to be 100% sure you are not stimulating above a desired current value, you can set this parameter to that maximum. If set to auto, the default will be the maximum current the CereStim can stimulate with.&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9018</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9018"/>
		<updated>2021-07-21T15:34:23Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* AppliedVoltage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
The CereStim drives current, so the applied voltage fluctuates according to the impedance between the current source (electrode) and drain. This dropdown parameter sets the maximum applied voltage (there will be no notification that this maximum has been met).&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9017</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9017"/>
		<updated>2021-07-21T14:11:11Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* Integration into BCI2000 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable &amp;lt;code&amp;gt;EXTENSIONS_CERESTIM=On&amp;lt;/code&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the &#039;&#039;BCI2000FrameworkAppModule&#039;&#039;, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending &amp;lt;code&amp;gt;--EnableCereStim=1&amp;lt;/code&amp;gt; to the user application module start executable command in your batch file.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9016</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9016"/>
		<updated>2021-07-21T14:10:10Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:Cerestim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable EXTENSIONS_CERESTIM=On in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the BCI2000FrameworkAppModule, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending --EnableCereStim=1 to the user application module start executable command in your batch file. &lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9015</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9015"/>
		<updated>2021-07-21T14:09:40Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
[[File:CereStim.jpg|400px|thumb|right|Blackrock CereStim 96]]&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable EXTENSIONS_CERESTIM=On in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the BCI2000FrameworkAppModule, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending --EnableCereStim=1 to the user application module start executable command in your batch file. &lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9014</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9014"/>
		<updated>2021-07-21T14:09:28Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
&amp;lt;!--[[File:CereStim.jpg|400px|thumb|right|Blackrock CereStim 96]]--&amp;gt;&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable EXTENSIONS_CERESTIM=On in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the BCI2000FrameworkAppModule, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending --EnableCereStim=1 to the user application module start executable command in your batch file. &lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim.jpg&amp;diff=9013</id>
		<title>File:Cerestim.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:Cerestim.jpg&amp;diff=9013"/>
		<updated>2021-07-21T14:08:51Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9012</id>
		<title>Contributions:CereStim</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:CereStim&amp;diff=9012"/>
		<updated>2021-07-21T13:30:04Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: Created page with &amp;quot;==Versioning== &amp;lt;!--g.tec g.Estim Switching Unit--&amp;gt; ===Author=== Alexander Belsten (belsten@neurotechcenter.org)  ===Vers...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Versioning==&lt;br /&gt;
&amp;lt;!--[[File:g.switching-unit-device.jpg|400px|thumb|right|g.tec g.Estim Switching Unit]]--&amp;gt;&lt;br /&gt;
===Author===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2021/07/21: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6337&lt;br /&gt;
*Known to compile under: 6337&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description== &lt;br /&gt;
This output extension integrates the Blackrock CereStim 96 intracranial stimulator with BCI2000. This integration enables automated stimulation of up to 96 electrodes with 15 different stimulation waveforms. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Enable the extension in your CMake configuration, enable EXTENSIONS_CERESTIM=On in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the BCI2000FrameworkAppModule, and then rebuild any user application module you want to use the extension with. Once the extension is built into the user application, you can enable it by appending --EnableCereStim=1 to the user application module start executable command in your batch file. &lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The CereStim is configured in the &amp;quot;CereStim&amp;quot; tab. The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===AppliedVoltage===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedCurrent===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedPhaseCharge===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AppliedFrequency===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===StimulationConfigurations===&lt;br /&gt;
&lt;br /&gt;
===StimulationTriggers===&lt;br /&gt;
&lt;br /&gt;
===DeviceInfo===&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===CereStimStimulation===&lt;br /&gt;
&lt;br /&gt;
==Latency==&lt;br /&gt;
&amp;lt;!--[[File:switching_unit_latency.png|600px|thumb|center|upright=2.5|Figure 3: Latency changes greatly depending on if there is one electrode pair or multiple]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Extensions&amp;diff=9011</id>
		<title>Contributions:Extensions</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Extensions&amp;diff=9011"/>
		<updated>2021-07-21T13:10:13Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A framework &#039;&#039;Extension&#039;&#039; is an optional contributed plugin which can affect multiple modules.  For example, various manufacturer-specific  [[User Reference:Logging Input|input-device loggers]] are provided in the &amp;lt;code&amp;gt;src/contrib/Extensions&amp;lt;/code&amp;gt; folder, and these can be optionally added to the BCI2000 framework for SignalSource modules, thereby giving all source modules the ability to log input from the corresponding devices.  Selecting a custom Extension, and re-building your modules to include it, requires the use of CMake and a supported C++ compiler:  see the [[Programming Howto:Quickstart Guide]] for a walkthrough that shows you how to recompile BCI2000 modules. &lt;br /&gt;
&lt;br /&gt;
The following user extensions are available in the [[Contributions:Contents|Contributions]] section of BCI2000:&lt;br /&gt;
&lt;br /&gt;
*[[Contributions:CyberGloveLogger]]: A logger extension which acquires data from CGI, CGII and CGIII Cybergloves. &lt;br /&gt;
*[[Contributions:DataGloveLogger]]: A logger extension which acquires data from the 5DT Data Glove Ultra.&lt;br /&gt;
*[[Contributions:EyetrackerLogger]]: A logger extension which acquires data from Tobii eyetrackers.&lt;br /&gt;
*[[Contributions:EyetrackerLoggerTobii3]]: A logger extension which acquires data from Tobii eyetrackers using SDK version 3&lt;br /&gt;
*[[Contributions:EyetrackerLoggerTobiiPro]]: A logger extension which acquires data from Tobii eyetrackers using Pro SDK&lt;br /&gt;
*[[Contributions:EyetrackerLoggerTobiiX]]: A logger extension which acquires data from Tobii Eye X eyetrackers.&lt;br /&gt;
*[[Contributions:GazeMonitorFilter]]: An application module filter extension which supports the EyetrackerLogger.&lt;br /&gt;
*[[Contributions:WiimoteLogger]]: A logger extension which acquires data from Nintendo Wii Remotes.&lt;br /&gt;
*[[Contributions:WebcamLogger]]: A logger extension which allows for synchronizing webcam video.&lt;br /&gt;
*[[Contributions:AudioExtension]]: An all purpose audio toolkit which allows for realtime multichannel audio I/O.&lt;br /&gt;
*[[Contributions:StimBoxFilter]]: A logger and controller for the gtec g.STIMbox.&lt;br /&gt;
*[[Contributions:ParallelPortFilter]]: A logger and controller for communication through parallel ports.&lt;br /&gt;
*[[Contributions:XsensMTwLogger]]: A logger for recording from Xsens wireless inertial measurement units.  &lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Programming Reference:EnvironmentExtension Class]]&lt;br /&gt;
&lt;br /&gt;
[[Programming Tutorial:Implementing an Input Logger]][[Category:Contents]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:XsensMTwLogger&amp;diff=9010</id>
		<title>Contributions:XsensMTwLogger</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:XsensMTwLogger&amp;diff=9010"/>
		<updated>2021-07-16T14:20:33Z</updated>

		<summary type="html">&lt;p&gt;Abelsten: /* State Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An BCI2000 extension that records synchronized rotational data into states, using XSens’s MTw motion tracking sensors.&lt;br /&gt;
&lt;br /&gt;
[[File:XSensMTwImage.png|right|thumb| An actual image of a MTw]]&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
https://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/XSensMTwLogger&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
William Engelhardt (engelhardt@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
*2021-07-06: Initial public release by Alexander Belsten (belsten@neurotechcenter.org)&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 6329&lt;br /&gt;
*Tested under: 6329&lt;br /&gt;
*Known to compile under: 6330&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Records the X, Y, and Z positions of multiple Xsens MTw (Motion Tracking - wireless) IMUs (Inertial Measurement Units) to events.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
To enable the extension in your CMake configuration, enable &amp;lt;tt&amp;gt;EXTENSIONS_XSENSMTWLOGGER=On&amp;lt;/tt&amp;gt; in the Extensions folder of the CMake GUI and then generate the BCI2000 Visual Studio solution in CMake. Next, open the solution with Visual Studio and rebuild the  &amp;lt;tt&amp;gt;BCI2000FrameworkSigSrcModule&amp;lt;/tt&amp;gt;,  and then rebuild any signal source module you want to use the extension with.&lt;br /&gt;
Once the extension is built into the source module, you can enable it by appending &amp;lt;code&amp;gt;--LogXsensMTw=1&amp;lt;/code&amp;gt;  to the source module &amp;lt;tt&amp;gt;start executable&amp;lt;/tt&amp;gt; command in your batch file. Also, &amp;lt;code&amp;gt;--NumberOfMTws=1&amp;lt;/code&amp;gt; needs to be appended as well. Set this equal to the exact number of MTw&#039;s you want connected. &lt;br /&gt;
&lt;br /&gt;
==Installation and Set-Up==&lt;br /&gt;
To install the drivers for the MTw Awinda, go to their [https://www.xsens.com/software-downloads Software Downloads Page] and download the latest stable software package for your operating system for &amp;quot;MTw Awinda&amp;quot;. This installs the needed drivers; now BCI2000 can connect to the MTw&#039;s. Mtw&#039;s are wireless and communicate with your PC via a USB signal receiver. This signal receiver must be plugged into your computer to record from the MTws. This receiver should be blinking in sync with the MTw&#039;s when they are recording. &lt;br /&gt;
&lt;br /&gt;
==Coordinate System==&lt;br /&gt;
In the figure below, the orange rectangle is the MTw. Three axes are defined, the X, Y, and Z. X and Z range from -180 to 180 degrees, while Y spans from -90 to 90. All three coordinates are rotational, which means MTw’s do not directly measure translational movement. &lt;br /&gt;
&lt;br /&gt;
[[File:XSensMTwCoordinateSystem.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
===User configurable Parameters===&lt;br /&gt;
The motion trackers are configured in the Source tab within the MTw section.&lt;br /&gt;
&lt;br /&gt;
====LogXsensMTw====&lt;br /&gt;
Set to 0 (uncheck) to disable the MTw logger, or 1 (checked) to enable the logger. This should be set in your batch file by appending &amp;lt;code&amp;gt;--LogXsensMTw=1&amp;lt;/code&amp;gt; to the source module &amp;lt;tt&amp;gt;start executable&amp;lt;/tt&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
====NumberOfMTws====&lt;br /&gt;
The exact number of MTw&#039;s that will be connected. 1 is the default, but this number can go up to as many MTw&#039;s as you have. This parameter should be set in your batch file by appending &amp;lt;code&amp;gt;--NumberOfMTws=1&amp;lt;/code&amp;gt;, just as &amp;lt;code&amp;gt;LogXsensMTw&amp;lt;/code&amp;gt; is. This parameter can only be set in the batch and will not appear in the Source tab. &lt;br /&gt;
&lt;br /&gt;
====MasterUpdateRate====&lt;br /&gt;
A default value of 80 Hz. This is the frequency that data is updated from the MTw’s to BCI2000. Below is a table provided by their [https://www.xsens.com/hubfs/Downloads/Manuals/MTw_Awinda_User_Manual.pdf MTw Awinda User Manual] of the maximum update rates relative to the number of MTw’s connected. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Maximum Update Rates&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! Amount of MTw’s&lt;br /&gt;
! Update Rate (Hz)&lt;br /&gt;
|-&lt;br /&gt;
| 1-5&lt;br /&gt;
| 120&lt;br /&gt;
|-&lt;br /&gt;
| 6-9&lt;br /&gt;
| 100&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 80&lt;br /&gt;
|-&lt;br /&gt;
| 11-20&lt;br /&gt;
| 60&lt;br /&gt;
|-&lt;br /&gt;
| 21-32&lt;br /&gt;
| 40&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====DataPrescaler====&lt;br /&gt;
A default value of 10,000,000. The most efficient prescaler is 11,930,464, but for simplicity’s sake this value is rounded. Details about what this value does is located in “Converting Back to Degrees” below. &lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
&lt;br /&gt;
===MTw1X, MTw1Y, MTw1Z===&lt;br /&gt;
These states record the three rotational data values per MTw. See the “Coordinate System” section to see how X, Y, and Z are defined.  If more than one MTw is connected, their label will continue to increase by 1, i.e., MTw2X, MTw3X, etc. The MTw’s connect in order of lowest serial code to highest serial code, so if multiple MTws are being recorded, MTw1 will always have the lowest serial code number. The serial codes and their respective IDs are printed in the operator log for clarity’s sake. This allows you to distinguish what MTw is recording to what state.&lt;br /&gt;
&lt;br /&gt;
==Converting back to Degrees==&lt;br /&gt;
The MTw’s record data in units of degrees, with two of the axes going up to 180, and the other going to 90. They also record a high precision of 6 decimal places. BCI2000 records integers to states, which means that anything after the decimal point will be cut off. If the data is kept as is, this would greatly reduce the quality of the data we are collecting. &lt;br /&gt;
&lt;br /&gt;
BCI2000 can record states with up to 32 bits, which is the resolution we need to record the high quality data from the MTw’s. To do this, the original data will be multiplied by the parameter &amp;lt;code&amp;gt;DataPrescaler&amp;lt;/code&amp;gt;, and shifted up by 2^31. &lt;br /&gt;
&lt;br /&gt;
To convert the data back into degrees, use Matlab or a similar program to &lt;br /&gt;
# Subtract 2^31 from every value.&lt;br /&gt;
# Divide the data by the &amp;lt;code&amp;gt;DataPrescaler&amp;lt;/code&amp;gt;.&lt;br /&gt;
This should now leave you with data between -180 and 180!&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Abelsten</name></author>
	</entry>
</feed>