Time stamp with another interface

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Time stamp with another interface
#1
Hi Josh.
I am wondering how can I send time stamp from bpod to TDT interface. What I am trying to do is sending each time stamp while I am recording transient calcium signal. So can you provide me detail information how to get it? In hardward, maybe I have use one of output BNC port, that I can understand. But what kind of code I have to use? 
 
Also I am wondering that whether I can make the code that synchronizing start time with TDT interface? For example, I want to start bpod training when I press start button in fiber photometry machine or opposite way. Which code will be helpful or which webpage include those kind of information?

Thanks, 
Kyuhyun.
Reply
#2
Hi Kyuhyun


Bpod records the time internally, and doesn't have a way to stream its clock to other devices.
Instead, it can send a TTL "sync" pulse to the other device at a known time. You can match the time of the event on both devices, to align Bpod events with the acquisition system's data stream.

The easiest way to send a sync pulse is using Bpod's configurable sync channel. From the Bpod console, select the wrench icon (Settings) and then the sync icon. You will see a UI with two drop menus. The first selects the channel to be used for sync (by default, none). The second selects when the logic pulses will be sent. You have two options:
  • Each_Trial (logic line goes high at time 0 when each trial begins, and low when the trial's last state ends)
  • Each_State (logic line switches levels with each state i.e. low-->high when entering state 1, high-->low when entering state 2...
I'm not sure which TDT device you're using, but most have BNC logic input channels - so the easiest thing would be to select one of Bpod's BNC output channels, and use a BNC cable to connect the systems.

With a second BNC cable, you can use Bpod's BNC input channels to make TDT start the trial - in state 1 of your state machine, wait for a BNC1_High event from TDT.
An example of this is provided in the repository, here.

I hope this helps!
Reply
#3
(08-21-2017, 02:08 AM)Josh Wrote: Hi Kyuhyun


Bpod records the time internally, and doesn't have a way to stream its clock to other devices.
Instead, it can send a TTL "sync" pulse to the other device at a known time. You can match the time of the event on both devices, to align Bpod events with the acquisition system's data stream.

The easiest way to send a sync pulse is using Bpod's configurable sync channel. From the Bpod console, select the wrench icon (Settings) and then the sync icon. You will see a UI with two drop menus. The first selects the channel to be used for sync (by default, none). The second selects when the logic pulses will be sent. You have two options:
  • Each_Trial (logic line goes high at time 0 when each trial begins, and low when the trial's last state ends)
  • Each_State (logic line switches levels with each state i.e. low-->high when entering state 1, high-->low when entering state 2...
I'm not sure which TDT device you're using, but most have BNC logic input channels - so the easiest thing would be to select one of Bpod's BNC output channels, and use a BNC cable to connect the systems.

With a second BNC cable, you can use Bpod's BNC input channels to make TDT start the trial - in state 1 of your state machine, wait for a BNC1_High event from TDT.
An example of this is provided in the repository, here.

I hope this helps!

Hi Josh
I figured out generating 1 TTL signal. Thanks!
My second obstacle is, how can bpod send 2 different ttl signal to the another machine? 
I want to make timestamp among different events. But the default setting (timestamp for every status change) didn't allow me to do that..
Reply
#4
Hello Kyuhyun

If you are able to design your state matrix so that a state change is triggered by the event you want to record, you can use the state's output actions to set any output channel to signal the event. 

Currently, there is no way to signal every instance of a particular event (regardless of state).

-Josh
Reply
#5
Photo 
[quote pid='288' dateline='1503281302']
" From the Bpod console, select the wrench icon (Settings) and then the sync icon. You will see a UI with two drop menus. The first selects the channel to be used for sync (by default, none). The second selects when the logic pulses will be sent. "
[/quote]
 Hi,
I was wondering which version of the Bpod you are using as I don't have this sync icon on the Bpod console (in settings).
I am using Bpod 0.5.
thanks,
Sarah


Attached Files Thumbnail(s)
   
Reply
#6
Hi Sarah

With Bpod 0.5, synchronization is done differently. 
There is a dedicated RJ45 connector labeled "sync".
As you view the connector, the left-most pin is ground.
Going rightwards, each line's logic level indicates a bit of the current state number.
For instance, if the state machine was in state# 5 (binary 101), the pins would read:
Gnd, 5V, 0V, 5V, 0V, 0V, 0V, 0V

To record the current state number in your acquisition system, you need to connect the ground pin to the system's ground, and each Sync port pin on Bpod to a digital input pin on the Ephys system. For Neuralynx and Open Ephys, we provide breakout boards to do this, here and here.

I hope this helps!
Reply
#7
(08-17-2017, 07:55 PM)Kyuhyun Wrote: Hi Josh.
I am wondering how can I send time stamp from bpod to TDT interface. What I am trying to do is sending each time stamp while I am recording transient calcium signal. So can you provide me detail information how to get it? In hardward, maybe I have use one of output BNC port, that I can understand. But what kind of code I have to use? 
 
Also I am wondering that whether I can make the code that synchronizing start time with TDT interface? For example, I want to start bpod training when I press start button in fiber photometry machine or opposite way. Which code will be helpful or which webpage include those kind of information?

Thanks, 
Kyuhyun.

All followed by me however, i reach the point where sync has started but unable to par the error. That i got after that. Please suggest me.
Reply
#8
Which error?
Reply
#9
(08-21-2017, 02:08 AM)Josh Wrote: Hi Kyuhyun


Bpod records the time internally, and doesn't have a way to stream its clock to other devices.
Instead, it can send a TTL "sync" pulse to the other device at a known time. You can match the time of the event on both devices, to align Bpod events with the acquisition system's data stream.

The easiest way to send a sync pulse is using Bpod's configurable sync channel. From the Bpod console, select the wrench icon (Settings) and then the sync icon. You will see a UI with two drop menus. The first selects the channel to be used for sync (by default, none). The second selects when the logic pulses will be sent. You have two options:
  • Each_Trial (logic line goes high at time 0 when each trial begins, and low when the trial's last state ends)
  • Each_State (logic line switches levels with each state i.e. low-->high when entering state 1, high-->low when entering state 2...
I'm not sure which TDT device you're using, but most have BNC logic input channels - so the easiest thing would be to select one of Bpod's BNC output channels, and use a BNC cable to connect the systems.

With a second BNC cable, you can use Bpod's BNC input channels to make TDT start the trial - in state 1 of your state machine, wait for a BNC1_High event from TDT.
An example of this is provided in the repository, here.

I hope this helps!
Hi Josh,

Is there anything else I have to do? I have selected a BNC channel and the option Each_Trial, but then when I run my protocol, the BNC button on the console won't light up at the beginning of each trial. I haven't paired it with my acquisition system yet, but for now I just want to make sure that the signal is being sent, and it doesn't seem like it.

Thanks!
Veronica
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)