Lpt3 port address running errors

240 views
Skip to first unread message

neuro...@gmail.com

unread,
Apr 22, 2014, 3:31:07 PM4/22/14
to e-p...@googlegroups.com
Hello,

I apologize ahead of time - a lot of this technical information and jargon is new to me, which may be obvious in my question. I am using a dual port setup in order to send feedback-locked triggers to an EEG acquisition computer. The original task that we're using was programmed on a lab computer that had the common Lpt1 port address (&H378). We're now trying to run the task on a new computer that has an Lpt3 port address (listed as E010-E017). I've tried to run this using the different methods, using hexidecimal/decimal variations and combinations, but nothing seems to be working.

Has anyone ever come across a similar situation? Any helpful tips or advice would be much appreciated.

Cheers,

Nick

ben robinson

unread,
Apr 22, 2014, 3:57:24 PM4/22/14
to eprime
I wound up having to use an old computer in order to send signals via parallel port, as new parallel ports use dynamically assigned port addresses, and as far as I could determine there is no way to determine the specific address that will be used at any given time. I realize how far fetched that sounds, but that was the best information I could gather.

ben


--
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+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/ef1ab78d-ca3c-4928-8d08-afefc2f2b29e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryan Whitfield

unread,
Apr 22, 2014, 4:32:02 PM4/22/14
to e-p...@googlegroups.com
If anybody is running into this issue, E-Prime 2.0 sp1 allows you to reference the parallel port by the LPT value, rather than having to reference the hex address. The use of the hex address presented some problems with dynamically assigned values in older versions, as well as hex values that were greater than an integer (32768). I recommend upgrading the sp1 and using task events for port communication whenever possible.

Ryan Whitfield

neuro...@gmail.com

unread,
Apr 23, 2014, 9:15:34 AM4/23/14
to e-p...@googlegroups.com
Thanks, Ryan and Ben for the reply,

I actually tried changing it by the Lpt value first (see below) and when I initially went to change the port address I updated the refernce from "Writeport Lpt1%, x" to "Writeport Lpt3%, x" but this didn't seem to take either. Does the format remain unchanged or am I missing something here?

And are the x values (those specified after the Lpt port number) in a hexidecimal format? I'm wondering how the values below (i.e., &H2A, &H2C, etc.) translate into integer values when communicating with our acquisition software:

If fb2type=0 Then
Writeport LptPort3%, &H2A
ElseIf fb2type=1 Then
Writeport LptPort3%, &H2C
ElseIf fb2type=2 Then
Writeport LptPort3%, &H2E
ElseIf fb2type=3 Then
Writeport LptPort3%, &H30
End If​

Thanks -

Nick

Ryan Whitfield

unread,
Apr 23, 2014, 1:37:21 PM4/23/14
to e-p...@googlegroups.com
Nick,

Again - sticking with the use of some of the newer features in E-Prime 2.0 SP1, you can use the following script to send the same values, as long as the ParallelPort Device is added to the experiment, changed to LPT3, and the data port is set to "output" (all of this is in the ParallelPort Device Properties)

If fb2type=0 Then
   ParallelPort.WriteByte 42
ElseIf fb2type=1 Then
   ParallelPort.WriteByte 44
ElseIf fb2type=2 Then
   ParallelPort.WriteByte 46
ElseIf fb2type=3 Then
   ParallelPort.WriteByte 48
End If​

I hope this is helpful.


Amy Winecoff

unread,
Jun 23, 2015, 2:03:39 PM6/23/15
to e-p...@googlegroups.com
Hello,

I'm having a similar issue. I have added the port to my experiment using the name LTP3 and the address as &HE10. In my experiment, before each time the script presents a picture stimulus, I have an InLine script that reads WritePort &H0E10, x (with x being 2-5 for the different conditions). This runs without an error in EPrime, but the system I am trying to send the pulse to (BIOPAC MP150) doesn't pick anything up. How do I know if EPrime is successfully sending the pulse? 

Also, I would attempt pasting in the script suggested by Ryan W into the InLine objects instead of my writeport codes; however, I don't understand what fb2type means. Is this something particular to the previous user's experiment? Sorry for asking such basic questions, I'm just really new to this.

Thanks!

Amy
Reply all
Reply to author
Forward
0 new messages