PortTalk to Biopac MP150/DAQ: EMG marker

Hi,

I'm not able to receive a marker signal in the BIOPAC DAQ. I'm using the following setup:


Stimulus PC (Win7) -->> MATLAB/PTB/PortTalk: TTL -->> LPT1 -->>

-->> DSUB-25 -->>
-->> GND D
-->> TRIGGER
-->> DIGITAL I/O: Ch 0

-->> MP150 -->> Aquisition PC (Win7)


The computers are running Windows 7 32-bit with MATLAB R2010a. When calling lptwrite there's no return statement. How can I make sure I've installed it correctly? For example, lptwrite(888, 256) did not return an error. I'm also wondering whether the wires are connected to the correct inputs.

The setup is intended for EMG data aquisition and the purpose of using PortTalk is to create a marker in the Biopac DAQ for each stimulus displayed.

I hope you can help,
Daniel
Hi there, I just saw this forum and have a similar issue, I hope through past experience you would have something that could help me. My issue is stated below:

I am currently using a Biopac MP150 model in our lab.

I have been trying to send TTL Signals via matlab to the biopac equipment via parallel port of address 378.
The matlab codes seem to be fine, however, the biopac doesnt seem to respond to the ttl signal.

What I have done till now:

As for matlab, i have downloaded and installed lptwrite.m which is the required software to send ttl signals.
and, i have created a plot via AcqKnowledge software to view the signals obtained/responsive by biopac.

On the plot, when the PC is on, its on high(5V) constantly. However, when the command: lptwrite(888, 0), is applied to make it low(0V).
It still stays on high(5V) when it should become low(0V).

Apparently, I was using biopac to collect GSR data on a participant simultaneously.
The plots for the ttl signal and gsr were on the same screen and run live at the same time.
The GSR data was running fine while the ttl signal was consistent and unresponsive at 5V while the signals to alter the ttl codes were executed.

The matlab codes used are shown below:

lptwrite(888, 0); % to transmit a 0V signal, 888 is the address for 378 in decimal
WaitSecs(0.005); % waits for 5 milli seconds
lptwrite(888, 255); % to transmit a 5V signal


Ultimately, I would like to make biopac responsive to the matlab codes below so that it shows on the plot as per the codes mentioned above via AcqKnowledge Software.
The aim is to use ttl signals as a markers for paradigms.

Is there anyway that I could make this happen?
Thanks

--- In psychtoolbox@yahoogroups.com, "daniellabbe@..." <daniel@...> wrote:
>
> This might be a driver issue...
>
> AllowIo.exe returns:
>
> PortTalk: You do not have rights to access the Service Control Manager and
> PortTalk: the PortTalk driver is not installed or started. Please ask
> PortTalk: your administrator to install the driver on your behalf.
> PortTalk: Couldn't access PortTalk Driver, Please ensure driver is loaded.
>
> In RegEdit ErrorControl is (1), Start is (0) and Type is (1) - all in hex format of course (e.g. 0x00000001). I have administrative rights to run Services MMC and can start and stop services there. What else might Service Control Manager refer to?
>
> The sys file is in the System32 folder. Could there be a compilation error? I'm using the LCC compiler with MATLAB that generates a mwex32 file.
>
> Any ideas?
> -Daniel
>
> --- In psychtoolbox@yahoogroups.com, "daniellabbe@" <daniel@> wrote:
> >
> > Thanks Erik for your reply. I appreciate every suggestion.
> >
> > I followed instructions 1, 2 and 3 - basically everything above "Additional information".
> >
> > The pulse was generated by the code:
> >
> > lptwrite(888, 255)
> > WaitSecs(0.004)
> > lptwrite(888, 0)
> >
> > I haven't made use of any other code on the page. The equipment was set to a sampling rate of 1000 Hz. I've even tried looping through the above with an iterator from 888 to 895.
> >
> > * UAC [check]
> > * Port address from device manager [check]
> >
> > I don't believe other processes will access the port, so I have not changed the registry. No hardware printer is installed and very few programs are installed. I'm using the latest version of PTB. I have not been able to minimize DPC latency, but that should be irrelevant (for now).
> >
> > What modes are available in the BIOS? I would have to contact an admin to change them. Windows is not admin locked though.
> >
> > I'm not very skilled at programming, and know even less about hardware. Maybe the BIOS needs a reconfig. I assume you're referring to the motherboard BIOS.
> >
> > -Daniel
> >
> >
> > --- In psychtoolbox@yahoogroups.com, "e_flister" <e_flister@> wrote:
> > >
> > > daniel-
> > > post code and explain which parts of these instructions you followed:
> > > http://psychtoolbox.org/wikka.php?wakka=FaqTTLTrigger
> > >
> > > notice that porttalk/IoExample/pt_ioctl.c defines outportb as a void type, because it does its own error checking (and would print an error if one were detected).
> > >
> > > i don't know that anyone's tried porttalk on win7 but i'm pretty sure it would work fine. notice the UAC issues that need to be addressed though.
> > >
> > > do you know your port address is correct? do you have your port set to the correct mode in the BIOS? did you actually generate a pulse or only set the pin to a value it may already have been set to? is your pulse long enough to be detected by the recipient?
> > >
> > > these breakout cards are very useful for debugging situations like this:
> > > http://www.winford.com/products/brk25mf.php
> > >
> > > then you can see what's going on with some data acquisition software or a multimeter. some people hook up LEDs directly to their pins but beware they are not meant to source a load.
> > >
> > > -e
> > >
> > > --- In psychtoolbox@yahoogroups.com, "daniellabbe@" <daniel@> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I'm not able to receive a marker signal in the BIOPAC DAQ. I'm using the following setup:
> > > >
> > > >
> > > > Stimulus PC (Win7) -->> MATLAB/PTB/PortTalk: TTL -->> LPT1 -->>
> > > >
> > > > -->> DSUB-25 -->>
> > > > -->> GND D
> > > > -->> TRIGGER
> > > > -->> DIGITAL I/O: Ch 0
> > > >
> > > > -->> MP150 -->> Aquisition PC (Win7)
> > > >
> > > >
> > > > The computers are running Windows 7 32-bit with MATLAB R2010a. When calling lptwrite there's no return statement. How can I make sure I've installed it correctly? For example, lptwrite(888, 256) did not return an error. I'm also wondering whether the wires are connected to the correct inputs.
> > > >
> > > > The setup is intended for EMG data aquisition and the purpose of using PortTalk is to create a marker in the Biopac DAQ for each stimulus displayed.
> > > >
> > > > I hope you can help,
> > > > Daniel
> > > >
> > >
> >
>
porttalk should work fine. which instructions did you follow from here:
http://psychtoolbox.org/wikka.php?wakka=FaqTTLTrigger

