Welcome! Log In Create A New Profile

Advanced

Eventmarkers and Idle

Posted by KhaledMTL 
Eventmarkers and Idle
October 24, 2024 05:28PM
Hello,

I am wondering why eventmarkers are being sent out according to the attached screenshot, while my code snippet is as follows:
eventmarker(12)
idle(Baseline2)
toggleobject(bell_snd, 'eventmarker',4);
goodmonkey(reward_juice_time, 'juiceline',1, 'numreward',1, 'eventmarker',8, 'nonblocking' ,1); % 100 ms of juice
state = 5;
I would expect, with Baseline2 set to 10000, that eventmarker 12 (Bas2) sends out, 10 seconds pass, then eventmarker 4 (Rewd) is sent out for duration of bell_snd and afterwards that eventmarker 8 (Juie) sends out, however that is not the case: They are all sent at the same time. Also, since juice is the last thing given before end of trial, the end trial eventmarker is "interrupting" the juice duration of 1s, even when juice is set to blocking or non-blocking, causing post analysis to view 2 juice events rather than one continuous one. Any help on this issue? Appreciate it
Attachments:
open | download - idle_timing.PNG (15.4 KB)
Re: Eventmarkers and Idle
October 24, 2024 07:07PM
I think you misunderstood something. It appears that what the screenshot shows is the traces of single digital bits.

An eventmarker is a multi-digit number, not a single bit. All assigned digital lines are used at the same time whenever an eventmarker is sent out.
Re: Eventmarkers and Idle
October 24, 2024 10:01PM
Hello Jaewon,

Thank you for your response! In the TDT system, I built a simple state maker machine that combines the digital bits and represents a specific combination of digital bits as a state. I can show you the separate digital lines with an adjustment to my setup, but trusting that they work as intended do you have insight on how the code works now and if the event markers are all sent at the same time? I can attach the complete timing file if the snippet isn’t clear
Re: Eventmarkers and Idle
October 24, 2024 11:25PM
I do not understand the purpose of your state machine. TDT can store the numbers sent via digital lines and their timestamps. Why do you need to build a state machine?

Eventmarkers are not sent at the same time. As I said, all assigned digital lines are used together to represent one number, so there is no way to send more than one number at a time.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.