block_number


Author
Message
tecnika
tecnika
Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)
Group: Forum Members
Posts: 156, Visits: 790
Hello,

I am trying to add the number of the block (block_number) as value so after the block 9 and 18 the trial branch with another trial.

The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

Any help?

Thank you so much,

Elena
Attachments
Hold_Sale_Task.iqx (576 views, 30.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
ebroggin - Thursday, November 10, 2016
Hello,

I am trying to add the number of the block (block_number) as value so after the block 9 and 18 the trial branch with another trial.

The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

Any help?

Thank you so much,

Elena

> The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

What makes you think the counter goes back to zero? I see nothing in the script that would reset values.block_number back to zero.

I do, however, see mistakes in your /branch attributes:

/ branch = [if (values.block_number = 18 ...) ...]

will not work because you are using the wrong operator. If you want to know whether the statement "values.block_number is equal to 18" is *true*, you need to use "==", the logical operator. "=" is the *assignment* operator, i.e., "the variable block_number shall now represent the number X". Thus:

/ branch = [if (values.block_number == 18 ...) ...]

is the correct syntax.

Also, code like this

/ branch = [if (...) {trial.stocksold_win_pt2; trial.end_pt2_win}]

does not make sense. You cannot /branch to *two* trials at once. You need to /branch to trial.stocksold_win_pt2. Then, *from* <trial stocksold_win_pt2> you need to /branch to trial.end_pt2_win.

Hope this helps.


tecnika
tecnika
Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)
Group: Forum Members
Posts: 156, Visits: 790
Dave - Thursday, November 10, 2016
ebroggin - Thursday, November 10, 2016
Hello,

I am trying to add the number of the block (block_number) as value so after the block 9 and 18 the trial branch with another trial.

The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

Any help?

Thank you so much,

Elena

> The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

What makes you think the counter goes back to zero? I see nothing in the script that would reset values.block_number back to zero.

I do, however, see mistakes in your /branch attributes:

/ branch = [if (values.block_number = 18 ...) ...]

will not work because you are using the wrong operator. If you want to know whether the statement "values.block_number is equal to 18" is *true*, you need to use "==", the logical operator. "=" is the *assignment* operator, i.e., "the variable block_number shall now represent the number X". Thus:

/ branch = [if (values.block_number == 18 ...) ...]

is the correct syntax.

Also, code like this

/ branch = [if (...) {trial.stocksold_win_pt2; trial.end_pt2_win}]

does not make sense. You cannot /branch to *two* trials at once. You need to /branch to trial.stocksold_win_pt2. Then, *from* <trial stocksold_win_pt2> you need to /branch to trial.end_pt2_win.

Hope this helps.


Hi Dave,

Thank you for your big help as usual. 

Now I have another problem...I cannot branch at the end of block_num == 9 the trials: end_pt1_win or end_pt1_loss) after the relative trial (I have tried to branched in the script but with no results), and at the end of block_num == 18 the trials: end_pt2_win or end_pt2_loss.

Any suggestion?

Many thanks,

Elena
Attachments
Hold_Sale_Task_revised.iqx (599 views, 29.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
ebroggin - Friday, November 11, 2016
Dave - Thursday, November 10, 2016
ebroggin - Thursday, November 10, 2016
Hello,

I am trying to add the number of the block (block_number) as value so after the block 9 and 18 the trial branch with another trial.

The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

Any help?

Thank you so much,

Elena

> The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

What makes you think the counter goes back to zero? I see nothing in the script that would reset values.block_number back to zero.

I do, however, see mistakes in your /branch attributes:

/ branch = [if (values.block_number = 18 ...) ...]

will not work because you are using the wrong operator. If you want to know whether the statement "values.block_number is equal to 18" is *true*, you need to use "==", the logical operator. "=" is the *assignment* operator, i.e., "the variable block_number shall now represent the number X". Thus:

/ branch = [if (values.block_number == 18 ...) ...]

is the correct syntax.

Also, code like this

/ branch = [if (...) {trial.stocksold_win_pt2; trial.end_pt2_win}]

does not make sense. You cannot /branch to *two* trials at once. You need to /branch to trial.stocksold_win_pt2. Then, *from* <trial stocksold_win_pt2> you need to /branch to trial.end_pt2_win.

Hope this helps.


Hi Dave,

Thank you for your big help as usual. 

Now I have another problem...I cannot branch at the end of block_num == 9 the trials: end_pt1_win or end_pt1_loss) after the relative trial (I have tried to branched in the script but with no results), and at the end of block_num == 18 the trials: end_pt2_win or end_pt2_loss.

Any suggestion?

Many thanks,

Elena

