timeout skips blocks


timeout skips blocks

Author
Message
lsolomyak
lsolomyak
Expert
Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)

Group: Forum Members
Posts: 9, Visits: 35
Hello,

I am coding a few experiments that I need to timeout after a certain amount of time has passed. When I add the timeout variable in expt, it skips some of the blocks in the experiment. I need each of those blocks to be self paced so I cannot have the block timeout. 

Has anyone had this problem or have any suggestions of how to fix it?

Thank you so much,
LS 
Dave
Dave
Supreme Being
Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)

Group: Administrators
Posts: 9.8K, Visits: 46K
Not sure I understand the question. What exactly does "it skips some of the blocks in the experiment" mean? Does it skip remaining blocks once the timeout has run out (which would be the appropriate behavior)? Or does it randomly skip some block in the middle and then moves on with the next?

Also, how would you *want* the script to behave once the global timeout runs out?

lsolomyak
lsolomyak
Expert
Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)

Group: Forum Members
Posts: 9, Visits: 35
It skips some of the middle blocks in the experiment (the one's that I specifically need to be self paced). 

Of course I want it to stop the experiment as soon as the timeout time passes. 

Thank you for your help!
LS 
Tags
Dave
Dave
Supreme Being
Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)

Group: Administrators
Posts: 9.8K, Visits: 46K
> It skips some of the middle blocks in the experiment

That would suggest a mistake in the code or some *really* weird bug. Can you provide a condensed example (fewer blocks, shorter timeout) that exhibits that behavior?

Dave
Dave
Supreme Being
Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)

Group: Administrators
Posts: 9.8K, Visits: 46K
Additionally, how would you like the script to behave if the timeout runs out in the middle of a given block? Terminate immediately? Allow participant to finish the current trial? Allow participant to finish the current block?

Dave
Dave
Supreme Being
Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)

Group: Administrators
Posts: 9.8K, Visits: 46K
Additionally, how would you like the script to behave if the timeout runs out in the middle of a given block? Terminate immediately? Allow participant to finish the current trial? Allow participant to finish the current block?

lsolomyak
lsolomyak
Expert
Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)

Group: Forum Members
Posts: 9, Visits: 35
Okay I'm attaching a "shortened" version. Unfortunately it still very long but I didn't know how to shorten it while still letting it run. Basically, without a timeout specified in expt, the experiment progresses from text to questions. When I specify the timeout in expt it skips the text (the cumulative1 blocks) and goes straight to the questions. If you just take out /timeout in expt you will see the reading text displayed. 

Thank you so much for your help!

**************************************************************************************************************
**************************************************************************************************************
Configuration Settings
**************************************************************************************************************
**************************************************************************************************************
windicatorA single character that indicates each display segment (window).
Must be set to a character which doesn't occur "naturally" in throughout
the stimulus material (e.g. '|' or '#'). Each stimulus must start and end
with this character. Default is "I".
cumulativeDetermines the moving window mode to use. If set to 'true', any
previously displayed window segments will remain visible on the
screen. If set to 'false' any previously displayed window segments will
be remasked (noncumulative mode). Default is 'false'.
highlightDetermines whether the current window should be displayed in a
different color than the remaining (masked or unmasked) text in
order to make it more salient. The highlighting color can be adjusted
via the '/ txcolor' attribute of 'text.mywindowhl'. Default is 'true'.
ucmaskcharCharacter used to mask uppercase letters and numbers (as defined in
'list.uppercase'). Suitable characters include (but are not limited to)
"-", "—", "_" or "…". The masking character may not be identical to
the character defined as window indicator (-> 'values.windicator')!
Default is "-".
lcmaskcharCharacter used to mask lowercase letters and interpunctuation
characters (as defined in 'list.lowercase'). Suitable characters
include (but are not limited to) "-", "—", "_" or "…". The masking
character may not be identical to the character defined as window
indicator (-> 'values.windicator')! Default is "-".

**************************************************************************************************************
**************************************************************************************************************
<values userparams>
/ cumulative = true
/ highlight = false
/ windicator = "|"
/ ucmaskchar = "-"
/ lcmaskchar = "-"
/ correct= 0
</values>


**************************************************************************************************************
**************************************************************************************************************

**************************************************************************************************************
**************************************************************************************************************
completed:0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run)

