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
My goal is to understand the exact way to control mmwave stdio via external matlab script (to configure the chirp configurations and automate raw data capture and user customized post processing with DCA1000/IWRxxx environment).
I`m working through this e2e, and I eventually have reached the following log on output console of mmwave studio:
[12:20:43] [RadarAPI]: Starting Matlab Engine..[12:21:04] [RadarAPI]: Matlab Engine Started![12:21:12] [RadarAPI]: ar1.LoadSettings('C:\Users\139432\AppData\Roaming\RSTD\ar1gui.ini')[12:21:12] TESTING = false[12:21:12] [12:21:12] ***Script completed successfully.***[12:22:06] RstdNet: Port 2777: Listening..
The config file installation and *.m script deployment to C:\ti\mmwave_studio_01_00_00_00\mmWaveStudio\Clients\RtttNetClientController suggested on the shared e2e post seems ok.
So, what should i do for next ? Could you please kindly suggest ? Please note i`m new for mmwave and matlab scripting.
EDIT--The post has been tagged with AWR1642BOOST, but my target device is not AWR, but IWR.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Naoki Kawada:
Please click the "This resolved my issue" button on this post if it answers your question.
In reply to Jitendra Gupta:
Thanks for your reply.
I just invoked the following command on octave command line after RSTD.NetStart() has been executed on mmwave studio lua shell and saw the following error:
Adding RSTD Assembly
error: 'NET' undefined near line 9 column 21
error: called from
Init_RSTD_Connection at line 9 column 19
RSTD_Interface_Example at line 6 column 11
It seems like i have encountered the error at NET in the script. RSTD_Interface_Example.m looks like this:
function ErrStatus = Init_RSTD_Connection(RSTD_DLL_Path)
%This script establishes the connection with Radarstudio software
% Type RSTD.NetStart() in Radarstudio Luashell before running the script. This would open port 2777
% Returns 30000 if no error.
if (strcmp(which('RtttNetClientAPI.RtttNetClient.IsConnected'),'')) %First time the code is run after opening MATLAB
disp('Adding RSTD Assembly');
RSTD_Assembly = NET.addAssembly(RSTD_DLL_Path);
disp('RSTD Assembly not loaded correctly. Check DLL path');
ErrStatus = -10;
Init_RSTD_Connection = 1;
elseif ~RtttNetClientAPI.RtttNetClient.IsConnected() %Not the first time but port is diconnected
% Init will reset the value of Isconnected. Hence Isconnected should be checked before Init
% However, Isconnected returns null for the 1st time after opening MATLAB (since init was never called before)
Init_RSTD_Connection = 1;
Init_RSTD_Connection = 0;
disp('Initializing RSTD client');
ErrStatus = RtttNetClientAPI.RtttNetClient.Init();
if (ErrStatus ~= 0)
disp('Unable to initialize NetClient DLL');
disp('Connecting to RSTD client');
ErrStatus = RtttNetClientAPI.RtttNetClient.Connect('127.0.0.1',2777);
if (ErrStatus ~= 0)
disp('Unable to connect to Radarstudio');
disp('Reopen port in Radarstudio. Type RSTD.NetClose() followed by RSTD.NetStart()')
pause(1);%Wait for 1sec. NOT a MUST have.
disp('Sending test message to RSTD');
Lua_String = 'WriteToLog("Running script from MATLAB\n", "green")';
ErrStatus = RtttNetClientAPI.RtttNetClient.SendCommand(Lua_String);
if (ErrStatus ~= 30000)
disp('Radarstudio Connection Failed');
disp('Test message success');
Can you suggest ? Please note windows 10 (64bit) is running on my PC and it supports .NET Framework 4.7.2.
I`m still getting stuck at the following error on octave :
Could you please suggest ?
Here is a small example script that you can run in mmWave studio, we will also run the same commands in MatLab, just make sure that you are able to run these in mmWave studio.
-- ************** Lua Code Begins*******************
-- Reset controlar1.SOPControl(2)
-- SPI operationsar1.PowerOn(0, 1000, 0, 0)ar1.RfEnable()
-- ******************** end Lua code ******************** Following the instruction and sample code in the "mmwave_studio_user_guide.pdf" , in the chapter named "Controlling mmWaveStudio from Matlab" create the scripts "RSTD_Interface_Example.m" and "Init_RSTD_Connection.m". After you have ran the scripts "RSTD_Interface_Example.m" and "Init_RSTD_Connection.m", then you can begin passing all the above commands as MatLab strings, examples below.
% Matlab Code begins
RtttNetClientAPI.RtttNetClient.SendCommand("ar1.PowerOn(0, 1000, 0, 0)");
% MatLab code ends
Hope this was helpful.
In reply to Alex Rivera:
Hi Alex, Thank you for your help. Last Week, I had been able to capture raw data in matlab by initiating lua scripts from there. But still, the above example you provided would be helpful for other users. OK, another problem is still pending. Please note i`m using free evaluation version of matlab and it would be expired in 1 month. So If you have any trick to use .NET from free matlab-like tool, say octave, please let me know. Best Regards, NK
Unfortunately at this time there is only support for MatLab. That being said, if you are able to control mmWave studio through MatLab, I will consider the issue resolved.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.