You need to be more specific here. In your description, please give the respective trial's names exactly as they are given in the script. Also, please describe *precisely* the flow of branches, etc. you intend to implement.

The fact that I cannot run the code -- because you included neither the images, nor the files required by the <include> elements -- doesn't help either.

Perhaps you can produce a stripped down version that does not require any of these.

Finally, I have no idea what you intend the /stop attribute in your <block>s to do

/ stop = [response == "Next_Stock"]

Apart from the fact that its syntax is not functional, if you stop a block, it won't run anymore trials.

Thanks.

tecnika
tecnika
Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)
Group: Forum Members
Posts: 156, Visits: 790
Dave - Friday, November 11, 2016
ebroggin - Friday, November 11, 2016
Dave - Thursday, November 10, 2016
ebroggin - Thursday, November 10, 2016
Hello,

I am trying to add the number of the block (block_number) as value so after the block 9 and 18 the trial branch with another trial.

The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

Any help?

Thank you so much,

Elena

> The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

What makes you think the counter goes back to zero? I see nothing in the script that would reset values.block_number back to zero.

I do, however, see mistakes in your /branch attributes:

/ branch = [if (values.block_number = 18 ...) ...]

will not work because you are using the wrong operator. If you want to know whether the statement "values.block_number is equal to 18" is *true*, you need to use "==", the logical operator. "=" is the *assignment* operator, i.e., "the variable block_number shall now represent the number X". Thus:

/ branch = [if (values.block_number == 18 ...) ...]

is the correct syntax.

Also, code like this

/ branch = [if (...) {trial.stocksold_win_pt2; trial.end_pt2_win}]

does not make sense. You cannot /branch to *two* trials at once. You need to /branch to trial.stocksold_win_pt2. Then, *from* <trial stocksold_win_pt2> you need to /branch to trial.end_pt2_win.

Hope this helps.


Hi Dave,

Thank you for your big help as usual. 

Now I have another problem...I cannot branch at the end of block_num == 9 the trials: end_pt1_win or end_pt1_loss) after the relative trial (I have tried to branched in the script but with no results), and at the end of block_num == 18 the trials: end_pt2_win or end_pt2_loss.

Any suggestion?

Many thanks,

Elena

You need to be more specific here. In your description, please give the respective trial's names exactly as they are given in the script. Also, please describe *precisely* the flow of branches, etc. you intend to implement.

The fact that I cannot run the code -- because you included neither the images, nor the files required by the <include> elements -- doesn't help either.

Perhaps you can produce a stripped down version that does not require any of these.

Finally, I have no idea what you intend the /stop attribute in your <block>s to do

/ stop = [response == "Next_Stock"]

Apart from the fact that its syntax is not functional, if you stop a block, it won't run anymore trials.

Thanks.

Hi Dave,

Thank you for your reply.

Now I am introducing a practice session, but I cannot branch the feedback trial.
E.g., i want to branch trial.feedbackwon10 if the practice picture 1, 4 or 5 is presented and the key"E" is pressed.

Is the below script wrong?

Thanks

Elena


<trial practice_image>
/ ontrialend = [(values.time = trial.Very_high.latency)]
/ ontrialend = [values.probability = "practice"]
/ stimulustimes = [1 = practice_image]
/ timeout = 1350
/ validresponse = ("E", "I")
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 18) trial.feedbackwon10]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 23) trial.feedbacklost40]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 0) trial.feedbacklost10]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 18) trial.feedbacklost20]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 23) trial.feedbackwon5]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 0) trial.feedbacklost10]
</trial>


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
ebroggin - Friday, November 18, 2016
Dave - Friday, November 11, 2016
ebroggin - Friday, November 11, 2016
Dave - Thursday, November 10, 2016
ebroggin - Thursday, November 10, 2016
Hello,

I am trying to add the number of the block (block_number) as value so after the block 9 and 18 the trial branch with another trial.

The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

Any help?

Thank you so much,

Elena

> The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

What makes you think the counter goes back to zero? I see nothing in the script that would reset values.block_number back to zero.

I do, however, see mistakes in your /branch attributes:

/ branch = [if (values.block_number = 18 ...) ...]

will not work because you are using the wrong operator. If you want to know whether the statement "values.block_number is equal to 18" is *true*, you need to use "==", the logical operator. "=" is the *assignment* operator, i.e., "the variable block_number shall now represent the number X". Thus:

/ branch = [if (values.block_number == 18 ...) ...]

is the correct syntax.

Also, code like this

/ branch = [if (...) {trial.stocksold_win_pt2; trial.end_pt2_win}]

does not make sense. You cannot /branch to *two* trials at once. You need to /branch to trial.stocksold_win_pt2. Then, *from* <trial stocksold_win_pt2> you need to /branch to trial.end_pt2_win.