inputstringUnmasked version of the current text containing the window indicators
('values.windicator').
maskstringMasked version of the current text containing the window inidicators
('values.windicator').
wincountOrdinal number of the currently displayed text segment (window).
winstartStart position of current text segment (window).
winendEnd position of current text segment (window)
prewindowstringText preceding the current window. Masked or unmasked according to
'values.cumulative'.
windowstringThe current window (always unmasked)
postwindowstringText succeeding the current window (always masked).
outputstringConcetanation of prewindow, window and postwindow strings.
prewindowstringhlUsed to implement the window highlighting (-> 'values.highlight').
windowstringhlColor-highlighted version of the current window.
postwindowstringhlUsed to implement the window highlighting (-> 'values.highlight').
outputstringhlUsed to implement the window highlighting (-> 'values.highlight').
stopblockSwitch used to automatically stop the currently running block as soon as
all items have been displayed.

**************************************************************************************************************
**************************************************************************************************************
<values taskparams>
/ completed = 0
/ inputstring = ""
/ maskstring = ""
/ prewindowstring = ""
/ windowstring = ""
/ postwindowstring = ""
/ outputstring = ""
/ maskstringhl = ""
/ prewindowstringhl = ""
/ windowstringhl = ""
/ postwindowstringhl = ""
/ outputstringhl = ""
/ wincount = 0
/ winstart = 0
/ winend = 0
/ stopblock = 0
</values>

Questions
<text question1>
/size = (500, 70)
/items = question1
/position = (50, 50)
/halign = center
/select = sequence
</text>

<item question1>
/1 = "What does every internal combustion engine contain?

If 'Flywheel' is the answer press D
If 'Spinner' is the answer press F
If 'Piston' is the answer press J
If 'Transmission' is the answer press K"
</item>

<trial question1>
/ stimulusframes = [1=question1]
/ trialduration = 8000
/ validresponse = (32,33,36,37)
/correctresponse = (32)
/ recorddata = true
</trial>


<text question2>
/size = (500, 70)
/items = question2
/position = (50, 50)
/halign = center
/select = sequence
</text>

<item question2>
/1 = "What is true about a flywheel that spins faster?

If 'More susceptible to damage' is the answer press D
If 'Requires more energy' is the answer press F
If 'More energy can be stored in it' is the answer press J
If 'The faster the car can move' is the answer press K"
</item>

<trial question2>
/ stimulusframes = [1=question2]
/ trialduration = 8000
/ validresponse = (32,33,36,37)
/correctresponse = (36)
/ recorddata = true
</trial>

<block questiona>
/ trials = [1=question1; 2=question2]
/ recorddata = true 
</block>

**************************************************************************************************************
**************************************************************************************************************
'list.uppercase' contains all characters to be masked by the character defined in
'values.ucmaskchar'. Add or remove characters as needed.
**************************************************************************************************************
**************************************************************************************************************
<list uppercase>
/ items = (
"A","B","C","D","E","F","G","H","I","J","K","L","M",
"N","O","P","Q","R","S","T","U","V","W","X","Y","Z",
"0","1","2","3","4","5","6","7","8","9")
/ selectionmode = sequence
/ selectionrate = always
</list>



