This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1642BOOST: Collecting Raw ADC Data using MATLAB

Part Number: AWR1642BOOST

I am trying to collect the Raw ADC Data using MATLAB instead of the Radar Studio. Is there an easy to understand method to do it?

I have gone through the "Controlling mmWave Studio from Matlab" section in the user guide of mmWave Studio GUI. But I am not sure how it is working. I have created the two scripts and saved them in the location of RtttNetClientAPI.dll. Next, typed RSTD.NetStart() in the LUA window of Radar Studio and finally, ran the script Init_RSTD_Connection. I don't get any error nor any response. The Matlab is just busy since then. DO I need to go something? As in after doing this process, do I have to do the configuration setup in Matlab and then so the Frame Trigger as done in the normal case?

Many Thanks

 

  • There is a bug in the released version of mmWaveStudio that currently prevents the RSTD.NetStart() command from taking effect.

    You will need to replace the mmWaveStudio.exe.config file with the version in this thread (there is a one-word change needed in the original config file):
    e2e.ti.com/.../2627526

    Additionally, you may need to edit the path in the RSTD_Interface_Example.m to point to the correct RtttNetClientAPI.dll file on your system.

    Best Regards,
    Anand
  • Dear Anand,
    Does this mean that I have to copy paste the file in the thread you mentioned to my Radar Studio folder? And the path for my RtttNetClientAPI.dll is the same as that mentioned in the user guide. Is it okay? And is this the correct dll file you are mentioning?
  • Yes, you have to unzip the file and copy the .config file to the mentioned location, replacing an existing file there.

    Yes, the path is the same as in the user guide. This should be fine.

    Best Regards,
    Anand
  • Tuanks,  let me try doing it...

  • Hey Anand,

    I firstly pasted the following command in Radar Studio LUA Shell: >RSTD.NetStart()
    And got thefollowing response in LUA Shell: "ans=0"

    The output Window shows the following commands:
    [17:10:20] [RadarAPI]: Starting Matlab Engine..
    [17:13:49] [RadarAPI]: Matlab Engine Started!
    [17:14:03] [RadarAPI]: ar1.LoadSettings('C:\Users\MR ACER\AppData\Roaming\RSTD\ar1gui.ini')
    [17:14:05] TESTING = false
    [17:14:05]
    [17:14:05] ***Script completed successfully.***
    [17:15:17] RstdNet: Port 2777: Listening..

    So I reckon everything is successful here.

    Next I have run the Matlab script. The script is running but Matlab goes to busy.
    I just wanted to confirm what will happen after the script runs? Do i have to do something on Radar Studio now?

    Many Thanks.
  • Can you kindly also confirm that afterchanging the configuration file, will the Radar Studio function independently as well like it was running previously? Without any MATLAB commands?
  • After running the script in Matlab, I get the following outputs:

    In the Radar Studio, I get the following output:
    [19:04:44] RstdNet: Port 2777: Client 127.0.0.1:49930 - Connected
    [19:04:46] Running script from MATLAB

    And in the Matlab, I get the following output:
    >> RSTD_Interface_Example
    Adding RSTD Assembly
    Initializing RSTD client
    Connecting to RSTD client
    Sending test message to RSTD
    Test message success

    What should I do next?
  • From the messages you posted above, it looks like Matlab is able to successfully talk to RadarStudio.

    You can now use Matlab to send LUA commands to RadarStudio.

    See lines 40-47 in Init_RSTD_Connection.m for an example of sending a single Lua Command. Basically, you construct the Lua command as a string in Matlab and pass it to the RtttNetClientAPI.RtttNetClient.SendCommand API. Also see commented lines 12-15 in RSTD_Interface_Example.m for an example on how to get RadarStudio to run an external Lua Script.

    Yes, RadarStudio will continue to function independently of the Matlab commands. You can control it directly from the RadarStudio GUI, or the RadarStudio LUA shell or from Matlab.
  • Thanks Anand for the reply.

    Firstly, what exactly are the LUA commands/ LUA shell. So as per your reply, I understand that using these scripts, we can control the configuration parameters of the Radar Studio through Matlab, and perform all the post-processing in Radar Studio like before, it's just that we are setting the parameters in Matlab.

    Am I right?

    Many Thanks.

  • Yes, For every GUI button click in RadarStudio, the corresponding LUA command gets printed in the "Output" window in RadarStudio. For example, when you press the set button in the profile section of the SensorConfig tab, you will see a call to ar1.ProfileConfig() .

    These LUA commands can be directly entered in the "Lua Shell" window, or can be put into a lua script and called at one shot.

    These commands can also be called from external programs like Matlab using the procedure above.