I want to get the raw data from x2m200

Discussion in 'X2 & X4 SoC' started by shim, Mar 6, 2017.

  1. shim

    shim New Member

    Hi my name is shim

    and now I'm finding the way to get the raw data from x2m200 on realtime.

    I installed matlab, visual studio, atmel studio 7 and have PIC24 MCU(using mplab).

    and I know the x2m200 has 16 pin and 3,4 pin are tx, rx

    Can I communicate with this pin and configurate the X2 setting? And how's the 1st pin voltage? 2.8v?
    and if I give the 2.8V the board fully operation?

    I download the X2 data sheet and XeThru Serial Protocol Rev.F from your web site

    but I'm not sure this protocol is for X2 chip or ATSAM4E.

    And that protocol is for ATSAM4E, then I can commucate with ATSAM4E and configure the X2 setting?

    if not How can I get the raw data from x2m200?

    If you have matlab code or som atmel studio code please teach me where I can download it.

    thank you for red these long question.

    best regards,

  2. Ole-Johan

    Ole-Johan New Member

    shim likes this.
  3. shim

    shim New Member


    thank you for reply my question.

    As your recommand I download the moduleconnector and using matlab I try to connect with x2m200

    I unzip the file and I found some file and folder
    I have matlab so I open the folder matlab -> +ModuleConnector -> @X2M200 -> X2M200.m

    and I run the m file but there occurs the error...

    >> ModuleConnector.X2M200(mc)
    the error says 'mc' is not defined function or variable( I'm not sure it's correct message because I installed korean version matlab so the error massage print as korean)

    Do you know how to solve this problem?


    best regards,

  4. Ole-Johan

    Ole-Johan New Member

    The X2M200.m file is the interface file itself. Try looking in matlab/examples folder for inspiration. You could start with test_BasicRadarClassX4.m and modify that to work with X2M200 interface methods.
  5. shim

    shim New Member

    Hi johan

    I try to run test_BasicRadarClassX4.m and got some error message

    I think it's similar with previous question that sweta ask

    the error message is here

    입력 파일을 전처리하지 못했습니다.
    (Can't preprocess the input file ?)

    전처리기의 출력은 matlab_wrapper.h
    (output of preprocessing is matlab_wrapper.h ?)

    f:\dean\circuit\relative_doc\x2m200\moduleconnector\include\matlab_recording_api.h(4) : fatal error C1083: Cannot open include file:
    'inttypes.h': No such file or directory

    error occur : ModuleConnector.Library/loadlib (line 33)
    [notfound,warnings] =

    error occur : ModuleConnector.Library (line 25)

    error occur : test_BasicRadarClassX4 (line 11)
    Lib = ModuleConnector.Library;

    what is the problem?

    please reply this

    thank you

    best regards.

    Last edited: Apr 5, 2017
  6. shim

    shim New Member

    FYI I'm using matlab R2015a(64X)
  7. Alireza

    Alireza New Member

    Hi Dear Johan .
    I want to link the X2M200 with MATLAB and get raw data .according to your suggestion that run test_BasicRadarClassX4.m, After Adding library path to MATLAB path (by Run the addpath ('directory') and savepath command in MATLAB) and also add library file to ... MATLAB/lib folder, Run the test_bBasicRadarClassX4 but there occurs some errors like ....

    ModuleConnector requires pre-loading of the dynamically linked library.
    Warning: The following error was caught while executing 'ModuleConnector.ModuleConnector' class destructor:

    Struct contents reference from a non-struct array object.

    > In BasicRadarClassX4/open (line 82)

    In test_BasicRadarClassX4 (line 24)

    Error using ModuleConnector.ModuleConnector (line 70)

    Cannot find library libModuleConnector64

    Error in BasicRadarClassX4/open (line 82)

    r.mc = ModuleConnector.ModuleConnector(r.COM,r.debugLvl);

    Error in test_BasicRadarClassX4 (line 24)


    How to fixed these errors??
    How to modified the cod for X2M200 ? Which part of the code should be changed to modified cod for X2M200?

    thank you

    best regards.

    Alireza Nakhostin
  8. Burak Ciceksoy

    Burak Ciceksoy New Member

    I used the command;

    >> LIB = ModuleConnector.Library;

    I get this error;

    Error using loadlibrary (line 422)
    Failed to preprocess the input file.
    Output from preprocessor is:matlab_wrapper.h
    c:\users\burak\desktop\moduleconnector-win32_win64-1.2.2\include\matlab_recording_api.h(4) : fatal
    error C1083: Cannot open include file: 'inttypes.h': No such file or directory

    Error in ModuleConnector.Library/loadlib (line 32)
    [notfound,warnings] =

    Error in ModuleConnector.Library (line 24)