Knowledge Base
Welcome to OPAL-RT’s Knowledge Base
OPAL-RT offers a repository of support information for optimal use of its technology.
Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.
For optimal experience, use a desktop computer.
Reference Number: AA-01560// Views: AA-01560// Created: 2018-11-09 16:18:09// Last Updated: 2019-03-07 15:17:31 HowTo How To Generate C Code in MATLAB to Troubleshoot RT-LAB Compilation Errors How To Generate C Code in MATLAB to Troubleshoot RT-LAB Compilation Errors Note: This procedure is for MATLAB 2016B. It might vary for different versions of MATLAB. During compilation in RT-LAB, the Simulink model is first separated and then converted into C code. The steps below allow the user to perform the C code generation step directly in MATLAB instead of RT-LAB. This is intended to be used as a test to troubleshoot RT-LAB compilation errors by comparing the MATLAB results with those obtained in RT-LAB. Step 1: Make sure the model can be run offline. For more information, please refer to the KnowledgeBase article linked below. KnowledgeBase Article: How To Prepare an Existing Simulink Model for Real Time Execution with RT-LAB Step 2: Navigate to Simulation >> Model Configuration Parameters Step 3: Navigate to the Code Generation section Step 4: Click Browse... to configure the System target file Step 5: Select rtlab_rtmodel.tlc and click Apply and OK In the Configuration Parameters dialog, click Apply and OK Step 6: Click Build Model in the Simulink toolbar Step 7: Click View Diagnostics at the bottom of the Simulink window
In the Diagnostic Viewer, you should see the output shown below and the message "Build process completed successfully"
|