also consider the suggestions earlier in the thread:
> > > > > do you know your port address is correct? do you have your port set to the correct mode in the BIOS?
> is your pulse long enough to be detected by the recipient?
> > > > >
> > > > > these breakout cards are very useful for debugging situations like this:
> > > > > http://www.winford.com/products/brk25mf.php
> > > > >
> > > > > then you can see what's going on with some data acquisition software or a multimeter.

somehow i missed daniellabbe's reply back in 2010 -- daniel, did you ever get this resolved? yes you have to go into the m/b's bios and verify the port is set to spp. did you run allowio as admin?

-e

--- In psychtoolbox@yahoogroups.com, "elladawu" <elladawu@...> wrote:
>
> i couldn't get PortTalk to work recently with a fresh install of Windows XP 32 bit.
>
> then i tried io32 (which is also mentioned in the Psychtoolbox wiki somewhere), and it did the trick:
>
> http://sunburst.usd.edu/~schieber/psyc770/IO32.html
>
>
>
> --- In psychtoolbox@yahoogroups.com, "remo3163" <ramhenry@> wrote:
> >
> > Hi there, I just saw this forum and have a similar issue, I hope through past experience you would have something that could help me. My issue is stated below:
> >
> > I am currently using a Biopac MP150 model in our lab.
> >
> > I have been trying to send TTL Signals via matlab to the biopac equipment via parallel port of address 378.
> > The matlab codes seem to be fine, however, the biopac doesnt seem to respond to the ttl signal.
> >
> > What I have done till now:
> >
> > As for matlab, i have downloaded and installed lptwrite.m which is the required software to send ttl signals.
> > and, i have created a plot via AcqKnowledge software to view the signals obtained/responsive by biopac.
> >
> > On the plot, when the PC is on, its on high(5V) constantly. However, when the command: lptwrite(888, 0), is applied to make it low(0V).
> > It still stays on high(5V) when it should become low(0V).
> >
> > Apparently, I was using biopac to collect GSR data on a participant simultaneously.
> > The plots for the ttl signal and gsr were on the same screen and run live at the same time.
> > The GSR data was running fine while the ttl signal was consistent and unresponsive at 5V while the signals to alter the ttl codes were executed.
> >
> > The matlab codes used are shown below:
> >
> > lptwrite(888, 0); % to transmit a 0V signal, 888 is the address for 378 in decimal
> > WaitSecs(0.005); % waits for 5 milli seconds
> > lptwrite(888, 255); % to transmit a 5V signal
> >
> >
> > Ultimately, I would like to make biopac responsive to the matlab codes below so that it shows on the plot as per the codes mentioned above via AcqKnowledge Software.
> > The aim is to use ttl signals as a markers for paradigms.
> >
> > Is there anyway that I could make this happen?
> > Thanks
> >
> > --- In psychtoolbox@yahoogroups.com, "daniellabbe@" <daniel@> wrote:
> > >
> > > This might be a driver issue...
> > >
> > > AllowIo.exe returns:
> > >
> > > PortTalk: You do not have rights to access the Service Control Manager and
> > > PortTalk: the PortTalk driver is not installed or started. Please ask
> > > PortTalk: your administrator to install the driver on your behalf.
> > > PortTalk: Couldn't access PortTalk Driver, Please ensure driver is loaded.
> > >
> > > In RegEdit ErrorControl is (1), Start is (0) and Type is (1) - all in hex format of course (e.g. 0x00000001). I have administrative rights to run Services MMC and can start and stop services there. What else might Service Control Manager refer to?
> > >
> > > The sys file is in the System32 folder. Could there be a compilation error? I'm using the LCC compiler with MATLAB that generates a mwex32 file.
> > >
> > > Any ideas?
> > > -Daniel
> > >
> > > --- In psychtoolbox@yahoogroups.com, "daniellabbe@" <daniel@> wrote:
> > > >
> > > > Thanks Erik for your reply. I appreciate every suggestion.
> > > >
> > > > I followed instructions 1, 2 and 3 - basically everything above "Additional information".
> > > >
> > > > The pulse was generated by the code:
> > > >
> > > > lptwrite(888, 255)
> > > > WaitSecs(0.004)
> > > > lptwrite(888, 0)
> > > >
> > > > I haven't made use of any other code on the page. The equipment was set to a sampling rate of 1000 Hz. I've even tried looping through the above with an iterator from 888 to 895.
> > > >
> > > > * UAC [check]
> > > > * Port address from device manager [check]
> > > >
> > > > I don't believe other processes will access the port, so I have not changed the registry. No hardware printer is installed and very few programs are installed. I'm using the latest version of PTB. I have not been able to minimize DPC latency, but that should be irrelevant (for now).
> > > >
> > > > What modes are available in the BIOS? I would have to contact an admin to change them. Windows is not admin locked though.
> > > >
> > > > I'm not very skilled at programming, and know even less about hardware. Maybe the BIOS needs a reconfig. I assume you're referring to the motherboard BIOS.
> > > >
> > > > -Daniel
> > > >
> > > >
> > > > --- In psychtoolbox@yahoogroups.com, "e_flister" <e_flister@> wrote:
> > > > >
> > > > > daniel-
> > > > > post code and explain which parts of these instructions you followed:
> > > > > http://psychtoolbox.org/wikka.php?wakka=FaqTTLTrigger
> > > > >
> > > > > notice that porttalk/IoExample/pt_ioctl.c defines outportb as a void type, because it does its own error checking (and would print an error if one were detected).
> > > > >
> > > > > i don't know that anyone's tried porttalk on win7 but i'm pretty sure it would work fine. notice the UAC issues that need to be addressed though.
> > > > >
> > > > > do you know your port address is correct? do you have your port set to the correct mode in the BIOS? did you actually generate a pulse or only set the pin to a value it may already have been set to? is your pulse long enough to be detected by the recipient?
> > > > >
> > > > > these breakout cards are very useful for debugging situations like this:
> > > > > http://www.winford.com/products/brk25mf.php
> > > > >
> > > > > then you can see what's going on with some data acquisition software or a multimeter. some people hook up LEDs directly to their pins but beware they are not meant to source a load.
> > > > >
> > > > > -e
> > > > >
> > > > > --- In psychtoolbox@yahoogroups.com, "daniellabbe@" <daniel@> wrote:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I'm not able to receive a marker signal in the BIOPAC DAQ. I'm using the following setup:
> > > > > >
> > > > > >
> > > > > > Stimulus PC (Win7) -->> MATLAB/PTB/PortTalk: TTL -->> LPT1 -->>
> > > > > >
> > > > > > -->> DSUB-25 -->>
> > > > > > -->> GND D
> > > > > > -->> TRIGGER
> > > > > > -->> DIGITAL I/O: Ch 0
> > > > > >
> > > > > > -->> MP150 -->> Aquisition PC (Win7)
> > > > > >
> > > > > >
> > > > > > The computers are running Windows 7 32-bit with MATLAB R2010a. When calling lptwrite there's no return statement. How can I make sure I've installed it correctly? For example, lptwrite(888, 256) did not return an error. I'm also wondering whether the wires are connected to the correct inputs.
> > > > > >
> > > > > > The setup is intended for EMG data aquisition and the purpose of using PortTalk is to create a marker in the Biopac DAQ for each stimulus displayed.
> > > > > >
> > > > > > I hope you can help,
> > > > > > Daniel
> > > > > >
> > > > >
> > > >
> > >
> >
>