Hope this helps.


Hi Dave,

Thank you for your big help as usual. 

Now I have another problem...I cannot branch at the end of block_num == 9 the trials: end_pt1_win or end_pt1_loss) after the relative trial (I have tried to branched in the script but with no results), and at the end of block_num == 18 the trials: end_pt2_win or end_pt2_loss.

Any suggestion?

Many thanks,

Elena

You need to be more specific here. In your description, please give the respective trial's names exactly as they are given in the script. Also, please describe *precisely* the flow of branches, etc. you intend to implement.

The fact that I cannot run the code -- because you included neither the images, nor the files required by the <include> elements -- doesn't help either.

Perhaps you can produce a stripped down version that does not require any of these.

Finally, I have no idea what you intend the /stop attribute in your <block>s to do

/ stop = [response == "Next_Stock"]

Apart from the fact that its syntax is not functional, if you stop a block, it won't run anymore trials.

Thanks.

Hi Dave,

Thank you for your reply.

Now I am introducing a practice session, but I cannot branch the feedback trial.
E.g., i want to branch trial.feedbackwon10 if the practice picture 1, 4 or 5 is presented and the key"E" is pressed.

Is the below script wrong?

Thanks

Elena


<trial practice_image>
/ ontrialend = [(values.time = trial.Very_high.latency)]
/ ontrialend = [values.probability = "practice"]
/ stimulustimes = [1 = practice_image]
/ timeout = 1350
/ validresponse = ("E", "I")
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 18) trial.feedbackwon10]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 23) trial.feedbacklost40]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 0) trial.feedbacklost10]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 18) trial.feedbacklost20]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 23) trial.feedbackwon5]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 0) trial.feedbacklost10]
</trial>


picture.practice_image == 1

does not mean or return anything. If you want to return and check the respective <picture> element's item number, you need to access the currentitemnumber property:

picture.practice_image.currentitemnumber == 1

(and so forth)


Edited 8 Years Ago by Dave
tecnika
tecnika
Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)
Group: Forum Members
Posts: 156, Visits: 790
Dave - Friday, November 18, 2016
ebroggin - Friday, November 18, 2016
Dave - Friday, November 11, 2016
ebroggin - Friday, November 11, 2016
Dave - Thursday, November 10, 2016
ebroggin - Thursday, November 10, 2016
Hello,

I am trying to add the number of the block (block_number) as value so after the block 9 and 18 the trial branch with another trial.

The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

Any help?

Thank you so much,

Elena

> The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

What makes you think the counter goes back to zero? I see nothing in the script that would reset values.block_number back to zero.

I do, however, see mistakes in your /branch attributes:

/ branch = [if (values.block_number = 18 ...) ...]

will not work because you are using the wrong operator. If you want to know whether the statement "values.block_number is equal to 18" is *true*, you need to use "==", the logical operator. "=" is the *assignment* operator, i.e., "the variable block_number shall now represent the number X". Thus:

/ branch = [if (values.block_number == 18 ...) ...]

is the correct syntax.

Also, code like this

/ branch = [if (...) {trial.stocksold_win_pt2; trial.end_pt2_win}]

does not make sense. You cannot /branch to *two* trials at once. You need to /branch to trial.stocksold_win_pt2. Then, *from* <trial stocksold_win_pt2> you need to /branch to trial.end_pt2_win.

Hope this helps.


Hi Dave,

Thank you for your big help as usual. 

Now I have another problem...I cannot branch at the end of block_num == 9 the trials: end_pt1_win or end_pt1_loss) after the relative trial (I have tried to branched in the script but with no results), and at the end of block_num == 18 the trials: end_pt2_win or end_pt2_loss.

Any suggestion?

Many thanks,

Elena

You need to be more specific here. In your description, please give the respective trial's names exactly as they are given in the script. Also, please describe *precisely* the flow of branches, etc. you intend to implement.

The fact that I cannot run the code -- because you included neither the images, nor the files required by the <include> elements -- doesn't help either.

Perhaps you can produce a stripped down version that does not require any of these.

Finally, I have no idea what you intend the /stop attribute in your <block>s to do

/ stop = [response == "Next_Stock"]

Apart from the fact that its syntax is not functional, if you stop a block, it won't run anymore trials.

Thanks.

Hi Dave,

Thank you for your reply.

Now I am introducing a practice session, but I cannot branch the feedback trial.
E.g., i want to branch trial.feedbackwon10 if the practice picture 1, 4 or 5 is presented and the key"E" is pressed.

Is the below script wrong?

Thanks

Elena


