Reply To: Timers

PennController for IBEX Forums Support Timers Reply To: Timers

#7687
Jeremy
Keymaster

Hi Elias,

Demonstration links give access to all of the project’s code by a simple click on the “edit” link at the top of the page. If you’re talking about live-sharing, as in Google Docs for example, where one can see someone else’s edits in real time, it’s not currently possible on the PCIbex Farm

Note that, if we’re talking about the project at https://farm.pcibex.net/r/rWbWmp/, you have 3 .js files in the Scripts folder (phase 3.js appears twice, which must be a bug—make sure you save a copy of your code, delete the file and recreate it). All files are executed in an alphanumeric order, so when you run your experiment, Phase 1.js will be executed first, then Phase2.js and finally phase 3.js. By “executed” here I mean that the global commands of each file take effect in that linear order (the commands inside the newTrials will be executed later, when each trial is run—the trials themselves are all created when the files are read)

In particular, you have four SendResults commands in Phase2.js and another SendResults command in phase 3.js. Because there is no Sequence command anywhere in those js files, the trials are simply run in the order in which they are created, which means: all the trials from Phase 1.js first, all the trials from Phase2.js then, and finally all the trials from phase 3.js. This is something you can confirm by looking up the list of trials in the “Sequence” tab of the debugger when you test your experiment

All that being said, you have an unlabeled trial at the end of Phase2.js which ends with newButton().wait(), which means that the experiment will hang there, and never actually run the trials from phase 3.js (even though you can see them in the debugger’s “Sequence” tab starting at trial #66)

At the end of the day, what you should remember is that all you js files are executed and their trials created, so if you have a command Sequence( randomize("experimental-trial") ) in any of those files, your experiment will only run trials labeled “experimental-trial”, but importantly, trials from all three files (because you create trials labeled “experimental-trial” in all three of your files)

I hope these comments brought some clarity as to how trials are created and run in PennController

Jeremy