IOPort error with TriggerBox

Hello Psychtool Box community,

I am setting up a new stimulus computer (Dell Precision 3440) using a Brain Products Trigger Box (Brain Products TriggerBox - Marker triggering via USB port) which acts as a virtual parallel port that is connected to the stim PC via USB. When attempting to open the correct port using IOPort, I get the following error:


>> TB = IOPort('OpenSerialPort', 'COM3', []); 

IOPort-Info: Configuration for device COM3:

IOPort-Info: Current baud rate is 9600

IOPort: Error: Failed to set requested write timeout 1.000000 seconds on serial port COM3 : SetCommTimeouts() failed with error code 87.

WARNING: In error handling: Error restoring comm timeouts for device COM3 - (87).

Error in function OpenSerialPort: Usage error

Error changing device settings for device COM3 - (87).

Error using IOPort

Usage:

[handle, errmsg] = IOPort('OpenSerialPort', port [, configString]);

Any suggestions on how to handle this error?

Thank you!

I have no clear idea for what is going wrong, but can you try following, and see how it goes?

TB = IOPort('OpenSerialPort', '\\.\COM3');

If it still gives the same problem, can you try to right-click Matlab startup icon, and “Run as Administrator”? Then try the open port command again.

Thank you for your quick response. I tried both of these suggestions and I am still getting exactly the same error.
Any other suggestions?

Thank you!

I am guessing some driver issue to deny timeout change. I would try following:

Go to Windows Device manager → Ports → USB Serial Port (COM3) → right-click → Properties

Here you will see Manufacturer information in case you need to update the device driver manually.

Then keep going to → “Port Settings” tab-> Advanced
You should have something like “Minimum Read Timeout” and “Minimum Write Timeout”. Change both to 1000 msecs, which is IOPort default. The hope is IOPort won’t need to change it so avoiding error.

If this does not work, try to update the device driver. You can go to “Drive” tab to “Update Driver”. If that doesn’t work, you may need to go the manufacturer website to download the driver.

Hello,

Thank you for your help. I can’t seem to find the “Port Settings” tab. What I see is this: Screen Shot 2021-03-23 at 8.02.44 AM
Where will I find the setting tab from here?

Best wishes,
Meg

Have you installed the device driver:
Brain Products GmbH / Downloads / Tools (File Converter, TriggerBox, Utilities, Firmware)
If not, that would likely be the cause.

Hello,

Yes I have. I can send triggers using the Brain Products Trigger Box application. The issue arises when I try to send triggers from Matlab. Do you have any further suggestions? I haven’t managed to find the Post Settings tab.

Best wishes,
Meg

Different serial-over-USB ports may have different settings. It seems there is no Port Setting for this manufacturer. If the driver was installed correctly, you may contact the manufacturer for help. They claim it works for Psychtoolbox.

You can also choose to use our RTBox:
GitHub - xiangruili/RTBox: RTBox driver code in Matlab
which should be cheaper than the TriggerBox I believe, and very easy to use under PTB. But you already bought their box, and it should work for you.
-Xiangrui

Is this issue resolved? Otherwise, you can buy priority support, if you need further assistance with that misbehaving Brainproducts device.

-mario