IWR6843: Adding lua external modules to extend the automation
Part Number: IWR6843
I have been exploring ways to read the output of the console after triggering data capture. I would specifically like to capture the "Frame Ended" string output as indicated below so that I can trigger another process from within my automation lua script. The problem is this response arrives at the console output asynchronously and not in response to a specific lua command.
[16:56:22] [RadarAPI]: Frame Ended
[16:56:22] Frame End async event received!
I can see the above output on the output console but I cannot access that output from within my automation lua script.
I spent quite a bit of time trying to redirect the console output to a file that I could process in my script but that did not work. For some reason, redirecting the stdout to a file does not help at this instance.
To recap, following is the top level functionality I am trying to achieve:
1 - Trigger collection of N radar frames using the automation script.
2 - Wait until the console output displays "[RadarAPI]: Frame Ended" (indicating N frames have been collected)
3 - Automation script detects the "[RadarAPI]: Frame Ended" on the console then triggers another post-processing task from within the same lua script.
At the moment, my automation script executes step 1, after which I have to manually intervene to bridge the gap after the N frames are captured.
If you have any suggestions on achieving the above, that will be of great help.
In the LUA script you could toggle frame start as shown below
if (0 == ar1.StartFrame()) then
WriteToLog("Frame Start Success\n", "green")
WriteToLog("Frame Start Failed\n", "red")
This indicates if it fails or succeeded. Since you know the frame period you then set a delay for that time frame and continue
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 Charles Oladimeji:
Thank you for your suggestion. That will work I think.
However, just out of curiosity, is there a guidance from TI on how to redirect the stdout to a file? It will be good to know this to log the full notification messages to a file as well. (I am not well-versed in lua as I haven't been using it much)
In reply to Cagri Tanriover:
We don't have a documented process for this at this time, But I can help with any other questions you may have.
Thanks for your message.
I have implemented the solution based on the delay insertion suggestion. After a few tests and timing tweaks, it seems to do the job for me. Therefore, I have no further related questions on this at the moment. Thank you for your help.
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.