Sending triggers for targets and responses from E-prime
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Sending triggers for targets and responses... Expand / Collapse
Author
Message
Posted 4/22/2008 8:29:54 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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!
Post #1502
Posted 4/22/2008 10:22:19 AM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum 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
Post #1505
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 12:35pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 10 queries. Compression Disabled.