scope="local" generating many events

mhisted's Avatar

mhisted

22 Jan, 2020 02:57 PM

Hi Chris,

In an old XML experiment we have a scope="local" variable that is unused by the experiment - its name is never referenced except in the declaration below:

<variable tag="rrStimulusNumber" scope="local" logging="when_changed" default_value="0" type="integer" persistant="0" groups="Internal"/>

However, this variable keeps throwing off events. Below is a screenshot of the event stream from an mwk2 file, formatted in a table. 'rrStimulusNumber' as far as I can tell with grep is not mentioned anywhere else in the experiment ever.

thanks,
Mark

  1. Support Staff 1 Posted by Christopher Sta... on 22 Jan, 2020 03:40 PM

    Christopher Stawarz's Avatar

    Hi Mark,

    MWorks announces local variable values upon entry to most paradigm components (blocks, trials, task systems, etc.). The reason for this (I think) is that each of these components hosts its own local variable "environment", in which every local variable can have a different value than it does in a different environment, so MWorks tries to keep the event stream up-to-date with the current values of local variables by announcing them.

    In your case, even though rrStimulusNumber is not being assigned, it is being announced, which is why you see it in the event file.

    Chris

  2. 2 Posted by mhisted on 23 Jan, 2020 01:09 AM

    mhisted's Avatar

    OK, got it - thank you. I now understand variable scopes and the Trial/Block etc containers a little better.

    Mark

  3. Christopher Stawarz closed this discussion on 23 Jan, 2020 02:51 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac