Jump to content

User Reference:gHIamp: Difference between revisions

From BCI2000 Wiki
Kgoering (talk | contribs)
No edit summary
Mellinger (talk | contribs)
 
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
==Synopsis==
==Synopsis==
The g.HIamp is a 256 channel amplifier from g.tec.  The contributed source module acquires raw signals from the amplifier in real time for use in BCI2000.  
The g.HIamp is a 256 analog channel and 16 digital channel amplifier from g.tec.  The contributed source module acquires raw signals from the amplifier in real time for use in BCI2000.


==Location==
==Location==
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/gHIampSource
http://{{SERVERNAME}}/svn/trunk/src/core/SignalSource/g.HIampSource


==Versioning==
==Versioning==
Line 21: Line 21:
* Future compatible with g.HIamp master/slave configurations
* Future compatible with g.HIamp master/slave configurations
* Using g.HIamp C API version 1.11.02
* Using g.HIamp C API version 1.11.02
Version 1.0 June 2015
* Digital Inputs enabled
* Using g.HIamp C API version 2.14.03


===Source Code Revisions===
===Source Code Revisions===
*Initial development: 3472
*Initial development: 3472
*Tested under: 3763
*Tested under: 4908
*Known to compile under: 3798
*Known to compile under: 4908
*Broken since: --
*Broken since: --


