<div dir="ltr">(sorry, those should be backslashes 00 RUN\r\n)<br><br>On Friday, August 16, 2013 11:55:29 AM UTC-4, John wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Correct - I was able to take out the inline and use task events by putting RUN/r/n into the custom string.<div><br></div><div>00 RUN/r/n triggers the first pump</div><div>01 RUN/r/n triggers the second pump</div><div><br></div><div>Success!<br><div><br>On Thursday, August 15, 2013 2:19:11 PM UTC-4, McFarlane, David wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Great, and thanks for posting back! So the issue was not exactly
<br>with E-Prime Task Events, but with including control characters in
<br>the output string.
<br>
<br>Hmm, then you should still be able to get it to work with Task Events
<br>by defining your string plus carriage return/newline into an
<br>attribute, and then using the attribute reference in Task
<br>Events. E.g., with inline code (could do this once at the Sesson level),
<br>
<br> c.SetAttrib RunString, "RUN" & ebCrLf
<br>
<br>and then for "Custom" in Task Events use
<br>
<br> [RunString]
<br>
<br>Even better, just try either of the following strings for Custom in
<br>Task Events:
<br> RUN\n
<br> RUN\r\n
<br>
<br>The generated code shows that it properly includes the escaped
<br>control characters (\n, or \r\n), so this should work, but I need
<br>someone else to run this and confirm.
<br>
<br>So the lesson here seems to be that we have to know how to embed
<br>standard escaped control characters in our Custom strings for Task Events.
<br>
<br>-----
<br>David McFarlane
<br>E-Prime training
<br>online: <a href="http://psychology.msu.edu/Workshops_Courses/eprime.aspx" target="_blank">http://psychology.msu.edu/<wbr>Workshops_Courses/eprime.aspx</a>
<br>Twitter: @EPrimeMaster (<a href="https://twitter.com/EPrimeMaster" target="_blank">https://twitter.com/<wbr>EPrimeMaster</a>)
<br>
<br>
<br>At 8/15/2013 01:14 PM Thursday, John wrote:
<br>>Update: We were able to get it running using inline script -- it
<br>>needed a carriage return.
<br>>
<br>>Prior to each event, put in an inline script with:
<br>>Serial.WriteString "RUN" & ebCrLf
<br>>
<br>>If using multiple pumps in a network, precede run with the address
<br>>of the pump: "00 RUN" for the first pump, "01 RUN" for the second, etc.
<br>>
<br>>
<br>>On Monday, August 12, 2013 11:28:34 AM UTC-4, John wrote:
<br>>I'm running eprime pro and trying to use task events to trigger an
<br>>external device.
<br>>
<br>>When the stimulus comes on the screen, I need eprime to send the
<br>>string "RUN" to the serial port.
<br>>
<br>>In task events, I do the following:
<br>>-Add an event
<br>>-Select the serial device (COM3)
<br>>-Action: WriteString
<br>>
<br>>...but then how to I define what the string is? (i.e. "RUN")
<br>>
<br>>
<br>>(In a terminal window, i can type "echo RUN > COM3" and that
<br>>triggers the device...I'm just trying to figure out how eprime to do that.)
<br>>
<br>>Thanks!
<br>
<br></blockquote></div></div></div></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe@googlegroups.com.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/e-prime/0f9f914c-f66f-458d-ad03-6017fb199861%40googlegroups.com">https://groups.google.com/d/msgid/e-prime/0f9f914c-f66f-458d-ad03-6017fb199861%40googlegroups.com</a>.<br />
For more options, visit <a href="https://groups.google.com/groups/opt_out">https://groups.google.com/groups/opt_out</a>.<br />