Issue with Using ModuleConnector in MATLAB on Ubuntu 16.04

Discussion in 'Module Connector (MC)' started by Jared Schutt, Apr 24, 2018.

  1. Jared Schutt

    Jared Schutt New Member

    I'm having issues trying to use the ModuleConnector in MATLAB on Ubuntu 16.04. My team currently has a script in MATLAB that we are running to interface with the X4M300. Other members of our team have been able to get it work in a Windows environment.

    The problem I am running into, is that when we come to this line in the script:

    radar = BasicRadarClassX4(COM, FPS, dataType);

    I get the following error:
    Undefined function or variable 'BasicRadarClassX4'.


    In the script there is a section where we are calling addpath, and adding the location of the 'matlab', 'include' and 'lib' directories from the ModuleConnector directory:

    addpath('/path_to_module_connector/matlab/');
    addpath('/path_to_module_connector/include/');
    addpath('/path_to_module_connector/lib/');

    Then we are loading the Module Connector like this:
    Lib = ModuleConnector.Library

    Is there something else I need to do in order to load up the BasicRadarClassX4 component in Ubuntu?
     
  2. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Jared,
    Do you mean the same Matlab script works on Windows but not on Ubuntu?
    Could you check if the BasicRadarClassX4.m file is in the same folder of your script?
     
  3. Jared Schutt

    Jared Schutt New Member

    Yes. That seemed to be the problem. There was a miscommunication about the location of the library files, as soon as we put them in the same directory as the script, it was able to find the BasicRadarClassX4 component.

    Thanks.
     
    Charlie Shao likes this.