**************************************************************************************************************
**************************************************************************************************************
'list.lowercase' contains all characters to be masked by the character defined in
'values.lcmaskchar'. Add or remove characters as needed.
**************************************************************************************************************
**************************************************************************************************************
<list lowercase>
/ items = (
"a","b","c","d","e","f","g","h","i","j","k","l","m",
"n","o","p","q","r","s","t","u","v","w","x","y","z",
"-","—","_",".",":",",",";","?","!","'","(",")","/","\")
/ selectionmode = sequence
/ selectionrate = always
</list>

**************************************************************************************************************
**************************************************************************************************************
Expressions
**************************************************************************************************************
**************************************************************************************************************
These expressions parse the input string for any occurence of the window indicator as
defined in 'values.windicator'. The input is segmented accordingly into a prewindow string
(either masked or unmasked according to the 'values.cumulative' setting), the current window
string (unmasked) and a postwindow string (masked).
**************************************************************************************************************
**************************************************************************************************************
inputendReturns the total number of characters of the current input string
(paragraph or sentence to be displayed in window segments). Used
to determine the end of the paragraph and initiate the selection of
the next stimulus (sentence or paragraph).
maskuppercaseReplaces all uppercase characters (as defined in 'list.uppercase')
with the masking character defined in 'values.ucmaskchar'.
masklowercaseReplaces all lowercase characters (as defined in 'list.lowercase')
with the masking character defined in 'values.lcmaskchar'.
maskuppercasehlUsed to implement the window highlighting (-> 'values.highlight').
masklowercasehlUsed to implement the window highlighting (-> 'values.highlight').
getwinstartRetrieves the start position of the current text segment (window) to
display and stores it to 'values.winstart'.
getwinendRetrieves the end position of the current text segment (window) to
display and stores it to 'values.winend.
getwincountComputes the ordinal number of the currently text segment (window)
and stores it to 'values.wincount'.
getprewindowExtracts the masked or unmasked text preceding the current window
and stores it to 'values.prewindowstring'.
getwindowExtracts the unmasked text for the current window and stores it to
'values.windowstring'.
getpostwindowExtracts the masked text succeeding the current window
and stores it to 'values.postwindowstring'.
getprewindowhlUsed to implement the window highlighting (-> 'values.highlight').
getwindowhlUsed to implement the window highlighting (-> 'values.highlight').
getpostwindowhlUsed to implement the window highlighting (-> 'values.highlight').
stripwindicatorRemoves the window indicator character ('values.windicator') from
prewindow, window and postwindow strings.
getoutputstringAssembles the complete output by joining prewindow, window and
postwindow strings and stores the result to 'values.outputstring'.
getoutputstringhlAssembles the output containining the color-highlighted window and
stores the result to 'values.outputstringhl'.
movingwindowBundles the expressions 'getwinstart' to 'getoutputstring' and executes
them when referenced by a trial element.

**************************************************************************************************************
**************************************************************************************************************
!!! DO NOT TOUCH !!!
**************************************************************************************************************
**************************************************************************************************************
<expressions>
/ inputend = length(values.inputstring)
/ maskuppercase = if(list.uppercase.unselectedcount>0){
values.maskstring=replaceall(values.maskstring,
list.uppercase.nextvalue, values.ucmaskchar);
expressions.maskuppercase;
}
/ masklowercase = if(list.lowercase.unselectedcount>0){
values.maskstring = replaceall(values.maskstring,
list.lowercase.nextvalue, values.lcmaskchar);
expressions.masklowercase;
}
/ masklowercasehl = values.maskstringhl = replaceall(values.maskstringhl,
values.lcmaskchar, " ")
/ maskuppercasehl = values.maskstringhl = replaceall(values.maskstringhl,
values.ucmaskchar, " ")
/ getwinstart = values.winstart = values.winend
/ getwinend = values.winend = search(substring(values.inputstring,
values.winstart, length(values.inputstring)-values.winstart), values.windicator)
+ length(values.windicator) + values.winstart
/ getprewindow = if(values.cumulative==true)
values.prewindowstring=substring(values.inputstring, 0, values.winstart) else
values.prewindowstring=substring(values.maskstring, 0, values.winstart)
/ getwindow = values.windowstring = substring(values.inputstring,
values.winstart, abs(values.winstart-values.winend))
/ getpostwindow = values.postwindowstring = substring(values.maskstring,
values.winend, abs(length(values.inputstring)-values.winend))
/ getprewindowhl = values.prewindowstringhl = substring(values.maskstringhl,
0, values.winstart)
/ getwindowhl = values.windowstringhl = substring(values.inputstring,
values.winstart, abs(values.winstart-values.winend))
/ getpostwindowhl = values.postwindowstringhl = substring(values.maskstringhl,
values.winend, abs(length(values.inputstring)-values.winend))
/ stripwindicator = if(values.windicator!=" "){
values.prewindowstring = replaceall(values.prewindowstring, values.windicator, "");
values.windowstring = replaceall(values.windowstring, values.windicator, "");
values.postwindowstring = replaceall(values.postwindowstring, values.windicator, "");
values.prewindowstringhl = replaceall(values.prewindowstringhl, values.windicator, "");
values.windowstringhl = replaceall(values.windowstringhl, values.windicator, "");
values.postwindowstringhl = replaceall(values.postwindowstringhl, values.windicator, "");
}
/ getwincount = if(values.windowstring!="")values.wincount+=1
/ getoutputstring = values.outputstring = concat(concat(values.prewindowstring,
values.windowstring),values.postwindowstring)
/ getoutputstringhl = if(values.highlight==true)
values.outputstringhl = concat(concat(values.prewindowstringhl,
values.windowstringhl),values.postwindowstringhl) else
values.outputstringhl=""
/ movingwindow = {
expressions.getwinstart; expressions.getwinend;
expressions.getprewindow; expressions.getwindow; expressions.getpostwindow;
expressions.getprewindowhl; expressions.getwindowhl; expressions.getpostwindowhl;
expressions.stripwindicator; expressions.getwincount;
expressions.getoutputstring; expressions.getoutputstringhl;
}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
Task Instructions
**************************************************************************************************************
**************************************************************************************************************
Instruction Settings
**************************************************************************************************************
**************************************************************************************************************


**************************************************************************************************************
**************************************************************************************************************
Instruction Pages
**************************************************************************************************************
**************************************************************************************************************
<text instructions>
/ items = instructions
/ select = sequence
/ size = (80%, 80%)
/ fontstyle = ("Arial", 18pt, false, false, false, false, 5, 0)
/ vjustify = center
/ hjustify = left
/resetinterval = 45
</text>


<item instructions>
/1= "Welcome to the Self-Paced Reading Task!

This script implements the moving window paradigm introduced by Just, M. A., Carpenter, P. A., & Wooley, J. D. (1982)."

</item>

<trial instructions>
/ stimulusframes = [1=instructions]
/ trialduration = 3000
/ validresponse = (noresponse)
/ recorddata = false
</trial>

<block instructions>
/ trials = [1=instructions]
/ recorddata = false
</block>


<text end>
/ items = instruct_cumulative
/ select = sequence
/ size = (80%, 80%)
/ fontstyle = ("Arial", 18pt, false, false, false, false, 5, 0)
/ vjustify = center
/ hjustify = left
/resetinterval = 45
</text>

<item end>
/1= "Thank you for your participation"
</item>

<trial end>
/ stimulusframes = [1=instruct_cumulative]
/ trialduration = 7700
/ validresponse = (noresponse)
/ recorddata = false
</trial>

<block end>
/ trials = [1=instruct_cumulative]
/ recorddata = false
</block>


<text instruct_cumulative>
/ items = instruct_cumulative
/ select = sequence
/ size = (80%, 80%)
/ fontstyle = ("Arial", 18pt, false, false, false, false, 5, 0)
/ vjustify = center
/ hjustify = left
/resetinterval = 45
</text>

<item instruct_cumulative>
/1= "Press the J Key to advance through the text. Read at your normal pace and try to understand what is written. You will be tested on the text afterwards"
</item>

<trial instruct_cumulative>
/ stimulusframes = [1=instruct_cumulative]
/ trialduration = 9000
/ validresponse = (noresponse)
/ recorddata = false
</trial>

<block instruct_cumulative>
/ trials = [1=instruct_cumulative]
/ recorddata = false
</block>


**************************************************************************************************************
**************************************************************************************************************
Trial Elements
**************************************************************************************************************
**************************************************************************************************************
Get Complete Stimulus & Set Up The Mask & Erase Screen
**************************************************************************************************************
**************************************************************************************************************
<trial getstim1>
/ ontrialbegin = [if(list.mwstims1.unselectedcount==0)values.stopblock=1]
/ ontrialbegin = [values.inputstring=getitem(text.mwstims1, list.mwstims1.nextvalue)]
/ ontrialbegin = [values.maskstring=values.inputstring]
/ ontrialbegin = [reset(list.uppercase); reset(list.lowercase)]
/ ontrialbegin = [expressions.maskuppercase; expressions.masklowercase]
/ ontrialbegin = [values.maskstringhl=values.maskstring]
/ ontrialbegin = [expressions.maskuppercasehl; expressions.masklowercasehl]
/ ontrialbegin = [values.wincount=0; values.winstart=0; values.winend=0]
/ validresponse = (noresponse)
/ trialduration = 0
/ branch = [trial.MWtrial1]
/ recorddata = false
</trial>

<trial getstim2>
/ ontrialbegin = [if(list.mwstims2.unselectedcount==0)values.stopblock=1]
/ ontrialbegin = [values.inputstring=getitem(text.mwstims2, list.mwstims2.nextvalue)]
/ ontrialbegin = [values.maskstring=values.inputstring]
/ ontrialbegin = [reset(list.uppercase); reset(list.lowercase)]
/ ontrialbegin = [expressions.maskuppercase; expressions.masklowercase]
/ ontrialbegin = [values.maskstringhl=values.maskstring]
/ ontrialbegin = [expressions.maskuppercasehl; expressions.masklowercasehl]
/ ontrialbegin = [values.wincount=0; values.winstart=0; values.winend=0]
/ validresponse = (noresponse)
/ trialduration = 0
/ branch = [trial.MWtrial2]
/ recorddata = false
</trial>


**************************************************************************************************************
**************************************************************************************************************
Display Moving Window Stimulus
**************************************************************************************************************
**************************************************************************************************************
<trial MWtrial1>
/ ontrialbegin = [expressions.movingwindow]
/ stimulusframes = [1=background, mywindow, mywindowhl]
/ validresponse = (36)
/ branch = [if(values.winend==expressions.inputend)trial.getstim1 else trial.MWtrial1]
</trial>

<trial MWtrial2>
/ ontrialbegin = [expressions.movingwindow]
/ stimulusframes = [1=background, mywindow, mywindowhl]
/ validresponse = (36)
/ branch = [if(values.winend==expressions.inputend)trial.getstim2 else trial.MWtrial2]
</trial>



**************************************************************************************************************
**************************************************************************************************************
Block Elements
**************************************************************************************************************
**************************************************************************************************************
Cumulative Moving Window Condition
**************************************************************************************************************
**************************************************************************************************************
preinstructions = (cumulative)
<block cumulative1>
/ onblockbegin = [values.cumulative=true]
/ onblockbegin = [reset(list.mwstims1)]
/ onblockend = [values.stopblock=0]
/ stop = [values.stopblock==1]
/ trials = [1=instruct_cumulative;2=getstim1]
</block>

<block cumulative2>
/ onblockbegin = [values.cumulative=true]
/ onblockbegin = [reset(list.mwstims2)]
/ onblockend = [values.stopblock=0]
/ stop = [values.stopblock==1]
/ trials = [1=getstim2]
</block>


**************************************************************************************************************
**************************************************************************************************************
Experiment Element
**************************************************************************************************************
**************************************************************************************************************
/ preinstructions = (intro)
<expt MovingWindow>
/ blocks = [1=instructions; 2=cumulative1; 3=questiona; 4=cumulative2; 5=questionb; 6=end]
/onexptend = [values.completed = 1]
/timeout = 200000
</expt>

**************************************************************************************************************
**************************************************************************************************************
Stimuli
**************************************************************************************************************
**************************************************************************************************************
Standard Window Text
**************************************************************************************************************
**************************************************************************************************************
Fontstyle must be set to a monospaced font such as "Courier", "Courier New", "Consolas" or
"Lucida Console". "Courier New" should be available on any version of the Windows operating
system.
**************************************************************************************************************
**************************************************************************************************************
<text mywindow>
/ items = ("<%values.outputstring%>")
/ fontstyle = ("Consolas", 3.00%, true, false, false)
/ vjustify = center
/ hjustify = left
/ txcolor = (black)
/ txbgcolor = (transparent)
/ erase = false
/ size = (86%, 90%)
</text>

**************************************************************************************************************
**************************************************************************************************************
Highlighted Window Text
**************************************************************************************************************
**************************************************************************************************************
Settings should be identical to those of 'text.mywindow' save for the '/ txcolor' attribute.
**************************************************************************************************************
**************************************************************************************************************
<text mywindowhl>
/ items = ("<%values.outputstringhl%>")
/ fontstyle = ("Consolas", 3.00%, true, false, false)
/ vjustify = center
/ hjustify = left
/ txcolor = (blue)
/ txbgcolor = (transparent)
/ erase = false
/ size = (86%, 90%)
</text>

**************************************************************************************************************
**************************************************************************************************************
Items & Text Elements for Moving Window Stimuli
**************************************************************************************************************
**************************************************************************************************************
Text stimuli containing the window indicator (as defined in 'values.windicator') must be
entered here.
**************************************************************************************************************
**************************************************************************************************************
<item mwstims1>
/ 1 ="|FLYWHEELS

|Flywheels |are |one |of |the |oldest |mechanical |devices |known |to |man.
|Every |internal-combustion |engine |contains |a |small |flywheel |that
|converts |the |jerky |motion |of |the |pistons |into |the |smooth |flow |of
|energy |that |powers |the |drive |shaft.

|The |greater |the |mass |of |a |flywheel |and |the |faster |it |spins, |the
|more |energy |can |be |stored |in |it. |But |its |maximum |spinning |speed
|is |limited |by |the |strength |of |the |material |it |is |made |from.
|If |it |spins |too |fast |for |its |mass, |any |flywheel |will |fly |apart.|

|One |type |of |flywheel |consists |of |round |sandwiches |of |fiberglass
|and |rubber |providing |the |maximum |possible |storage |of |energy |when
|the |wheel |is |confined |in |a |small |space |as |in |an |automobile.

|Another |type, |the |'superflywheel', |consists |of |a |series |of |rimless
|spokes. |This |flywheel |stores |the |maximum |energy |when |space |is
|unlimited.|"

</item>

<item mwstims2>

/2 = " |Olympic National Park

|Olympic |National |Park |is |a |United | States |national |park |located |in |the |state |of |Washington, |in |
the |Olympic |Peninsula.| It | was | designated| a| national| park| by| President| Franklin| Roosevelt| on| June 29, 1938.| The coastal
portion| of| the| park| is| a| rugged,| sandy| beach| along| with| a strip| of |adjacent| forest.|
It| is |60 miles (97 km)| long| but| just| a few| miles| wide,| with| native| communities| at| the| mouths| of| two| rivers.|

|Prior| to| the| influx| of| European| settlers,| Olympic's| human| population| consisted| of| Native Americans|, whose
use| of| the| peninsula| was| thought| to| have| consisted| mainly| of| fishing| and| hunting.| Most| if| not| all| Pacific| Northwest| indigenous|
cultures| were| adversely| affected| by| European| diseases| (often decimated)| and| other| factors,| well| before| ethnographers,| business| operations| and|
settlers| arrived| in| the| region,| so| what| they| saw| and| recorded| was| a |much-reduced| native| culture-base.| Large| numbers| of| cultural| sites| are|
now| identified| in| the| Olympic| mountains,| and| important| artifacts| have| been| found.|"

</item>

<text mwstims1>
/ items = mwstims1
</text>

<text mwstims2>
/ items = mwstims2
</text>

**************************************************************************************************************
**************************************************************************************************************
List Elements (Item Selection)
**************************************************************************************************************
**************************************************************************************************************
Adapt as needed by modifying the settings in the '/ select' attribute.
**************************************************************************************************************
**************************************************************************************************************
<list mwstims1>
/ items = (1)
/ selectionmode = sequence
</list>

<list mwstims2>
/ items = (1)
/ selectionmode = sequence
</list>


**************************************************************************************************************
**************************************************************************************************************
Layout Elements
**************************************************************************************************************
**************************************************************************************************************
<shape background>
/ shape = rectangle
/ color = (white)
/ erase = false
/ size = (95%, 93%)
</shape>

**************************************************************************************************************
**************************************************************************************************************
Default Settings
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvassize = (100%,100%)
/ canvasaspectratio = (4,3)
/ fontstyle = ("Verdana", 2.50%, false, false, false)
/ minimumversion = "4.0.0.0"
/ inputdevice = keyboard
/ screencolor = (silver)
</defaults>

**************************************************************************************************************
**************************************************************************************************************
Custom Data Output
**************************************************************************************************************
**************************************************************************************************************

********************
raw data
********************
build:Inquisit build
date, time, subject, group:date and time script was run with the current subject/groupnumber
blockcode, blocknum:the name and number of the current block
trialcode, trialnum: the name and number of the currently recorded trial
(Note: not all trials that are run might record data)
response:the participant's response
correct:the correctness of the response (1 = correct; 0 = incorrect)
latency: the response latency (in ms)

list.mwstims1.nextvalue:current "page" number
text.mywindow.stimulusonset:returns the stimulus onset time. The onset time is the point at which the stimulus
is presented relative to the start of the trial.
windowstringThe current window (always unmasked)
wincountOrdinal number of the currently displayed text segment (window).
inputendReturns the total number of characters of the current input string
(paragraph or sentence to be displayed in window segments). Used
to determine the end of the paragraph and initiate the selection of
the next stimulus (sentence or paragraph).
winstartStart position of current text segment (window).
winendEnd position of current text segment (window)
cumulativeDetermines the moving window mode to use. If set to 'true', any
previously displayed window segments will remain visible on the
screen. If set to 'false' any previously displayed window segments will
be remasked (noncumulative mode). Default is 'false'.
highlightDetermines whether the current window should be displayed in a
different color than the remaining (masked or unmasked) text in
order to make it more salient. The highlighting color can be adjusted
via the '/ txcolor' attribute of 'text.mywindowhl'. Default is 'true'.

<data>
/ file = "SelfPacedReading_rawdata.iqdat"
/ columns = [build,date,time,subject,blockcode, blocknum,trialcode,trialnum,response,correct,latency,
list.mwstims1.nextvalue,list.mwstims2.nextvalue, text.mywindow.stimulusonset,values.windowstring,
values.wincount,expressions.inputend,values.winstart,values.winend,values.cumulative,values.highlight, values.completed]
/ separatefiles = true
</data>


Dave
Dave
Supreme Being
Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)

