Output variable when recording

Hi Chris,

I am a postdoc in the Jazayeri lab. I would like to trigger recording in third party software based on whether MWorks is currently writing to disk. Is there a way to define a variable that will, for example, be equal to 1 when MWorks is recording and 0 when it is not?

Thanks,
Gabe

Hi Gabe,

By “writing to disk”, do you mean when MWorks is writing the event file? That happens continually while an experiment is running, so there’s no on/off state to track. Or did you have some other kind of recording in mind?

Cheers,
Chris

Hi Chris,

Yes that is what I mean. I know that the default is to open a data file and stream to disk when the experiment is running, but I have turned off this default. I therefore would like a variable that is “true” when MWorks is “streaming to disk” and “false” when it is not. My hope is to output this state, via labjack, to my neural acquisition system. This is useful because it would allow me to trigger recording on my neural system when MWorks is recording, and thus have both datastreams begin at approximately the same time. Hopefully this is clear.

Thanks,
Gabe

Hi Gabe,

Thanks for the clarification. At present, the experiment has no way to know whether a data file is open. However, it would be a simple thing to add – maybe a function called data_file_is_open? Let me know if you’d like me to make such a change.

Cheers,
Chris