How to install/use the io64 function

Hello,

i’m quite new in Matlab/PTB.

I need to send some triggers to the parallel port for EEG data. Most people in my lab use io64 function like this :

ioObj = io64;
status = io64(ioObj);
address = hex2dec(‘E010’);
io64(ioObj,address,value);

The EEG platform is on Windows 10.

I develop my code on Linux on my laptop which does not has any parallel port.
The version of Matlab is R2022b and the PTB version is 3.0.18.

On this setup, there is no function io64 :

>> ioObj = io64;
Unrecognized function or variable 'io64'.

Perhaps this is an expected behaviour since I have not parallel port or perhap this is a Windows only function…

Do you have any idea here ?

And besides this issue, do you where I could find any documentation on this io64 function ?

Thanks a lot,

BR,

Pierre

For Linux the solutions are different, please read the FAQ:

For Linux I think this is the recommended route to use Parallel port: GitHub - widmann/ppdev-mex: Simple mex interface to ppdev

There are lots of options for using USB ports too which obviously allow more flexibility in hardware configuration and could work cross-platform…

Hello Ian-Max-Andolina,

thank you very much for your quick and well documented answer !

I understand that sending messages through the parallel port is handled differently between Windows and Linux.

I will then focus on Windows since it is the system on which the “official” run will be performed.

On 32-bits Windows, the link you cite suggested to us PortTall/lptwrite.c

On 64-bits Windows, it is rather suggested to use “Inpout driver” (I don’t know what this name refers to) and two links are given :

  • the first one refers to IO64 (hooray !) which seems to be maintained by the University of South Dakota
  • the second one refers to a Yahoo group discussion and seems to use callib Matlab function

Sadly, both links are currently dead so I can’t investigate furthermore.

Searching the web, I found another page from which it is possible to download IO64. But there is no documentation and I can’t tell if this version is up-to-date.

How did you proceed on Windows to install IO64 since the main page on usd.edu is no more available ?

Thanks a lot !

BR

Pierre

1 Like

Ok just a quick answer to myself :

I used web.archive.org to see if (by chance) a snapshot of this page of usd.edu has been done in the past.

You can access a snapshot done 2 years ago (in 2021) at the following address : Mex-File Utility for Fast MATLAB Port I/O (64-bit)

I will check that (and carefully save the page on my computer ^^)

BR

Pierre

Yes, web.archive.org seems to be a snapshot of Frank Schieber’s web site. Frank meanwhile retired and his webpage is down. I still use io64 on Win10 and Win11 PCs without any problems. Important issue: copy the inpoutx64.dll to Windows\System32 folder and run the InstallDriver.exe with admin priviledges.
We are now moving to Neurospec MMBT-S USB trigger box which works stable on Win, MacOS and Linux. No code changes if you move your project to a system with different OS :slight_smile:
Greetings
Andreas

Hello Andreas,

thanks for your reply !

What do you mean by “run the InstallDriver.exe” ? Is InstallDriver.exe some sort of Windows executable available by default with Win10/11 ?

Because I don’t find any InstallDriver.exe on the USD webpage…

Thanks a lot for your information :slight_smile:

BR

Pierre

What do you mean by “run the InstallDriver.exe” ? Is InstallDriver.exe some sort of Windows executable available by default with Win10/11 ?

It came with the binaries of the io64, I can send you a zip file. But maybe placing the inpoutx64.dll in the System32 folder is sufficient. Give it a try.
Best
Andreas

This last should do it. As an aside, running in Linux will make a lot of things easier and more reliable. The parallel port is only one - but see the note from Ian-Max-Andolina; USB offers more flexibility (having said that, we use a parallel port on Linux)

See also Mario’s helpful answer for best practice of sending TTL markers in this thread here.