<trial practice_image>
/ ontrialend = [(values.time = trial.Very_high.latency)]
/ ontrialend = [values.probability = "practice"]
/ stimulustimes = [1 = practice_image]
/ timeout = 1350
/ validresponse = ("E", "I")
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 18) trial.feedbackwon10]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 23) trial.feedbacklost40]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 0) trial.feedbacklost10]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 18) trial.feedbacklost20]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 23) trial.feedbackwon5]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 0) trial.feedbacklost10]
</trial>


picture.practice_image == 1

does not mean or return anything. If you want to return and check the respective <picture> element's item number, you need to access the currentitemnumber propery:

picture.practice_image.currentitemnumber == 1

(and so forth)


Hi Dave,

It works indeed now.


Now I need to put the response box Cedrus RB-834. the test that is on your website to test the response box doesn't run.
I have added this on my code:

<defaults>
/minimumversion = "4.0.2.0"
/ fontstyle = ("Arial", 3.52%, false, false, false, false, 5, 0)
/ screencolor = black
/ txcolor = white
/ txbgcolor = black
/ inputdevice = XID
</defaults>

and 

/ validresponse = (2,6) 

in the trial.

It says:

"No XID compatible devices found. Besure the device is plugged in, turned on (if necessary), and the appropriate driver installed."

I am using Mac and the response box normally works using other devices like Superlab on this Mac.
Is there anything that I need to install?
Please let me know if you need more information.

Your help is vital as usual.

Many thanks,

Elena



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
ebroggin - Friday, November 18, 2016
Dave - Friday, November 18, 2016
ebroggin - Friday, November 18, 2016
Dave - Friday, November 11, 2016
ebroggin - Friday, November 11, 2016
Dave - Thursday, November 10, 2016
ebroggin - Thursday, November 10, 2016
Hello,

I am trying to add the number of the block (block_number) as value so after the block 9 and 18 the trial branch with another trial.

The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

Any help?

Thank you so much,

Elena

> The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

What makes you think the counter goes back to zero? I see nothing in the script that would reset values.block_number back to zero.

I do, however, see mistakes in your /branch attributes:

/ branch = [if (values.block_number = 18 ...) ...]

will not work because you are using the wrong operator. If you want to know whether the statement "values.block_number is equal to 18" is *true*, you need to use "==", the logical operator. "=" is the *assignment* operator, i.e., "the variable block_number shall now represent the number X". Thus:

/ branch = [if (values.block_number == 18 ...) ...]

is the correct syntax.

Also, code like this

/ branch = [if (...) {trial.stocksold_win_pt2; trial.end_pt2_win}]

does not make sense. You cannot /branch to *two* trials at once. You need to /branch to trial.stocksold_win_pt2. Then, *from* <trial stocksold_win_pt2> you need to /branch to trial.end_pt2_win.

Hope this helps.


Hi Dave,

Thank you for your big help as usual. 

Now I have another problem...I cannot branch at the end of block_num == 9 the trials: end_pt1_win or end_pt1_loss) after the relative trial (I have tried to branched in the script but with no results), and at the end of block_num == 18 the trials: end_pt2_win or end_pt2_loss.

Any suggestion?

Many thanks,

Elena

You need to be more specific here. In your description, please give the respective trial's names exactly as they are given in the script. Also, please describe *precisely* the flow of branches, etc. you intend to implement.

The fact that I cannot run the code -- because you included neither the images, nor the files required by the <include> elements -- doesn't help either.

Perhaps you can produce a stripped down version that does not require any of these.

Finally, I have no idea what you intend the /stop attribute in your <block>s to do

/ stop = [response == "Next_Stock"]

Apart from the fact that its syntax is not functional, if you stop a block, it won't run anymore trials.

Thanks.

Hi Dave,

Thank you for your reply.

Now I am introducing a practice session, but I cannot branch the feedback trial.
E.g., i want to branch trial.feedbackwon10 if the practice picture 1, 4 or 5 is presented and the key"E" is pressed.

Is the below script wrong?

Thanks

Elena


<trial practice_image>
/ ontrialend = [(values.time = trial.Very_high.latency)]
/ ontrialend = [values.probability = "practice"]
/ stimulustimes = [1 = practice_image]
/ timeout = 1350
/ validresponse = ("E", "I")
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 18) trial.feedbackwon10]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 23) trial.feedbacklost40]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 0) trial.feedbacklost10]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 18) trial.feedbacklost20]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 23) trial.feedbackwon5]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 0) trial.feedbacklost10]
</trial>


picture.practice_image == 1

does not mean or return anything. If you want to return and check the respective <picture> element's item number, you need to access the currentitemnumber propery:

picture.practice_image.currentitemnumber == 1

(and so forth)


Hi Dave,

