|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/13/2010 1:23:04 AM
Posts: 6,
Visits: 89
|
|
| Regarding an earlier post: http://support.pstnet.com/forum/FindPost687.aspx I am also running E-Prime with Brain Vision as my EEG acquisition system. I have my own response box though and am having a lot of trouble sending response triggers. I tried your .ACC and Stimulus.RESP scripts but they don’t seem to work. You see I don’t care about the accuracies of the responses but I want to tell the acquisition computer just WHAT button is pressed and exactly WHEN. I think part of my problem might be that the stimulus which the subject responds to is only presented very quickly (300ms) but a response would take longer (500-1000ms). Following the target stimulus there is another, crosshair stimulus (2500ms), and it is during this stimulus that the subject is likely to respond. I know I need to put some script in somewhere to send the trigger over but I don't get how. If I place the InLine just after the target stimulus (i.e. just before the crosshair stimulus) it would only be sending the trigger over if the responses are made in that millisecond between stimuli presumably, and if I place the InLine after the crosshare (i.e. after the 2500ms period which the subject would respond in) it doesn’t process the InLine until the crosshair stimulus is finished. I then get a response marker on the acquisition system just after the crosshair is finished presenting, regardless of when the subject actually pressed the button. Could somebody please help me? I'm guessing there is a simple solution because it's not exactly an uncommon thing that I need to do. This is the script which I am using at the moment: Dim mouseResps As Integer Dim mouseResponse As MouseResponseData If mouseResps = 1 Then WritePort &H378, 8 ElseIf mouseResps = 2 Then WritePort &H378, 16 EndIf Thanks in advance!
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/13/2010 1:23:04 AM
Posts: 6,
Visits: 89
|
|
Does anybody have any ideas?
If so, I'd really appreciate them! 
Racheal.
|
|
|
|
|
Forum MVP
      
Group: Forum Members
Last Login: 2 days ago @ 5:27:05 PM
Posts: 707,
Visits: 2,733
|
|
(Been off on holiday for a few weeks, just getting back into gear...)
I see two issues here, (1) just generally sending signals to the Brain Vision equipment, and (2) specifically sending a signal after a response during an ongoing stimulus (e.g., your crosshair). I assume that you have already solved issue #1 with Brandon's help, so I will briefly address only issue #2.
In short, I think you will need to use the Extended Input capability (see Appendix C of the User's Guide that came with E-Prime), setting the Duration of your crosshair to 0 and the response Time Limit to 2500ms. You will then need some script immediately following the crosshair object. This script will take care of filling in the 2500ms interval, all the time looking for a response using either the .IsPending() method of your input mask (see the InputMask.IsPending topic in the online E-Basic Help), or just looking at, e.g., Crosshair.RESP, Crosshair.RT, or Crosshair.RTTime to detect a response. Once the script detects a response you will have it send the appropriate signal to Brain Vision, as illustrated earlier. (BTW, if it were me I would not try to work all this out at once -- first I would just write script that successfully sends signals to Brain Vision, and only after I got that to work would I go on to getting the timing right with Extended Input, etc.)
If you want to pursue the use of .IsPending() you may look at the "Process Responses Template" and "Clear Stimulus-Leave More Time for Response" samples downloadable from PST, although in your case some script that looks for .RESP, .RT, or .RTTime should work a little more easily.
Best of luck with this, please post back when you get this worked out,
-- David McFarlane, Professional Faultfinder
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/13/2010 1:23:04 AM
Posts: 6,
Visits: 89
|
|
| Thanks for your reply David. I tried what you said and have looked at the templates you suggested but to no avail. I also tried the .IsPending() method. Apart from the triggers being sent, I also didn't want the crosshair stimulus to terminate after a response is collected. No matter when the response is I just want the crosshare (and the target stimulus) to carry out its full duration. I have attached the .es file and image stimuli, and I would really appreciate your help. As you can see from the file, I had previously added some simple InLines for stimulus triggers, and this works fine. I'd send you the image stimuli as well but its hundred of megabytes even after compression. I suppose you can just replace the image stimuli with just some random pics to test? Thanks for your time, Racheal.
|
|
|
|
|
Forum MVP
      
Group: Forum Members
Last Login: 2 days ago @ 5:27:05 PM
Posts: 707,
Visits: 2,733
|
|
Racheal,
Unfortunately, I do not generally have the leisure to look at other people's programs. You might want to submit this to PST Web Support at http://support.pstnet.com/e-prime/support/login.asp.
One clue I failed to mention -- in the input mask for your response, make sure that you set End Action to (none) rather than Terminate.
Regards,
-- David McFarlane, Professional Faultfinder
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2/1/2010 12:40:36 PM
Posts: 4,
Visits: 40
|
|
Hello Rachael,
I know I am a bit late, but there might be a chance that you stumble over my reply...
Have you been able to solve your problem? I am very interested in how you managed to send immediate response triggers, since I am having the same problem right now.
Thank you very much in advance,
Laura
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 6/26/2011 7:20:44 PM
Posts: 10,
Visits: 45
|
|
| Hi, Follow the IsPending example from the download and have the following If *.Resp Then ...... seems to work for EGI system, I suspect it will be the same for any EEG system using a parallel port TTL pulse. Cheers, Vanessa writeport 888, 0 Dim endTime as Long endTime = Clock.Read + 1000 ' Wait until input is received or until max time hasexpired Do Loop Until NOT(PracSlideTarget.InputMasks.IsPending()) OR Clock.Read >= endTime If PracSlideTarget.RESP = c.GetAttrib ("CorrectAnswer") Then Writeport 888, 5 Else Writeport 888, 6 End If sleep 5 Writeport 888, 0
|
|
|
|