Line 33: Line 37:
==Installation==
==Installation==
Compile the gHIampSource module using [[Programming_Reference:Build_System#How_To_Build_Using_CMake|CMake and your compiler]].  The resulting gHIampSource.exe should be placed in the prog directory automatically.
Compile the gHIampSource module using [[Programming_Reference:Build_System#How_To_Build_Using_CMake|CMake and your compiler]].  The resulting gHIampSource.exe should be placed in the prog directory automatically.
==gHIampgetinfo Tool==
gHIampgetinfo.exe is a simple console application that can be used to determine what gHIamp devices are connected to your system, and what hardware filters they support. This tool is automatically compiled with BCI2000 and resides in the prog directory.
The outputted tables display the index of the filter (<code>num</code>), the high pass frequency (<code>hpf</code>), the low pass frequency (<code>hpf</code>), the corresponding sampling frequency (<code>sfr</code>), the order of the filter (<code>or</code>), and the type. Type-name correspondence can be seen in the table below:
{| class="wikitable" style="text-align:center;"
|- style="font-weight:bold;"
! Type
! Name
|-
| 0
| Chebyshev
|-
| 1
| Butterworth
|-
| 2
| Bessel
|}


==Parameters==
==Parameters==
Line 46: Line 69:
* '''DeviceIDs''' is a list of device serials (typically in "'''HA-20XX.XX.XX'''" format) which corresponds to the devices to record channels from.  One of these serials must be specified as the master device in the "DeviceIDMaster" parameter.  This parameter can also be set to "'''auto'''" if there is only one g.HIamp device connected to the machine.  <br/>
* '''DeviceIDs''' is a list of device serials (typically in "'''HA-20XX.XX.XX'''" format) which corresponds to the devices to record channels from.  One of these serials must be specified as the master device in the "DeviceIDMaster" parameter.  This parameter can also be set to "'''auto'''" if there is only one g.HIamp device connected to the machine.  <br/>
** '''NOTE:''' <span style="text-decoration: underline;">Device slaving is not yet supported by the module OR the g.HIamp C API. -- This parameter only exists for future compatibility. </span>
** '''NOTE:''' <span style="text-decoration: underline;">Device slaving is not yet supported by the module OR the g.HIamp C API. -- This parameter only exists for future compatibility. </span>
* '''AcquisitionMode:''' Data acquisition mode
** ''Analog Signal Acquisition'' = 0
** ''Calibration Signal'' = 1
** ''Impedance Measurement'' = 2
* '''RefChList''' is a list of channels which can act as "Reference" channels for each amp.  If left blank, no channel will be used as a reference, and the raw signal will be recorded in the output.  <br/>
* '''RefChList''' is a list of channels which can act as "Reference" channels for each amp.  If left blank, no channel will be used as a reference, and the raw signal will be recorded in the output.  <br/>
** '''NOTE:''' <span style="text-decoration: underline;">If specifying reference channels, there must be one reference channel per device specified in "DeviceIDs" in the same order. </span>
** '''NOTE:''' <span style="text-decoration: underline;">If specifying reference channels, there must be one reference channel per device specified in "DeviceIDs" in the same order. </span>
Line 60: Line 87:
* '''NotchType'''
* '''NotchType'''
* '''SourceBufferSize'''
* '''SourceBufferSize'''
* '''EnableDigitalInputs''' is a toggle button to enable both digital input ports on the back of the amp and save them as synchronous states from each individual pin
* '''EnableDigitalInputs''' is a toggle button to enable both digital input ports and store them in synchronous states DigitalInput1 - DigitalInput16.
** '''NOTE''' <span style= "text-decoration: underline;"> To record digital input, at least one analog channel must also be recorded. </span>


===Valid Operating Modes===
===Valid Operating Modes===
Line 89: Line 117:


==Digital Input==
==Digital Input==
The g.HIamp has two digital input ports which give a total of 16 digital input channels, see figures below. These channels can be read and stored in synchronous states and the same sample rate as the analog channels. More information on the states are below.
[[File:DigIn1.JPG]]
[[File:DigIn2.JPG]]


There are two digital input ports on the back of the gHIamp. With the newest source code, data can be read through them and saved as synchronous states while reading the data from the analog channels simultaneously.
{|style="margin: 2 auto;"
| [[File:DigIn1.JPG|thumb|left| Digital Input 1 port (Click to enlarge image)]]
| [[File:DigIn2.JPG|thumb|left| Digital Input 2 port (Click to enlarge image)]]
|}


===State Variables===
===State Variables===


The state name gives which pin the value was read from. They are saved synchronously as data is gathered. Their value can be either a 0 or a 1.
The state name gives which pin the value was read from. They are saved synchronously as the signals are read. Their value can be either a 0 or a 1.


<pre>
<pre>
Line 104: Line 132:
StateName          == Sensor
StateName          == Sensor
-----------------------------------------
-----------------------------------------
HIampDigitalInput1 == DigitalIn Pin1
DigitalInput1 == Digital In 1 Pin1
HIampDigitalInput2 == DigitalIn Pin2
DigitalInput2 == Digital In 1 Pin2
HIampDigitalInput3 == DigitalIn Pin3
DigitalInput3 == Digital In 1 Pin3
HIampDigitalInput4 == DigitalIn Pin4
DigitalInput4 == Digital In 1 Pin4
HIampDigitalInput5 == DigitalIn Pin5
DigitalInput5 == Digital In 1 Pin5
HIampDigitalInput6 == DigitalIn Pin6
DigitalInput6 == Digital In 1 Pin6
HIampDigitalInput7 == DigitalIn Pin7
DigitalInput7 == Digital In 1 Pin7
HIampDigitalInput8 == DigitalIn Pin8
DigitalInput8 == Digital In 1 Pin8
HIampDigitalInput9 == DigitalIn Pin9
DigitalInput9 == Digital In 2 Pin1
HIampDigitalInput10 == DigitalIn Pin10
DigitalInput10 == Digital In 2 Pin2
HIampDigitalInput11 == DigitalIn Pin11
DigitalInput11 == Digital In 2 Pin3
HIampDigitalInput12 == DigitalIn Pin12
DigitalInput12 == Digital In 2 Pin4
HIampDigitalInput13 == DigitalIn Pin13
DigitalInput13 == Digital In 2 Pin5
HIampDigitalInput14 == DigitalIn Pin14
DigitalInput14 == Digital In 2 Pin6
HIampDigitalInput15 == DigitalIn Pin15
DigitalInput15 == Digital In 2 Pin7
HIampDigitalInput16 == DigitalIn Pin16
DigitalInput16 == Digital In 2 Pin8
-----------------------------------------
-----------------------------------------
</pre>
</pre>
==See also==
==See also==
[[User Reference:Filters]], [[Contributions:ADCs]]
[[User Reference:Filters]], [[Contributions:ADCs]]


[[Category:Contributions]][[Category:Data Acquisition]]
[[Category:Data Acquisition]]

Latest revision as of 15:58, 9 January 2026

Synopsis

The g.HIamp is a 256 analog channel and 16 digital channel amplifier from g.tec. The contributed source module acquires raw signals from the amplifier in real time for use in BCI2000.

Location

http://www.bci2000.org/svn/trunk/src/core/SignalSource/g.HIampSource

Versioning

Authors

Griffin Milsap (griffin.milsap@gmail.com) Rensselaer Polytechnic Institute

Kristopher Kaleb Goering (kaleb.goering@gmail.com) University of Kansas

Version History

Version 0.9: August 2011

  • Supports one g.HIamp
  • Supports Filters
  • Referencing by any channel
  • Future compatible with g.HIamp master/slave configurations
  • Using g.HIamp C API version 1.11.02

Version 1.0 June 2015

  • Digital Inputs enabled
  • Using g.HIamp C API version 2.14.03

Source Code Revisions

  • Initial development: 3472
  • Tested under: 4908
  • Known to compile under: 4908
  • Broken since: --

Functional Description

Acquires raw data from the g.HIamp.

Installation

Compile the gHIampSource module using CMake and your compiler. The resulting gHIampSource.exe should be placed in the prog directory automatically.

gHIampgetinfo Tool

gHIampgetinfo.exe is a simple console application that can be used to determine what gHIamp devices are connected to your system, and what hardware filters they support. This tool is automatically compiled with BCI2000 and resides in the prog directory.

The outputted tables display the index of the filter (num), the high pass frequency (hpf), the low pass frequency (hpf), the corresponding sampling frequency (sfr), the order of the filter (or), and the type. Type-name correspondence can be seen in the table below:

Type Name
0 Chebyshev
1 Butterworth
2 Bessel

Parameters

  • SourceCh represents the total number of channels to be logged from the source module.
  • SampleBlockSize should be set equal to the size of the sample block pulled from the device.
  • SampleRate determines the rate at which the device samples data.
  • ChannelNames is a convenience parameter. Name channels here and they can be referenced by these names later.
  • SourceChOffset should be set to a list of "0"s -- one 0 for each channel as indicated by SourceCh, separated by spaces.
  • SourceChGain should be set to a list of "1"s -- one 0 for each channel as indicated by SourceCh, separated by spaces.
  • DeviceIDMaster is the serial number identifier of the master g.HIamp device. This serial can be found on the physical device and is typically in a "HA-20XX.XX.XX" format. This parameter can also be set to "auto" if there is only one g.HIamp device connected to the machine.
  • DeviceIDs is a list of device serials (typically in "HA-20XX.XX.XX" format) which corresponds to the devices to record channels from. One of these serials must be specified as the master device in the "DeviceIDMaster" parameter. This parameter can also be set to "auto" if there is only one g.HIamp device connected to the machine.
    • NOTE: Device slaving is not yet supported by the module OR the g.HIamp C API. -- This parameter only exists for future compatibility.
  • AcquisitionMode: Data acquisition mode
    • Analog Signal Acquisition = 0
    • Calibration Signal = 1
    • Impedance Measurement = 2
  • RefChList is a list of channels which can act as "Reference" channels for each amp. If left blank, no channel will be used as a reference, and the raw signal will be recorded in the output.
    • NOTE: If specifying reference channels, there must be one reference channel per device specified in "DeviceIDs" in the same order.
  • SourceChList
  • FilterEnabled
  • FilterHighPass
  • FilterLowPass
  • FilterModelOrder
  • FilterType
  • NotchEnabled
  • NotchHighPass
  • NotchLowPass
  • NotchModelOrder
  • NotchType
  • SourceBufferSize
  • EnableDigitalInputs is a toggle button to enable both digital input ports and store them in synchronous states DigitalInput1 - DigitalInput16.
    • NOTE To record digital input, at least one analog channel must also be recorded.

Valid Operating Modes

The gHIamp only accepts specific combinations of sampling rates and sample block sizes. The following table shows all valid combinations of sample rate and block size. Operating outside of these modes is untested and could result in problems.

Sample Rate Valid Sample Block Sizes
256 Samples per second 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 32 64 128 256
512 Samples per second 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 32 64 128 256
600 Samples per second 4 5 6 7 8 9 10 11 12 13 15 16 17 32 64 128 256
1200 Samples per second 8 9 10 11 12 13 14 15 16 32 64 128 256
2400 Samples per second 16 32 64 128 256
4800 Samples per second 32 64 128 256

Digital Input

The g.HIamp has two digital input ports which give a total of 16 digital input channels, see figures below. These channels can be read and stored in synchronous states and the same sample rate as the analog channels. More information on the states are below.


State Variables

The state name gives which pin the value was read from. They are saved synchronously as the signals are read. Their value can be either a 0 or a 1.

-----------------------------------------
StateName           == Sensor
-----------------------------------------
DigitalInput1  == Digital In 1 Pin1
DigitalInput2  == Digital In 1 Pin2
DigitalInput3  == Digital In 1 Pin3
DigitalInput4  == Digital In 1 Pin4
DigitalInput5  == Digital In 1 Pin5
DigitalInput6  == Digital In 1 Pin6
DigitalInput7  == Digital In 1 Pin7
DigitalInput8  == Digital In 1 Pin8
DigitalInput9  == Digital In 2 Pin1
DigitalInput10 == Digital In 2 Pin2
DigitalInput11 == Digital In 2 Pin3
DigitalInput12 == Digital In 2 Pin4
DigitalInput13 == Digital In 2 Pin5
DigitalInput14 == Digital In 2 Pin6
DigitalInput15 == Digital In 2 Pin7
DigitalInput16 == Digital In 2 Pin8
-----------------------------------------

See also

User Reference:Filters, Contributions:ADCs