Trigger with Usb-to-serial port cable (rs232) with FTDI chipset
Julia Shin
jshin at psych.udel.edu
Wed Apr 9 20:29:07 UTC 2014
Hi all,
So I was fishing through all trigger-related questions in this group, but I
have yet to find a solution that would help me with my problem :( I am also
a newbie in running trigger so I apologize in advance if my questions look
really easy...
So I am trying to run an experiment with a desktop computer that would send
a trigger signal to another computer telling the other computer to play *a
sound file* when the signal is sent. Basically the gist of the experiment
is that we want the other computer to play a sound file which is a mp3 file
of a metronome (120 bpm) while the main computer sends stimulation to the
participant and collecting their responses. We can easily do this by
playing the metronome sound file in mp3 player but we want to control when
the stimulation would happen in accordance with the metronome sound so I
think that is why we want to go with the trigger option.
- My first questions is: for the receiving end of the computer do I have
to have the E-Prime experiment up and running to receive the signal from
the main computer?
- Second question: I used Serial.WriteString SoundOut1.Play (or run) and
Serial.ReadString SoundOut1.Play (or run) but E-Prime kept saying Play/Run
was not a property of the object. What syntax do I have to use to signal
the other computer to play the sound file? And what syntax do I have to use
for receiving signal from the main computer to run the sound file when
prompted? Is this why my E-prime keeps crashing whenever I tried to run the
e-prime experiment for signal receiving computer? I added Serial to
Device option in Experiment tab in E-Prime with correct com port and baud
rate. Though, is it common to have different com port number for the main
computer and the receiving computer?
So here is the syntax for Serial.WriteString that is placed in InLine that
is placed in the beginning of the experiment:
Dim strData As String
strData = "SoundOut1.Play"
Serial.WriteString strData
Then here is the syntax for Serial.ReadString. I just copied this straight
from the BasicSerial.es sample in PSTNET:
' Just hold the experiment here until some bytes
' arrive over the serial port.
Dim str As String
Dim n As Long
Debug.TimeStampsEnabled = True
Do While Serial.InputCount = 0
Loop
' Read the data that came in
n = Serial.ReadString(str)
- Third question: Does the trigger syntax for usb-to-serial port cable
differ from trigger syntax for serial port? I thought they would be the
same but I just want to confirm that there is no problem with the cable
here. When I plugged in the cable, both receiving and main computers
installed the drivers and I didn't see any warning signs saying that the
cables were not working properly.
Sorry that I am asking hundred questions at the same time. But I would
greatly appreciate your help...I went through the FAQ page relating to
trigger on PSTNET but they mostly seem to have helpful answers for parallel
ports.
Thank you!
Best,
Julia Shin
--
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/8542792e-4210-4527-a09a-4fdc590d4567%40googlegroups.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/20140409/2e5a24b3/attachment.htm>
More information about the Eprime
mailing list