It works indeed now.


Now I need to put the response box Cedrus RB-834. the test that is on your website to test the response box doesn't run.
I have added this on my code:

<defaults>
/minimumversion = "4.0.2.0"
/ fontstyle = ("Arial", 3.52%, false, false, false, false, 5, 0)
/ screencolor = black
/ txcolor = white
/ txbgcolor = black
/ inputdevice = XID
</defaults>

and 

/ validresponse = (2,6) 

in the trial.

It says:

"No XID compatible devices found. Besure the device is plugged in, turned on (if necessary), and the appropriate driver installed."

I am using Mac and the response box normally works using other devices like Superlab on this Mac.
Is there anything that I need to install?
Please let me know if you need more information.

Your help is vital as usual.

Many thanks,

Elena



There are a number of reasons why auto-detecting the box may fail. What you can do is specify the port number or port name the box is attached to explicitly, as in

/ inputdevice = XID3

https://www.millisecond.com/support/docs/v4/html/language/attributes/inputdevice.htm





tecnika
tecnika
Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)
Group: Forum Members
Posts: 156, Visits: 790
Dave - Friday, November 18, 2016
ebroggin - Friday, November 18, 2016
Dave - Friday, November 18, 2016
ebroggin - Friday, November 18, 2016
Dave - Friday, November 11, 2016
ebroggin - Friday, November 11, 2016
Dave - Thursday, November 10, 2016
Dave - Friday, November 18, 2016
ebroggin - Friday, November 18, 2016
Dave - Friday, November 18, 2016
ebroggin - Friday, November 18, 2016
Dave - Friday, November 11, 2016
ebroggin - Friday, November 11, 2016
Dave - Thursday, November 10, 2016
ebroggin - Thursday, November 10, 2016
Hello,

I am trying to add the number of the block (block_number) as value so after the block 9 and 18 the trial branch with another trial.

The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

Any help?

Thank you so much,

Elena

> The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

What makes you think the counter goes back to zero? I see nothing in the script that would reset values.block_number back to zero.

I do, however, see mistakes in your /branch attributes:

/ branch = [if (values.block_number = 18 ...) ...]

will not work because you are using the wrong operator. If you want to know whether the statement "values.block_number is equal to 18" is *true*, you need to use "==", the logical operator. "=" is the *assignment* operator, i.e., "the variable block_number shall now represent the number X". Thus:

/ branch = [if (values.block_number == 18 ...) ...]

is the correct syntax.

Also, code like this

/ branch = [if (...) {trial.stocksold_win_pt2; trial.end_pt2_win}]

does not make sense. You cannot /branch to *two* trials at once. You need to /branch to trial.stocksold_win_pt2. Then, *from* <trial stocksold_win_pt2> you need to /branch to trial.end_pt2_win.

Hope this helps.


Hi Dave,

Thank you for your big help as usual. 

Now I have another problem...I cannot branch at the end of block_num == 9 the trials: end_pt1_win or end_pt1_loss) after the relative trial (I have tried to branched in the script but with no results), and at the end of block_num == 18 the trials: end_pt2_win or end_pt2_loss.

Any suggestion?

Many thanks,

Elena

You need to be more specific here. In your description, please give the respective trial's names exactly as they are given in the script. Also, please describe *precisely* the flow of branches, etc. you intend to implement.

The fact that I cannot run the code -- because you included neither the images, nor the files required by the <include> elements -- doesn't help either.

Perhaps you can produce a stripped down version that does not require any of these.

Finally, I have no idea what you intend the /stop attribute in your <block>s to do

/ stop = [response == "Next_Stock"]

Apart from the fact that its syntax is not functional, if you stop a block, it won't run anymore trials.

Thanks.

Hi Dave,

Thank you for your reply.

Now I am introducing a practice session, but I cannot branch the feedback trial.
E.g., i want to branch trial.feedbackwon10 if the practice picture 1, 4 or 5 is presented and the key"E" is pressed.

Is the below script wrong?

Thanks

Elena


<trial practice_image>
/ ontrialend = [(values.time = trial.Very_high.latency)]
/ ontrialend = [values.probability = "practice"]
/ stimulustimes = [1 = practice_image]
/ timeout = 1350
/ validresponse = ("E", "I")
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 18) trial.feedbackwon10]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 23) trial.feedbacklost40]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 0) trial.feedbacklost10]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 18) trial.feedbacklost20]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 23) trial.feedbackwon5]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 0) trial.feedbacklost10]
</trial>


picture.practice_image == 1

does not mean or return anything. If you want to return and check the respective <picture> element's item number, you need to access the currentitemnumber propery:

picture.practice_image.currentitemnumber == 1

