|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/22/2008 8:28:34 AM
Posts: 1,
Visits: 5
|
|
Hi!
I’m new to E-prime, and I hope somebody can help me with this problem: I tried to run an experiment where three different tones are used as targets. Every time a tone is emitted, I want E-prime to send a trigger to another computer. I used the following script, but it only sends a trigger the first time the tone appears and not in the following instances:
Dim someCode as integer
someCode = CInt (c.GetAttrib ("triggercode"))
Ton.OnsetSignalEnabled = True
Ton.OnsetSignalPort = &H378
Ton.OnsetSignalData = someCode
Ton.OffsetSignalEnabled = True
Ton.OffsetSignalPort = &H378
Ton.OffsetSignalData = someCode
My second question: How can I send triggers for responses (in this experiment it’s mouse button clicks)?
Thanks!
|
|
|
|
|
Forum Guru
      
Group: Forum Members
Last Login: 2 days ago @ 5:23:48 PM
Posts: 137,
Visits: 380
|
|
(Just repeating what I already posted on the E-Prime list...)
I have never used the onset & offset signals, but I will hazard a
guess that your offset signal must be different from your onset
signal, otherwise the signal never changes once it is set. Here is
an example change in your code:
Dim trigOnCode as integer
Dim trigOffCode as integer
trigOnCode = CInt (c.GetAttrib ("TriggerOnCode"))
trigOffCode = CInt (c.GetAttrib ("triggerOffCode"))
Ton.OnsetSignalEnabled = True
Ton.OnsetSignalPort = &H378
Ton.OnsetSignalData = trigOnCode
Ton.OffsetSignalEnabled = True
Ton.OffsetSignalPort = &H378
Ton.OffsetSignalData = trigOffCode
-- David McFarlane, Professional Faultfinder
|
|
|
|