USB port TMS

David McFarlane mcfarla9 at msu.edu
Thu Mar 6 17:09:02 UTC 2014


Annchen,

For the syntax & usage of the Declare statement, look at the Declare 
topic in the E-Basic Help facility.  You might find even better 
documentation for Declare in references for Microsoft Visual Basic or 
Visual Basic for Applications.

For the rest, you really do have to get that from MCC, they are 
supposed to know and document which of their .dll files and functions 
to use.  As I recall when I used their UL (almost 4 years ago now), 
it came with extensive documentation and examples.  Remember that 
E-Prime is just a derivative of MS VBA, so you should look at the 
documentation & examples for Visual Basic.  In fact, next time you 
talk to MCC staff, do *not* mention E-Prime, just tell them you want 
to use their board with Visual Basic, and that should help orient them better.

Best,
-----
David McFarlane
E-Prime training 
online:  http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter:  @EPrimeMaster (https://twitter.com/EPrimeMaster )

/----
Stock reminder:  1) I do not work for PST.  2) PST's trained staff 
take any and all questions at https://support.pstnet.com , and they 
strive to respond to all requests in 24-48 hours, so make full use of 
it.  3) In addition, PST offers several instructional videos on their 
YouTube channel (http://www.youtube.com/user/PSTNET ).  4) If you do 
get an answer from PST staff, please extend the courtesy of posting 
their reply back here for the sake of others.
\----


At 3/6/2014 11:54 AM Thursday, Annchen Knodt wrote:
>I've been referring to this older post for help getting E-prime to 
>send output signals to a USB device: MCC USB-1208FS.  Since Eprime 
>doesn't have any native functionality for communicating with a USB 
>I'd like to try using the DLL the comes with the device's "Universal 
>Library" installation as David suggests below.  However, I can't 
>find any instructions for working with Eprime anywhere in the UL 
>documentation (and the rep I chatted with at MCC help had never 
>heard of Eprime), so I'm hoping that someone might be able to 
>clarify two things for me:
>
>1) Which MCC DLL file to I link to in Eprime? (and what is the 
>syntax of the Declare statement?)  The MCC rep said I should use 
>cbw64.dll, but I'm not sure if he's right since he didn't really 
>know what I was talking about
>2) What inline commands then do I use in Eprime to send the signal 
>to the USB?  We had previously used WritePort with a different 
>device that's been replaced with this USB
>
>Thanks!
>
>Annchen Knodt
>
>
>On Monday, May 31, 2010 6:20:18 PM UTC-4, David McFarlane wrote:
>Sara,
>
>Come to think of it, there is a way to send & receive data through USB
>using E-Prime, in fact I am doing that for a project now.  First go to
>Measurement Computing (referred to earlier) and get whatever I/O board
>suits your fancy, e.g., their USB-1024 ($100).  When that arrives,
>install the Universal Libray software that comes with it.  Then add the
>appropriate Declare statements in the User Script area of your EP
>program (see instructions that come with the MCC UL).  Now you can use
>MCC UL function calls from EP inline code to send & receive data through
>the USB port.
>
>Recognizing that the MCC UL essentially just adds a DLL to provide the
>USB support, with enough ingenuity you could take this even further by
>writing your own DLL to use from EP.  For that, you might want to take a
>look at "USB Complete" by Jan Axelson.
>
>Mind you, I am not advising you do any of this.  Just being an academic
>and pointing out the full range of possibilities.
>
>-- David McFarlane, Professional Faultfinder
>
>
>David McFarlane wrote:
> > Sara,
> >
> > Stock reminder:  1) I do not work for PST.  2) PST's trained staff
> > really does like to take any and all questions at
> > 
> <http://support.pstnet.com/e%2Dprime/support/login.asp>http://support.pstnet.com/e%2Dprime/support/login.asp 
> , and they strive
> > to respond to all requests in 24-48 hours -- this is pretty much their
> > substitute for proper documentation, so make full use of it.  3) If you
> > do get an answer from PST Web Support, please extend the courtesy of
> > posting their reply back here for the sake of others.
> >
> > That said, here is my take ...
> >
> > Unless PST has added something new to the latest release of EP2, E-Prime
> > simply has no facility for sending or receiving data through a USB port,
> > so you are just out of luck there.  But do not take my word for this,
> > please contact PST Web Support yourself and then report back here.
> >
> > Say, why not just install another parallel port?  Or, does your other
> > device need all 8 outputs from the parallel port?  If not, why not just
> > build a cable to send different wires to your different devices?  Just
> > take a look at the book "Parallel Port Complete" by Jan Axelson to get
> > some idea of how to make full use of the parallel port.  Or, skip the
> > parallel port and just install a real digital I/O card (e.g., from
> > <http://www.mccdaq.com>http://www.mccdaq.com ).
> >
> > -- David McFarlane, Professional Faultfinder
> >
> >
> >> does anyone knows the scropt to open the USB port in order to trigger
> >> a TMS?
> >>
> >> please, let me know
> >> I have to send a trigger though the USB port, because the parallel
> >> port is used to trigger another device.
> >>
> >> thank you very much
> >> Sara

-- 
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/5318abb6.e272320a.402c.22d0SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/groups/opt_out.



More information about the Eprime mailing list