Triggering the No/Go response on inline
Paul Groot
pfc.groot at gmail.com
Tue Jun 24 13:45:27 UTC 2014
Hi Enrico,
Does your paradigm really allow multiple responses on a single stimulus?
Your script checks the value of the latest response, which would be
over-complicated in case the maximum number of allowed responses is 1.
Also, if there are no responses, your script will fail because it tries to
read the value of the last element of the response array, which will not
exist if there are no elements! So, to simplify the script you should
use TResp.RESP instead of TResp.Responses(TResp.Responses.count).resp.
Also be aware that comparison will be case sensitive. And instead of using
if-then, you could use Select-Case. Combining it all together:
Select Case UCase$(TResp.RESP)
Case "S"
Trisp=1
Case "L"
Trisp=2
Case ""
Trisp=3
Otherwise
Debug.Print "Unexpected reponse: " & TResp.RESP
End Select
Or combining the other lines as well:
Dim code as Integer
Select Case UCase$(TResp.RESP)
Case "S"
code = 51
Case "L"
code = 52
Case ""
code = 50
Otherwise
Debug.Print "Unexpected reponse: " & TResp.RESP
code = 0
End Select
if code>0 then
writeport 888, code
sleep 5
writeport 888, 0
end if
Best
Paul
PS. Note that nonzero pre-release times will be problematic if this inline
is used immediately after TResp.
On 23 June 2014 18:28, Enrico Fattorini <enrico.fattorini at uniroma1.it>
wrote:
> Hi to everyone,
>
> I am using E-Prime 1. I am now preparing a Go/NoGo paradigm. I have a
> problem about the triggering of the No/Go response on the inline file. I
> have three response conditions: response with left hand ("s"); response
> with right hand ("l"); NO response. I did not have problem to trigger the
> two Go responses (letter "s" and "l") but the software is closing and
> segnaling an error when I did not make a response. I have to find the way
> to triggering a NO response.
>
> I tried a lot of different combinations, one is the following:
>
> if TResp.Responses(TResp.Responses.count).resp= "s" then
> Trisp=1
> elseif TResp.Responses(TResp.Responses.count).resp= "l" then
> Trisp=2
> elseif TResp.Responses(TResp.Responses.count).resp= "void" then
> Trisp=3
> end if
>
> if Trisp = 1 then
> writeport 888, 51
> sleep 5
> writeport 888, 0
>
> elseif Trisp = 2 then
> writeport 888, 52
> sleep 5
> writeport 888, 0
>
> elseif Trisp = 3 then
> writeport 888, 50
> sleep 5
> writeport 888, 0
>
> Any suggestions?
>
> Thank you a lot.
>
> Enrico
>
> --
> You received this message because you are subscribed to the Google Groups
> "E-Prime" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to e-prime+unsubscribe at googlegroups.com.
> To post to this group, send email to e-prime at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/e-prime/836c0a8c-6e89-48ab-90fd-f31ad7a9894f%40googlegroups.com
> <https://groups.google.com/d/msgid/e-prime/836c0a8c-6e89-48ab-90fd-f31ad7a9894f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/CAKAdR-sF9sowLnfJbefSv_Pzmuv-qAxh6Xtc7cJ-h-W85M%2BMTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20140624/1e1bd1ad/attachment.htm>
More information about the Eprime
mailing list