Group: Administrators
Posts: 9.8K, Visits: 46K
Thanks for the example code. That's a weird issue indeed. Not sure what's happening there. As a workaround you can either do something like this

<expt MovingWindow>
/ blocks = [1=instructions; 2=cumulative1; 3=questiona; 4=cumulative2; 5=questionb; 6=end]
/onexptend = [values.completed = 1]
/ stop = [expt.movingwindow.elapsedtime>=200000]
</expt>

which will have the side effect of letting the participant finish the currently running trial prior to terminating (I don't know if that's acceptable in your case or not).

Alternatively, you can work with dynamically determined (i,e,, computed at runtime) timeouts at the <block>-level instead of a single one at the <expt>-level. Basic example:

<values>
/ globaltimeout = 20000
</values>


<expt myexpt>
/ blocks = [1=a; 2=b; 3=c]
</expt>

<block a>
/ trials = [1-10=mytrial]
/ timeout = values.globaltimeout
</block>

<block b>
/ onblockbegin = [values.globaltimeout-=expt.myexpt.elapsedtime]
/ trials = [1-10=mytrial]
/ timeout = values.globaltimeout
</block>

<block c>
/ onblockbegin = [values.globaltimeout-=expt.myexpt.elapsedtime]
/ trials = [1-10=mytrial]
/ timeout = values.globaltimeout
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("Block <%script.currentblocknumber%> <%script.currentblock%> | Trial <%script.currenttrialnumber%> | Time elapsed <%expt.myexpt.elapsedtime%> ms | Timeout (block) <%values.globaltimeout%>")
</text>

<data>
/ columns = [date time subject group blocknum blockcode trialnum trialcode response latency expt.myexpt.elapsedtime]
/ separatefiles = true
</data>

P.S.: Instead of pasting large amounts of code into a message body, please use the forum's file attachment facilities. Click +Insert -> Add File to attach files to a given post / thread.

lsolomyak
lsolomyak
Expert
Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)

Group: Forum Members
Posts: 9, Visits: 35
Thank you so much for your suggestions. Because I need it to last a very specific amount of time, I cannot allow the participant to even finish the currently running trial. 

When I tried to implement your second solution, it displays only the first block of text but then skips the rest of the texts (going straight to the question blocks). 
Could it be something wrong with my text blocks? 

Thanks,
LS 
lsolomyak
lsolomyak
Expert
Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)

Group: Forum Members
Posts: 9, Visits: 35
Thank you so much for your suggestions. Because I need it to last a very specific amount of time, I cannot allow the participant to even finish the currently running trial. 

When I tried to implement your second solution, it displays only the first block of text but then skips the rest of the texts (going straight to the question blocks). 
Could it be something wrong with my text blocks? 

Thanks,
LS 
GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search