Problems sending responsemessage to eeg


Author
Message
july1810
july1810
Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)
Group: Forum Members
Posts: 28, Visits: 213
Hi there,
the thing is, that the response message is not send, because the values I'm calling or the way I'm calling them does not work. I would really appreciate your help. Please find my code below.
Thank you.
Julia

<port signal_response_correct>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

<trial block1_congruent>
/ontrialbegin = [values.iti_congruent = list.iti_congruent.nextvalue]
/ontrialbegin = [if (list.congruent.currentvalue == 1) values.correctresponse = "25" else values.correctresponse = "16"]
/ontrialbegin = [if (list.congruent.currentvalue == 1) values.errorresponse = "16" else values.errorresponse = "25"]

/stimulustimes = [0 = outerbox_black, innerbox, flanker1_congruent, flanker2_congruent, target_congruent, flanker3_congruent, flanker4_congruent, signal_cond_congruent; 200 = blankscreen]
/validresponse = (16, 25)
/iscorrectresponse = [if (values.correctresponse == 25) trial.block1_congruent.response == 25 else trial.block1_congruent.response == 16]
/responsemessage = (values.correctresponse, signal_response_correct, 0)
/responsemessage = (values.errorresponse, signal_response_error, 0)
/responseinterrupt = trial
/trialduration = values.iti_congruent

/ontrialend = [if (trial.block1_congruent.correct == true) values.block1_correct_congruent +=1]
/ontrialend = [if (trial.block1_congruent.correct == false) values.block1_error_congruent +=1]
/ontrialend = [if (trial.block1_congruent.correct == true) values.block1_reactime_congruent_correct +=trial.block1_congruent.latency]
/ontrialend = [if (trial.block1_congruent.correct == false) values.block1_reactime_congruent_error +=trial.block1_congruent.latency]
/ontrialend = [if (trial.block1_congruent.timeout == true) values.block1_miss_congruent +=1]
</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
#1: It looks like you also present <port> stimuli via the /stimulustimes attribute. You *must* make sure to also reset all those raised bits to zero after a short amount of time in /stimulustimes. Otherwise the signal will *remain raised* and mask the <port> signals you are trying to send via /responsemessage. See e.g. this example:

https://www.millisecond.com/forums/FindPost15055.aspx

#2: You should set a sufficient minimum duration in your /responsemessage attributes. Otherwise the signal may not be raised long enough for your external equipment to detect it.

/responsemessage = (values.correctresponse, signal_response_correct, 0)

#3: Also, the syntax in your /responsemessage attributes is wrong. You cannot use variables in it:

/responsemessage = (values.correctresponse, signal_response_correct, 0)

The right thing to do is to use the /correct- and /errormessage attributes instead. I.e.

<trial block1_congruent>
...
/responsemessage = (values.correctresponse, signal_response_correct, 0)
/responsemessage = (values.errorresponse, signal_response_error, 0)

/ correctmessage = (signal_response_correct, 100)
/ errormessage = (signal_response_error, 100)
/responseinterrupt = trial
/trialduration = values.iti_congruent

...
</trial>

july1810
july1810
Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)
Group: Forum Members
Posts: 28, Visits: 213
Thank you very much. It works fine now =)

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search