Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Jack_23

Member
Registered:
Posts: 31
Reply with quote  #1 
Could someone please explain the difference between strobe and behavioral code?
Thank you.

0
ryklin

Administrator
Registered:
Posts: 235
Reply with quote  #2 
A strobe is a unique and constant signal telling your peripheral that a code has been sent. Essentially, a strobe is a notification to the peripheral tell information has been transmitted, and you should go ahead and process it (it was just noise). Typically, a strobe is a digital output that immediately follows the behavioral code digital output (as illustrated below).

For example, you have high frequency data logger, it's turned on and sampling neural signals. Side by side is Monkey Logic presenting stimulus and recording eye movements. The data logger and Monkey Logic need to be temporally synchronized so that you can post-hoc determine what neural signal was sampled when stimulus was turned on and off. You create a counter variable in monkeylogic, starting at 0. It increments each time the stimulus is turned (perhaps once per trial). This counter value is your "behavioral code". When the stimulus turns on, the counter increments in your timing file, and the behavioral code is sent as a digital output to the neurological sampling peripheral which is listening on it's digital board. It detects a signal, the counter value, but it will not record that value unless it receives a confirmation signal - that's the strobe. The strobe is always the same value. The behavioral code is always changing, but since the strobe is the same digital value, the peripheral can confirm that the behavioral code was indeed sent. Lets consider the following scenerio:

Stimulus Presentation 1
Behavioral Code digout = 0000 0000 0000 0001
Strobe               digout = 1000 0000 0000 0000

Stimulus Presentation 2
Behavioral Code digout = 0000 0000 0000 0010
Strobe               digout = 1000 0000 0000 0000

Stimulus Presentation 3
Behavioral Code digout = 0000 0000 0000 0011
Strobe              digout =  1000 0000 0000 0000

Stimulus Presentation 4
Behavioral Code digout = 0000 0000 0000 0100
Strobe               digout = 1000 0000 0000 0000

Stimulus Presentation 5
Behavioral Code digout = 0000 0000 0000 0101
Strobe               digout = 1000 0000 0000 0000

and so on.

There is a limitation here however. When the behavioral code reaches 65536 (1111 1111 1111 1111), it will interfere with the strobe value. So to prevent this you need to limit the behavioral code to be in the range of 0 ... 2^16-1, because in this case strobe == 2^16. Unless you have more than 16536 stimulus presentations per session, you have nothing to worry about. However, if you do need a higher dynamic range, you will need more than 16 digital output bits. Which is discussed here  https://www.nimh.nih.gov/labs-at-nimh/research-areas/clinics-and-labs/ln/shn/monkeylogic/national-instruments-daq-card.shtml

I hope this explanation helps, and perhaps Jaewon can also add his thoughts to it.




0
Jaewon

Administrator
Registered:
Posts: 622
Reply with quote  #3 
The behavioral code is a word (a number) that you want to send to your external device, like plexon, tdt, blockrock, etc. The strobe is a one-digit signal that triggers the external device to read the behavioral code. Some devices do not require the strobe, because they read the behavioral code just when the code changes. ML2 has three different strobe options, depending on whether your device reads on the rising edge of the strobe or the falling edge, or does not require the strobe.

In ML2, the strobe and the behavioral code are separated, so the strobe is not interfered even if the behavioral code is large beyond the size that the assigned lines can represent. And, if the code is too large, the portion larger than the assigned digits is simply ignored.
0
Jack_23

Member
Registered:
Posts: 31
Reply with quote  #4 
Thank you, ryklin and Jaewon. I see now.
For event marker, can I send to event markers with very little time interval in a trial, for example 10 ms? Is there some restriction when sending event marker? Thank you.
0
Jaewon

Administrator
Registered:
Posts: 622
Reply with quote  #5 
You can change the duration of the strobe pulse on the ML menu.

strobe_menu.png  strobe.png

By default, the duration of one strobe is 250 us (125 us T1 + 125 us T2), so you can send roughly 4 event codes per millisecond. 125 us for T1 & T2 is a pretty safe value for both Plexon and TDT. You can change them if you know the exact specification of the pulse that your device requires.

As for the accuracy of the pulse duration, refer to my SfN poster. See the bottom of the NIMH DAQ TOOLBOX section.

ftp://helix.nih.gov/lsn/monkeylogic/ML2_doc/SfN2017_poster.pdf

If you want to send many event codes in no time, you can set the codes as a vector, like

eventmarker([10 20 30 40]);

0
Jack_23

Member
Registered:
Posts: 31
Reply with quote  #6 
Thank you, Jaewon. I think I understand how it works now.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.