Task Event - WriteString?

John jpryan28 at gmail.com
Fri Aug 16 15:55:29 UTC 2013


Correct - I was able to take out the inline and use task events by putting 
RUN/r/n into the custom string.

00 RUN/r/n  triggers the first pump
01 RUN/r/n  triggers the second pump

Success!

On Thursday, August 15, 2013 2:19:11 PM UTC-4, McFarlane, David wrote:
>
> Great, and thanks for posting back!  So the issue was not exactly 
> with E-Prime Task Events, but with including control characters in 
> the output string. 
>
> Hmm, then you should still be able to get it to work with Task Events 
> by defining your string plus carriage return/newline into an 
> attribute, and then using the attribute reference in Task 
> Events.  E.g., with inline code (could do this once at the Sesson level), 
>
>          c.SetAttrib RunString, "RUN" & ebCrLf 
>
> and then for "Custom" in Task Events use 
>
>          [RunString] 
>
> Even better, just try either of the following strings for Custom in 
> Task Events: 
>          RUN\n 
>          RUN\r\n 
>
> The generated code shows that it properly includes the escaped 
> control characters (\n, or \r\n), so this should work, but I need 
> someone else to run this and confirm. 
>
> So the lesson here seems to be that we have to know how to embed 
> standard escaped control characters in our Custom strings for Task Events. 
>
> ----- 
> David McFarlane 
> E-Prime training 
> online:  http://psychology.msu.edu/Workshops_Courses/eprime.aspx 
> Twitter:  @EPrimeMaster (https://twitter.com/EPrimeMaster) 
>
>
> At 8/15/2013 01:14 PM Thursday, John wrote: 
> >Update:  We were able to get it running using inline script -- it 
> >needed a carriage return. 
> > 
> >Prior to each event, put in an inline script with: 
> >Serial.WriteString "RUN" & ebCrLf 
> > 
> >If using multiple pumps in a network, precede run with the address 
> >of the pump:  "00 RUN" for the first pump, "01 RUN" for the second, etc. 
> > 
> > 
> >On Monday, August 12, 2013 11:28:34 AM UTC-4, John wrote: 
> >I'm running eprime pro and trying to use task events to trigger an 
> >external device. 
> > 
> >When the stimulus comes on the screen, I need eprime to send the 
> >string "RUN" to the serial port. 
> > 
> >In task events, I do the following: 
> >-Add an event 
> >-Select the serial device (COM3) 
> >-Action:  WriteString 
> > 
> >...but then how to I define what the string is?  (i.e. "RUN") 
> > 
> > 
> >(In a terminal window, i can type "echo RUN > COM3" and that 
> >triggers the device...I'm just trying to figure out how eprime to do 
> that.) 
> > 
> >Thanks! 
>
>

-- 
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/64ff3f74-b687-4074-aeb9-9dd31662998a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130816/b73857af/attachment.htm>


More information about the Eprime mailing list