Sending TTL Signals as Event Markers to Biopac MP35 amplifier


Author
Message
pspowell
pspowell
Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)
Group: Forum Members
Posts: 13, Visits: 3

Hi,


I've been working to send TTL signals to a Biopac MP35 amplifier in order to record event markers for collecting GSR data.  What I would like to do is insert an event marker at the beginning and end of each trial.  I've been successful with this before using a different amplifier (BioLog), but have not found a way to do this with the Biopac system.


Another problem I am having is that when I attempt to run the parallel port monitor inquisit crashes.  Finally, I've also attempted to run the script to determine if the biopac will receive the TTL signal and I've had no success with this either.  Below is a portion of script I'm using, first part is defining the TTL signal and below that you can see where I am attempting to insert these signals during a trial. Any advice would be appreciated.


Best,


Patrick



<port EM0>
/ port = lpt1
/ subport = data
/ items = ("00000000")
</port>


<port EM1>
/ port = lpt1
/ subport = data
/ items = ("00000001")
</port>


<trial CSM_H>
/ stimulustimes = [1=CSM, EM1; 7000 = blank, EM0]
/ inputdevice = mouse
/ correctresponse = (lbuttondown)
/ pretrialpause = 1500
/ timeout = 10000
</trial>


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 103K

Regarding the crash:


- try running things on a 32-bit Windows system. The Inquisit 3 port monitor may not work properly under 64-bit Windows editions.


- make sure you have the latest Inquisit 3 version installed (check http://www.millisecond.com/download)


- try using a different port library than the one shipping with Inquisit 3 by default. See http://www.millisecond.com/forums/Topic7461.aspx#7461.


pspowell
pspowell
Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)
Group: Forum Members
Posts: 13, Visits: 3

Hi Dave,


I've tried all your suggestions, and I even attempted to run the script and the port monitor tool in Inquisit 2, with not luck.  However, I was having a little trouble finding the port library you suggested.  Also, just to clarify, do I simply remove the old port library and replace it the version you suggested in the forum?  If there is anything else that needs to be done or that I could try just let me know.


Thanks again,


Patrick


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 103K

The thread mentioned in my previous reply includes a download link to the library. Repeating it here: http://logix4u.net/InpOutBinaries.zip. Extract the zip and put inpout32.dll in the Inquisit program directory (i.e., where Inquisit.exe is located).


pspowell
pspowell
Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)
Group: Forum Members
Posts: 13, Visits: 3

Hi Dave,


I was able to fix the parallel port tool problem by adding the inpout32.dll to the inquisit program directory like you mentioned.  So far so good, the parallel port tool seems to be working properly.  Now I'm on to my next problem, which is getting my biopac amplifier to record a ttl signal from inquisit.  I've tried using the parallel port tool to see what which signal the biopac will recognize but I've had no luck.  I've also tried running my script to send event signals (see earlier post), but this hasn't worked either.  I'm open to any other suggestions you guys might have.  


Thanks in advance!


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 103K

Have you ruled out that the Biopac amp is part of the problem? I.e., does the amp catch TTL signals from that machine at all (not using Inquisit)?


pspowell
pspowell
Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)
Group: Forum Members
Posts: 13, Visits: 3

Yes the amp is designed to recognize TTL signals.  I think the problem is that it records digital inputs on pins 10 -13 and 22-25.  This seems like it would pose a problem since inquisit seems to send data signals on pins 2-9.  Is there anyway to tell inquisit to send the signal on a different pin other than pins 2-9?


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 103K

Inquisit can send via the data and control registers. You specify the register to use via the /subport attribute. Details are available in the language reference for the <port> element in the documentation. A schematic overview is available in the documentation's "How to Present TTL Signals Through the Parallel
Port" topic.


Pins 22-25 are ground pins which Inquisit cannot set. Pins 10-13 are status pins, which are for input only. See e.g. http://www.probotix.com/manuals/images/parallel_port_pinout.jpg for an illustration.


If the Biopac amp provides no means to change / select the pins used for sending and receiving data, I don't see a way to pull this of short of rewiring the cable (which should only be done with the aid of a trained electronics professional).


seandr
seandr
Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)
Group: Administrators
Posts: 1.3K, Visits: 5.6K


As Dave mentioned, no software program can send signals out of pins 10-13 as the hardware of the port simply doesn't support this. However, you have a couple of options, neither of which requires building your own cable:


1) Presumably you are using a straight-through parallel port cable, which maps each pin directly to its counterpart on the other side. Instead, you need a "LapLink" or "InterLink" parallel port cable, which maps pins 3-6 of the data register on the PC to pins 10-13 of the status register on the amp). Here's a pin-out diagram for a LapLink cable.


As you can see from the diagram, 4 bits can be sent and received using this scheme - specifically bits 1-4 make up the signal, whereas bits 0, 5-7 are ignored. Given the ignored bits, "11111111" and "00011110" are the same value as far as BioPac is concerned, but "00011010" and "00010110" are different values. The highest value you can send is "00011110", which equals 16. 


If Biopac only registers input on its status port, I'd be surprised if they didn't include such a cable, but if not, you can easily find them online or at places like RadioShack. 


2) Just about every modern parallel ports allow the data register (pins 2-9) to both read and write data. I'd be surprised if there wasn't a way to switch the BioPac data register into read mode, in which case you could use a straight through cable and send 8-bit signals to BioPac's pins 2-9. Possibly you've already pursued this with BioPac support resources, but if not, it might be worth a try. 


Hope this helps,
Sean








pspowell
pspowell
Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)Distinguished Member (3.7K reputation)
Group: Forum Members
Posts: 13, Visits: 3

Hi Sean,


Thanks for the advice the LapLink cable works perfectly, and definitely was a much more economical option than the proprietary cable offered by biopac.


Thanks again!


Patrick


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search