(and so forth)


Hi Dave,

It works indeed now.


Now I need to put the response box Cedrus RB-834. the test that is on your website to test the response box doesn't run.
I have added this on my code:

<defaults>
/minimumversion = "4.0.2.0"
/ fontstyle = ("Arial", 3.52%, false, false, false, false, 5, 0)
/ screencolor = black
/ txcolor = white
/ txbgcolor = black
/ inputdevice = XID
</defaults>

and 

/ validresponse = (2,6) 

in the trial.

It says:

"No XID compatible devices found. Besure the device is plugged in, turned on (if necessary), and the appropriate driver installed."

I am using Mac and the response box normally works using other devices like Superlab on this Mac.
Is there anything that I need to install?
Please let me know if you need more information.

Your help is vital as usual.

Many thanks,

Elena



There are a number of reasons why auto-detecting the box may fail. What you can do is specify the port number or port name the box is attached to explicitly, as in

/ inputdevice = XID3

https://www.millisecond.com/support/docs/v4/html/language/attributes/inputdevice.htm







> The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

What makes you think the counter goes back to zero? I see nothing in the script that would reset values.block_number back to zero.

I do, however, see mistakes in your /branch attributes:

/ branch = [if (values.block_number = 18 ...) ...]

will not work because you are using the wrong operator. If you want to know whether the statement "values.block_number is equal to 18" is *true*, you need to use "==", the logical operator. "=" is the *assignment* operator, i.e., "the variable block_number shall now represent the number X". Thus:

/ branch = [if (values.block_number == 18 ...) ...]

is the correct syntax.

Also, code like this

/ branch = [if (...) {trial.stocksold_win_pt2; trial.end_pt2_win}]

does not make sense. You cannot /branch to *two* trials at once. You need to /branch to trial.stocksold_win_pt2. Then, *from* <trial stocksold_win_pt2> you need to /branch to trial.end_pt2_win.

Hope this helps.


Hi Dave,

Thank you for your big help as usual. 

Now I have another problem...I cannot branch at the end of block_num == 9 the trials: end_pt1_win or end_pt1_loss) after the relative trial (I have tried to branched in the script but with no results), and at the end of block_num == 18 the trials: end_pt2_win or end_pt2_loss.

Any suggestion?

Many thanks,

Elena

You need to be more specific here. In your description, please give the respective trial's names exactly as they are given in the script. Also, please describe *precisely* the flow of branches, etc. you intend to implement.

The fact that I cannot run the code -- because you included neither the images, nor the files required by the <include> elements -- doesn't help either.

Perhaps you can produce a stripped down version that does not require any of these.

Finally, I have no idea what you intend the /stop attribute in your <block>s to do

/ stop = [response == "Next_Stock"]

Apart from the fact that its syntax is not functional, if you stop a block, it won't run anymore trials.

Thanks.

Hi Dave,

Thank you for your reply.

Now I am introducing a practice session, but I cannot branch the feedback trial.
E.g., i want to branch trial.feedbackwon10 if the practice picture 1, 4 or 5 is presented and the key"E" is pressed.

Is the below script wrong?

Thanks

Elena


<trial practice_image>
/ ontrialend = [(values.time = trial.Very_high.latency)]
/ ontrialend = [values.probability = "practice"]
/ stimulustimes = [1 = practice_image]
/ timeout = 1350
/ validresponse = ("E", "I")
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 18) trial.feedbackwon10]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 23) trial.feedbacklost40]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 0) trial.feedbacklost10]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 18) trial.feedbacklost20]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 23) trial.feedbackwon5]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 0) trial.feedbacklost10]
</trial>


picture.practice_image == 1

does not mean or return anything. If you want to return and check the respective <picture> element's item number, you need to access the currentitemnumber propery:

picture.practice_image.currentitemnumber == 1

(and so forth)


Hi Dave,

It works indeed now.


Now I need to put the response box Cedrus RB-834. the test that is on your website to test the response box doesn't run.
I have added this on my code:

<defaults>
/minimumversion = "4.0.2.0"
/ fontstyle = ("Arial", 3.52%, false, false, false, false, 5, 0)
/ screencolor = black
/ txcolor = white
/ txbgcolor = black
/ inputdevice = XID
</defaults>

and 

/ validresponse = (2,6) 

in the trial.

It says:

"No XID compatible devices found. Besure the device is plugged in, turned on (if necessary), and the appropriate driver installed."

I am using Mac and the response box normally works using other devices like Superlab on this Mac.
Is there anything that I need to install?
Please let me know if you need more information.

Your help is vital as usual.

Many thanks,

Elena



There are a number of reasons why auto-detecting the box may fail. What you can do is specify the port number or port name the box is attached to explicitly, as in

/ inputdevice = XID3

https://www.millisecond.com/support/docs/v4/html/language/attributes/inputdevice.htm





Hi Dave,

I have tried with different port number, but still it doesn't work....
tecnika
tecnika
Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)Guru (14K reputation)
Group: Forum Members
Posts: 156, Visits: 790
ebroggin - Monday, November 21, 2016
Dave - Friday, November 18, 2016
ebroggin - Friday, November 18, 2016
Dave - Friday, November 18, 2016
ebroggin - Friday, November 18, 2016
Dave - Friday, November 11, 2016
ebroggin - Friday, November 11, 2016
Dave - Thursday, November 10, 2016
Dave - Friday, November 18, 2016
ebroggin - Friday, November 18, 2016
Dave - Friday, November 18, 2016
ebroggin - Friday, November 18, 2016
Dave - Friday, November 11, 2016
ebroggin - Friday, November 11, 2016
Dave - Thursday, November 10, 2016
ebroggin - Thursday, November 10, 2016
Hello,

I am trying to add the number of the block (block_number) as value so after the block 9 and 18 the trial branch with another trial.

The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

Any help?

Thank you so much,

Elena

> The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

What makes you think the counter goes back to zero? I see nothing in the script that would reset values.block_number back to zero.

I do, however, see mistakes in your /branch attributes:

/ branch = [if (values.block_number = 18 ...) ...]

will not work because you are using the wrong operator. If you want to know whether the statement "values.block_number is equal to 18" is *true*, you need to use "==", the logical operator. "=" is the *assignment* operator, i.e., "the variable block_number shall now represent the number X". Thus:

/ branch = [if (values.block_number == 18 ...) ...]

is the correct syntax.

Also, code like this

/ branch = [if (...) {trial.stocksold_win_pt2; trial.end_pt2_win}]

does not make sense. You cannot /branch to *two* trials at once. You need to /branch to trial.stocksold_win_pt2. Then, *from* <trial stocksold_win_pt2> you need to /branch to trial.end_pt2_win.

Hope this helps.


Hi Dave,

Thank you for your big help as usual. 

Now I have another problem...I cannot branch at the end of block_num == 9 the trials: end_pt1_win or end_pt1_loss) after the relative trial (I have tried to branched in the script but with no results), and at the end of block_num == 18 the trials: end_pt2_win or end_pt2_loss.

Any suggestion?

Many thanks,

Elena

You need to be more specific here. In your description, please give the respective trial's names exactly as they are given in the script. Also, please describe *precisely* the flow of branches, etc. you intend to implement.

The fact that I cannot run the code -- because you included neither the images, nor the files required by the <include> elements -- doesn't help either.

Perhaps you can produce a stripped down version that does not require any of these.

Finally, I have no idea what you intend the /stop attribute in your <block>s to do

/ stop = [response == "Next_Stock"]

Apart from the fact that its syntax is not functional, if you stop a block, it won't run anymore trials.

Thanks.

Hi Dave,

Thank you for your reply.

Now I am introducing a practice session, but I cannot branch the feedback trial.
E.g., i want to branch trial.feedbackwon10 if the practice picture 1, 4 or 5 is presented and the key"E" is pressed.

Is the below script wrong?

Thanks

Elena


<trial practice_image>
/ ontrialend = [(values.time = trial.Very_high.latency)]
/ ontrialend = [values.probability = "practice"]
/ stimulustimes = [1 = practice_image]
/ timeout = 1350
/ validresponse = ("E", "I")
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 18) trial.feedbackwon10]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 23) trial.feedbacklost40]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 0) trial.feedbacklost10]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 18) trial.feedbacklost20]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 23) trial.feedbackwon5]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 0) trial.feedbacklost10]
</trial>


picture.practice_image == 1

does not mean or return anything. If you want to return and check the respective <picture> element's item number, you need to access the currentitemnumber propery:

picture.practice_image.currentitemnumber == 1

(and so forth)


Hi Dave,

It works indeed now.


Now I need to put the response box Cedrus RB-834. the test that is on your website to test the response box doesn't run.
I have added this on my code:

<defaults>
/minimumversion = "4.0.2.0"
/ fontstyle = ("Arial", 3.52%, false, false, false, false, 5, 0)
/ screencolor = black
/ txcolor = white
/ txbgcolor = black
/ inputdevice = XID
</defaults>

and 

/ validresponse = (2,6) 

in the trial.

It says:

"No XID compatible devices found. Besure the device is plugged in, turned on (if necessary), and the appropriate driver installed."

I am using Mac and the response box normally works using other devices like Superlab on this Mac.
Is there anything that I need to install?
Please let me know if you need more information.

