Getting going

Discussion in 'Module Connector (MC)' started by Daniel Robinson, Jul 27, 2018.

  1. Daniel Robinson

    Daniel Robinson New Member

    Hey im rather new to python and im trying to use it to get the raw data from the x4m200 sensor to display in real time using module connector however I have no idea how to get started, i've run setup.py from the python36-win64 folder and that went ok but when I try to run anything it comes up with errors when trying to find the required packages and there is no documentation I can find to help.

    Thanks.

    upload_2018-7-27_12-4-54.png
     
  2. NSANGOU CHOUAIBOU

    NSANGOU CHOUAIBOU Active Member

    Hi Daniel Robinson,
    If all required packages are not correctly installed your python codes will never run properly ! Launch Anaconda, open Anaconda prompt (Anaconda console) and execute the command :
    conda list
    All installed packages in environment, included python version will be displayed ! Now you can check if you have all you need for your Module Connector python example codes.
    B.R
     
    Last edited: Jul 31, 2018
    Aksel Johnsby likes this.
  3. Daniel Robinson

    Daniel Robinson New Member

    I have pymoduleconnector what are the other modules I need?
     
  4. Aksel Johnsby

    Aksel Johnsby Moderator Staff Member

  5. Daniel Robinson

    Daniel Robinson New Member

    Moved question to moduleconnector for windows discussion.
     

    Attached Files:

    Last edited: Jul 30, 2018
  6. Daniel Robinson

    Daniel Robinson New Member

    Hey got it working now but can't seem to set the sensor mode, any suggestions? upload_2018-7-30_17-33-13.png
     

    Attached Files:

  7. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Daniel, please use examples designed for X4M200, not X2M200.
     
  8. Daniel Robinson

    Daniel Robinson New Member

    I'm trying to write the raw data from the x4m200 module in to a format that other programs could use, being able to write in to a csv and have it as plain text would be useful is this possible when only recording the baseband AP and without using the file types that write to a csv already?
     
  9. Aksel Johnsby

    Aksel Johnsby Moderator Staff Member

  10. Daniel Robinson

    Daniel Robinson New Member

    Cheers that helped a lot, another thing sometimes when I try to run something for the module it has trouble when it first tries to reset it giving this error

    Traceback (most recent call last):
    File "<pyshell#3>", line 1, in <module>
    simple_xep_plot('COM3')
    File "C:\Users\Danny\Desktop\ModuleConnector-win32_win64-1.5.3\python36-win32\pymoduleconnector\examples\XEP_X4M200_X4M300_plot_record_playback_radar_raw_data.py", line 60, in simple_xep_plot
    reset(device_name)
    File "C:\Users\Danny\Desktop\ModuleConnector-win32_win64-1.5.3\python36-win32\pymoduleconnector\examples\XEP_X4M200_X4M300_plot_record_playback_radar_raw_data.py", line 35, in reset
    mc = pymoduleconnector.ModuleConnector(device_name)
    File "C:\Users\Danny\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pymoduleconnector-1.5.3-py3.6.egg\pymoduleconnector\moduleconnector.py", line 73, in __init__
    super(ModuleConnector, self).__init__(device_name, log_level)
    File "C:\Users\Danny\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pymoduleconnector-1.5.3-py3.6.egg\pymoduleconnector\moduleconnectorwrapper\__init__.py", line 3930, in __init__
    this = _moduleconnectorwrapper.new_PythonModuleConnector(*args)
    RuntimeError: Unable to set serial device parameters


    If I unplug and plug it back in to the computer it works for a few executions before throwing it again, it only means that I will always need to be present in case the error throws but still.

    Any suggestions?
     
  11. Daniel Robinson

    Daniel Robinson New Member

    Fixed the error my code skipped over the section that set FPS to 0 again
     
    Charlie Shao likes this.