Contributions:NatusADC: Difference between revisions
| Line 69: | Line 69: | ||
#* DecimationFactor: 1 | #* DecimationFactor: 1 | ||
#* ServerIP: Set the IP address to that of the Natus computer | #* ServerIP: Set the IP address to that of the Natus computer | ||
#*[[File:Natus8_BCI2000Parameters.jpg|center|1000px|Natus BCI2000 parameters]] | |||
# Press “Set Config.” Data should begin streaming. Open the System Log from the BCI2000 Operator window to confirm that the sampling rate and channel count were inherited correctly from the Natus stream | # Press “Set Config.” Data should begin streaming. Open the System Log from the BCI2000 Operator window to confirm that the sampling rate and channel count were inherited correctly from the Natus stream | ||
Revision as of 20:39, 23 May 2023
Function
The NatusADC filter acquires raw data in real-time from Natus Headboxes over UDP connection for signal processing and visualizations. The overview of the NatusADC working is shown in the image below.

NatusDataServer processes and sends signal from the device to the client application. A project named XLDataExportClient reads signals from the device and calls the NatusDataServer's functions to send the signal to the client. NatusClient is the client application within the BCI2000 that receives the signals and does the initial processing. NatusPackageInterface contains the implementation of data transfer protocol between server/device and client and is used by NatusClient and NatusDataServer to communicate with each other over TCP and UDP. NatusDataServer and NatusPackageInterface are independent of BCI2000, whereas NatusClient relies on BCI2000.
The below image explains the context in which packet, blocks, samples and channels are used in this project. A packet may have one or block, a block may have one or more samples and a sample contains values for all the channels.

Version History
Source Code Revisions
- Initial development:
- Tested under:
- Known to compile under:
- Broken since: --
- Natus software version: 9.x
Prerequisites
- The NatusADC source module requires a proprietary SDK protected by an NDA with Natus. Please contact Natus for this NDA and for access to the XLDataExportClient SDK before attempting to use the NatusADC source module.
- It is also helpful to have an ethernet port available for the Natus computer. If your system does not have an ethernet port, consider using a USB ethernet dongle.
Hardware
In theory, the module should work fine with all of the following Natus Headboxes.
- EEG32
- EEG128, EEG128FS
- Mobee32, Mobee32-02
- Mobee-24
- Connex/ Brain Monitor
- Trex
- EMU40
- EEG32u
- Quantum
- NeuroLink IP
- Bio-logic NetLink
- Bio-logic Traveler
Drivers
Connecting Natus to BCI2000
On the Natus Computer
- If you have previously registered the XLDataExportClient.dll for an older version of the data export tool, you must first deregister this dll. Launch a command window as an administrator and type regsvr /u XLDataExportClient.dll
- Connect to the network via ethernet cable. Alternately, it is preferable to connect directly to the BCI2000 computer via ethernet.
- Copy the Export Service folder found in src\private\SignalSource\NatusSignalSource\DataExport_9.4\XLDataExportService to the hard drive of the computer running Natus Neuroworks or to a USB drive
- Note the IP address of the Natus computer (run “ipconfig” in the Command Prompt on the Natus computer). If the computers are directly connected with an ethernet cable, the IP address should be under "ethernet adapter ethernet"
- When starting a new study, set the sampling rate of the acquisition system by opening "Wave" and going to edit -> settings -> acquisition while a study is NOT running
- Start an EEG study in Neuroworks. You will need to enter the study information. Note that you do not need to start the recording for the signal to stream to BCI2000.
- Run the executable XLDataExportSrv.exe found in the XLDataExportService folder that was copied to the Natus computer
On the BCI2000 Computer
- Connect to the same network that the Natus computer is connected via ethernet cable. Alternately, it is preferable to connect directly to the Natus computer via ethernet.
- Run a BCI2000 batch file that loads the NatusADC Signal Source
- Open the config window and navigate to the source tab. Source parameters will vary according to your needs, but some recommended settings can be found below
- SampleBlockSize: 1024 (at a sampling rate of 16384, this yields a sample block size of 62.5ms. Adjust the number of samples per block to yield a reasonable sample block duration, above 20ms)
- SamplingRate: auto
- ServerBlockSize: 64
- DecimationFactor: 1
- ServerIP: Set the IP address to that of the Natus computer

Natus BCI2000 parameters
- Press “Set Config.” Data should begin streaming. Open the System Log from the BCI2000 Operator window to confirm that the sampling rate and channel count were inherited correctly from the Natus stream
Parameters
Parameters common to all source modules are described under User Reference:DataIOFilter. In addition, the following parameters are supported:
SamplingRate
The rate at which the device samples the data. The default value is the device's default sampling rate.
SampleBlockSize
The number of samples per block the output signal, created by the client application(NatusADC), should have. The default value is 20
ServerBlockSize
The number of blocks sent by the server/device in a single UDP Packet. The default value is 1.
DecimationFactor
The decimation factor. The factor by which to decimate/downsize the signal. The default value is 1. The SamplingRate is updated by dividing it by the DecimationFactor. Note: The SamplingRate should be an integral multiple of DecimationFactor.
ServerIP
The IPv4 address of the server/device.
Port
The port number of the server/device which on which TCP runs. UDP port number is assumed to be 1 + TCP port number.
SourceCh
The number of channels to be acquired from the device. If this is set to auto, all the available channels from the device will be acquired.
SourceChGain
SourceChGain should be left to auto. The default value is 0 for every channel.
SourceChOffset
SourceChOffset should be left to auto. The default value is 1 microVolt for every channel.
SourceChList
The list of channel numbers to be acquired from the device. The order of the numbers doesn't matter, i.e., '1 2 3 4' is same as '3 2 4 1'. Entering duplicate channels, eg. in '1 2 3 2' will result in an error. Entering an invalid channel number, i.e., a number greater than the maximum number of the channels will result in an error. If set to auto, all the device channels will be streamed.
ChannelNames
The user-preferred channel names. If set to auto, the channel names will be retrieved from the device. If the device doesn't have any specific channel names, the channel names will be set to 0 to SourceCh - 1. If set manually, names should be given for each channel in SourceChList
States
Interpolated
Interpolated is represented by 1 bit. The device sends data in packets over UDP connection which is not a reliable connection and hence may result in loss of some packets. The lost packets between two packets received from the device are linearly interpolated from the aforementioned two packets. The Interpolated state value is 1 if the packet is interpolated or 0 if the packet is received from the device.
Additional Info
The module also contains a function called GetDecimationFactor to query the current Decimation Factor from the server/device.
More details from a programmer's perspective can be found here Programming_Reference:NatusADC
See also
User Reference:DataIOFilter, Programming Reference:GenericADC Class






