Hi all,--A search of this group tells me that this is a very popular topic, but I haven't been able to find a solution to this particular issue.I'm trying to send a TTL trigger at the exact onset of a stimulus in eprime (Standard 2.0). Currently I'm using Writeport, but (as expected) the trigger is sent slight before the stimulus appears on the screen because of the monitor's refresh rate. To remedy this, I've been attempting to use:
X.OnsetSignalEnabled
X.OnsetSignalPort
X.OnsetSignalData
X.OffsetSignalEnabled
X.OffsetSignalPort
X.OffsetSignalDataAs described in this group and in the PST knowledge base (i.e., https://www.pstnet.com/support/kb.asp?TopicID=1318)However, the port data/val that I need to send at the onset of the stimulus varies as a function of 1) the type of stimulus (there are 4 types) and 2) the experimental block (there are 5 blocks). In the examples I've seen, the port information is sent through x.OnsetSignalData/x.OffsetSignalData, but I can't figure out how to incorporate conditional logic into this call. Below is a very poor attempt to do so, which (not surprisingly) did not send ttl triggers as expected. This was placed in line directly before the stimulus slide.ImagePres.OnsetSignalEnabled = TrueImagePres.OnsetSignalPort = &HE010ImagePres.OnsetSignalData = c.GetAttrib("BlockNum")If c.GetAttrib("BlockNum") = "1" ThenIf c.GetAttrib("ImageType") = "1" ThenWriteport &HE010, 11ElseIf c.GetAttrib("ImageType") = "2" ThenWriteport &HE010, 12ElseIf c.GetAttrib("ImageType") = "3" ThenWriteport &HE010, 13ElseIf c.GetAttrib("ImageType") = "4" ThenWriteport &HE010, 14End IfElseIf c.GetAttrib("BlockNum") = "2" ThenIf c.GetAttrib("ImageType") = "1" ThenWriteport &HE010, 21ElseIf c.GetAttrib("ImageType") = "2" ThenWriteport &HE010, 22ElseIf c.GetAttrib("ImageType") = "3" ThenWriteport &HE010, 23ElseIf c.GetAttrib("ImageType") = "4" ThenWriteport &HE010, 24End IfElseIf c.GetAttrib("BlockNum") = "3" ThenIf c.GetAttrib("ImageType") = "1" ThenWriteport &HE010, 31ElseIf c.GetAttrib("ImageType") = "2" ThenWriteport &HE010, 32ElseIf c.GetAttrib("ImageType") = "3" ThenWriteport &HE010, 33ElseIf c.GetAttrib("ImageType") = "4" ThenWriteport &HE010, 34End IfElseIf c.GetAttrib("BlockNum") = "4" ThenIf c.GetAttrib("ImageType") = "1" ThenWriteport &HE010, 41ElseIf c.GetAttrib("ImageType") = "2" ThenWriteport &HE010, 42ElseIf c.GetAttrib("ImageType") = "3" ThenWriteport &HE010, 43ElseIf c.GetAttrib("ImageType") = "4" ThenWriteport &HE010, 44End IfElseIf c.GetAttrib("BlockNum") = "5" ThenIf c.GetAttrib("ImageType") = "1" ThenWriteport &HE010, 51ElseIf c.GetAttrib("ImageType") = "2" ThenWriteport &HE010, 52ElseIf c.GetAttrib("ImageType") = "3" ThenWriteport &HE010, 53ElseIf c.GetAttrib("ImageType") = "4" ThenWriteport &HE010, 54End IfEnd IfImagePres.OffsetSignalData = 0ImagePres.OffsetSignalPort = &HE010ImagePres.OffsetSignalEnabled = TrueDoes anyone know how to incorporate condition logic into this method of matching stim onset with ttl triggers? (Or is some other method more appropriate?)Thank you!
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@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/5ac9053f-d7d1-471f-97f7-33df61fa79d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+u...@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/5ac9053f-d7d1-471f-97f7-33df61fa79d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/ded00a42-d814-48bf-ac3f-110b1e4bab0f%40googlegroups.com.