Millisecond Forums

Problem passing batch parameters and values

https://forums.millisecond.com/Topic32259.aspx

By empra-uulm - 9/30/2021

Hi,

we have an experiment which contains multiple tests. Which subset of tests is presented to a specific participant depends on a testgroup variable which is chosen at the beginning and passed on afterwards.

The batch looks like this:

<parameters>
/ testgroup = 0
/ vpcode_hd2 = 0
</parameters>

<values>
/ testgroup_selected = 0
/ vpcode_hd1 = 0
</values>

<batch multigroup>
/ file = "group.iqx"
/ file = "vpcode.iqx"
/ file = "ulkabe_binding_28_09_2021.iqx"
/ file = "ulkabe_rwm_28_09_2021.iqx"
/ file = "ulkabe_updating_28_09_2021.iqx"
/ file = "gc_deutsch.iqx"
/ file = "gc_mathe.iqx"
/ onscriptend = [
    if (batch.multigroup.currentscript == "group.iqx")
    {
        parameters.testgroup = values.testgroup_selected;
    }
]
/ onscriptend = [
    if (batch.multigroup.currentscript == "vpcode.iqx")
    {
        parameters.vpcode_hd2 = values.vpcode_hd1;
    }
]
</batch>


The expt part of each test looks a bit like this - depending on the group variable defined at the beginning, the script is run or not.

<expt>
/ onexptbegin = [if (parameters.testgroup == 1) ]
/ onexptbegin = [if (parameters.testgroup == 2) script.abort(false)]
/ onexptbegin = [if (parameters.testgroup == 3) script.abort(false)]
/ onexptbegin = [if (parameters.testgroup == 4) ]
/ onexptbegin = [if (parameters.testgroup == 5) script.abort(false)]
/ onexptbegin = [if (parameters.testgroup == 6) script.abort(false)]
/ onexptbegin = [if (parameters.testgroup == 7) ]
/ blocks = [1 = instruktion;
            2 = block_practice1;
            3 = block_practice2;
...
</expt>


The design looks like this: Design

The problem we have is that in testgroup 4 and 7, the experiment ends after the updating test is finished. The subsequent experiments are loaded but not run, as if the testgroup parameter is not passed on correctly. The experiment just ends without an error message. We tried to track down where the error might occur but can't figure it out.

Do you have any idea?

Here's the updating script: Updating
and here's the entire test (55 MB): Complete

Thanks!







By Dave - 9/30/2021

empra-uulm - 9/30/2021
Hi,

we have an experiment which contains multiple tests. Which subset of tests is presented to a specific participant depends on a testgroup variable which is chosen at the beginning and passed on afterwards.

The batch looks like this:

<parameters>
/ testgroup = 0
/ vpcode_hd2 = 0
</parameters>

<values>
/ testgroup_selected = 0
/ vpcode_hd1 = 0
</values>

<batch multigroup>
/ file = "group.iqx"
/ file = "vpcode.iqx"
/ file = "ulkabe_binding_28_09_2021.iqx"
/ file = "ulkabe_rwm_28_09_2021.iqx"
/ file = "ulkabe_updating_28_09_2021.iqx"
/ file = "gc_deutsch.iqx"
/ file = "gc_mathe.iqx"
/ onscriptend = [
    if (batch.multigroup.currentscript == "group.iqx")
    {
        parameters.testgroup = values.testgroup_selected;
    }
]
/ onscriptend = [
    if (batch.multigroup.currentscript == "vpcode.iqx")
    {
        parameters.vpcode_hd2 = values.vpcode_hd1;
    }
]
</batch>


The expt part of each test looks a bit like this - depending on the group variable defined at the beginning, the script is run or not.

<expt>
/ onexptbegin = [if (parameters.testgroup == 1) ]
/ onexptbegin = [if (parameters.testgroup == 2) script.abort(false)]
/ onexptbegin = [if (parameters.testgroup == 3) script.abort(false)]
/ onexptbegin = [if (parameters.testgroup == 4) ]
/ onexptbegin = [if (parameters.testgroup == 5) script.abort(false)]
/ onexptbegin = [if (parameters.testgroup == 6) script.abort(false)]
/ onexptbegin = [if (parameters.testgroup == 7) ]
/ blocks = [1 = instruktion;
            2 = block_practice1;
            3 = block_practice2;
...
</expt>


The design looks like this: Design

The problem we have is that in testgroup 4 and 7, the experiment ends after the updating test is finished. The subsequent experiments are loaded but not run, as if the testgroup parameter is not passed on correctly. The experiment just ends without an error message. We tried to track down where the error might occur but can't figure it out.

Do you have any idea?

Here's the updating script: Updating
and here's the entire test (55 MB): Complete

Thanks!








Your design graphic does not match the code. The "updating" script is not run for group 4 and that's not the only mismatch, there are several others.



So what's the actual design supposed to be?

I'm referring to the full set of files you posted at https://www.dropbox.com/s/toukshj7o1si3m6/28-09-2021.zip?dl=0

By empra-uulm - 9/30/2021

Hi Dave,

you are right - this was a mistake from our side, as we tried to figure out the solution to our problem. We saved the updating file with the change in line 1319 instead of ondoing the change again.

However, this doesn't really matter, as the same problem occurs when we choose group 7 in the beginning.

We start the batch.
We choose group 7.
The script "vpcode" runs.
The script "updating" runs.
Then we are getting a full stop without ever seeing the "gc_deutsch" script.

The design is supposed to be:

Group 1: Binding, RWM, Updating
Group 2: Binding, gc_mathe
Group 3: RWM, gc_mathe
Group 4: Updating, gc_mathe
Group 5: Binding, gc_deutsch
Group 6: RWM, gc_deutsch
Group 7: Updating, gc_deutsch

All groups are working, except for group 4 and group 7
By Dave - 9/30/2021

empra-uulm - 9/30/2021
Hi Dave,

you are right - this was a mistake from our side, as we tried to figure out the solution to our problem. We saved the updating file with the change in line 1319 instead of ondoing the change again.

However, this doesn't really matter, as the same problem occurs when we choose group 7 in the beginning.

We start the batch.
We choose group 7.
The script "vpcode" runs.
The script "updating" runs.
Then we are getting a full stop without ever seeing the "gc_deutsch" script.

The design is supposed to be:

Group 1: Binding, RWM, Updating
Group 2: Binding, gc_mathe
Group 3: RWM, gc_mathe
Group 4: Updating, gc_mathe
Group 5: Binding, gc_deutsch
Group 6: RWM, gc_deutsch
Group 7: Updating, gc_deutsch

All groups are working, except for group 4 and group 7

Well, you have this in your updating script:

<block block_end>
/ trials = [1 = trial_end]
/ bgstim = (landscape)
/ branch = [script.abort()]
/ onblockend = [
    values.stopscript += 1
]
</block>
By empra-uulm - 10/1/2021

Ugh - great! Seems like we were routine-blinded. Thank you, now everything works smoothly