Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Thoughtstream USB Raw Data Format

  1. #1

    Question Thoughtstream USB Raw Data Format

    Hello,

    I've searched through the past threads regarding the raw data format from the throughstream RS-232 and the USB versions. I was wondering if the USB data format is still the same as the older RS-232 setup?

    ie:

    9 Bytes total
    Byte
    1 Header
    2 Header
    3 Device Code Value
    4 Relaxation value (255, all red; 0, all green)
    5 & 6 Current 12/14 bit (rs232/usb respectively) ADC value recorded
    7 Status of Thoughtstream
    8 & 9 12/14 bit ADC value of the starting probe resistance set at the beginning of the session.

    I don't seem to be getting a consistent 9 bytes, but rather something like 15 or 16 bytes.
    This is based on the assumption that Bytes 1 and 2 are still the "header" values which have a value of "0". But to confuse the interpretation, there are a lot of file separator bytes (Decimal value "28"). Any clarification would be greatly appreciated.

    Thanks,
    Vinc.

  2. #2
    Join Date
    Apr 2006
    Location
    Calgary, Alberta, Canada
    Posts
    4,115
    Blog Entries
    3

    Default Re: Thoughtsteram USB Raw Data Format

    Hello Vinc;

    The RS-232 version of the ThoughtStream had a different format than the USB version. The data in the USB version has a higher resolution and a different sampling rate.

    Here is an example of a few seconds of raw data from the TS USB (in Hex):

    A3-5B-08-22-CA-04-01-F6
    A3-5B-08-22-CA-04-01-F6
    A3-5B-08-22-CB-04-01-F7
    A3-5B-08-22-CB-04-01-F7
    A3-5B-08-22-CC-04-01-F8
    A3-5B-08-22-CD-04-01-F9
    A3-5B-08-22-D0-04-01-FC
    A3-5B-08-22-D5-04-02-01
    A3-5B-08-22-D8-04-02-04
    A3-5B-08-22-DC-04-02-08
    A3-5B-08-22-E0-04-02-0C
    A3-5B-08-22-E5-04-02-11
    A3-5B-08-22-E9-04-02-15
    A3-5B-08-22-EF-04-02-1B
    A3-5B-08-22-F2-04-02-1E
    A3-5B-08-22-F4-04-02-20
    A3-5B-08-22-F5-04-02-21
    A3-5B-08-22-F8-04-02-24
    A3-5B-08-22-F8-04-02-24
    A3-5B-08-22-F7-04-02-23
    A3-5B-08-22-F7-04-02-23
    A3-5B-08-22-F7-04-02-23
    A3-5B-08-22-F7-04-02-23
    A3-5B-08-22-F7-04-02-23

    I am getting 8 bytes, not 9. I don't have any current documentation, but others here have figured out the format and will hopefully reply.
    -Andy.

    Hey, if someone makes a good post, don't forget to click at the bottom of their post to add to their reputation!

  3. #3
    Join Date
    Apr 2011
    Location
    Tripping the Light Fantastic
    Posts
    1,326
    Blog Entries
    29

    Default Re: Thoughtsteram USB Raw Data Format

    There are some differences in the formats.
    The main thing is the baud rate.
    TS USB uses 19200 and TS RS232 uses 4800.
    There is also a difference in the precision of the reading as noted 12 vs 14bit.
    The USB also updates more often.
    One more thing is that there is additional status values (which you have noted above) in the RS232 that are not in the USB. The docs above refer to RS232.

    I am attaching a PDF file that defines the TS USB format.

    I suspect that your garbage info may be due to incorrect port settings... probably baud?

    The hardest part of the TS format is that there is no delimiter. You must track the 'header' byte identifiers and then chunk out the 8 bytes in reference to that.

    Hope this helps, ask if more info is needed.
    Scott
    Attached Files Attached Files
    Last edited by neuroasis; 08-03-2014 at 05:11 AM.
    If you know something I don't, speak up! If maybe I know something you don't, ask away!

  4. #4
    Join Date
    Apr 2011
    Location
    Tripping the Light Fantastic
    Posts
    1,326
    Blog Entries
    29

    Default Re: Thoughtsteram USB Raw Data Format

    Right also RS232 has 9 bytes and USB has 8 bytes.
    If you know something I don't, speak up! If maybe I know something you don't, ask away!

  5. #5
    Join Date
    Apr 2006
    Location
    Calgary, Alberta, Canada
    Posts
    4,115
    Blog Entries
    3

    Default Re: Thoughtsteram USB Raw Data Format

    Quote Originally Posted by neuroasis View Post
    The hardest part of the TS format is that there is no delimiter. You must track the 'header' byte identifiers and then chunk out the 8 bytes in reference to that.
    Depends on the Serial Port Library that you use.
    In my case, using the .NET Serial Port functions, the DataReceived event only happens when a complete block of 8 bytes has been sent.
    -Andy.

    Hey, if someone makes a good post, don't forget to click at the bottom of their post to add to their reputation!

  6. #6
    Join Date
    Apr 2011
    Location
    Tripping the Light Fantastic
    Posts
    1,326
    Blog Entries
    29

    Default Re: Thoughtsteram USB Raw Data Format

    However, you have to determine whether to truncate bytes if you start somewhere in the middle of a packet. The ThoughtStream just starts machine gunning data at you.
    If you know something I don't, speak up! If maybe I know something you don't, ask away!

  7. #7
    Join Date
    Apr 2006
    Location
    Calgary, Alberta, Canada
    Posts
    4,115
    Blog Entries
    3

    Default Re: Thoughtsteram USB Raw Data Format

    Quote Originally Posted by neuroasis View Post
    However, you have to determine whether to truncate bytes if you start somewhere in the middle of a packet. The ThoughtStream just starts machine gunning data at you.
    Not with the .NET library, but with other libraries YMMV.
    -Andy.

    Hey, if someone makes a good post, don't forget to click at the bottom of their post to add to their reputation!

  8. #8
    Join Date
    Apr 2011
    Location
    Tripping the Light Fantastic
    Posts
    1,326
    Blog Entries
    29

    Default Re: Thoughtsteram USB Raw Data Format

    So you have a working app then I guess?
    If you know something I don't, speak up! If maybe I know something you don't, ask away!

  9. #9
    Join Date
    Apr 2006
    Location
    Calgary, Alberta, Canada
    Posts
    4,115
    Blog Entries
    3

    Default Re: Thoughtsteram USB Raw Data Format

    Quote Originally Posted by neuroasis View Post
    So you have a working app then I guess?
    Lol. Not as such, no. Just a simple data reader.
    -Andy.

    Hey, if someone makes a good post, don't forget to click at the bottom of their post to add to their reputation!

  10. #10
    Join Date
    Apr 2006
    Location
    Calgary, Alberta, Canada
    Posts
    4,115
    Blog Entries
    3

    Default Re: Thoughtsteram USB Raw Data Format

    Did you ever try that python-based software?
    -Andy.

    Hey, if someone makes a good post, don't forget to click at the bottom of their post to add to their reputation!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Read data from ThoughtStream RS232 via USB
    By strahek in forum Thoughtstream
    Replies: 3
    Last Post: 01-23-2015, 11:20 AM
  2. PC not detecting data from TS
    By Pfiffig in forum Thoughtstream
    Replies: 3
    Last Post: 12-14-2013, 04:25 PM
  3. Replies: 13
    Last Post: 01-30-2013, 03:04 PM
  4. Reading data in USB Interface software
    By actionace in forum Thoughtstream
    Replies: 4
    Last Post: 09-16-2012, 05:17 AM
  5. TS interface software does not display any data
    By dbhavik in forum Thoughtstream
    Replies: 6
    Last Post: 01-26-2010, 02:27 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •