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.
Overview of NatusADC working
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.
Packet, block and samples relationship
Version History
Source Code Revisions
Initial development:
Tested under: 7372
Known to compile under:7372
Broken since: --
Natus software version: 9.x
Natus Data Export Version: 9.4
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" Run ipconfig on the Natus computer and note the IP address
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 Set Natus Sampling Rate
Start an EEG study in Neuroworks using the New EEG button. Start a new Natus study You will need to enter the study information. Enter the study information Note that you do not need to start the recording for the signal to stream to BCI2000. Study is running
Run the executable XLDataExportSrv.exe found in the XLDataExportService folder that was copied to the Natus computer Run the executable XLDataExportSrv.exe from the XLDataExportService folder
Note that this can be started before an EEG study has been started, or after an EEG study is already running
A small horizontal window should appear, indicating study data is streaming Natus Data Export Service Running
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 NatusSignalSource
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 (inherited from the Natus system)
ServerBlockSize: 64 (server buffer size. Larger ServerBlockSize can lead to performance issues.)
DecimationFactor: 1 (you can decimate the incoming sampled data by the DecimationFactor. The BCI2000 sampling rate will reflect the decimated rate.)
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