How to get raw baseband data in X2M200

Discussion in 'Respiration Sensor' started by vikas mehra, Apr 25, 2017.

  1. vikas mehra

    vikas mehra New Member

    Hello
    I am in possession of only X2M200 hardware and Matlab R2014b
    Earlier I have downloaded baseband amplitude example (X2M200_XeThru_Baseband_Amplitude_Example_AN-v22-20160610_1241) as per attachment. Now i am not able to see link in your website.
    My Question is
    1. Whenever i am recording raw data with new Xethru Explorer 2.3.1 and try to run file "testBasebandAmplitude.m" below error comes up. But same program running absolutely fine with prerecording "xethru_baseband_ap_20160523_143423.dat".
    I think recording data format mismatch in both *.dat files. However i have followed correct setting as given in pdf file.
    Following Error comes :

    Error using zeros
    Size inputs must be integers.

    Error in readBasebandFile (line 48)
    hdrMat = zeros(numFrames, NumHdrs);

    Error in testBasebandAmplitude (line 8)
    [hdrMat , FrameMat] = readBasebandFile( file );

    2. What is the method to get live raw data in matlab not a recorded one as point1? I am confused with module connector concept. Don't know how to use it. I am a beginner with Matlab. Pl tell easy way to record live data from X2M200 and matlab.

    Expecting Quick reply.

    Thanks
    Vikas Mehra
     

    Attached Files:

  2. Olav Liseth

    Olav Liseth Administrator Staff Member

    Hi vikas,

    1. There seems to be a change in the recorded file format, I have filed this as a bug and will post an update when we have a solution. The app note is still available: https://www.xethru.com/community/resources/x2m200-baseband-amplitude-example.63/

    2. The matlab wrapper for ModuleConnector has an X2M200 interface with example in the documentation, see this file:
    ModuleConnector-win32-1.1.5\matlab\+ModuleConnector\@X2M200\X2M200.m

    Check ModuleConnector matlab readme and documentation for how to use the library.

    Best,

    Olav
     
  3. vikas mehra

    vikas mehra New Member

    Hello Olav
    1. Thanks for reporting about bug.
    2. I have opened My X2M200 connected in COM17. I have changed all the directory as per Readme file but still not able to run code. Could you please tell What all changes to be done in code for COM17 port usage and it is still confusing for me.
     
  4. Olav Liseth

    Olav Liseth Administrator Staff Member

    Hi Vikas,

    Please try the following
    1. Save the attached .m script to the ModuleConnector-win32-1.1.5\matlab\examples folder
    2. Change the variable COMPORT to the actual comport (seen e.g. in the device manager)
    3. Run the script

    Olav
     

    Attached Files:

  5. Olav Liseth

    Olav Liseth Administrator Staff Member

    1. Please refer to the python example in Module Connector

    Code:
    > ModuleConnector-win32-1.1.5\python\pymoduleconnector\examples>python read_recording.py -f <PATH-TO-RECORDING>\xethru_recording_meta.dat
     
  6. Mo Frz

    Mo Frz New Member

    Hi,

    I have a similar issue with my X2M200. It appears that the raw amplitude/phase file does not match the supposed file format, and therefore I get a similar error message at line 48 of the readBasebandFile.m: "Size inputs must be integers."

    I have attached an example. Could anybody resolve this issue?

    Thanks
     
  7. R.Adam

    R.Adam New Member