Your help is vital as usual.

Many thanks,

Elena



There are a number of reasons why auto-detecting the box may fail. What you can do is specify the port number or port name the box is attached to explicitly, as in

/ inputdevice = XID3

https://www.millisecond.com/support/docs/v4/html/language/attributes/inputdevice.htm







> The counter goes back to 0 so I cannot trigger the trial that I wanted at the end of the blocks.

What makes you think the counter goes back to zero? I see nothing in the script that would reset values.block_number back to zero.

I do, however, see mistakes in your /branch attributes:

/ branch = [if (values.block_number = 18 ...) ...]

will not work because you are using the wrong operator. If you want to know whether the statement "values.block_number is equal to 18" is *true*, you need to use "==", the logical operator. "=" is the *assignment* operator, i.e., "the variable block_number shall now represent the number X". Thus:

/ branch = [if (values.block_number == 18 ...) ...]

is the correct syntax.

Also, code like this

/ branch = [if (...) {trial.stocksold_win_pt2; trial.end_pt2_win}]

does not make sense. You cannot /branch to *two* trials at once. You need to /branch to trial.stocksold_win_pt2. Then, *from* <trial stocksold_win_pt2> you need to /branch to trial.end_pt2_win.

Hope this helps.


Hi Dave,

Thank you for your big help as usual. 

Now I have another problem...I cannot branch at the end of block_num == 9 the trials: end_pt1_win or end_pt1_loss) after the relative trial (I have tried to branched in the script but with no results), and at the end of block_num == 18 the trials: end_pt2_win or end_pt2_loss.

Any suggestion?

Many thanks,

Elena

You need to be more specific here. In your description, please give the respective trial's names exactly as they are given in the script. Also, please describe *precisely* the flow of branches, etc. you intend to implement.

The fact that I cannot run the code -- because you included neither the images, nor the files required by the <include> elements -- doesn't help either.

Perhaps you can produce a stripped down version that does not require any of these.

Finally, I have no idea what you intend the /stop attribute in your <block>s to do

/ stop = [response == "Next_Stock"]

Apart from the fact that its syntax is not functional, if you stop a block, it won't run anymore trials.

Thanks.

Hi Dave,

Thank you for your reply.

Now I am introducing a practice session, but I cannot branch the feedback trial.
E.g., i want to branch trial.feedbackwon10 if the practice picture 1, 4 or 5 is presented and the key"E" is pressed.

Is the below script wrong?

Thanks

Elena


<trial practice_image>
/ ontrialend = [(values.time = trial.Very_high.latency)]
/ ontrialend = [values.probability = "practice"]
/ stimulustimes = [1 = practice_image]
/ timeout = 1350
/ validresponse = ("E", "I")
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 18) trial.feedbackwon10]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 23) trial.feedbacklost40]
/ branch= [if ((picture.practice_image == 1 || picture.practice_image == 4 || picture.practice_image == 5) && trial.practice_image.response == 0) trial.feedbacklost10]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 18) trial.feedbacklost20]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 23) trial.feedbackwon5]
/ branch= [if ((picture.practice_image == 2 || picture.practice_image == 3 || picture.practice_image == 6) && trial.practice_image.response == 0) trial.feedbacklost10]
</trial>


picture.practice_image == 1

does not mean or return anything. If you want to return and check the respective <picture> element's item number, you need to access the currentitemnumber propery:

picture.practice_image.currentitemnumber == 1

(and so forth)


Hi Dave,

It works indeed now.


Now I need to put the response box Cedrus RB-834. the test that is on your website to test the response box doesn't run.
I have added this on my code:

<defaults>
/minimumversion = "4.0.2.0"
/ fontstyle = ("Arial", 3.52%, false, false, false, false, 5, 0)
/ screencolor = black
/ txcolor = white
/ txbgcolor = black
/ inputdevice = XID
</defaults>

and 

/ validresponse = (2,6) 

in the trial.

It says:

"No XID compatible devices found. Besure the device is plugged in, turned on (if necessary), and the appropriate driver installed."

I am using Mac and the response box normally works using other devices like Superlab on this Mac.
Is there anything that I need to install?
Please let me know if you need more information.

Your help is vital as usual.

Many thanks,

Elena



There are a number of reasons why auto-detecting the box may fail. What you can do is specify the port number or port name the box is attached to explicitly, as in

/ inputdevice = XID3

https://www.millisecond.com/support/docs/v4/html/language/attributes/inputdevice.htm





Hi Dave,

I have tried with different port number, but still it doesn't work....

Here is attachment the specifications of the Mac USB port...not sure which name I should include. It is the only XID device attached to my Mac...
Attachments
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search