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
Attachment: PastedGraphic-1.png (88.1 KB)
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
OK, got it - thank you. I now understand variable scopes and the Trial/Block etc containers a little better.
Mark