Error reading digitize data points with Polhemus

Hello,

I am using brainstorm on MATLAB R2018b (64 bt version), to digitize electrode positions with the EEG montage: fastrak, polhemus on Windows 10.

I get this error while collecting the points
image

I did the following to check the port connection

image

image

I also have problem with reading the EEG montage text file. I get this error

image
ANT Channel list _FASTRAK_64.txt (557 Bytes)

I attached the text file.

Any advice would be greatly appreciated and thanks for your help.

Best wishes

Anusha

The code was not handling the new line at the end of the montage text file...
I fixed this in this commit: https://github.com/brainstorm-tools/brainstorm3/commit/c106aef012ad87e3a2dd05bb3e0465b8a4aba3c2

Please update Brainstorm and try again.
Thanks for reporting this bug

Hello Francois,

Thank you for your help.
Now I can load the montage file. But its not collecting the points. When I hit collect point I do not see any points or a error message.

Here is what I got for read/write state

image

Regarding this, I have no experience...
@ebock @Marc.Lalancette Any suggestion ?

I can't test now because someone is using our system, but are you sure it's the correct COM port (COM1, COM2, etc)? If you're using Windows, you can check from the device manager.

Yes I am sure its on correct COM port.

Did you follow the Troubleshooting in the tutorial?

  1. From the Digitize->File->Edit settings (Figure 7), confirm the information in 's' matches your settings
  2. Confirm the information in 's' matches your COM port settings of your computer (this info is in the Device Manager)
  3. Press the button of the stylus, then execute s = instrfind() again. You should see that there are bytes available (94 bytes for Fastrak, 120 bytes for Patriot).

If you do not get #3, then you have communication issues. Check that the device is configured correctly.

I followed this

  1. Power on the device
  2. Restart Matlab
  3. Start brainstorm
  4. Start Digitize
  5. At the Matlab command prompt, type this: s = instrfind()

This is the result I got
image

Here are the settings on Brainstorm and on PC

With press the button of the stylus, this is the error I got
image

s slows image

Digitize.SerialCommection

image

Hello

I wondering if you have any suggestion for trouble shooting this errors reading data points??

Sorry to revive this ancient thread. I'm having similar issues with the Digitizer. I can establish a serial port connection with the Polhemus Patriot device. However, when I try to digitise a location, I get:

Error reading data point. Try again.
If the problem persists, reset the serial connection. 

This is followed by a non-sensical string of characters.

I also noticed that the names of the locations in the montage are not displayed correctly. I'm using the biosemi64 10-10 montage. The names of the channels appear as non-sensical strings, too.

Software versions:
Brainstorm: latest (April 2022)
Matlab: R2019b

If anyone experienced similar issues and managed to resolve them, I'd be extremely grateful for some suggestions!

@ebock Any suggestion?

Did you follow the Troubleshooting in the tutorial?

  1. From the Digitize->File->Edit settings (Figure 7), confirm the information in 's' matches your settings
  2. Confirm the information in 's' matches your COM port settings of your computer (this info is in the Device Manager)
  3. Press the button of the stylus, then execute s = instrfind() again. You should see that there are bytes available (94 bytes for Fastrak, 120 bytes for Patriot).

If you do not get #3, then you have communication issues. Check that the device is configured correctly.

https://neuroimage.usc.edu/brainstorm/Tutorials/TutDigitize#Troubleshooting

@joebathelt23 Did you fix this?

No, unfortunately, there is still an issue. I do get data through with s=instrfind(), but not in the GUI. I'll create a screencast when I have access to the lab. Thank you for your help!

I managed to get the Polhemus device to communicate with Digitize now. It worked after I uninstalled and reinstalled the driver for the serial port via the Windows device manager. However, the EEG montage still looks strange. The channel names appear in strange characters (see screenshot below).

I loaded the montage from brainstorm3 > defaults > eeg > NotAligned and tried all versions of the channel_BioSemi_64 montage. The 10-10 version is the one I need.

Is that not the correct file to use?

Sorry, I realise now that these montages are not in the right format for Digitize. I created my own plain text file with channel names now, as described on the Digitize tutorial page (https://neuroimage.usc.edu/brainstorm/Tutorials/TutDigitize). It's all working smoothly now. Thank you for your help!

Hi I had a similar problem in which I got the error: "Error reading data point. Try again." and then a strange line with the received information.

After several hours of checking the communication and possible solutions, I found out that the Fastrak was not sending the data in ASCII. To enable this mode it just needed to send an 'F' when initializing the connection. So I added this line "fprintf(SerialConnection,'%s','F');" in the file panel_digitize.m after the line that set the units to cm "fprintf(SerialConnection,'%s','u');"

I hope this helps!

image

@ebock Is this reasonable to add this line, or do you think it can cause other problems?

@asoler My concern is that this digitizer code has been working for a long time for Fastrak devices. If you need this extra line in your specific case, it probably means that you are using a different type of hardware than what was used to write this function.
Maybe we need to add an extra test before sending this F character, maybe checking the version of the hardware? or control this with a checkbox in the GUI?

Could someone with a Polhemus Fastrak device check this?