block_number


Author
Message
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: 12K, Visits: 98K
ebroggin - Monday, November 21, 2016
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...

What's the position of the dipswitches on the back of the box?

tecnika
tecnika
Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)
Group: Forum Members
Posts: 156, Visits: 790
They are all down.

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: 12K, Visits: 98K
ebroggin - Monday, November 21, 2016
They are all down.

Thanks,

Elena

Okay, thanks. That means the box is set to XID mode as it should be. As for the detection failure: Have you tried disconnecting the box and/or attaching it to a different USB port?

tecnika
tecnika
Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)
Group: Forum Members
Posts: 156, Visits: 790
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
They are all down.

Thanks,

Elena

Okay, thanks. That means the box is set to XID mode as it should be. As for the detection failure: Have you tried disconnecting the box and/or attaching it to a different USB port?

Hi Dave,

Thank you for your reply. Yes, I have tried 3 different usb ports and changed devices (in both cases Cedrus RB-834). I have also restarted my Mac.

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: 12K, Visits: 98K
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
They are all down.

Thanks,

Elena

Okay, thanks. That means the box is set to XID mode as it should be. As for the detection failure: Have you tried disconnecting the box and/or attaching it to a different USB port?

Hi Dave,

Thank you for your reply. Yes, I have tried 3 different usb ports and changed devices (in both cases Cedrus RB-834). I have also restarted my Mac.

Elena

Okay. Running out of ideas. To clarify: When you run a script with inputdevice set to XID, is the error still

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

or does the script start / run, but appears to accept no input from the device?

tecnika
tecnika
Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)
Group: Forum Members
Posts: 156, Visits: 790
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
They are all down.

Thanks,

Elena

Okay, thanks. That means the box is set to XID mode as it should be. As for the detection failure: Have you tried disconnecting the box and/or attaching it to a different USB port?

Hi Dave,

Thank you for your reply. Yes, I have tried 3 different usb ports and changed devices (in both cases Cedrus RB-834). I have also restarted my Mac.

Elena

Okay. Running out of ideas. To clarify: When you run a script with inputdevice set to XID, is the error still

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

or does the script start / run, but appears to accept no input from the device?

There is still that error
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: 12K, Visits: 98K
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
They are all down.

Thanks,

Elena

Okay, thanks. That means the box is set to XID mode as it should be. As for the detection failure: Have you tried disconnecting the box and/or attaching it to a different USB port?

Hi Dave,

Thank you for your reply. Yes, I have tried 3 different usb ports and changed devices (in both cases Cedrus RB-834). I have also restarted my Mac.

Elena

Okay. Running out of ideas. To clarify: When you run a script with inputdevice set to XID, is the error still

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

or does the script start / run, but appears to accept no input from the device?

There is still that error

Thanks. I suspect there is some driver initialization issue. Can you try the following and let me know the result:
- Close Inquisit.
- Run SuperLab and make sure SuperLab successfully detects the box and accepts input from it.
- Once confirmed, close SuperLab.
- Open Inquisit and run https://www.millisecond.com/download/library/v4/cedrus/xidresponsetest.iqx

Checking if a more recent driver for the pad is available from Cedrus may also be worth a shot. Thanks.

tecnika
tecnika
Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)
Group: Forum Members
Posts: 156, Visits: 790
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
They are all down.

Thanks,

Elena

Okay, thanks. That means the box is set to XID mode as it should be. As for the detection failure: Have you tried disconnecting the box and/or attaching it to a different USB port?

Hi Dave,

Thank you for your reply. Yes, I have tried 3 different usb ports and changed devices (in both cases Cedrus RB-834). I have also restarted my Mac.

Elena

Okay. Running out of ideas. To clarify: When you run a script with inputdevice set to XID, is the error still

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

or does the script start / run, but appears to accept no input from the device?

There is still that error

Thanks. I suspect there is some driver initialization issue. Can you try the following and let me know the result:
- Close Inquisit.
- Run SuperLab and make sure SuperLab successfully detects the box and accepts input from it.
- Once confirmed, close SuperLab.
- Open Inquisit and run https://www.millisecond.com/download/library/v4/cedrus/xidresponsetest.iqx

Checking if a more recent driver for the pad is available from Cedrus may also be worth a shot. Thanks.

Hi Dave,

Is there a driver that I need to install for Mac? Superlab doesn't recognise the device as well.
And when I tried to run that file it gave me the same error:

No XID devices detected. Be sure the device is plugged in, turned on (if necessary), and the appropriate driver installed.

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: 12K, Visits: 98K
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
They are all down.

Thanks,

Elena

Okay, thanks. That means the box is set to XID mode as it should be. As for the detection failure: Have you tried disconnecting the box and/or attaching it to a different USB port?

Hi Dave,

Thank you for your reply. Yes, I have tried 3 different usb ports and changed devices (in both cases Cedrus RB-834). I have also restarted my Mac.

Elena

Okay. Running out of ideas. To clarify: When you run a script with inputdevice set to XID, is the error still

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

or does the script start / run, but appears to accept no input from the device?

There is still that error

Thanks. I suspect there is some driver initialization issue. Can you try the following and let me know the result:
- Close Inquisit.
- Run SuperLab and make sure SuperLab successfully detects the box and accepts input from it.
- Once confirmed, close SuperLab.
- Open Inquisit and run https://www.millisecond.com/download/library/v4/cedrus/xidresponsetest.iqx

Checking if a more recent driver for the pad is available from Cedrus may also be worth a shot. Thanks.

Hi Dave,

Is there a driver that I need to install for Mac? Superlab doesn't recognise the device as well.
And when I tried to run that file it gave me the same error:

No XID devices detected. Be sure the device is plugged in, turned on (if necessary), and the appropriate driver installed.

Thanks,

Elena

Assuming the information at the Cedrus site is still current / correct, then yes, a driver is required:

http://www.cedrus.com/support/rbx30/tn1057_install_rbx30_macos_x.htm

tecnika
tecnika
Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)Guru (13K reputation)
Group: Forum Members
Posts: 156, Visits: 790
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
Dave - Monday, November 21, 2016
ebroggin - Monday, November 21, 2016
They are all down.

Thanks,

Elena

Okay, thanks. That means the box is set to XID mode as it should be. As for the detection failure: Have you tried disconnecting the box and/or attaching it to a different USB port?

Hi Dave,

Thank you for your reply. Yes, I have tried 3 different usb ports and changed devices (in both cases Cedrus RB-834). I have also restarted my Mac.

Elena

Okay. Running out of ideas. To clarify: When you run a script with inputdevice set to XID, is the error still

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

or does the script start / run, but appears to accept no input from the device?

There is still that error

Thanks. I suspect there is some driver initialization issue. Can you try the following and let me know the result:
- Close Inquisit.
- Run SuperLab and make sure SuperLab successfully detects the box and accepts input from it.
- Once confirmed, close SuperLab.
- Open Inquisit and run https://www.millisecond.com/download/library/v4/cedrus/xidresponsetest.iqx

Checking if a more recent driver for the pad is available from Cedrus may also be worth a shot. Thanks.

Hi Dave,

Is there a driver that I need to install for Mac? Superlab doesn't recognise the device as well.
And when I tried to run that file it gave me the same error:

No XID devices detected. Be sure the device is plugged in, turned on (if necessary), and the appropriate driver installed.

Thanks,

Elena

Assuming the information at the Cedrus site is still current / correct, then yes, a driver is required:

http://www.cedrus.com/support/rbx30/tn1057_install_rbx30_macos_x.htm



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search