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.
Hi,
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
GM: Constructor
GM: Wed Oct 28 19:10:32 2020
RSTD.Transmit("/Settings")
[19:10:33]
[19:10:33] ### Running Startup script: "C:\ti\mmwave_studio_02_01_01_00\mmWaveStudio\Scripts\Startup.lua" ###
[19:10:33] RSTD.SetAndTransmit ("/Settings/Scripter/Display DateTime" , "1")
[19:10:33] RSTD.SetAndTransmit ("/Settings/Scripter/DateTime Format" , "HH:mm:ss")
[19:10:33] Scripter ignored: Attempt to UnBuild() again or before Build.
[19:10:33] RSTD.SetVar ("/Settings/Clients/Client 0/Dll" , "C:\\ti\\mmwave_studio_02_01_01_00\\mmWaveStudio\\Clients\\\\LabClient.dll")
[19:10:33] RSTD.SetVar ("/Settings/Clients/Client 0/Use" , "TRUE")
[19:10:33] RSTD.SetVar ("/Settings/Clients/Client 1/Use" , "FALSE")
[19:10:33] RSTD.SetVar ("/Settings/Clients/Client 2/Use" , "FALSE")
[19:10:33] RSTD.SetVar ("/Settings/Clients/Client 3/Use" , "FALSE")
[19:10:33] RSTD.SetVar ("/Settings/Clients/Client 4/Use" , "FALSE")
[19:10:33] RSTD.SetVar ("/Settings/AL Client/AL Dll" , "C:\\ti\\mmwave_studio_02_01_01_00\\mmWaveStudio\\RunTime\\SAL.dll")
[19:10:33] RSTD.SetVar ("/Settings/Clients/Client 0/GuiDll" , "")
[19:10:33] RSTD.SetVar ("/Settings/AutoUpdate/Enabled" , "TRUE")
[19:10:33] RSTD.SetVar ("/Settings/AutoUpdate/Interval" , "1")
[19:10:33] RSTD.SetVar ("/Settings/Monitors/UpdateDisplay" , "TRUE")
[19:10:33] RSTD.SetVar ("/Settings/Monitors/OneClickStart" , "TRUE")
[19:10:33] RSTD.SetVar ("/Settings/Automation/Automation Mode" , "false")
[19:10:33] RSTD.Transmit("/")
[19:10:33] RSTD.SaveSettings(): Settings saved to "C:\Users\Administrator\AppData\Roaming\RSTD\config.xml"
[19:10:33] RSTD.Build()
[19:10:33] RSTD.SaveSettings(): Settings saved to "C:\Users\Administrator\AppData\Roaming\RSTD\config.xml"
[19:10:33] RSTD.Transmit("/")
[19:10:33] RSTD.AL_Build()
[19:10:33] RSTD.AL_LoadXml()
[19:10:33] RSTD.Transmit("/")
[19:10:33] RSTD.AL_Init()
[19:10:33] RSTD.Clients_Build()
[19:10:33] GM: Init
[19:10:33] GM: Loaded 'C:\ti\mmwave_studio_02_01_01_00\mmWaveStudio\Clients\\LabClient.dll'
[19:10:33] GM: 1 Guest (s) init
[19:10:33] GM: 1 Module(s) init
[19:10:33] GM: 2 Tab (s) init
[19:10:33] RSTD.Client_LoadXml()
[19:10:33] [RadarAPI]: ar1.selectRadarMode(0)
[19:10:33] [RadarAPI]: Status: Passed
[19:10:33] Matlab Runtime Engine is installed
[19:10:33] [RadarAPI]: Starting Matlab Engine..
[19:10:37] [RadarAPI]: Matlab Engine Started!
[19:10:39] [RadarAPI]: ar1.selectCascadeMode(0)
[19:10:39] [RadarAPI]: Status: Passed
[19:10:39] [RadarAPI]: ar1.LoadSettings('C:\Users\Administrator\AppData\Roaming\RSTD\ar1gui.ini')
[19:10:39] TESTING = false
[19:10:39] RstdNet: Port 2777: Listening..
[19:10:39]
[19:10:39] ***Script completed successfully.***
[19:10:49] RstdNet: Port 2777: Client 127.0.0.1:52661 - Connected
[19:10:50] Running script from MATLAB
[19:10:53] Running script from MATLAB
[19:15:04] Running script from MATLAB
[19:15:19] Running script from MATLAB
I run RSTD_Interface_Example and Init_RSTD_Connection with MATLAB, and the output results are as follows.
>> RSTD_Interface_Example
Initializing RSTD client
Connecting to RSTD client
Sending test message to RSTD
Test message success
>> Init_RSTD_Connection
Sending test message to RSTD
Test message success
ans =
int32
30000
It seems that MATLAB and mmwave studio have established a connection, but when I execute“ RtttNetClientAPI.RtttNetClient.SendCommand("ar1.SOPControl(2)");”, hit output results are as follows, and there is an error. How should I solve it?
Method' SendCommand' with matching signature was not found for class' RtttNetClientAPI
Hello User,
For cascade devices, we always use Matlab to configure mmWave Studio. There are some example codes in the below directory:
C:\ti\mmwave_studio_02_01_xx_xx\mmWaveStudio\MatlabExamples\4chip_cascade_TxBF_example
We though this might be helpful for you. Please take a look.
Regards,
Ishita
This folder is not in the directory, and can you explain to me the reason of this mistake and how to solve it?
I found this folder, but it seems that none of them can work. Can you recommend a file that can be run directly after running the first two scripts?
This is the code I used in MATLAB before
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.SOPControl(2)");
RtttNetClientAPI.RtttNetClient.SendCommand("ar1.Connect(6,921600,1000)");
RtttNetClientAPI.RtttNetClient.SendCommand("ar1.DownloadBSSFw("C:\\ti\\mmwave_studio_<version>\\rf_eval_firmware\\radarss\\xwr16xx_radarss.bin")");
RtttNetClientAPI.RtttNetClient.SendCommand("ar1.DownloadMSSFw("C:\\ti\\mmwave_studio_<version>\\rf_eval_firmware\\masterss\\xwr16xx_masterss.bin")");
RtttNetClientAPI.RtttNetClient.SendCommand("ar1.PowerOn(0, 1000, 0, 0)");
RtttNetClientAPI.RtttNetClient.SendCommand("ar1.RfEnable()");
% MatLab code ends
Hello User,
Are you getting any error when you run the above commands? I just want to understand what happens when you issue these?
Regards,
Ishita