EthoVision integration with NSPs using TCAP signal and TTL signal

EthoVision integration with NSPs using TCAP signal and TTL signal

Integration using TCAP signal
The best option to synchronize EthoVision's video/tracking with Blackrock Neurotech's NSPs is using the TCAP signals from EthoVision. 

I. The TCAP signal contains Time Code and Auxiliary data plus a Parity Checksum (for more details please refer to " Noldus EthoVision XT Combined KB Article "). A series of bits called a frame is sent from the EthoVision XT computer to the external DAQ device. Each frame contains the current date and time and additional information. synchronization of tracking and external data is more accurate using the Time Code signal because it is done for more than two offset points and not just at the start and stop of acquisition as with the On-Off signal.
 



II. Use a COM (USB adapter optional) to BNC cable to transmit TCAP signal from the EthoVision PC to the Analog Input port on NSPs. 

III. Set up in EthoVision: 

Choose "Enable DAQ co-acquisition", choose "signal type" to be "Time Code (TCAP)".
Enter the Sample rate (in Hz) with which you sample data on your DAQ system (for sample rate higher than 2 KHz, set 2000 Hz). 
Depending on the Sample rate, the Minimal sampling time changes; this indicates the minimum time the data should be acquired on the DAQ system for synchronization to work properly.

IV. Set up in Central:  configure the Analog-In channel's (the one connected with the BNC cable) sampling frequency to >=2000 Hz
Start NSP's recording first, than start behavior trial with Ethovision . 

The Raster Plot in Central can display TCAP signal in the Analog-In channel as below. 

V. Check the data in MATLAB for further analysis

Use openNSx with 'noalign' to access the NSx.Time array which is the PTP timestamps for the Analog-In data or neural data from the same trial.  The customer can further develop algorithms to align the data in the same time system.   Please note that the Analog-In data are clusters of 1 and 0 bits carrying the TCAP signal, each cluster represent one frame.  The leading edge of the first bit of every Bit frame indicates the exact time stamp which is “translated” into the bit frame itself. For example, if the time stamp of the leading edge of the first bit of the bit frame is 2005-04-28, 12:43:48,281, then this timestamp value is encoded in the bit frame.

Aligning sample neural data with TCAP signal (note that the onset of the cluster of each TCAP signal is the time the frame is acquired). 

start_time_point = 1.734491210000000e+18; % the value is obtained through examining the absolute PTP time values in the NSx.Time arrays, and pick a value at the begingning of the trial to set a "0" time point.
figure();
Timestamp_ns3 = (NS3.Time - start_time_point)/1000000000; %convert nsx timestamp in seconds
Timestamp_ns4 = (NS4.Time - start_time_point)/1000000000; %ns4 is DNSS neural data sampled at 10kHz, ns3 is TCAP signal through Analog 1 at 2kHz
plot(Timestamp_ns3,NS3.Data/10-1000); % some adjustment for visual display
hold on
plot(Timestamp_ns4,NS4.Data);



VI. Check the data in EthoVision (refer to " Noldus EthoVision XT Combined KB Article ")
This imports neural continuous data or spike data into EthoVision for visualization purposes. 
Three different CSV generator Matlab functions: NSxToNoldus.m, NEVToNoldus.m, and NSxTCAP.m (ask Blackrock Neurotech's Support for them)

NSxToNoldus, create a CSV of the properly parsed Neural signal data. 
NEVToNoldus.m, creates CSV files from Blackrock data that calculates the number of spikes in a video frame and excludes spike rate data where the on/off signal from the RS232 adapter is low.
NSxTCAP.m creats ASCII files with TCAP data.

Integration using TTL signal
For applications that only needs aligned start and stop of the behavior trial with external data acquisition, EthoVision could just send on and off signals (can be TTL) to the external data acquisition device. Refer to EthoVision XT 18 Help, note that the On and Off signal are not sent at the exact moments of the trial start and stop...  This functionality may not be very useful for neural data recording synchronization. 


To set up in EthoVision
Engaging Noldus I/O box:



Add actions of Blackrock remote start and Blackrock remote stop in trial control

Define the TTL output for Blackrock remote start and Blackrock remote stop: start is ouput 1 high, stop is output 1 low.




In BRN Central, set up 

Wiring between EthoVision I/O and BRN Digital port
EthoVision PC to the USB port on the I/O box

TTL port on the I/O box to Digital breakout adaptor/Digital port on the NSP, with Ethernet to BNC cable, BNC to alligator cable in between. Please customize accordingly. 




 Other ways to ensure synchronicity between video and data streams

Refer to EthoVision XT 18 Help. It is possible to configure the output pin from the 6-pin I/O connector on the back of the Basler Camera to send TTL pulses to the NSPs. This may need device configuration with Basler camera's hardware and software, and device integration outside of EthoVision and Central/NSPs. 
















The above document is an ongoing work on the topic and may include inaccurate information. More tests and verification are expected. 
    • Related Articles

    • Noldus Ethovision Integration Guide

      Noldus EthoVision XT (EVXT) is a software platform designed for tracking and analyzing behavior, movement, and activity of a wide range of animal models. EVXT offers solutions for many standard behavioral tests such as the Morris water maze or open ...
    • How to Synchronize Multiple Neural Signal Processors

      Introduction Neural Signal Processors can be synchronized to achieve higher channel counts on the combined system. Hardware Requirements Neural Signal Processors with PN 4176 were not all synchronization capable. To check whether your unit is ...
    • Neural Signal Processor Input Maximum Input Characteristics

      Defining MaximumsThe maximum input characteristics information provided below is directly extracted from the Maximum Ratings which is normally mentioned inside the technical datasheets associated with the installed electronics behind the Analog and ...
    • Using cbMEX on Unix Operating Systems

      Introduction This article covers the method for allowing cbmex, our online Matlab interface, to function on unix operating systems. For more information on cbmex and our Matlab libraries, please refer to the user manuals section of our website.  ...
    • Signal Processing Flow Diagram

      The attached document shows how various signal processing steps and Central signal processing features are applied to the neural data stream from Blackrock analog and digital (CerePlex) systems.