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]);
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.
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.
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